/* Copyright (c) 1996, Ruslan R. Laishev (@RRL) */ #include #include #include #include "nntp_log.h" /* *-------------------------------------------------------------------------------- */ char *nntp_log_time (void) { time_t t; char *ta; time(&t); ta = ctime(&t); *(ta+strlen(ta)-1) = 0; return ta+4; /* Skip day of Week */ } /* *-------------------------------------------------------------------------------- */ int nntp_log_err (long stat) { if (stat & 0) { nntp_log(logw,(stdout,strerror(EVMSERR,stat))); return 0; } if (stat & 3) { nntp_log(logd,(stdout,strerror(EVMSERR,stat))); return 0; } if (stat & 4) { nntp_log(logs,(stdout,strerror(EVMSERR,stat))); return -1; } nntp_log(loge,(stdout,strerror(EVMSERR,stat))); return -1; }