Skip to content
Snippets Groups Projects
Commit 684fb407 authored by rswindell's avatar rswindell
Browse files

Fix compile problem with FreeBSD/gcc and use timestr() instead of ctime()

in dumpindex().
parent 370b387d
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
/****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment