Sparc systems fixes

This commit is contained in:
Michiel Broek 2001-12-23 16:44:18 +00:00
parent 2ce85589e4
commit a372efaea8
62 changed files with 170 additions and 193 deletions

View File

@ -4246,6 +4246,7 @@ v0.33.19 26-Oct-2001
When adding seenby entries, the zone number is copied from the When adding seenby entries, the zone number is copied from the
previous adress just like with the net numbers. This is for previous adress just like with the net numbers. This is for
old style tic files, they were not full 3d. old style tic files, they were not full 3d.
Fixes for Sparc systems.
lang: lang:
Changed language prompts 6, 71, 429. 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. When an new area is made available, the database is created.
The AREADEF lines in golded.inc now contain the aka to use The AREADEF lines in golded.inc now contain the aka to use
instead of a dot. instead of a dot.
Fixes for Sparc systems.
mbsebbs: mbsebbs:
Added menu 317, change FS editor shortcut keys to (Emacs/ 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 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 areas if you want to test the users age. Also the age in the
users record is invalid. users record is invalid.
Fixes for Sparc systems.
mbnewusr: mbnewusr:
New program, run by user bbs. This is only to register a new New program, run by user bbs. This is only to register a new
bbs user. Should be started by the bbs account. bbs user. Should be started by the bbs account.
Ask Date of Birth now only is asked if set in configuration. Ask Date of Birth now only is asked if set in configuration.
Fixes for Sparc systems.
mbcico: mbcico:
Removed IEMSI support since mbsebbs doesn't support it 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 The hydra driver now sends 8.3 mangled filenames and long
filenames as specified in the specs. filenames as specified in the specs.
Corrected the location of the modem lockfile on FreeBSD. Corrected the location of the modem lockfile on FreeBSD.
Fixes for Sparc systems.
mbout:
Fixes for Sparc systems.
mbtask: mbtask:
Changed to handle the External Doors flag in the lastcaller Changed to handle the External Doors flag in the lastcaller
@ -4365,9 +4373,11 @@ v0.33.19 26-Oct-2001
information. information.
When lastcaller info is scrolling, the lines are first proper When lastcaller info is scrolling, the lines are first proper
erased. erased.
Fixes for Sparc systems.
mbmsg: mbmsg:
Corrected header in logfile for pack function. Corrected header in logfile for pack function.
Fixes for Sparc systems.
import: import:
Removed users import, could not work anymore. Removed users import, could not work anymore.
@ -4388,6 +4398,7 @@ v0.33.19 26-Oct-2001
rescan option. rescan option.
Implemented long filenames with hatch. Now uses ticfile key- Implemented long filenames with hatch. Now uses ticfile key-
word Fullname for the long filename. word Fullname for the long filename.
Fixes for Sparc systems.
mbfile: mbfile:
During check the file databases are reset to filemode 0660. During check the file databases are reset to filemode 0660.
@ -4415,10 +4426,21 @@ v0.33.19 26-Oct-2001
at the same time. at the same time.
Implemented "mbfile delete" and "mbfile undelete" commands. Implemented "mbfile delete" and "mbfile undelete" commands.
The command mbfile check now removes obsolete file databases. The command mbfile check now removes obsolete file databases.
Fixes for Sparc systems.
mball: mball:
The index function is now obsolete, this is added to mbfile. The index function is now obsolete, this is added to mbfile.
You may need to adjust your scripts that call "mball index". 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: mbfbgen:
Obsolete and removed from the distribution. The function is Obsolete and removed from the distribution. The function is

View File

@ -1,12 +1,11 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: gmtoffset.c * $Id$
* Purpose ...............: Calculate UTC offset * Purpose ...............: Calculate UTC offset
* Last modification date : 18-Dec-1999
* Source ................: Eugene G. Crosser's ifmail package. * Source ................: Eugene G. Crosser's ifmail package.
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-1999 * Copyright (C) 1997-2001
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -47,7 +46,7 @@ long gmt_offset(time_t now)
long offset; long offset;
if (!now) if (!now)
time(&now); now = time(NULL);
ptm = *localtime(&now); ptm = *localtime(&now);
/* /*

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: packet.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 06-Jun-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -113,7 +112,7 @@ FILE *openpkt(FILE *pkt, faddr *addr, char flavor)
Syslog('P', "creating new .pkt"); Syslog('P', "creating new .pkt");
memset(&buffer, 0, sizeof(buffer)); memset(&buffer, 0, sizeof(buffer));
time(&t); t = time(NULL);
ptm = localtime(&t); ptm = localtime(&t);
if (ptm->tm_sec > 59) if (ptm->tm_sec > 59)
ptm->tm_sec = 59; ptm->tm_sec = 59;

View File

@ -1,4 +1,6 @@
/* $Revision$ /* $Id$
**
** $ Revision: 1.2 $
** **
** Originally written by Steven M. Bellovin <smb@research.att.com> while ** Originally written by Steven M. Bellovin <smb@research.att.com> while
** at the University of North Carolina at Chapel Hill. Later tweaked by ** 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; Now->usec = tv.tv_usec;
#else #else
/* Can't check for -1 since that might be a time, I guess. */ /* Can't check for -1 since that might be a time, I guess. */
(void)time(&Now->time); Now->time = time(NULL);
Now->usec = 0; Now->usec = 0;
#endif /* defined(HAVE_GETTIMEOFDAY) */ #endif /* defined(HAVE_GETTIMEOFDAY) */

View File

@ -1,11 +1,10 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: pktname.c * $Id$
* Purpose ...............: BinkleyTerm outbound naming * Purpose ...............: BinkleyTerm outbound naming
* Last modification date : 23-Dec-2000
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2000 * Copyright (C) 1997-2001
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -228,7 +227,7 @@ char *dayname(void)
time_t tt; time_t tt;
struct tm *ptm; struct tm *ptm;
(void)time(&tt); tt = time(NULL);
ptm = localtime(&tt); ptm = localtime(&tt);
sprintf(buf, "%s", dow[ptm->tm_wday]); sprintf(buf, "%s", dow[ptm->tm_wday]);
@ -245,7 +244,7 @@ char *arcname(faddr *addr, unsigned short Zone, int ARCmailCompat)
struct tm *ptm; struct tm *ptm;
faddr *bestaka; faddr *bestaka;
(void)time(&tt); tt = time(NULL);
ptm = localtime(&tt); ptm = localtime(&tt);
ext = dow[ptm->tm_wday]; ext = dow[ptm->tm_wday];

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: rfcdate.c * $Id$
* Purpose ...............: Date utilities * Purpose ...............: Date utilities
* Last modification date : 30-Apr-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -149,7 +148,7 @@ char *rfcdate(time_t now)
long offset; long offset;
if (!now) if (!now)
time(&now); now = time(NULL);
ptm = *localtime(&now); ptm = *localtime(&now);
/* /*

View File

@ -1,11 +1,10 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: strutil.c * $Id$
* Purpose ...............: Common string functions * Purpose ...............: Common string functions
* Last modification date : 18-Mar-2000
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2000 * Copyright (C) 1997-2001
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -264,7 +263,7 @@ char *GetLocalHM()
static char gettime[15]; static char gettime[15];
time_t T_Now; time_t T_Now;
time(&T_Now); T_Now = time(NULL);
sprintf(gettime,"%s", StrTimeHM(T_Now)); sprintf(gettime,"%s", StrTimeHM(T_Now));
return(gettime); return(gettime);
} }
@ -280,7 +279,7 @@ char *GetLocalHMS()
static char gettime[15]; static char gettime[15];
time_t T_Now; time_t T_Now;
time(&T_Now); T_Now = time(NULL);
sprintf(gettime,"%s", StrTimeHMS(T_Now)); sprintf(gettime,"%s", StrTimeHMS(T_Now));
return(gettime); return(gettime);
} }
@ -328,30 +327,10 @@ char *GetDateDMY()
struct tm *l_d; struct tm *l_d;
time_t T_Now; time_t T_Now;
time(&T_Now); T_Now = time(NULL);
l_d = localtime(&T_Now); l_d = localtime(&T_Now);
sprintf(tdate, "%02d-%02d-%04d", l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900); sprintf(tdate, "%02d-%02d-%04d", l_d->tm_mday,l_d->tm_mon+1,l_d->tm_year+1900);
return(tdate); 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);
}
*/

View File

@ -314,7 +314,7 @@ int binkp_expired(void)
{ {
time_t now; time_t now;
(void)time(&now); now = time(NULL);
if (now >= Timer) if (now >= Timer)
Syslog('b', "Timer expired"); Syslog('b', "Timer expired");
return (now >= Timer); 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,"ZYZ %s", CFG.sysop_name);
binkp_send_control(MM_NUL,"LOC %s", CFG.location); binkp_send_control(MM_NUL,"LOC %s", CFG.location);
binkp_send_control(MM_NUL,"NDL %s", CFG.Flags); 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,"TIME %s", rfcdate(t));
binkp_send_control(MM_NUL,"VER mbcico/%s binkp/1.0", VERSION); binkp_send_control(MM_NUL,"VER mbcico/%s binkp/1.0", VERSION);
if (strlen(CFG.Phone)) 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)); 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), binkp_send_control(MM_FILE, "%s %lu %ld %ld", MBSE_SS(tmp->remote),
(unsigned long)tmp->size, (long)tmp->date, (unsigned long)tmp->offset); (unsigned long)tmp->size, (long)tmp->date, (unsigned long)tmp->offset);
(void)time(&txstarttime); txstarttime = time(NULL);
tmp->state = Sending; tmp->state = Sending;
cursend = tmp; cursend = tmp;
TxState = TxTryRead; TxState = TxTryRead;
@ -997,7 +997,7 @@ int binkp_batch(file_list *to_send)
/* /*
* calculate time needed and bytes transferred * calculate time needed and bytes transferred
*/ */
(void)time(&txendtime); txendtime = time(NULL);
txstarttime = txendtime - txstarttime; txstarttime = txendtime - txstarttime;
if (txstarttime <= 0L) if (txstarttime <= 0L)
txstarttime = 1L; txstarttime = 1L;
@ -1116,7 +1116,7 @@ int binkp_batch(file_list *to_send)
binkp_send_control(MM_GOT, "%s %ld %ld", rname, rsize, rtime); binkp_send_control(MM_GOT, "%s %ld %ld", rname, rsize, rtime);
closefile(TRUE); closefile(TRUE);
rxpos = rxpos - rxbytes; rxpos = rxpos - rxbytes;
(void)time(&rxendtime); rxendtime = time(NULL);
if ((rxstarttime = rxendtime - rxstarttime) == 0L) if ((rxstarttime = rxendtime - rxstarttime) == 0L)
rxstarttime = 1L; rxstarttime = 1L;
Syslog('+', "Binkp: received OK %lu bytes in %s (%ld cps)", Syslog('+', "Binkp: received OK %lu bytes in %s (%ld cps)",
@ -1143,7 +1143,7 @@ int binkp_batch(file_list *to_send)
case RxAcceptFile: case RxAcceptFile:
Syslog('+', "Binkp: receive file \"%s\" date %s size %ld offset %ld", rname, date(rtime), rsize, roffs); Syslog('+', "Binkp: receive file \"%s\" date %s size %ld offset %ld", rname, date(rtime), rsize, roffs);
rxfp = openfile(rname, rtime, rsize, &rxbytes, resync); rxfp = openfile(rname, rtime, rsize, &rxbytes, resync);
(void)time(&rxstarttime); rxstarttime = time(NULL);
rxpos = 0; rxpos = 0;
if (!diskfree(CFG.freespace)) { if (!diskfree(CFG.freespace)) {

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/callstat.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 05-Aug-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -69,7 +68,7 @@ void putstatus(faddr *addr, int incr, int sts)
else else
cst->tryno += incr; cst->tryno += incr;
cst->trystat = sts; cst->trystat = sts;
(void)time(&cst->trytime); cst->trytime = time(NULL);
fwrite(cst, sizeof(callstat), 1, fp); fwrite(cst, sizeof(callstat), 1, fp);
fclose(fp); fclose(fp);
if (cst->tryno >= 30) if (cst->tryno >= 30)

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/dial.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 08-Jun-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -120,7 +119,7 @@ int hangup()
chat(modem.hangup, CFG.timeoutreset, NULL); chat(modem.hangup, CFG.timeoutreset, NULL);
if (carrier) { if (carrier) {
time(&c_end); c_end = time(NULL);
online += (c_end - c_start); online += (c_end - c_start);
Syslog('+', "Connection time %s", t_elapsed(c_start, c_end)); Syslog('+', "Connection time %s", t_elapsed(c_start, c_end));
carrier = FALSE; carrier = FALSE;

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/emsidat.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 24-Jun-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -223,7 +222,7 @@ char *mkemsidat(int caller)
p=xstrcat(p,(char *)"]["); p=xstrcat(p,(char *)"][");
p=xstrcat(p,flags?emsiencode(flags):(char *)""); p=xstrcat(p,flags?emsiencode(flags):(char *)"");
p=xstrcat(p,(char *)"]}{TRX#}{["); p=xstrcat(p,(char *)"]}{TRX#}{[");
(void)time(&tt); tt = time(NULL);
sprintf(cbuf,"%08lX",mtime2sl(tt)); sprintf(cbuf,"%08lX",mtime2sl(tt));
p=xstrcat(p,cbuf); p=xstrcat(p,cbuf);
p=xstrcat(p,(char *)"]}{TZUTC}{["); p=xstrcat(p,(char *)"]}{TZUTC}{[");

View File

@ -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: 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)); 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; txstate = HTX_ToFName;
@ -1115,7 +1115,7 @@ int hydra_batch(int role, file_list *to_send)
/* /*
* calculate time needed and bytes transferred * calculate time needed and bytes transferred
*/ */
(void) time(&txendtime); txendtime = time(NULL);
txstarttime = txendtime - txstarttime; txstarttime = txendtime - txstarttime;
if (txstarttime <= 0L) if (txstarttime <= 0L)
@ -1324,7 +1324,7 @@ int hydra_batch(int role, file_list *to_send)
Name, filesize, date(timestamp)); Name, filesize, date(timestamp));
rxfp = openfile(Name, timestamp, filesize, &rxpos, resync); rxfp = openfile(Name, timestamp, filesize, &rxpos, resync);
(void) time(&rxstarttime); rxstarttime = time(NULL);
/* check for error opening file */ /* check for error opening file */
if (rxfp) { if (rxfp) {
@ -1414,7 +1414,7 @@ int hydra_batch(int role, file_list *to_send)
/* /*
* calculate time and CPU usage needed * calculate time and CPU usage needed
*/ */
(void) time(&rxendtime); rxendtime = time(NULL);
if (rxpos >= 0) { if (rxpos >= 0) {
rxfp = NULL; rxfp = NULL;

View File

@ -1,11 +1,10 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/lutil.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 12-Mar-2000
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2000 * Copyright (C) 1997-2001
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -65,9 +64,9 @@ char *date(time_t t)
static char buf[20]; static char buf[20];
if (t) if (t)
now=t; now = t;
else else
time(&now); now = time(NULL);
ptm=*localtime(&now); ptm=*localtime(&now);
sprintf(buf,"%s %02d %02d:%02d:%02d", sprintf(buf,"%s %02d %02d:%02d:%02d",
mon[ptm.tm_mon],ptm.tm_mday, mon[ptm.tm_mon],ptm.tm_mday,

View File

@ -136,7 +136,7 @@ void die(int onsig)
if (gotfiles) if (gotfiles)
CreateSema((char *)"mailin"); CreateSema((char *)"mailin");
time(&t_end); t_end = time(NULL);
Syslog(' ', "MBCICO finished in %s", t_elapsed(t_start, t_end)); Syslog(' ', "MBCICO finished in %s", t_elapsed(t_start, t_end));
free_mem(); free_mem();
if (envptr) if (envptr)
@ -190,9 +190,7 @@ int main(int argc, char *argv[])
InitNode(); InitNode();
InitFidonet(); InitFidonet();
TermInit(1); TermInit(1);
time(&t_start); t_start = c_start = c_end = time(NULL);
time(&c_start);
time(&c_end);
InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, CFG.cico_loglevel, CFG.error_log); InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, CFG.cico_loglevel, CFG.error_log);
Syslog(' ', " "); Syslog(' ', " ");

View File

@ -105,7 +105,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBOUT finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) { if (!do_quiet) {
@ -176,7 +176,7 @@ int main(int argc, char *argv[])
InitNode(); InitNode();
InitFidonet(); InitFidonet();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
umask(002); umask(002);
/* /*

View File

@ -1,11 +1,10 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/outstat.c * $Id$
* Purpose ...............: Show mail outbound status * 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 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -94,7 +93,7 @@ int outstat()
if ((tmp->flavors) & F_FREQ ) flstr[4]='R'; if ((tmp->flavors) & F_FREQ ) flstr[4]='R';
if ((tmp->flavors) & F_POLL ) flstr[5]='P'; if ((tmp->flavors) & F_POLL ) flstr[5]='P';
(void)time(&age); age = time(NULL);
age -= tmp->time; age -= tmp->time;
sprintf(temp, "%s %8lu %s %s", flstr, (long)tmp->size, str_time(age), ascfnode(&(tmp->addr), 0x1f)); 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.point = addr->point;
(*tmp)->addr.domain = xstrcpy(addr->domain); (*tmp)->addr.domain = xstrcpy(addr->domain);
(*tmp)->flavors = 0; (*tmp)->flavors = 0;
time(&((*tmp)->time)); (*tmp)->time = time(NULL);
(*tmp)->size = 0L; (*tmp)->size = 0L;
} }
@ -159,7 +158,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
if (stat(fname,&st) != 0) { if (stat(fname,&st) != 0) {
WriteError("$Can't stat %s", fname); WriteError("$Can't stat %s", fname);
st.st_size = 0L; 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. * is losing mail or files.
*/ */
st.st_size = 0L; st.st_size = 0L;
(void)time(&st.st_mtime); st.st_mtime = time(NULL);
} }
} else { } else {
if (stat(p, &st) != 0) { if (stat(p, &st) != 0) {
st.st_size = 0L; st.st_size = 0L;
(void)time(&st.st_mtime); st.st_mtime = time(NULL);
} }
} }
} }

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/tcpproto.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 07-Aug-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -198,7 +197,7 @@ static int sendtfile(char *ln, char *rn)
if (st.st_size > 0) { if (st.st_size > 0) {
Syslog('+', "TCP send \"%s\" as \"%s\"", MBSE_SS(ln), MBSE_SS(rn)); 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)); Syslog('+', "TCP size %lu bytes, dated %s", (unsigned long)st.st_size, date(st.st_mtime));
(void)time(&startime); startime = time(NULL);
} else { } else {
Syslog('+', "File \"%s\" has 0 size, skiped",ln); Syslog('+', "File \"%s\" has 0 size, skiped",ln);
return 0; return 0;
@ -240,7 +239,7 @@ static int sendtfile(char *ln, char *rn)
} }
if (rc == 0 && strncmp(rxbuf,"FOK",3) == 0) { if (rc == 0 && strncmp(rxbuf,"FOK",3) == 0) {
(void)time(&endtime); endtime = time(NULL);
if ((startime=endtime-startime) == 0) if ((startime=endtime-startime) == 0)
startime = 1; startime = 1;
@ -275,7 +274,7 @@ static int closeit(int success)
rc = closefile(success); rc = closefile(success);
fout = NULL; fout = NULL;
sbytes = rxbytes - sbytes; sbytes = rxbytes - sbytes;
(void)time(&endtime); endtime = time(NULL);
if ((startime = endtime - startime) == 0L) if ((startime = endtime - startime) == 0L)
startime = 1L; 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)); Syslog('+', "TCP receive \"%s\" (%lu bytes) dated %s",fn,fs,date(ft));
strcpy(txbuf,"ROK"); strcpy(txbuf,"ROK");
fout = openfile(fn, ft, fs, &rxbytes, resync); fout = openfile(fn, ft, fs, &rxbytes, resync);
(void)time(&startime); startime = time(NULL);
sbytes = rxbytes; sbytes = rxbytes;
if (fs == rxbytes) { if (fs == rxbytes) {

View File

@ -1,11 +1,10 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/ttyio.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 23-Dec-2000
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2000 * Copyright (C) 1997-2001
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -127,7 +126,7 @@ int tty_expired(int tno)
if (timer[tno] == (time_t) 0) if (timer[tno] == (time_t) 0)
return 0; return 0;
(void)time(&now); now = time(NULL);
Syslog('T', "ttyio: expired(%d) now=%lu,timer=%lu,return %s", Syslog('T', "ttyio: expired(%d) now=%lu,timer=%lu,return %s",
tno,now,timer[tno],(now >= timer[tno])?"yes":"no"); tno,now,timer[tno],(now >= timer[tno])?"yes":"no");
return (now >= timer[tno]); return (now >= timer[tno]);
@ -170,7 +169,7 @@ static int tty_read(char *buf, int size, int tot)
return 0; return 0;
tty_status = 0; tty_status = 0;
(void)time(&now); now = time(NULL);
timeout = (time_t)300; /* maximum of 5 minutes */ timeout = (time_t)300; /* maximum of 5 minutes */
for (i = 0; i < TIMERNO_TX; i++) { for (i = 0; i < TIMERNO_TX; i++) {
@ -325,7 +324,7 @@ int tty_waitputget(int tot)
struct timeval seltimer; struct timeval seltimer;
tty_status=0; tty_status=0;
(void)time(&now); now = time(NULL);
timeout=(time_t)300; /* maximum of 5 minutes */ timeout=(time_t)300; /* maximum of 5 minutes */
for (i = 0; i < NUMTIMERS; i++) { for (i = 0; i < NUMTIMERS; i++) {
@ -508,7 +507,7 @@ int tty_putget(char **obuf, int *osize, char **ibuf, int *isize)
struct timeval seltimer; struct timeval seltimer;
tty_status = 0; tty_status = 0;
(void)time(&now); now = time(NULL);
timeout = (time_t)300; /* maximum of 5 minutes */ timeout = (time_t)300; /* maximum of 5 minutes */
for (i = 0; i < NUMTIMERS; i++) { for (i = 0; i < NUMTIMERS; i++) {

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/xmrecv.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 04-Jan-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -89,7 +88,7 @@ int closeit(int success)
off_t endofs; off_t endofs;
endofs = recv_blk*XMBLKSIZ; endofs = recv_blk*XMBLKSIZ;
(void)time(&etm); etm = time(NULL);
if (etm == stm) if (etm == stm)
etm++; etm++;
Syslog('+', "Xmodem %s %lu bytes in %s (%lu cps)", success?"received":"dropped after", Syslog('+', "Xmodem %s %lu bytes in %s (%lu cps)", success?"received":"dropped after",
@ -147,7 +146,7 @@ SM_EDECL
int goteot = FALSE; int goteot = FALSE;
Syslog('x', "xmrecv INIT"); Syslog('x', "xmrecv INIT");
(void)time(&stm); stm = time(NULL);
recv_blk=-1L; recv_blk=-1L;
memset(&tmpfname, 0, sizeof(tmpfname)); memset(&tmpfname, 0, sizeof(tmpfname));

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/xmsend.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 04-Jan-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -123,7 +122,7 @@ SM_EDECL
fl.l_len=0L; fl.l_len=0L;
Syslog('x', "xmsend INIT"); Syslog('x', "xmsend INIT");
(void)time(&stm); stm = time(NULL);
/* if we got 'C' than hopefully remote is sealink capable... */ /* if we got 'C' than hopefully remote is sealink capable... */
@ -236,7 +235,7 @@ SM_STATE(sendblk)
} else if (ackd_blk < last_blk) { } else if (ackd_blk < last_blk) {
SM_PROCEED(waitack); SM_PROCEED(waitack);
} else { } else {
(void)time(&etm); etm = time(NULL);
if (etm == stm) if (etm == stm)
etm++; etm++;
Syslog('+', "sent %lu bytes in %s (%lu cps)", (unsigned long)st.st_size,str_time(etm-stm), Syslog('+', "sent %lu bytes in %s (%lu cps)", (unsigned long)st.st_size,str_time(etm-stm),

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/zmrecv.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 10-Aug-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -442,7 +441,7 @@ int closeit(int success)
rc = closefile(success); rc = closefile(success);
fout = NULL; fout = NULL;
sbytes = rxbytes - sbytes; sbytes = rxbytes - sbytes;
(void)time(&etime); etime = time(NULL);
if ((startime = etime - startime) == 0L) if ((startime = etime - startime) == 0L)
startime = 1L; startime = 1L;
Syslog('+', "Zmodem: %s %lu bytes in %s (%ld cps)", success?"OK":"dropped after", 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); Syslog('+', "Zmodem: \"%s\" %ld bytes, %s mode %o", Name, Bytesleft, ctt, Filemode);
fout = openfile(Name,Modtime,Bytesleft,&(long)(rxbytes),resync); fout = openfile(Name,Modtime,Bytesleft,&(long)(rxbytes),resync);
(void)time(&startime); startime = time(NULL);
sbytes = rxbytes; sbytes = rxbytes;
if (Bytesleft == rxbytes) { if (Bytesleft == rxbytes) {

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbcico/zmsend.c * $Id$
* Purpose ...............: Fidonet mailer * Purpose ...............: Fidonet mailer
* Last modification date : 07-Aug-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-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: 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)); 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); 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); bufl = strlen(txbuf);
@ -224,7 +223,7 @@ static int sendzfile(char *ln, char *rn)
Syslog('+', "Zmodem: remote skipped %s, is OK",MBSE_SS(ln)); Syslog('+', "Zmodem: remote skipped %s, is OK",MBSE_SS(ln));
return 0; return 0;
} else if ((rc == OK) && (st.st_size - skipsize)) { } else if ((rc == OK) && (st.st_size - skipsize)) {
(void)time(&endtime); endtime = time(NULL);
if ((startime = endtime - startime) == 0) if ((startime = endtime - startime) == 0)
startime = 1; startime = 1;
Syslog('+', "Zmodem: OK %lu bytes in %s (%ld cps)", (unsigned long)st.st_size - skipsize, str_time(startime), Syslog('+', "Zmodem: OK %lu bytes in %s (%ld cps)", (unsigned long)st.st_size - skipsize, str_time(startime),

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbfido/addpkt.c * $Id$
* Purpose ...............: Add mail to .pkt * Purpose ...............: Add mail to .pkt
* Last modification date : 31-Jul-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-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 * Write .PKT header, see FSC-0039 rev. 4
*/ */
memset(&buffer, 0, sizeof(buffer)); memset(&buffer, 0, sizeof(buffer));
time(&Now); Now = time(NULL);
Tm = localtime(&Now); Tm = localtime(&Now);
if (Tm->tm_sec > 59) if (Tm->tm_sec > 59)
Tm->tm_sec = 59; Tm->tm_sec = 59;

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbfido/aliasdb.c * $Id$
* Purpose ...............: Alias Database * Purpose ...............: Alias Database
* Last modification date : 11-May-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -137,7 +136,7 @@ int registrate(char *freename, char *address)
/* /*
* Already present, update date/time. * Already present, update date/time.
*/ */
time(&key.dtime); key.dtime = time(NULL);
fseek(afp, - sizeof(key), SEEK_CUR); fseek(afp, - sizeof(key), SEEK_CUR);
fwrite(&key, sizeof(key), 1, afp); fwrite(&key, sizeof(key), 1, afp);
close_alias_db(); close_alias_db();
@ -147,7 +146,7 @@ int registrate(char *freename, char *address)
sprintf(key.freename, "%s", buf); sprintf(key.freename, "%s", buf);
sprintf(key.address, "%s", address); sprintf(key.address, "%s", address);
time(&key.dtime); key.dtime = time(NULL);
if (fwrite(&key, sizeof(key), 1, afp) != 1) { if (fwrite(&key, sizeof(key), 1, afp) != 1) {
WriteError("$Cannot store: \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address)); WriteError("$Cannot store: \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address));

View File

@ -1,9 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbfido/ftn2rfc.c * $Id$
* Purpose ...............: Gate netmail->email or echomail->news * Purpose ...............: Gate netmail->email or echomail->news
* Last modification date : 29-Oct-2001
* Last modification date : 30-Oct-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-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 */ } else { /* if newsmode */
time(&now); now = time(NULL);
if (CFG.EmailMode == E_NOISP) { if (CFG.EmailMode == E_NOISP) {
/* /*
* Probaly not needed as messages for systems without ISP never get here. * 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 * Restamp future postings
*/ */
if(mdate > time(&now)) { now = time(NULL);
if (mdate > now) {
Syslog('+', "Future posting: %s", rfcdate(mdate)); Syslog('+', "Future posting: %s", rfcdate(mdate));
sprintf(temp,"Date: %s\n", rfcdate(now)); sprintf(temp,"Date: %s\n", rfcdate(now));
Send(newsmode, temp); Send(newsmode, temp);
sprintf(temp,"X-Origin-Date: %s\n", rfcdate(mdate)); sprintf(temp,"X-Origin-Date: %s\n", rfcdate(mdate));
Send(newsmode, temp); 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 * Restamp old postings
*/ */

View File

@ -74,7 +74,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBAFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) { if (!do_quiet) {
@ -98,7 +98,7 @@ int main(int argc, char **argv)
#endif #endif
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
t = localtime(&t_start); t = localtime(&t_start);
Diw = t->tm_wday; Diw = t->tm_wday;
Miy = t->tm_mon; Miy = t->tm_mon;

View File

@ -98,7 +98,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBDIFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) { if (!do_quiet) {
@ -126,7 +126,7 @@ int main(int argc, char **argv)
#endif #endif
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
umask(002); umask(002);
/* /*

View File

@ -234,7 +234,7 @@ void die(int onsig)
if (notify + areamgr + filemgr) if (notify + areamgr + filemgr)
Syslog('+', "Notify msgs [%4d] AreaMgr [%4d] FileMgr [%4d]", 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)); Syslog(' ', "MBFIDO finished in %s", t_elapsed(t_start, t_end));
ulockunpack(); ulockunpack();
@ -296,7 +296,7 @@ int main(int argc, char **argv)
InitUser(); InitUser();
InitFidonet(); InitFidonet();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
t = localtime(&t_start); t = localtime(&t_start);
Diw = t->tm_wday; Diw = t->tm_wday;
Miy = t->tm_mon; Miy = t->tm_mon;

View File

@ -79,7 +79,7 @@ int main(int argc, char **argv)
#endif #endif
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
umask(002); umask(002);
/* /*

View File

@ -91,7 +91,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBFILE finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) { if (!do_quiet) {

View File

@ -192,7 +192,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBINDEX finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) if (!do_quiet)

View File

@ -92,7 +92,7 @@ int main(int argc, char **argv)
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
oldmask = umask(007); oldmask = umask(007);
time(&t_start); t_start = time(NULL);
/* /*
* Catch all signals we can, and ignore or catch them * Catch all signals we can, and ignore or catch them
@ -235,7 +235,7 @@ void die(int onsig)
if (msg_tot || msg_del) if (msg_tot || msg_del)
Syslog('+', "Msgs [%5d] Deleted [%5d]", 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)); Syslog(' ', "MBMSG finished in %s", t_elapsed(t_start, t_end));
umask(oldmask); umask(oldmask);

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbaff/msgutil.c * $Id$
* Purpose ...............: Announce new files and FileFind * Purpose ...............: Announce new files and FileFind
* Last modification date : 21-Jan-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -91,7 +90,7 @@ void Msg_Pid(void)
sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION); sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION);
MsgText_Add2(temp); MsgText_Add2(temp);
sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode)); sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode));
(void)time(&tt); tt = time(NULL);
sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt));
MsgText_Add2(temp); MsgText_Add2(temp);
free(temp); free(temp);

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbfido/post.c * $Id$
* Purpose ...............: Post a message from a file. * Purpose ...............: Post a message from a file.
* Last modification date : 20-Mar-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -117,7 +116,7 @@ void Post(char *To, long Area, char *Subj, char *File, char *Flavor)
return; return;
} }
(void)time(&tt); tt = time(NULL);
t = localtime(&tt); t = localtime(&tt);
Diw = t->tm_wday; Diw = t->tm_wday;
Miy = t->tm_mon; Miy = t->tm_mon;

View File

@ -84,7 +84,7 @@ int ProcessTic(fa_list *sbl)
int BBS_Imp = FALSE, DidBanner = FALSE; int BBS_Imp = FALSE, DidBanner = FALSE;
time(&Now); Now = time(NULL);
if (TIC.TicIn.PathError) { if (TIC.TicIn.PathError) {
WriteError("Our Aka is in the path"); WriteError("Our Aka is in the path");

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: tosser/storenet.c * $Id$
* Purpose ...............: Import a netmail message * Purpose ...............: Import a echomail message
* Last modification date : 28-Jul-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * 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) { if (!bad && !dupe) {
StatAdd(&msgs.Received, 1L); StatAdd(&msgs.Received, 1L);
time(&msgs.LastRcvd); msgs.LastRcvd = time(NULL);
StatAdd(&mgroup.MsgsRcvd, 1L); StatAdd(&mgroup.MsgsRcvd, 1L);
time(&mgroup.LastDate); mgroup.LastDate = time(NULL);
UpdateMsgs(); UpdateMsgs();
} }

View File

@ -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)) { if (SearchNetBoard(t->zone, t->net)) {
StatAdd(&msgs.Received, 1L); StatAdd(&msgs.Received, 1L);
time(&msgs.LastRcvd); msgs.LastRcvd = time(NULL);
UpdateMsgs(); UpdateMsgs();
result = Msg_Open(msgs.Base); result = Msg_Open(msgs.Base);

View File

@ -1,8 +1,7 @@
/***************************************************************************** /*****************************************************************************
* *
* File ..................: mbmon/common.c * $Id$
* Purpose ...............: Common utilities * Purpose ...............: Common utilities
* Last modification date : 10-Aug-2001
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2001
@ -603,7 +602,7 @@ long gmt_offset(time_t now)
long offset; long offset;
if (!now) if (!now)
time(&now); now = time(NULL);
ptm = *localtime(&now); ptm = *localtime(&now);
/* /*

View File

@ -372,7 +372,7 @@ void show_date(int fg, int bg, int y, int x)
time_t now; time_t now;
char *p; char *p;
time(&now); now = time(NULL);
if (now != lasttime) { if (now != lasttime) {
lasttime = now; lasttime = now;
set_color(LIGHTGREEN, BLUE); set_color(LIGHTGREEN, BLUE);

View File

@ -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)); Syslog(' ', "MBSEBBS finished in %s", t_elapsed(t_start, t_end));
/* /*

View File

@ -338,7 +338,7 @@ void Download(void)
* Wait a while before download * Wait a while before download
*/ */
sleep(2); sleep(2);
time(&ElapstimeStart); ElapstimeStart = time(NULL);
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s ./tag/*", sProtDn); sprintf(temp, "%s ./tag/*", sProtDn);
@ -366,7 +366,7 @@ void Download(void)
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
free(temp); free(temp);
time(&ElapstimeFin); ElapstimeFin = time(NULL);
/* /*
* Get time from Before Download and After Download to get * Get time from Before Download and After Download to get
@ -414,7 +414,7 @@ void Download(void)
} }
Size += file.Size; Size += file.Size;
file.TimesDL++; file.TimesDL++;
time(&file.LastDL); file.LastDL = time(NULL);
fseek(fp, - sizeof(file), SEEK_CUR); fseek(fp, - sizeof(file), SEEK_CUR);
fwrite(&file, sizeof(file), 1, fp); fwrite(&file, sizeof(file), 1, fp);
fclose(fp); fclose(fp);
@ -1117,7 +1117,7 @@ int Upload()
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
sleep(2); sleep(2);
time(&ElapstimeStart); ElapstimeStart = time(NULL);
/* /*
* Get the file(s). Set the Client/Server time to 2 hours. * Get the file(s). Set the Client/Server time to 2 hours.
@ -1139,7 +1139,7 @@ int Upload()
printf("\n\n\n"); printf("\n\n\n");
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
time(&ElapstimeFin); ElapstimeFin = time(NULL);
/* /*
* Get time from Before Upload and After Upload to get * 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 * Wait a while before download
*/ */
sleep(2); sleep(2);
time(&ElapstimeStart); ElapstimeStart = time(NULL);
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s %s", sProtDn, symFrom); sprintf(temp, "%s %s", sProtDn, symFrom);
@ -1315,7 +1315,7 @@ int DownloadDirect(char *Name, int Wait)
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
free(temp); free(temp);
time(&ElapstimeFin); ElapstimeFin = time(NULL);
/* /*
* Get time from Before Download and After Download to get * Get time from Before Download and After Download to get
@ -1656,7 +1656,7 @@ int Upload_Home()
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
sleep(2); sleep(2);
time(&ElapstimeStart); ElapstimeStart = time(NULL);
/* /*
* Get the file(s). Set the Client/Server time to 2 hours. * Get the file(s). Set the Client/Server time to 2 hours.
@ -1678,7 +1678,7 @@ int Upload_Home()
printf("\n\n\n"); printf("\n\n\n");
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
time(&ElapstimeFin); ElapstimeFin = time(NULL);
/* /*
* Get time from Before Upload and After Upload to get * Get time from Before Upload and After Upload to get

View File

@ -340,7 +340,7 @@ char *GLCdateyy()
static char GLcdateyy[15]; static char GLcdateyy[15];
char ntime[15]; char ntime[15];
time(&Time_Now); Time_Now = time(NULL);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
sprintf(GLcdateyy,"%02d-", sprintf(GLcdateyy,"%02d-",

View File

@ -91,7 +91,7 @@ void die(int onsig)
WriteError("Terminated with error %d", 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)); Syslog(' ', "MBALL finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) { if (!do_quiet) {
@ -138,7 +138,7 @@ int main(int argc, char **argv)
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
umask(000); umask(000);
/* /*

View File

@ -245,7 +245,7 @@ char *ttime2()
time_t Time_Now; time_t Time_Now;
static char Ttime2[9]; static char Ttime2[9];
time(&Time_Now); Time_Now = time(NULL);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
sprintf(Ttime2, "%02d:%02d", l_date->tm_hour,l_date->tm_min); sprintf(Ttime2, "%02d:%02d", l_date->tm_hour,l_date->tm_min);

View File

@ -97,12 +97,11 @@ int main(int argc, char **argv)
/* /*
* Set local time and statistic indexes. * Set local time and statistic indexes.
*/ */
time(&Time_Now); Time_Now = t_start = time(NULL);
time(&t_start);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
Diw = l_date->tm_wday; Diw = l_date->tm_wday;
Miy = l_date->tm_mon; Miy = l_date->tm_mon;
time(&ltime); ltime = time(NULL);
/* /*
* Initialize this client with the server. We don't know * Initialize this client with the server. We don't know

View File

@ -376,7 +376,7 @@ static void check_password(const struct passwd *pw)
exp_status = isexpired(pw); exp_status = isexpired(pw);
#endif #endif
time(&now); now = time(NULL);
#ifdef SHADOW_PASSWORD #ifdef SHADOW_PASSWORD
/* /*

View File

@ -79,12 +79,11 @@ int main(int argc, char **argv)
/* /*
* Set local time and statistic indexes. * Set local time and statistic indexes.
*/ */
time(&Time_Now); Time_Now = t_start = time(NULL);
time(&t_start);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
Diw = l_date->tm_wday; Diw = l_date->tm_wday;
Miy = l_date->tm_mon; Miy = l_date->tm_mon;
time(&ltime); ltime = time(NULL);
/* /*
* Initialize this client with the server. * Initialize this client with the server.

View File

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* *
* $id$ * $Id$
* Purpose ...............: Change BBS status * Purpose ...............: Change BBS status
* *
***************************************************************************** *****************************************************************************
@ -91,7 +91,7 @@ void die(int onsig)
printf("\n"); printf("\n");
} }
time(&t_end); t_end = time(NULL);
Syslog(' ', "MBSTAT finished in %s", t_elapsed(t_start, t_end)); Syslog(' ', "MBSTAT finished in %s", t_elapsed(t_start, t_end));
ExitClient(onsig); ExitClient(onsig);
@ -114,7 +114,7 @@ int main(int argc, char **argv)
#endif #endif
InitConfig(); InitConfig();
TermInit(1); TermInit(1);
time(&t_start); t_start = time(NULL);
/* /*
* Catch or ignore signals * Catch or ignore signals

View File

@ -61,7 +61,7 @@ int main(int argc, char **argv)
Days = 0; Days = 0;
Level = 0; Level = 0;
time(&t_start); t_start = time(NULL);
if (argc < 2) if (argc < 2)
Help(); Help();
@ -113,7 +113,7 @@ int main(int argc, char **argv)
UserPack(Days, Level, pack); UserPack(Days, Level, pack);
umask(oldmask); umask(oldmask);
time(&t_end); t_end = time(NULL);
Syslog(' ', "MBUSER finished in %s", t_elapsed(t_start, t_end)); Syslog(' ', "MBUSER finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) if (!do_quiet)

View File

@ -93,7 +93,7 @@ int ChkFiles()
WriteError("$ChkFiles: Can't create %s", sDataFile); WriteError("$ChkFiles: Can't create %s", sDataFile);
else { else {
memset((char *)&SYSINFO, 0, sizeof(SYSINFO)); memset((char *)&SYSINFO, 0, sizeof(SYSINFO));
time(&Now); Now = time(NULL);
SYSINFO.StartDate = Now; SYSINFO.StartDate = Now;
rewind(pCallerLog); rewind(pCallerLog);
@ -223,7 +223,7 @@ char *GLCdate()
{ {
static char GLcdate[15]; static char GLcdate[15];
time(&Time_Now); Time_Now = time(NULL);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
sprintf(GLcdate,"%02d-", l_date->tm_mday); sprintf(GLcdate,"%02d-", l_date->tm_mday);

View File

@ -62,7 +62,7 @@ char *rfcdate(time_t now)
long offset; long offset;
if (!now) if (!now)
time(&now); now = time(NULL);
ptm = *localtime(&now); ptm = *localtime(&now);
/* /*
@ -229,7 +229,7 @@ void Add_Headkludges(faddr *dest, int IsReply)
sprintf(temp, "\001PID: MBSE-BBS %s", VERSION); sprintf(temp, "\001PID: MBSE-BBS %s", VERSION);
MsgText_Add2(temp); MsgText_Add2(temp);
(void)time(&tt); tt = time(NULL);
sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt));
MsgText_Add2(temp); MsgText_Add2(temp);
free(temp); free(temp);

View File

@ -557,7 +557,7 @@ void Fast_Bye(int onsig)
char *temp; char *temp;
time_t t_end; time_t t_end;
time(&t_end); t_end = time(NULL);
Syslog(' ', "MBNEWUSR finished in %s", t_elapsed(t_start, t_end)); Syslog(' ', "MBNEWUSR finished in %s", t_elapsed(t_start, t_end));
socket_shutdown(mypid); socket_shutdown(mypid);

View File

@ -1113,7 +1113,7 @@ void OLR_Upload(void)
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
sleep(2); sleep(2);
time(&ElapstimeStart); ElapstimeStart = time(NULL);
/* /*
* Get the file * Get the file
@ -1130,7 +1130,7 @@ void OLR_Upload(void)
printf("\n"); printf("\n");
fflush(stdout); fflush(stdout);
fflush(stdin); fflush(stdin);
time(&ElapstimeFin); ElapstimeFin = time(NULL);
/* /*
* Get the upload time. * Get the upload time.

View File

@ -93,7 +93,7 @@ char *crypt_make_salt(void)
static unsigned long x; static unsigned long x;
static char result[3]; static char result[3];
time(&now); now = time(NULL);
x += now + getpid() + clock(); x += now + getpid() + clock();
result[0] = i64c(((x >> 18) ^ (x >> 6)) & 077); result[0] = i64c(((x >> 18) ^ (x >> 6)) & 077);
result[1] = i64c(((x >> 12) ^ x) & 077); result[1] = i64c(((x >> 12) ^ x) & 077);

View File

@ -83,7 +83,7 @@ void TimeCheck(void)
time_t Now; time_t Now;
int Elapsed; int Elapsed;
time(&Now); Now = time(NULL);
/* /*
* Update the global string for the menu prompt * Update the global string for the menu prompt

View File

@ -45,7 +45,7 @@ void TimeStats()
{ {
char Logdate[15]; char Logdate[15];
time(&Time_Now); Time_Now = time(NULL);
l_date = localtime(&Time_Now); l_date = localtime(&Time_Now);
sprintf(Logdate,"%02d-%s %02d:%02d:%02d", l_date->tm_mday, GetMonth(l_date->tm_mon+1), 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); l_date->tm_hour, l_date->tm_min, l_date->tm_sec);

View File

@ -408,7 +408,7 @@ void user()
Syslog('+', "User successfully logged into BBS"); Syslog('+', "User successfully logged into BBS");
Syslog('+', "Level %d (%s), %d mins. left, port %s", Syslog('+', "Level %d (%s), %d mins. left, port %s",
usrconfig.Security.level, LIMIT.Description, usrconfig.iTimeLeft, pTTY); usrconfig.Security.level, LIMIT.Description, usrconfig.iTimeLeft, pTTY);
time(&Time2Go); Time2Go = time(NULL);
Time2Go += usrconfig.iTimeLeft * 60; Time2Go += usrconfig.iTimeLeft * 60;
iUserTimeLeft = exitinfo.iTimeLeft; iUserTimeLeft = exitinfo.iTimeLeft;

View File

@ -198,7 +198,7 @@ int AppendFGroup(void)
sprintf(ffile, "%s/etc/fgroups.temp", getenv("MBSE_ROOT")); sprintf(ffile, "%s/etc/fgroups.temp", getenv("MBSE_ROOT"));
if ((fil = fopen(ffile, "a")) != NULL) { if ((fil = fopen(ffile, "a")) != NULL) {
memset(&fgroup, 0, sizeof(fgroup)); memset(&fgroup, 0, sizeof(fgroup));
time(&fgroup.StartDate); fgroup.StartDate = time(NULL);
fgroup.DivideCost = TRUE; fgroup.DivideCost = TRUE;
fwrite(&fgroup, sizeof(fgroup), 1, fil); fwrite(&fgroup, sizeof(fgroup), 1, fil);
fclose(fil); fclose(fil);

View File

@ -1672,7 +1672,7 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Machine type %s\n", utsbuf.machine); fprintf(fp, " Machine type %s\n", utsbuf.machine);
} }
fprintf(fp, " MBSE_ROOT %s\n", getenv("MBSE_ROOT")); fprintf(fp, " MBSE_ROOT %s\n", getenv("MBSE_ROOT"));
time(&now); now = time(NULL);
fprintf(fp, " Date created %s", ctime(&now)); fprintf(fp, " Date created %s", ctime(&now));
addtoc(fp, toc, 1, 2, page, (char *)"System fidonet addresses"); addtoc(fp, toc, 1, 2, page, (char *)"System fidonet addresses");

View File

@ -198,7 +198,7 @@ int AppendMGroup(void)
sprintf(ffile, "%s/etc/mgroups.temp", getenv("MBSE_ROOT")); sprintf(ffile, "%s/etc/mgroups.temp", getenv("MBSE_ROOT"));
if ((fil = fopen(ffile, "a")) != NULL) { if ((fil = fopen(ffile, "a")) != NULL) {
memset(&mgroup, 0, sizeof(mgroup)); memset(&mgroup, 0, sizeof(mgroup));
time(&mgroup.StartDate); mgroup.StartDate = time(NULL);
fwrite(&mgroup, sizeof(mgroup), 1, fil); fwrite(&mgroup, sizeof(mgroup), 1, fil);
fclose(fil); fclose(fil);
MGrpUpdated = 1; MGrpUpdated = 1;

View File

@ -486,7 +486,7 @@ void ImportOneline(void)
return; return;
} }
time(&Time); Time = time(NULL);
l_date = localtime(&Time); l_date = localtime(&Time);
sprintf(buf, "%02d-%02d-%04d", l_date->tm_mday, l_date->tm_mon+1, l_date->tm_year+1900); sprintf(buf, "%02d-%02d-%04d", l_date->tm_mday, l_date->tm_mon+1, l_date->tm_year+1900);

View File

@ -94,7 +94,7 @@ void show_date(int fg, int bg, int y, int x)
time_t now; time_t now;
char *p; char *p;
time(&now); now = time(NULL);
if (now != lasttime) { if (now != lasttime) {
lasttime = now; lasttime = now;
set_color(LIGHTGREEN, BLUE); set_color(LIGHTGREEN, BLUE);