Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4db419f5
Commit
4db419f5
authored
21 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Need local name for cmdstr() (conflicting prototypes with xtrn.cpp version).
parent
2d7e92dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/addfiles.c
+8
-8
8 additions, 8 deletions
src/sbbs3/addfiles.c
src/sbbs3/sbbsecho.c
+7
-7
7 additions, 7 deletions
src/sbbs3/sbbsecho.c
with
15 additions
and
15 deletions
src/sbbs3/addfiles.c
+
8
−
8
View file @
4db419f5
...
...
@@ -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 200
0
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
3
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
*
my
cmdstr
(
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
(
my
cmdstr
(
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
(
my
cmdstr
(
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
(
my
cmdstr
(
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
(
my
cmdstr
(
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
(
my
cmdstr
(
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
(
my
cmdstr
(
scfg
.
fextr
[
i
]
->
cmd
,
str
,
"DESC.SDI"
,
NULL
));
fexistcase
(
tmp
);
}
if
((
file
=
nopen
(
tmp
,
O_RDONLY
|
O_BINARY
))
!=-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/sbbsecho.c
+
7
−
7
View file @
4db419f5
...
...
@@ -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
*
my
cmdstr
(
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
(
my
cmdstr
(
&
scfg
,
cfg
.
arcdef
[
i
].
unpack
,
infile
,
secure
?
cfg
.
secure
:
cfg
.
inbound
));
if
(
j
)
{
printf
(
"
\7
ERROR %d (%d) executing %s
\n
"
,
j
,
errno
,
cmdstr
(
&
scfg
,
cfg
.
arcdef
[
i
].
unpack
,
infile
,
j
,
errno
,
my
cmdstr
(
&
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__
,
my
cmdstr
(
&
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
(
my
cmdstr
(
&
scfg
,
cfg
.
arcdef
[
use
].
pack
,
destfile
,
srcfile
));
if
(
j
)
{
printf
(
"
\7
ERROR %d (%d) executing %s
\n
"
,
j
,
errno
,
cmdstr
(
&
scfg
,
cfg
.
arcdef
[
use
].
pack
,
destfile
,
srcfile
));
,
j
,
errno
,
my
cmdstr
(
&
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__
,
my
cmdstr
(
&
scfg
,
cfg
.
arcdef
[
use
].
pack
,
destfile
,
srcfile
));
}
}
enum
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment