From 8c9b7b968ffc0f3355a1a88f2439f5b2755b788e Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 15 May 2003 20:56:56 +0000 Subject: [PATCH] ADDFILES now uses chk_ar() from userdat.c to select the correct file extractor based on the platform ARS (e.g. pkunzip for DOS/Win32 and unzip for Unix). --- src/sbbs3/GNUmakefile | 1 + src/sbbs3/Makefile | 1 + src/sbbs3/addfiles.c | 10 ++++------ src/sbbs3/addfiles.dsp | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/sbbs3/GNUmakefile b/src/sbbs3/GNUmakefile index 1ed2db147b..6b2b998d34 100644 --- a/src/sbbs3/GNUmakefile +++ b/src/sbbs3/GNUmakefile @@ -401,6 +401,7 @@ ADDFILES_OBJS = \ $(EXEODIR)/crc16.o \ $(EXEODIR)/str_util.o \ $(EXEODIR)/dat_rec.o \ + $(EXEODIR)/userdat.o \ $(EXEODIR)/filedat.o \ $(EXEODIR)/filewrap.o \ $(EXEODIR)/dirwrap.o \ diff --git a/src/sbbs3/Makefile b/src/sbbs3/Makefile index 54bfe4d260..a64cea6e66 100644 --- a/src/sbbs3/Makefile +++ b/src/sbbs3/Makefile @@ -189,6 +189,7 @@ $(ADDFILES): addfiles.c \ $(LIBODIR)\crc16.obj \ $(LIBODIR)\str_util.obj \ $(LIBODIR)\date_str.obj \ + $(LIBODIR)\userdat.obj \ dat_rec.c \ filedat.c \ genwrap.c \ diff --git a/src/sbbs3/addfiles.c b/src/sbbs3/addfiles.c index 80af7d5414..dcf1077d94 100644 --- a/src/sbbs3/addfiles.c +++ b/src/sbbs3/addfiles.c @@ -37,9 +37,7 @@ #include "sbbs.h" -#define ADDFILES_VER "3.00" - -char *crlf="\r\n"; +#define ADDFILES_VER "3.01" scfg_t scfg; @@ -278,7 +276,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) if(mode&FILE_ID) { for(i=0;i<scfg.total_fextrs;i++) - if(!stricmp(scfg.fextr[i]->ext,f.name+9)) + if(!stricmp(scfg.fextr[i]->ext,f.name+9) && chk_ar(&scfg,scfg.fextr[i]->ar,NULL)) break; if(i<scfg.total_fextrs) { sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir); @@ -481,7 +479,7 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) if(mode&FILE_ID) { for(i=0;i<scfg.total_fextrs;i++) - if(!stricmp(scfg.fextr[i]->ext,f.name+9)) + if(!stricmp(scfg.fextr[i]->ext,f.name+9) && chk_ar(&scfg,scfg.fextr[i]->ar,NULL)) break; if(i<scfg.total_fextrs) { sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir); @@ -894,7 +892,7 @@ int main(int argc, char **argv) printf("%s %7lu %s\n",f.name,f.cdt,f.desc); if(mode&FILE_ID) { for(i=0;i<scfg.total_fextrs;i++) - if(!stricmp(scfg.fextr[i]->ext,f.name+9)) + if(!stricmp(scfg.fextr[i]->ext,f.name+9) && chk_ar(&scfg,scfg.fextr[i]->ar,NULL)) break; if(i<scfg.total_fextrs) { sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir); diff --git a/src/sbbs3/addfiles.dsp b/src/sbbs3/addfiles.dsp index ec017204d2..bb134ba01e 100644 --- a/src/sbbs3/addfiles.dsp +++ b/src/sbbs3/addfiles.dsp @@ -136,5 +136,9 @@ SOURCE=.\scfglib2.c SOURCE=.\str_util.c # End Source File +# Begin Source File + +SOURCE=.\userdat.c +# End Source File # End Target # End Project -- GitLab