*** subs.c.old Sun Aug 31 03:38:22 1997 --- subs.c Thu Feb 12 01:11:43 1998 *************** *** 14,20 **** Prototype void fdprintf(int fd, const char *ctl, ...); Prototype int ChangeUser(const char *user, short dochdir); Prototype void vlog(int level, int fd, const char *ctl, va_list va); ! Prototype int slog(char *buf, const char *ctl, va_list va, short useDate); Prototype char *strdup(const char *); void --- 14,20 ---- Prototype void fdprintf(int fd, const char *ctl, ...); Prototype int ChangeUser(const char *user, short dochdir); Prototype void vlog(int level, int fd, const char *ctl, va_list va); ! Prototype int slog(char *buf, const int, const char *ctl, va_list va, short useDate); Prototype char *strdup(const char *); void *************** *** 67,79 **** static short useDate = 1; if (level >= LogLevel) { ! write(fd, buf, n = slog(buf, ctl, va, useDate)); useDate = (n && buf[n-1] == '\n'); } } int ! slog(char *buf, const char *ctl, va_list va, short useDate) { time_t t = time(NULL); struct tm *tp = localtime(&t); --- 67,79 ---- static short useDate = 1; if (level >= LogLevel) { ! write(fd, buf, n = slog(buf, sizeof(buf), ctl, va, useDate)); useDate = (n && buf[n-1] == '\n'); } } int ! slog(char *buf, const int length, const char *ctl, va_list va, short useDate) { time_t t = time(NULL); struct tm *tp = localtime(&t); *************** *** 81,87 **** buf[0] = 0; if (useDate) strftime(buf, 128, "%d-%b-%y %H:%M ", tp); ! vsnprintf(buf + strlen(buf), sizeof(buf), ctl, va); return(strlen(buf)); } --- 81,87 ---- buf[0] = 0; if (useDate) strftime(buf, 128, "%d-%b-%y %H:%M ", tp); ! vsnprintf(buf + strlen(buf), length, ctl, va); return(strlen(buf)); }