--- sbbs/src/sbbs3/getstats.c 2018/04/24 16:41:23 1.1 +++ sbbs/src/sbbs3/getstats.c 2018/04/24 16:43:25 1.1.1.2 @@ -2,13 +2,13 @@ /* Synchronet C-export statistics retrieval functions */ -/* $Id: getstats.c,v 1.1 2018/04/24 16:41:23 root Exp $ */ +/* $Id: getstats.c,v 1.1.1.2 2018/04/24 16:43:25 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -51,6 +51,7 @@ BOOL DLLCALL getstats(scfg_t* cfg, char return(FALSE); } lseek(file,4L,SEEK_SET); /* Skip update time/date */ + /* TODO: Direct read of unpacked struct */ read(file,stats,sizeof(stats_t)); close(file); return(TRUE); @@ -67,7 +68,7 @@ long DLLCALL getfiles(scfg_t* cfg, uint if(dirnum>=cfg->total_dirs) /* out of range */ return(0); sprintf(str,"%s%s.ixb",cfg->dir[dirnum]->data_dir, cfg->dir[dirnum]->code); - l=flength(str); + l=(long)flength(str); if(l>0L) return(l/F_IXBSIZE); return(0); @@ -82,7 +83,7 @@ ulong DLLCALL getposts(scfg_t* cfg, uint ulong l; sprintf(str,"%s%s.sid",cfg->sub[subnum]->data_dir,cfg->sub[subnum]->code); - l=flength(str); + l=(long)flength(str); if((long)l==-1) return(0); return(l/sizeof(idxrec_t));