4 * Command-line user list utility.
13 #if TIME_WITH_SYS_TIME
14 # include <sys/time.h>
18 # include <sys/time.h>
43 printf("%s\n",&buf[4]);
46 printf(" User Name Num L LastCall Calls Posts\n");
47 printf("------------------------- ----- - ---------- ----- -----\n");
48 while (serv_gets(buf), strcmp(buf,"000")) {
51 printf("%5ld %d ",extract_long(buf,2),
53 lc = extract_long(buf,3);
54 tmbuf = (struct tm *)localtime(&lc);
55 printf("%02d/%02d/%04d ",
58 (tmbuf->tm_year + 1900));
60 extract_long(buf,4),extract_long(buf,5));
66 int main(int argc, char **argv)
69 char hostbuf[SIZ], portbuf[SIZ];
71 attach_to_server(argc, argv, hostbuf, portbuf);
73 if ((buf[0]!='2')&&(strncmp(buf,"551",3))) {
74 fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);
88 * replacement strerror() for systems that don't have it
94 sprintf(buf,"errno = %d",e);