From 684fb4071acd078a7c0958c701c612d776f32546 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 29 Sep 2005 01:01:36 +0000 Subject: [PATCH] Fix compile problem with FreeBSD/gcc and use timestr() instead of ctime() in dumpindex(). --- src/sbbs3/smbutil.c | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/sbbs3/smbutil.c b/src/sbbs3/smbutil.c index 0442df310e..bc89ccf5e8 100644 --- a/src/sbbs3/smbutil.c +++ b/src/sbbs3/smbutil.c @@ -482,29 +482,6 @@ void listmsgs(ulong start, ulong count) } } -/****************************************************************************/ -/****************************************************************************/ -void dumpindex(ulong start, ulong count) -{ - ulong l=0; - idxrec_t idx; - - if(!start) - start=1; - if(!count) - count=~0; - fseek(smb.sid_fp,(start-1L)*sizeof(idxrec_t),SEEK_SET); - while(l<count) { - if(!fread(&idx,1,sizeof(idx),smb.sid_fp)) - break; - - printf("%4lu %04hX %04hX %04Xh %04Xh %06X %.24s\n" - ,idx.number,idx.from,idx.to,idx.subj,idx.attr - ,idx.offset,ctime(&idx.time)); - l++; - } -} - char *binstr(uchar *buf, ushort length) { static char str[512]; @@ -564,6 +541,29 @@ char *my_timestr(time_t *intime) return(str); } +/****************************************************************************/ +/****************************************************************************/ +void dumpindex(ulong start, ulong count) +{ + ulong l=0; + idxrec_t idx; + + if(!start) + start=1; + if(!count) + count=~0; + fseek(smb.sid_fp,(start-1L)*sizeof(idxrec_t),SEEK_SET); + while(l<count) { + if(!fread(&idx,1,sizeof(idx),smb.sid_fp)) + break; + + printf("%4lu %04hX %04hX %04Xh %04Xh %06X %s\n" + ,idx.number,idx.from,idx.to,idx.subj,idx.attr + ,idx.offset,my_timestr((time_t*)&idx.time)); + l++; + } +} + /****************************************************************************/ /* Displays message header information */ /****************************************************************************/ -- GitLab