Skip to content
Snippets Groups Projects
Commit 4db419f5 authored by rswindell's avatar rswindell
Browse files

Need local name for cmdstr() (conflicting prototypes with xtrn.cpp version).

parent 2d7e92dd
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2003 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 *
......@@ -121,7 +121,7 @@ void prep_desc(char *str)
/*****************************************************************************/
/* Returns command line generated from instr with %c replacments */
/*****************************************************************************/
char *cmdstr(char *instr, char *fpath, char *fspec, char *outstr)
char *mycmdstr(char *instr, char *fpath, char *fspec, char *outstr)
{
static char cmd[MAX_PATH+1];
char str[MAX_PATH+1];
......@@ -283,11 +283,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip)
if(i<scfg.total_fextrs) {
sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
fexistcase(tmp);
}
if((file=nopen(tmp,O_RDONLY|O_BINARY))!=-1) {
......@@ -486,11 +486,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip)
if(i<scfg.total_fextrs) {
sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
fexistcase(tmp);
}
if((file=nopen(tmp,O_RDONLY|O_BINARY))!=-1) {
......@@ -899,11 +899,11 @@ int main(int argc, char **argv)
if(i<scfg.total_fextrs) {
sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,str,"FILE_ID.DIZ",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,str,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp);
system(cmdstr(scfg.fextr[i]->cmd,str,"DESC.SDI",NULL));
system(mycmdstr(scfg.fextr[i]->cmd,str,"DESC.SDI",NULL));
fexistcase(tmp);
}
if((file=nopen(tmp,O_RDONLY|O_BINARY))!=-1) {
......
......@@ -206,7 +206,7 @@ void logprintf(char *str, ...)
/*****************************************************************************/
/* Returns command line generated from instr with %c replacments */
/*****************************************************************************/
char *cmdstr(scfg_t* cfg, char *instr, char *fpath, char *fspec)
char *mycmdstr(scfg_t* cfg, char *instr, char *fpath, char *fspec)
{
static char cmd[128];
char str[256],str2[128];
......@@ -1527,14 +1527,14 @@ int unpack(char *infile)
logprintf("ERROR line %d determining filetype of %s",__LINE__,infile);
return(1); }
j=execute(cmdstr(&scfg,cfg.arcdef[i].unpack,infile
j=execute(mycmdstr(&scfg,cfg.arcdef[i].unpack,infile
,secure ? cfg.secure : cfg.inbound));
if(j) {
printf("\7ERROR %d (%d) executing %s\n"
,j,errno,cmdstr(&scfg,cfg.arcdef[i].unpack,infile
,j,errno,mycmdstr(&scfg,cfg.arcdef[i].unpack,infile
,secure ? cfg.secure : cfg.inbound));
logprintf("ERROR %d (%d) line %d executing %s"
,j,errno,__LINE__,cmdstr(&scfg,cfg.arcdef[i].unpack,infile
,j,errno,__LINE__,mycmdstr(&scfg,cfg.arcdef[i].unpack,infile
,secure ? cfg.secure : cfg.inbound));
return(j); }
return(0);
......@@ -1553,12 +1553,12 @@ void pack(char *srcfile,char *destfile,faddr_t dest)
if(i<cfg.nodecfgs)
use=cfg.nodecfg[i].arctype;
j=execute(cmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile));
j=execute(mycmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile));
if(j) {
printf("\7ERROR %d (%d) executing %s\n"
,j,errno,cmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile));
,j,errno,mycmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile));
logprintf("ERROR %d (%d) line %d executing %s"
,j,errno,__LINE__,cmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile)); }
,j,errno,__LINE__,mycmdstr(&scfg,cfg.arcdef[use].pack,destfile,srcfile)); }
}
enum {
......
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