#include #include #include /* taken from Dale Schumacher's dLibs library */ static char timebuf[26]; static char *day[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; static char *month[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; #ifdef __GNUC__ /* * macro to produce two decimal digits of mval and write them * at position pointed by mptr - moves mptr to the next free position; * mval has to be in range 0-99, or banshee will get you */ #define _TWODIG(mptr,mval) \ { \ long _i = (long)(mval); \ __asm__ volatile(" extl %1; divu #10,%1; addb #48,%1; moveb %1,%0@+; swap %1; addb #48,%1; moveb %1,%0@+" \ : "=a"((long)mptr) \ : "d"(_i), "g"((unsigned short)mval), \ "0"(mptr)); \ } #else static char * two_dig(char *buf, unsigned short num) { unsigned int rem; rem = num % 10; *buf++ = '0' + (num / 10); *buf++ = '0' + rem; return buf; } #endif /* __GNUC__ */ char *asctime(time) register const struct tm *time; /* * Convert