diff --git a/ChangeLog b/ChangeLog index bceedc4a..011d20b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4246,6 +4246,7 @@ v0.33.19 26-Oct-2001 When adding seenby entries, the zone number is copied from the previous adress just like with the net numbers. This is for old style tic files, they were not full 3d. + Fixes for Sparc systems. lang: Changed language prompts 6, 71, 429. @@ -4275,6 +4276,7 @@ v0.33.19 26-Oct-2001 When an new area is made available, the database is created. The AREADEF lines in golded.inc now contain the aka to use instead of a dot. + Fixes for Sparc systems. mbsebbs: Added menu 317, change FS editor shortcut keys to (Emacs/ @@ -4331,11 +4333,13 @@ v0.33.19 26-Oct-2001 should not disable this if you restrict access to some file areas if you want to test the users age. Also the age in the users record is invalid. + Fixes for Sparc systems. mbnewusr: New program, run by user bbs. This is only to register a new bbs user. Should be started by the bbs account. Ask Date of Birth now only is asked if set in configuration. + Fixes for Sparc systems. mbcico: Removed IEMSI support since mbsebbs doesn't support it @@ -4351,6 +4355,10 @@ v0.33.19 26-Oct-2001 The hydra driver now sends 8.3 mangled filenames and long filenames as specified in the specs. Corrected the location of the modem lockfile on FreeBSD. + Fixes for Sparc systems. + + mbout: + Fixes for Sparc systems. mbtask: Changed to handle the External Doors flag in the lastcaller @@ -4365,9 +4373,11 @@ v0.33.19 26-Oct-2001 information. When lastcaller info is scrolling, the lines are first proper erased. + Fixes for Sparc systems. mbmsg: Corrected header in logfile for pack function. + Fixes for Sparc systems. import: Removed users import, could not work anymore. @@ -4388,6 +4398,7 @@ v0.33.19 26-Oct-2001 rescan option. Implemented long filenames with hatch. Now uses ticfile key- word Fullname for the long filename. + Fixes for Sparc systems. mbfile: During check the file databases are reset to filemode 0660. @@ -4415,10 +4426,21 @@ v0.33.19 26-Oct-2001 at the same time. Implemented "mbfile delete" and "mbfile undelete" commands. The command mbfile check now removes obsolete file databases. + Fixes for Sparc systems. mball: The index function is now obsolete, this is added to mbfile. You may need to adjust your scripts that call "mball index". + Fixes for Sparc systems. + + mbaff: + Fixes for Sparc systems. + + mbindex: + Fixes for Sparc systems. + + mbdiff: + Fixes for Sparc systems. mbfbgen: Obsolete and removed from the distribution. The function is diff --git a/lib/gmtoffset.c b/lib/gmtoffset.c index 5d81fe55..74afcb31 100644 --- a/lib/gmtoffset.c +++ b/lib/gmtoffset.c @@ -1,12 +1,11 @@ /***************************************************************************** * - * File ..................: gmtoffset.c + * $Id$ * Purpose ...............: Calculate UTC offset - * Last modification date : 18-Dec-1999 * Source ................: Eugene G. Crosser's ifmail package. * ***************************************************************************** - * Copyright (C) 1997-1999 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -47,7 +46,7 @@ long gmt_offset(time_t now) long offset; if (!now) - time(&now); + now = time(NULL); ptm = *localtime(&now); /* diff --git a/lib/packet.c b/lib/packet.c index 3b79307c..d614ccb0 100644 --- a/lib/packet.c +++ b/lib/packet.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: packet.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 06-Jun-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -113,7 +112,7 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor) Syslog('P', "creating new .pkt"); memset(&buffer, 0, sizeof(buffer)); - time(&t); + t = time(NULL); ptm = localtime(&t); if (ptm->tm_sec > 59) ptm->tm_sec = 59; diff --git a/lib/parsedate.c b/lib/parsedate.c index 28effcef..ad833299 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -1,4 +1,6 @@ -/* $Revision$ +/* $Id$ +** +** $ Revision: 1.2 $ ** ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -1427,7 +1429,7 @@ int GetTimeInfo(TIMEINFO *Now) Now->usec = tv.tv_usec; #else /* Can't check for -1 since that might be a time, I guess. */ - (void)time(&Now->time); + Now->time = time(NULL); Now->usec = 0; #endif /* defined(HAVE_GETTIMEOFDAY) */ diff --git a/lib/pktname.c b/lib/pktname.c index 5cadc666..0f96d4c5 100644 --- a/lib/pktname.c +++ b/lib/pktname.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: pktname.c + * $Id$ * Purpose ...............: BinkleyTerm outbound naming - * Last modification date : 23-Dec-2000 * ***************************************************************************** - * Copyright (C) 1997-2000 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -228,7 +227,7 @@ char *dayname(void) time_t tt; struct tm *ptm; - (void)time(&tt); + tt = time(NULL); ptm = localtime(&tt); sprintf(buf, "%s", dow[ptm->tm_wday]); @@ -245,7 +244,7 @@ char *arcname(faddr *addr, unsigned short Zone, int ARCmailCompat) struct tm *ptm; faddr *bestaka; - (void)time(&tt); + tt = time(NULL); ptm = localtime(&tt); ext = dow[ptm->tm_wday]; diff --git a/lib/rfcdate.c b/lib/rfcdate.c index c12eabdf..4504eb4a 100644 --- a/lib/rfcdate.c +++ b/lib/rfcdate.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: rfcdate.c + * $Id$ * Purpose ...............: Date utilities - * Last modification date : 30-Apr-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -149,7 +148,7 @@ char *rfcdate(time_t now) long offset; if (!now) - time(&now); + now = time(NULL); ptm = *localtime(&now); /* diff --git a/lib/strutil.c b/lib/strutil.c index 9d85aba4..32285610 100644 --- a/lib/strutil.c +++ b/lib/strutil.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: strutil.c + * $Id$ * Purpose ...............: Common string functions - * Last modification date : 18-Mar-2000 * ***************************************************************************** - * Copyright (C) 1997-2000 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -264,7 +263,7 @@ char *GetLocalHM() static char gettime[15]; time_t T_Now; - time(&T_Now); + T_Now = time(NULL); sprintf(gettime,"%s", StrTimeHM(T_Now)); return(gettime); } @@ -280,7 +279,7 @@ char *GetLocalHMS() static char gettime[15]; time_t T_Now; - time(&T_Now); + T_Now = time(NULL); sprintf(gettime,"%s", StrTimeHMS(T_Now)); return(gettime); } @@ -328,30 +327,10 @@ char *GetDateDMY() struct tm *l_d; time_t T_Now; - time(&T_Now); + T_Now = time(NULL); l_d = localtime(&T_Now); sprintf(tdate, "%02d-%02d-%04d", l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900); return(tdate); } - -/* - * Returns current date in DDMMYYY - */ -/* -char *tDate1() -{ - static char tdate1[15]; - struct tm *l_d; - time_t T_Now; - - time(&T_Now); - l_d = localtime(&T_Now); - sprintf(tdate1, "%02d%02d%02d", - l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900); - - return(tdate1); -} - -*/ diff --git a/mbcico/binkp.c b/mbcico/binkp.c index bb91993b..e72300b0 100644 --- a/mbcico/binkp.c +++ b/mbcico/binkp.c @@ -314,7 +314,7 @@ int binkp_expired(void) { time_t now; - (void)time(&now); + now = time(NULL); if (now >= Timer) Syslog('b', "Timer expired"); return (now >= Timer); @@ -331,7 +331,7 @@ void b_banner(int originate) binkp_send_control(MM_NUL,"ZYZ %s", CFG.sysop_name); binkp_send_control(MM_NUL,"LOC %s", CFG.location); binkp_send_control(MM_NUL,"NDL %s", CFG.Flags); - time(&t); + t = time(NULL); binkp_send_control(MM_NUL,"TIME %s", rfcdate(t)); binkp_send_control(MM_NUL,"VER mbcico/%s binkp/1.0", VERSION); if (strlen(CFG.Phone)) @@ -949,7 +949,7 @@ int binkp_batch(file_list *to_send) Syslog('+', "Binkp: size %lu bytes, dated %s", (unsigned long)tmp->size, date(tmp->date)); binkp_send_control(MM_FILE, "%s %lu %ld %ld", MBSE_SS(tmp->remote), (unsigned long)tmp->size, (long)tmp->date, (unsigned long)tmp->offset); - (void)time(&txstarttime); + txstarttime = time(NULL); tmp->state = Sending; cursend = tmp; TxState = TxTryRead; @@ -997,7 +997,7 @@ int binkp_batch(file_list *to_send) /* * calculate time needed and bytes transferred */ - (void)time(&txendtime); + txendtime = time(NULL); txstarttime = txendtime - txstarttime; if (txstarttime <= 0L) txstarttime = 1L; @@ -1116,7 +1116,7 @@ int binkp_batch(file_list *to_send) binkp_send_control(MM_GOT, "%s %ld %ld", rname, rsize, rtime); closefile(TRUE); rxpos = rxpos - rxbytes; - (void)time(&rxendtime); + rxendtime = time(NULL); if ((rxstarttime = rxendtime - rxstarttime) == 0L) rxstarttime = 1L; Syslog('+', "Binkp: received OK %lu bytes in %s (%ld cps)", @@ -1143,7 +1143,7 @@ int binkp_batch(file_list *to_send) case RxAcceptFile: Syslog('+', "Binkp: receive file \"%s\" date %s size %ld offset %ld", rname, date(rtime), rsize, roffs); rxfp = openfile(rname, rtime, rsize, &rxbytes, resync); - (void)time(&rxstarttime); + rxstarttime = time(NULL); rxpos = 0; if (!diskfree(CFG.freespace)) { diff --git a/mbcico/callstat.c b/mbcico/callstat.c index 83bf5755..b9ddf4bd 100644 --- a/mbcico/callstat.c +++ b/mbcico/callstat.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/callstat.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 05-Aug-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -69,7 +68,7 @@ void putstatus(faddr *addr, int incr, int sts) else cst->tryno += incr; cst->trystat = sts; - (void)time(&cst->trytime); + cst->trytime = time(NULL); fwrite(cst, sizeof(callstat), 1, fp); fclose(fp); if (cst->tryno >= 30) diff --git a/mbcico/dial.c b/mbcico/dial.c index 45ca130e..8b400a96 100644 --- a/mbcico/dial.c +++ b/mbcico/dial.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/dial.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 08-Jun-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -120,7 +119,7 @@ int hangup() chat(modem.hangup, CFG.timeoutreset, NULL); if (carrier) { - time(&c_end); + c_end = time(NULL); online += (c_end - c_start); Syslog('+', "Connection time %s", t_elapsed(c_start, c_end)); carrier = FALSE; diff --git a/mbcico/emsidat.c b/mbcico/emsidat.c index e50a7cb5..3f5ade45 100644 --- a/mbcico/emsidat.c +++ b/mbcico/emsidat.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/emsidat.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 24-Jun-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -223,7 +222,7 @@ char *mkemsidat(int caller) p=xstrcat(p,(char *)"]["); p=xstrcat(p,flags?emsiencode(flags):(char *)""); p=xstrcat(p,(char *)"]}{TRX#}{["); - (void)time(&tt); + tt = time(NULL); sprintf(cbuf,"%08lX",mtime2sl(tt)); p=xstrcat(p,cbuf); p=xstrcat(p,(char *)"]}{TZUTC}{["); diff --git a/mbcico/hydra.c b/mbcico/hydra.c index 02a20bae..1b31de57 100644 --- a/mbcico/hydra.c +++ b/mbcico/hydra.c @@ -838,7 +838,7 @@ int hydra_batch(int role, file_list *to_send) Syslog('+', "Hydra: send \"%s\" as \"%s\"", MBSE_SS(to_send->local), MBSE_SS(to_send->remote)); Syslog('+', "Hydra: size %lu bytes, dated %s",(unsigned long)txstat.st_size, date(txstat.st_mtime)); - (void) time(&txstarttime); + txstarttime = time(NULL); } txstate = HTX_ToFName; @@ -1115,7 +1115,7 @@ int hydra_batch(int role, file_list *to_send) /* * calculate time needed and bytes transferred */ - (void) time(&txendtime); + txendtime = time(NULL); txstarttime = txendtime - txstarttime; if (txstarttime <= 0L) @@ -1324,7 +1324,7 @@ int hydra_batch(int role, file_list *to_send) Name, filesize, date(timestamp)); rxfp = openfile(Name, timestamp, filesize, &rxpos, resync); - (void) time(&rxstarttime); + rxstarttime = time(NULL); /* check for error opening file */ if (rxfp) { @@ -1414,7 +1414,7 @@ int hydra_batch(int role, file_list *to_send) /* * calculate time and CPU usage needed */ - (void) time(&rxendtime); + rxendtime = time(NULL); if (rxpos >= 0) { rxfp = NULL; diff --git a/mbcico/lutil.c b/mbcico/lutil.c index b78f6b74..979d1c65 100644 --- a/mbcico/lutil.c +++ b/mbcico/lutil.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbcico/lutil.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 12-Mar-2000 * ***************************************************************************** - * Copyright (C) 1997-2000 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -65,9 +64,9 @@ char *date(time_t t) static char buf[20]; if (t) - now=t; + now = t; else - time(&now); + now = time(NULL); ptm=*localtime(&now); sprintf(buf,"%s %02d %02d:%02d:%02d", mon[ptm.tm_mon],ptm.tm_mday, diff --git a/mbcico/mbcico.c b/mbcico/mbcico.c index 8a12e351..ce7fb320 100644 --- a/mbcico/mbcico.c +++ b/mbcico/mbcico.c @@ -136,7 +136,7 @@ void die(int onsig) if (gotfiles) CreateSema((char *)"mailin"); - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBCICO finished in %s", t_elapsed(t_start, t_end)); free_mem(); if (envptr) @@ -190,9 +190,7 @@ int main(int argc, char *argv[]) InitNode(); InitFidonet(); TermInit(1); - time(&t_start); - time(&c_start); - time(&c_end); + t_start = c_start = c_end = time(NULL); InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, CFG.cico_loglevel, CFG.error_log); Syslog(' ', " "); diff --git a/mbcico/mbout.c b/mbcico/mbout.c index d52a297a..fd44b205 100644 --- a/mbcico/mbout.c +++ b/mbcico/mbout.c @@ -105,7 +105,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBOUT finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) { @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) InitNode(); InitFidonet(); TermInit(1); - time(&t_start); + t_start = time(NULL); umask(002); /* diff --git a/mbcico/outstat.c b/mbcico/outstat.c index 50c6507e..be3689fc 100644 --- a/mbcico/outstat.c +++ b/mbcico/outstat.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbcico/outstat.c + * $Id$ * Purpose ...............: Show mail outbound status - * Last modification date : 23-Dec-2000 * ***************************************************************************** - * Copyright (C) 1997-2000 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -94,7 +93,7 @@ int outstat() if ((tmp->flavors) & F_FREQ ) flstr[4]='R'; if ((tmp->flavors) & F_POLL ) flstr[5]='P'; - (void)time(&age); + age = time(NULL); age -= tmp->time; sprintf(temp, "%s %8lu %s %s", flstr, (long)tmp->size, str_time(age), ascfnode(&(tmp->addr), 0x1f)); @@ -142,7 +141,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname) (*tmp)->addr.point = addr->point; (*tmp)->addr.domain = xstrcpy(addr->domain); (*tmp)->flavors = 0; - time(&((*tmp)->time)); + (*tmp)->time = time(NULL); (*tmp)->size = 0L; } @@ -159,7 +158,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname) if (stat(fname,&st) != 0) { WriteError("$Can't stat %s", fname); st.st_size = 0L; - (void)time(&st.st_mtime); + st.st_mtime = time(NULL); } /* @@ -191,12 +190,12 @@ int each(faddr *addr, char flavor, int isflo, char *fname) * is losing mail or files. */ st.st_size = 0L; - (void)time(&st.st_mtime); + st.st_mtime = time(NULL); } } else { if (stat(p, &st) != 0) { st.st_size = 0L; - (void)time(&st.st_mtime); + st.st_mtime = time(NULL); } } } diff --git a/mbcico/tcpproto.c b/mbcico/tcpproto.c index 1b4f372b..433716c8 100644 --- a/mbcico/tcpproto.c +++ b/mbcico/tcpproto.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/tcpproto.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 07-Aug-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -198,7 +197,7 @@ static int sendtfile(char *ln, char *rn) if (st.st_size > 0) { Syslog('+', "TCP send \"%s\" as \"%s\"", MBSE_SS(ln), MBSE_SS(rn)); Syslog('+', "TCP size %lu bytes, dated %s", (unsigned long)st.st_size, date(st.st_mtime)); - (void)time(&startime); + startime = time(NULL); } else { Syslog('+', "File \"%s\" has 0 size, skiped",ln); return 0; @@ -240,7 +239,7 @@ static int sendtfile(char *ln, char *rn) } if (rc == 0 && strncmp(rxbuf,"FOK",3) == 0) { - (void)time(&endtime); + endtime = time(NULL); if ((startime=endtime-startime) == 0) startime = 1; @@ -275,7 +274,7 @@ static int closeit(int success) rc = closefile(success); fout = NULL; sbytes = rxbytes - sbytes; - (void)time(&endtime); + endtime = time(NULL); if ((startime = endtime - startime) == 0L) startime = 1L; @@ -312,7 +311,7 @@ static int receivefile(char *fn, time_t ft, off_t fs) Syslog('+', "TCP receive \"%s\" (%lu bytes) dated %s",fn,fs,date(ft)); strcpy(txbuf,"ROK"); fout = openfile(fn, ft, fs, &rxbytes, resync); - (void)time(&startime); + startime = time(NULL); sbytes = rxbytes; if (fs == rxbytes) { diff --git a/mbcico/ttyio.c b/mbcico/ttyio.c index df9d2afe..9568128a 100644 --- a/mbcico/ttyio.c +++ b/mbcico/ttyio.c @@ -1,11 +1,10 @@ /***************************************************************************** * - * File ..................: mbcico/ttyio.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 23-Dec-2000 * ***************************************************************************** - * Copyright (C) 1997-2000 + * Copyright (C) 1997-2001 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -127,7 +126,7 @@ int tty_expired(int tno) if (timer[tno] == (time_t) 0) return 0; - (void)time(&now); + now = time(NULL); Syslog('T', "ttyio: expired(%d) now=%lu,timer=%lu,return %s", tno,now,timer[tno],(now >= timer[tno])?"yes":"no"); return (now >= timer[tno]); @@ -170,7 +169,7 @@ static int tty_read(char *buf, int size, int tot) return 0; tty_status = 0; - (void)time(&now); + now = time(NULL); timeout = (time_t)300; /* maximum of 5 minutes */ for (i = 0; i < TIMERNO_TX; i++) { @@ -325,7 +324,7 @@ int tty_waitputget(int tot) struct timeval seltimer; tty_status=0; - (void)time(&now); + now = time(NULL); timeout=(time_t)300; /* maximum of 5 minutes */ for (i = 0; i < NUMTIMERS; i++) { @@ -508,7 +507,7 @@ int tty_putget(char **obuf, int *osize, char **ibuf, int *isize) struct timeval seltimer; tty_status = 0; - (void)time(&now); + now = time(NULL); timeout = (time_t)300; /* maximum of 5 minutes */ for (i = 0; i < NUMTIMERS; i++) { diff --git a/mbcico/xmrecv.c b/mbcico/xmrecv.c index 3c19f7ff..d7ddfa5b 100644 --- a/mbcico/xmrecv.c +++ b/mbcico/xmrecv.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/xmrecv.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 04-Jan-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -89,7 +88,7 @@ int closeit(int success) off_t endofs; endofs = recv_blk*XMBLKSIZ; - (void)time(&etm); + etm = time(NULL); if (etm == stm) etm++; Syslog('+', "Xmodem %s %lu bytes in %s (%lu cps)", success?"received":"dropped after", @@ -147,7 +146,7 @@ SM_EDECL int goteot = FALSE; Syslog('x', "xmrecv INIT"); - (void)time(&stm); + stm = time(NULL); recv_blk=-1L; memset(&tmpfname, 0, sizeof(tmpfname)); diff --git a/mbcico/xmsend.c b/mbcico/xmsend.c index a2d87974..425f5f0d 100644 --- a/mbcico/xmsend.c +++ b/mbcico/xmsend.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/xmsend.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 04-Jan-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -123,7 +122,7 @@ SM_EDECL fl.l_len=0L; Syslog('x', "xmsend INIT"); - (void)time(&stm); + stm = time(NULL); /* if we got 'C' than hopefully remote is sealink capable... */ @@ -236,7 +235,7 @@ SM_STATE(sendblk) } else if (ackd_blk < last_blk) { SM_PROCEED(waitack); } else { - (void)time(&etm); + etm = time(NULL); if (etm == stm) etm++; Syslog('+', "sent %lu bytes in %s (%lu cps)", (unsigned long)st.st_size,str_time(etm-stm), diff --git a/mbcico/zmrecv.c b/mbcico/zmrecv.c index 43dfa6ed..df909d9f 100644 --- a/mbcico/zmrecv.c +++ b/mbcico/zmrecv.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/zmrecv.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 10-Aug-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -442,7 +441,7 @@ int closeit(int success) rc = closefile(success); fout = NULL; sbytes = rxbytes - sbytes; - (void)time(&etime); + etime = time(NULL); if ((startime = etime - startime) == 0L) startime = 1L; Syslog('+', "Zmodem: %s %lu bytes in %s (%ld cps)", success?"OK":"dropped after", @@ -515,7 +514,7 @@ int procheader(char *Name) Syslog('+', "Zmodem: \"%s\" %ld bytes, %s mode %o", Name, Bytesleft, ctt, Filemode); fout = openfile(Name,Modtime,Bytesleft,&(long)(rxbytes),resync); - (void)time(&startime); + startime = time(NULL); sbytes = rxbytes; if (Bytesleft == rxbytes) { diff --git a/mbcico/zmsend.c b/mbcico/zmsend.c index 97f35e83..91eaf698 100644 --- a/mbcico/zmsend.c +++ b/mbcico/zmsend.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbcico/zmsend.c + * $Id$ * Purpose ...............: Fidonet mailer - * Last modification date : 07-Aug-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -212,7 +211,7 @@ static int sendzfile(char *ln, char *rn) Syslog('+', "Zmodem: send \"%s\" as \"%s\"", MBSE_SS(ln), MBSE_SS(rn)); Syslog('+', "Zmodem: size %lu bytes, dated %s", (unsigned long)st.st_size, date(st.st_mtime)); - (void)time(&startime); + startime = time(NULL); sprintf(txbuf,"%s %lu %lo %o 0 0 0", rn,(unsigned long)st.st_size, st.st_mtime+(st.st_mtime%2), st.st_mode); bufl = strlen(txbuf); @@ -224,7 +223,7 @@ static int sendzfile(char *ln, char *rn) Syslog('+', "Zmodem: remote skipped %s, is OK",MBSE_SS(ln)); return 0; } else if ((rc == OK) && (st.st_size - skipsize)) { - (void)time(&endtime); + endtime = time(NULL); if ((startime = endtime - startime) == 0) startime = 1; Syslog('+', "Zmodem: OK %lu bytes in %s (%ld cps)", (unsigned long)st.st_size - skipsize, str_time(startime), diff --git a/mbfido/addpkt.c b/mbfido/addpkt.c index 99ed58d3..003f4936 100644 --- a/mbfido/addpkt.c +++ b/mbfido/addpkt.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbfido/addpkt.c + * $Id$ * Purpose ...............: Add mail to .pkt - * Last modification date : 31-Jul-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -68,7 +67,7 @@ FILE *CreatePkt(char *Queue, fidoaddr Orig, fidoaddr Dest, char *Extension) * Write .PKT header, see FSC-0039 rev. 4 */ memset(&buffer, 0, sizeof(buffer)); - time(&Now); + Now = time(NULL); Tm = localtime(&Now); if (Tm->tm_sec > 59) Tm->tm_sec = 59; diff --git a/mbfido/aliasdb.c b/mbfido/aliasdb.c index 935ead89..2d0e32f6 100644 --- a/mbfido/aliasdb.c +++ b/mbfido/aliasdb.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbfido/aliasdb.c + * $Id$ * Purpose ...............: Alias Database - * Last modification date : 11-May-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -137,7 +136,7 @@ int registrate(char *freename, char *address) /* * Already present, update date/time. */ - time(&key.dtime); + key.dtime = time(NULL); fseek(afp, - sizeof(key), SEEK_CUR); fwrite(&key, sizeof(key), 1, afp); close_alias_db(); @@ -147,7 +146,7 @@ int registrate(char *freename, char *address) sprintf(key.freename, "%s", buf); sprintf(key.address, "%s", address); - time(&key.dtime); + key.dtime = time(NULL); if (fwrite(&key, sizeof(key), 1, afp) != 1) { WriteError("$Cannot store: \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address)); diff --git a/mbfido/ftn2rfc.c b/mbfido/ftn2rfc.c index 0a535d96..448b71ce 100644 --- a/mbfido/ftn2rfc.c +++ b/mbfido/ftn2rfc.c @@ -1,9 +1,7 @@ /***************************************************************************** * - * File ..................: mbfido/ftn2rfc.c + * $Id$ * Purpose ...............: Gate netmail->email or echomail->news - * Last modification date : 29-Oct-2001 - * Last modification date : 30-Oct-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -900,7 +898,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl } } else { /* if newsmode */ - time(&now); + now = time(NULL); if (CFG.EmailMode == E_NOISP) { /* * Probaly not needed as messages for systems without ISP never get here. @@ -1083,13 +1081,14 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl /* * Restamp future postings */ - if(mdate > time(&now)) { + now = time(NULL); + if (mdate > now) { Syslog('+', "Future posting: %s", rfcdate(mdate)); sprintf(temp,"Date: %s\n", rfcdate(now)); Send(newsmode, temp); sprintf(temp,"X-Origin-Date: %s\n", rfcdate(mdate)); Send(newsmode, temp); - } else if((mdate < time(&now)-14*24*60*60) && (mdate > time(&now)-RESTAMP_OLD_POSTINGS*24*60*60)) { + } else if ((mdate < now-14*24*60*60) && (mdate > time(&now)-RESTAMP_OLD_POSTINGS*24*60*60)) { /* * Restamp old postings */ diff --git a/mbfido/mbaff.c b/mbfido/mbaff.c index 09b3285b..2588e83b 100644 --- a/mbfido/mbaff.c +++ b/mbfido/mbaff.c @@ -74,7 +74,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBAFF finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) { @@ -98,7 +98,7 @@ int main(int argc, char **argv) #endif InitConfig(); TermInit(1); - time(&t_start); + t_start = time(NULL); t = localtime(&t_start); Diw = t->tm_wday; Miy = t->tm_mon; diff --git a/mbfido/mbdiff.c b/mbfido/mbdiff.c index be6047c9..07ac0ee9 100644 --- a/mbfido/mbdiff.c +++ b/mbfido/mbdiff.c @@ -98,7 +98,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBDIFF finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) { @@ -126,7 +126,7 @@ int main(int argc, char **argv) #endif InitConfig(); TermInit(1); - time(&t_start); + t_start = time(NULL); umask(002); /* diff --git a/mbfido/mbfido.c b/mbfido/mbfido.c index 05899e4b..95bfb809 100644 --- a/mbfido/mbfido.c +++ b/mbfido/mbfido.c @@ -234,7 +234,7 @@ void die(int onsig) if (notify + areamgr + filemgr) Syslog('+', "Notify msgs [%4d] AreaMgr [%4d] FileMgr [%4d]", notify, areamgr, filemgr); - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBFIDO finished in %s", t_elapsed(t_start, t_end)); ulockunpack(); @@ -296,7 +296,7 @@ int main(int argc, char **argv) InitUser(); InitFidonet(); TermInit(1); - time(&t_start); + t_start = time(NULL); t = localtime(&t_start); Diw = t->tm_wday; Miy = t->tm_mon; diff --git a/mbfido/mbfile.c b/mbfido/mbfile.c index 3644378f..bb3ee00c 100644 --- a/mbfido/mbfile.c +++ b/mbfido/mbfile.c @@ -79,7 +79,7 @@ int main(int argc, char **argv) #endif InitConfig(); TermInit(1); - time(&t_start); + t_start = time(NULL); umask(002); /* diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index 2fee7fa5..398c9f05 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -91,7 +91,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBFILE finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) { diff --git a/mbfido/mbindex.c b/mbfido/mbindex.c index bd61d205..1fb94648 100644 --- a/mbfido/mbindex.c +++ b/mbfido/mbindex.c @@ -192,7 +192,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBINDEX finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) diff --git a/mbfido/mbmsg.c b/mbfido/mbmsg.c index 60b1c256..9d5b8fd5 100644 --- a/mbfido/mbmsg.c +++ b/mbfido/mbmsg.c @@ -92,7 +92,7 @@ int main(int argc, char **argv) InitConfig(); TermInit(1); oldmask = umask(007); - time(&t_start); + t_start = time(NULL); /* * Catch all signals we can, and ignore or catch them @@ -235,7 +235,7 @@ void die(int onsig) if (msg_tot || msg_del) Syslog('+', "Msgs [%5d] Deleted [%5d]", msg_tot, msg_del); - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBMSG finished in %s", t_elapsed(t_start, t_end)); umask(oldmask); diff --git a/mbfido/msgutil.c b/mbfido/msgutil.c index 0f3018f8..30f62c90 100644 --- a/mbfido/msgutil.c +++ b/mbfido/msgutil.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbaff/msgutil.c + * $Id$ * Purpose ...............: Announce new files and FileFind - * Last modification date : 21-Jan-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -91,7 +90,7 @@ void Msg_Pid(void) sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION); MsgText_Add2(temp); sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode)); - (void)time(&tt); + tt = time(NULL); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); MsgText_Add2(temp); free(temp); diff --git a/mbfido/post.c b/mbfido/post.c index b12db6d3..4c7cf617 100644 --- a/mbfido/post.c +++ b/mbfido/post.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbfido/post.c + * $Id$ * Purpose ...............: Post a message from a file. - * Last modification date : 20-Mar-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -117,7 +116,7 @@ void Post(char *To, long Area, char *Subj, char *File, char *Flavor) return; } - (void)time(&tt); + tt = time(NULL); t = localtime(&tt); Diw = t->tm_wday; Miy = t->tm_mon; diff --git a/mbfido/ptic.c b/mbfido/ptic.c index bfca2004..8e447267 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -84,7 +84,7 @@ int ProcessTic(fa_list *sbl) int BBS_Imp = FALSE, DidBanner = FALSE; - time(&Now); + Now = time(NULL); if (TIC.TicIn.PathError) { WriteError("Our Aka is in the path"); diff --git a/mbfido/storeecho.c b/mbfido/storeecho.c index 4557439d..558117bb 100644 --- a/mbfido/storeecho.c +++ b/mbfido/storeecho.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: tosser/storenet.c - * Purpose ...............: Import a netmail message - * Last modification date : 28-Jul-2001 + * $Id$ + * Purpose ...............: Import a echomail message * ***************************************************************************** * Copyright (C) 1997-2001 @@ -69,9 +68,9 @@ int storeecho(faddr *f, faddr *t, time_t mdate, int flags, char *subj, char *msg */ if (!bad && !dupe) { StatAdd(&msgs.Received, 1L); - time(&msgs.LastRcvd); + msgs.LastRcvd = time(NULL); StatAdd(&mgroup.MsgsRcvd, 1L); - time(&mgroup.LastDate); + mgroup.LastDate = time(NULL); UpdateMsgs(); } diff --git a/mbfido/storenet.c b/mbfido/storenet.c index e2cce9de..cceb8c63 100644 --- a/mbfido/storenet.c +++ b/mbfido/storenet.c @@ -66,7 +66,7 @@ int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgi if (SearchNetBoard(t->zone, t->net)) { StatAdd(&msgs.Received, 1L); - time(&msgs.LastRcvd); + msgs.LastRcvd = time(NULL); UpdateMsgs(); result = Msg_Open(msgs.Base); diff --git a/mbmon/common.c b/mbmon/common.c index 04732877..b41503c1 100644 --- a/mbmon/common.c +++ b/mbmon/common.c @@ -1,8 +1,7 @@ /***************************************************************************** * - * File ..................: mbmon/common.c + * $Id$ * Purpose ...............: Common utilities - * Last modification date : 10-Aug-2001 * ***************************************************************************** * Copyright (C) 1997-2001 @@ -603,7 +602,7 @@ long gmt_offset(time_t now) long offset; if (!now) - time(&now); + now = time(NULL); ptm = *localtime(&now); /* diff --git a/mbmon/mutil.c b/mbmon/mutil.c index ccb60693..a8d6f12d 100644 --- a/mbmon/mutil.c +++ b/mbmon/mutil.c @@ -372,7 +372,7 @@ void show_date(int fg, int bg, int y, int x) time_t now; char *p; - time(&now); + now = time(NULL); if (now != lasttime) { lasttime = now; set_color(LIGHTGREEN, BLUE); diff --git a/mbsebbs/bye.c b/mbsebbs/bye.c index ef8228cf..daea2870 100644 --- a/mbsebbs/bye.c +++ b/mbsebbs/bye.c @@ -100,7 +100,7 @@ void Good_Bye(int onsig) } } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBSEBBS finished in %s", t_elapsed(t_start, t_end)); /* diff --git a/mbsebbs/file.c b/mbsebbs/file.c index 274b4de7..b8cfb776 100644 --- a/mbsebbs/file.c +++ b/mbsebbs/file.c @@ -338,7 +338,7 @@ void Download(void) * Wait a while before download */ sleep(2); - time(&ElapstimeStart); + ElapstimeStart = time(NULL); temp = calloc(PATH_MAX, sizeof(char)); sprintf(temp, "%s ./tag/*", sProtDn); @@ -366,7 +366,7 @@ void Download(void) fflush(stdout); fflush(stdin); free(temp); - time(&ElapstimeFin); + ElapstimeFin = time(NULL); /* * Get time from Before Download and After Download to get @@ -414,7 +414,7 @@ void Download(void) } Size += file.Size; file.TimesDL++; - time(&file.LastDL); + file.LastDL = time(NULL); fseek(fp, - sizeof(file), SEEK_CUR); fwrite(&file, sizeof(file), 1, fp); fclose(fp); @@ -1117,7 +1117,7 @@ int Upload() fflush(stdout); fflush(stdin); sleep(2); - time(&ElapstimeStart); + ElapstimeStart = time(NULL); /* * Get the file(s). Set the Client/Server time to 2 hours. @@ -1139,7 +1139,7 @@ int Upload() printf("\n\n\n"); fflush(stdout); fflush(stdin); - time(&ElapstimeFin); + ElapstimeFin = time(NULL); /* * Get time from Before Upload and After Upload to get @@ -1287,7 +1287,7 @@ int DownloadDirect(char *Name, int Wait) * Wait a while before download */ sleep(2); - time(&ElapstimeStart); + ElapstimeStart = time(NULL); temp = calloc(PATH_MAX, sizeof(char)); sprintf(temp, "%s %s", sProtDn, symFrom); @@ -1315,7 +1315,7 @@ int DownloadDirect(char *Name, int Wait) fflush(stdout); fflush(stdin); free(temp); - time(&ElapstimeFin); + ElapstimeFin = time(NULL); /* * Get time from Before Download and After Download to get @@ -1656,7 +1656,7 @@ int Upload_Home() fflush(stdout); fflush(stdin); sleep(2); - time(&ElapstimeStart); + ElapstimeStart = time(NULL); /* * Get the file(s). Set the Client/Server time to 2 hours. @@ -1678,7 +1678,7 @@ int Upload_Home() printf("\n\n\n"); fflush(stdout); fflush(stdin); - time(&ElapstimeFin); + ElapstimeFin = time(NULL); /* * Get time from Before Upload and After Upload to get diff --git a/mbsebbs/funcs.c b/mbsebbs/funcs.c index 74993d4d..17bdf39f 100644 --- a/mbsebbs/funcs.c +++ b/mbsebbs/funcs.c @@ -340,7 +340,7 @@ char *GLCdateyy() static char GLcdateyy[15]; char ntime[15]; - time(&Time_Now); + Time_Now = time(NULL); l_date = localtime(&Time_Now); sprintf(GLcdateyy,"%02d-", diff --git a/mbsebbs/mball.c b/mbsebbs/mball.c index d7f2bdf8..7a90f7b2 100644 --- a/mbsebbs/mball.c +++ b/mbsebbs/mball.c @@ -91,7 +91,7 @@ void die(int onsig) WriteError("Terminated with error %d", onsig); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBALL finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) { @@ -138,7 +138,7 @@ int main(int argc, char **argv) InitConfig(); TermInit(1); - time(&t_start); + t_start = time(NULL); umask(000); /* diff --git a/mbsebbs/mbchat.c b/mbsebbs/mbchat.c index 1d4ef95a..5d1e1e94 100644 --- a/mbsebbs/mbchat.c +++ b/mbsebbs/mbchat.c @@ -245,7 +245,7 @@ char *ttime2() time_t Time_Now; static char Ttime2[9]; - time(&Time_Now); + Time_Now = time(NULL); l_date = localtime(&Time_Now); sprintf(Ttime2, "%02d:%02d", l_date->tm_hour,l_date->tm_min); diff --git a/mbsebbs/mbnewusr.c b/mbsebbs/mbnewusr.c index 80081599..fcfb80d4 100644 --- a/mbsebbs/mbnewusr.c +++ b/mbsebbs/mbnewusr.c @@ -97,12 +97,11 @@ int main(int argc, char **argv) /* * Set local time and statistic indexes. */ - time(&Time_Now); - time(&t_start); + Time_Now = t_start = time(NULL); l_date = localtime(&Time_Now); Diw = l_date->tm_wday; Miy = l_date->tm_mon; - time(<ime); + ltime = time(NULL); /* * Initialize this client with the server. We don't know diff --git a/mbsebbs/mbpasswd.c b/mbsebbs/mbpasswd.c index 944b5503..06abed63 100644 --- a/mbsebbs/mbpasswd.c +++ b/mbsebbs/mbpasswd.c @@ -376,7 +376,7 @@ static void check_password(const struct passwd *pw) exp_status = isexpired(pw); #endif - time(&now); + now = time(NULL); #ifdef SHADOW_PASSWORD /* diff --git a/mbsebbs/mbsebbs.c b/mbsebbs/mbsebbs.c index 52b4ec26..704a7e41 100644 --- a/mbsebbs/mbsebbs.c +++ b/mbsebbs/mbsebbs.c @@ -79,12 +79,11 @@ int main(int argc, char **argv) /* * Set local time and statistic indexes. */ - time(&Time_Now); - time(&t_start); + Time_Now = t_start = time(NULL); l_date = localtime(&Time_Now); Diw = l_date->tm_wday; Miy = l_date->tm_mon; - time(<ime); + ltime = time(NULL); /* * Initialize this client with the server. diff --git a/mbsebbs/mbstat.c b/mbsebbs/mbstat.c index a401c2c5..9fde990c 100644 --- a/mbsebbs/mbstat.c +++ b/mbsebbs/mbstat.c @@ -1,6 +1,6 @@ /***************************************************************************** * - * $id$ + * $Id$ * Purpose ...............: Change BBS status * ***************************************************************************** @@ -91,7 +91,7 @@ void die(int onsig) printf("\n"); } - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBSTAT finished in %s", t_elapsed(t_start, t_end)); ExitClient(onsig); @@ -114,7 +114,7 @@ int main(int argc, char **argv) #endif InitConfig(); TermInit(1); - time(&t_start); + t_start = time(NULL); /* * Catch or ignore signals diff --git a/mbsebbs/mbuser.c b/mbsebbs/mbuser.c index b69f0ff6..7834b818 100644 --- a/mbsebbs/mbuser.c +++ b/mbsebbs/mbuser.c @@ -61,7 +61,7 @@ int main(int argc, char **argv) Days = 0; Level = 0; - time(&t_start); + t_start = time(NULL); if (argc < 2) Help(); @@ -113,7 +113,7 @@ int main(int argc, char **argv) UserPack(Days, Level, pack); umask(oldmask); - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBUSER finished in %s", t_elapsed(t_start, t_end)); if (!do_quiet) diff --git a/mbsebbs/misc.c b/mbsebbs/misc.c index 57cd3553..3a930afc 100644 --- a/mbsebbs/misc.c +++ b/mbsebbs/misc.c @@ -93,7 +93,7 @@ int ChkFiles() WriteError("$ChkFiles: Can't create %s", sDataFile); else { memset((char *)&SYSINFO, 0, sizeof(SYSINFO)); - time(&Now); + Now = time(NULL); SYSINFO.StartDate = Now; rewind(pCallerLog); @@ -223,7 +223,7 @@ char *GLCdate() { static char GLcdate[15]; - time(&Time_Now); + Time_Now = time(NULL); l_date = localtime(&Time_Now); sprintf(GLcdate,"%02d-", l_date->tm_mday); diff --git a/mbsebbs/msgutil.c b/mbsebbs/msgutil.c index 1224f914..6a1a37a0 100644 --- a/mbsebbs/msgutil.c +++ b/mbsebbs/msgutil.c @@ -62,7 +62,7 @@ char *rfcdate(time_t now) long offset; if (!now) - time(&now); + now = time(NULL); ptm = *localtime(&now); /* @@ -229,7 +229,7 @@ void Add_Headkludges(faddr *dest, int IsReply) sprintf(temp, "\001PID: MBSE-BBS %s", VERSION); MsgText_Add2(temp); - (void)time(&tt); + tt = time(NULL); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); MsgText_Add2(temp); free(temp); diff --git a/mbsebbs/newuser.c b/mbsebbs/newuser.c index 36503377..0005619a 100644 --- a/mbsebbs/newuser.c +++ b/mbsebbs/newuser.c @@ -557,7 +557,7 @@ void Fast_Bye(int onsig) char *temp; time_t t_end; - time(&t_end); + t_end = time(NULL); Syslog(' ', "MBNEWUSR finished in %s", t_elapsed(t_start, t_end)); socket_shutdown(mypid); diff --git a/mbsebbs/offline.c b/mbsebbs/offline.c index 9ab241e2..1b1a794b 100644 --- a/mbsebbs/offline.c +++ b/mbsebbs/offline.c @@ -1113,7 +1113,7 @@ void OLR_Upload(void) fflush(stdout); fflush(stdin); sleep(2); - time(&ElapstimeStart); + ElapstimeStart = time(NULL); /* * Get the file @@ -1130,7 +1130,7 @@ void OLR_Upload(void) printf("\n"); fflush(stdout); fflush(stdin); - time(&ElapstimeFin); + ElapstimeFin = time(NULL); /* * Get the upload time. diff --git a/mbsebbs/salt.c b/mbsebbs/salt.c index ab09941d..2fdf6440 100644 --- a/mbsebbs/salt.c +++ b/mbsebbs/salt.c @@ -93,7 +93,7 @@ char *crypt_make_salt(void) static unsigned long x; static char result[3]; - time(&now); + now = time(NULL); x += now + getpid() + clock(); result[0] = i64c(((x >> 18) ^ (x >> 6)) & 077); result[1] = i64c(((x >> 12) ^ x) & 077); diff --git a/mbsebbs/timecheck.c b/mbsebbs/timecheck.c index b9e9acb6..49e3f7bb 100644 --- a/mbsebbs/timecheck.c +++ b/mbsebbs/timecheck.c @@ -83,7 +83,7 @@ void TimeCheck(void) time_t Now; int Elapsed; - time(&Now); + Now = time(NULL); /* * Update the global string for the menu prompt diff --git a/mbsebbs/timestats.c b/mbsebbs/timestats.c index 4183a84d..d08e06dc 100644 --- a/mbsebbs/timestats.c +++ b/mbsebbs/timestats.c @@ -45,7 +45,7 @@ void TimeStats() { char Logdate[15]; - time(&Time_Now); + Time_Now = time(NULL); l_date = localtime(&Time_Now); sprintf(Logdate,"%02d-%s %02d:%02d:%02d", l_date->tm_mday, GetMonth(l_date->tm_mon+1), l_date->tm_hour, l_date->tm_min, l_date->tm_sec); diff --git a/mbsebbs/user.c b/mbsebbs/user.c index 4dcfb492..7ad0b8b5 100644 --- a/mbsebbs/user.c +++ b/mbsebbs/user.c @@ -408,7 +408,7 @@ void user() Syslog('+', "User successfully logged into BBS"); Syslog('+', "Level %d (%s), %d mins. left, port %s", usrconfig.Security.level, LIMIT.Description, usrconfig.iTimeLeft, pTTY); - time(&Time2Go); + Time2Go = time(NULL); Time2Go += usrconfig.iTimeLeft * 60; iUserTimeLeft = exitinfo.iTimeLeft; diff --git a/mbsetup/m_fgroup.c b/mbsetup/m_fgroup.c index 97f6b838..25fd86a3 100644 --- a/mbsetup/m_fgroup.c +++ b/mbsetup/m_fgroup.c @@ -198,7 +198,7 @@ int AppendFGroup(void) sprintf(ffile, "%s/etc/fgroups.temp", getenv("MBSE_ROOT")); if ((fil = fopen(ffile, "a")) != NULL) { memset(&fgroup, 0, sizeof(fgroup)); - time(&fgroup.StartDate); + fgroup.StartDate = time(NULL); fgroup.DivideCost = TRUE; fwrite(&fgroup, sizeof(fgroup), 1, fil); fclose(fil); diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index abdd618d..a178bbfc 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -1672,7 +1672,7 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Machine type %s\n", utsbuf.machine); } fprintf(fp, " MBSE_ROOT %s\n", getenv("MBSE_ROOT")); - time(&now); + now = time(NULL); fprintf(fp, " Date created %s", ctime(&now)); addtoc(fp, toc, 1, 2, page, (char *)"System fidonet addresses"); diff --git a/mbsetup/m_mgroup.c b/mbsetup/m_mgroup.c index 7cf89cd1..6ff4d3b5 100644 --- a/mbsetup/m_mgroup.c +++ b/mbsetup/m_mgroup.c @@ -198,7 +198,7 @@ int AppendMGroup(void) sprintf(ffile, "%s/etc/mgroups.temp", getenv("MBSE_ROOT")); if ((fil = fopen(ffile, "a")) != NULL) { memset(&mgroup, 0, sizeof(mgroup)); - time(&mgroup.StartDate); + mgroup.StartDate = time(NULL); fwrite(&mgroup, sizeof(mgroup), 1, fil); fclose(fil); MGrpUpdated = 1; diff --git a/mbsetup/m_ol.c b/mbsetup/m_ol.c index b35fca4a..acec0bae 100644 --- a/mbsetup/m_ol.c +++ b/mbsetup/m_ol.c @@ -486,7 +486,7 @@ void ImportOneline(void) return; } - time(&Time); + Time = time(NULL); l_date = localtime(&Time); sprintf(buf, "%02d-%02d-%04d", l_date->tm_mday, l_date->tm_mon+1, l_date->tm_year+1900); diff --git a/mbsetup/screen.c b/mbsetup/screen.c index 1460e266..147b4f9a 100644 --- a/mbsetup/screen.c +++ b/mbsetup/screen.c @@ -94,7 +94,7 @@ void show_date(int fg, int bg, int y, int x) time_t now; char *p; - time(&now); + now = time(NULL); if (now != lasttime) { lasttime = now; set_color(LIGHTGREEN, BLUE);