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
8a8c5102
Commit
8a8c5102
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Need to define SCFG for new scfglib1/2.c memory leak/segfault leaks (don't
compile AR strings for SCFG).
parent
363795fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/sbbs3/scfg/Makefile
+1
-1
1 addition, 1 deletion
src/sbbs3/scfg/Makefile
src/sbbs3/scfglib.h
+7
-1
7 additions, 1 deletion
src/sbbs3/scfglib.h
src/sbbs3/scfglib1.c
+10
-10
10 additions, 10 deletions
src/sbbs3/scfglib1.c
src/sbbs3/scfglib2.c
+20
-20
20 additions, 20 deletions
src/sbbs3/scfglib2.c
with
38 additions
and
32 deletions
src/sbbs3/scfg/Makefile
+
1
−
1
View file @
8a8c5102
...
...
@@ -22,7 +22,7 @@ XPDEV = ..\..\xpdev
UIFC
=
..
\.
.
\u
ifc
LIB
=
..
\.
.
\.
.
\l
ib
INCLUDE
=
..
\.
.
\.
.
\i
nclude
CFLAGS
=
-M
-I
..
;$(
UIFC
);$(
XPDEV
)
CFLAGS
=
-DSCFG
-M
-I
..
;$(
UIFC
);$(
XPDEV
)
DELETE
=
echo
y | del
.path.c
=
.
;
..
;$(
UIFC
);$(
XPDEV
)
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib.h
+
7
−
1
View file @
8a8c5102
...
...
@@ -57,7 +57,13 @@ extern const uchar* nular;
#define FREE_AND_NULL(x) if(x!=NULL) { FREE(x); x=NULL; }
/* allocated with arstr() */
#define FREE_AR(x) if(x!=NULL && x!=nular) { FREE(x); x=NULL; }
#define FREE_AR(x) if(x!=NULL && x!=nular) { FREE(x); x=NULL; }
#if defined(SCFG)
/* Don't compile AR strings for SCFG */
#define ARSTR(str,cfg) NULL
#else
#define ARSTR(str,cfg) arstr(NULL,str,cfg)
#endif
char
*
get_alloc
(
long
*
offset
,
char
*
outstr
,
int
maxlen
,
FILE
*
instream
);
BOOL
allocerr
(
FILE
*
,
char
*
error
,
long
offset
,
char
*
fname
,
uint
size
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib1.c
+
10
−
10
View file @
8a8c5102
...
...
@@ -95,7 +95,7 @@ BOOL read_node_cfg(scfg_t* cfg, char* error)
get_int
(
cfg
->
node_valuser
,
instream
);
get_int
(
cfg
->
node_minbps
,
instream
);
get_str
(
cfg
->
node_arstr
,
instream
);
cfg
->
node_ar
=
arstr
(
NULL
,
cfg
->
node_arstr
,
cfg
);
cfg
->
node_ar
=
ARSTR
(
cfg
->
node_arstr
,
cfg
);
get_int
(
cfg
->
node_dollars_per_call
,
instream
);
get_str
(
cfg
->
node_editor
,
instream
);
...
...
@@ -242,7 +242,7 @@ BOOL read_main_cfg(scfg_t* cfg, char* error)
get_int
(
cfg
->
sys_def_stat
,
instream
);
/* default status line */
get_str
(
cfg
->
sys_chat_arstr
,
instream
);
cfg
->
sys_chat_ar
=
arstr
(
NULL
,
cfg
->
sys_chat_arstr
,
cfg
);
cfg
->
sys_chat_ar
=
ARSTR
(
cfg
->
sys_chat_arstr
,
cfg
);
get_int
(
cfg
->
cdt_min_value
,
instream
);
get_int
(
cfg
->
max_minutes
,
instream
);
...
...
@@ -391,7 +391,7 @@ BOOL read_main_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
shell
[
i
]
->
name
,
instream
);
get_str
(
cfg
->
shell
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
shell
[
i
]
->
arstr
,
instream
);
cfg
->
shell
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
shell
[
i
]
->
arstr
,
cfg
);
cfg
->
shell
[
i
]
->
ar
=
ARSTR
(
cfg
->
shell
[
i
]
->
arstr
,
cfg
);
get_int
(
cfg
->
shell
[
i
]
->
misc
,
instream
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -430,7 +430,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
get_int
(
cfg
->
mail_maxcrcs
,
instream
);
get_int
(
cfg
->
mail_maxage
,
instream
);
get_str
(
cfg
->
preqwk_arstr
,
instream
);
cfg
->
preqwk_ar
=
arstr
(
NULL
,
cfg
->
preqwk_arstr
,
cfg
);
cfg
->
preqwk_ar
=
ARSTR
(
cfg
->
preqwk_arstr
,
cfg
);
get_int
(
cfg
->
smb_retry_time
,
instream
);
/* odd byte */
if
(
!
cfg
->
smb_retry_time
)
...
...
@@ -465,7 +465,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
grp
[
i
]
->
sname
,
instream
);
get_str
(
cfg
->
grp
[
i
]
->
arstr
,
instream
);
cfg
->
grp
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
grp
[
i
]
->
arstr
,
cfg
);
cfg
->
grp
[
i
]
->
ar
=
ARSTR
(
cfg
->
grp
[
i
]
->
arstr
,
cfg
);
get_str
(
cfg
->
grp
[
i
]
->
code_prefix
,
instream
);
...
...
@@ -505,10 +505,10 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
sub
[
i
]
->
post_arstr
,
instream
);
get_str
(
cfg
->
sub
[
i
]
->
op_arstr
,
instream
);
cfg
->
sub
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
sub
[
i
]
->
arstr
,
cfg
);
cfg
->
sub
[
i
]
->
read_ar
=
arstr
(
NULL
,
cfg
->
sub
[
i
]
->
read_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
post_ar
=
arstr
(
NULL
,
cfg
->
sub
[
i
]
->
post_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
op_ar
=
arstr
(
NULL
,
cfg
->
sub
[
i
]
->
op_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
ar
=
ARSTR
(
cfg
->
sub
[
i
]
->
arstr
,
cfg
);
cfg
->
sub
[
i
]
->
read_ar
=
ARSTR
(
cfg
->
sub
[
i
]
->
read_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
post_ar
=
ARSTR
(
cfg
->
sub
[
i
]
->
post_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
op_ar
=
ARSTR
(
cfg
->
sub
[
i
]
->
op_arstr
,
cfg
);
get_int
(
cfg
->
sub
[
i
]
->
misc
,
instream
);
...
...
@@ -540,7 +540,7 @@ BOOL read_msgs_cfg(scfg_t* cfg, char* error)
#endif
get_str
(
cfg
->
sub
[
i
]
->
mod_arstr
,
instream
);
cfg
->
sub
[
i
]
->
mod_ar
=
arstr
(
NULL
,
cfg
->
sub
[
i
]
->
mod_arstr
,
cfg
);
cfg
->
sub
[
i
]
->
mod_ar
=
ARSTR
(
cfg
->
sub
[
i
]
->
mod_arstr
,
cfg
);
get_int
(
cfg
->
sub
[
i
]
->
qwkconf
,
instream
);
get_int
(
c
,
instream
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib2.c
+
20
−
20
View file @
8a8c5102
...
...
@@ -95,7 +95,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
fextr
[
i
]
->
ext
,
instream
);
get_str
(
cfg
->
fextr
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
fextr
[
i
]
->
arstr
,
instream
);
cfg
->
fextr
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
fextr
[
i
]
->
arstr
,
cfg
);
cfg
->
fextr
[
i
]
->
ar
=
ARSTR
(
cfg
->
fextr
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -123,7 +123,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
fcomp
[
i
]
->
ext
,
instream
);
get_str
(
cfg
->
fcomp
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
fcomp
[
i
]
->
arstr
,
instream
);
cfg
->
fcomp
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
fcomp
[
i
]
->
arstr
,
cfg
);
cfg
->
fcomp
[
i
]
->
ar
=
ARSTR
(
cfg
->
fcomp
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -150,7 +150,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
fview
[
i
]
->
ext
,
instream
);
get_str
(
cfg
->
fview
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
fview
[
i
]
->
arstr
,
instream
);
cfg
->
fview
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
fview
[
i
]
->
arstr
,
cfg
);
cfg
->
fview
[
i
]
->
ar
=
ARSTR
(
cfg
->
fview
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -178,7 +178,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
ftest
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
ftest
[
i
]
->
workstr
,
instream
);
get_str
(
cfg
->
ftest
[
i
]
->
arstr
,
instream
);
cfg
->
ftest
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
ftest
[
i
]
->
arstr
,
cfg
);
cfg
->
ftest
[
i
]
->
ar
=
ARSTR
(
cfg
->
ftest
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -207,7 +207,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
dlevent
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
dlevent
[
i
]
->
workstr
,
instream
);
get_str
(
cfg
->
dlevent
[
i
]
->
arstr
,
instream
);
cfg
->
dlevent
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
dlevent
[
i
]
->
arstr
,
cfg
);
cfg
->
dlevent
[
i
]
->
ar
=
ARSTR
(
cfg
->
dlevent
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -243,7 +243,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
prot
[
i
]
->
bicmd
,
instream
);
get_int
(
cfg
->
prot
[
i
]
->
misc
,
instream
);
get_str
(
cfg
->
prot
[
i
]
->
arstr
,
instream
);
cfg
->
prot
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
prot
[
i
]
->
arstr
,
cfg
);
cfg
->
prot
[
i
]
->
ar
=
ARSTR
(
cfg
->
prot
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -301,7 +301,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
lib
[
i
]
->
sname
,
instream
);
get_str
(
cfg
->
lib
[
i
]
->
arstr
,
instream
);
cfg
->
lib
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
lib
[
i
]
->
arstr
,
cfg
);
cfg
->
lib
[
i
]
->
ar
=
ARSTR
(
cfg
->
lib
[
i
]
->
arstr
,
cfg
);
get_str
(
cfg
->
lib
[
i
]
->
parent_path
,
instream
);
...
...
@@ -358,10 +358,10 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
dir
[
i
]
->
dl_arstr
,
instream
);
get_str
(
cfg
->
dir
[
i
]
->
op_arstr
,
instream
);
cfg
->
dir
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
dir
[
i
]
->
arstr
,
cfg
);
cfg
->
dir
[
i
]
->
ul_ar
=
arstr
(
NULL
,
cfg
->
dir
[
i
]
->
ul_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
dl_ar
=
arstr
(
NULL
,
cfg
->
dir
[
i
]
->
dl_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
op_ar
=
arstr
(
NULL
,
cfg
->
dir
[
i
]
->
op_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
ar
=
ARSTR
(
cfg
->
dir
[
i
]
->
arstr
,
cfg
);
cfg
->
dir
[
i
]
->
ul_ar
=
ARSTR
(
cfg
->
dir
[
i
]
->
ul_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
dl_ar
=
ARSTR
(
cfg
->
dir
[
i
]
->
dl_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
op_ar
=
ARSTR
(
cfg
->
dir
[
i
]
->
op_arstr
,
cfg
);
get_str
(
cfg
->
dir
[
i
]
->
path
,
instream
);
...
...
@@ -375,7 +375,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_int
(
cfg
->
dir
[
i
]
->
seqdev
,
instream
);
get_int
(
cfg
->
dir
[
i
]
->
sort
,
instream
);
get_str
(
cfg
->
dir
[
i
]
->
ex_arstr
,
instream
);
cfg
->
dir
[
i
]
->
ex_ar
=
arstr
(
NULL
,
cfg
->
dir
[
i
]
->
ex_arstr
,
cfg
);
cfg
->
dir
[
i
]
->
ex_ar
=
ARSTR
(
cfg
->
dir
[
i
]
->
ex_arstr
,
cfg
);
get_int
(
cfg
->
dir
[
i
]
->
maxage
,
instream
);
get_int
(
cfg
->
dir
[
i
]
->
up_pct
,
instream
);
...
...
@@ -409,7 +409,7 @@ BOOL read_file_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
txtsec
[
i
]
->
name
,
instream
);
get_str
(
cfg
->
txtsec
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
txtsec
[
i
]
->
arstr
,
instream
);
cfg
->
txtsec
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
txtsec
[
i
]
->
arstr
,
cfg
);
cfg
->
txtsec
[
i
]
->
ar
=
ARSTR
(
cfg
->
txtsec
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -482,7 +482,7 @@ BOOL read_xtrn_cfg(scfg_t* cfg, char* error)
get_int
(
cfg
->
xedit
[
i
]
->
misc
,
instream
);
get_str
(
cfg
->
xedit
[
i
]
->
arstr
,
instream
);
cfg
->
xedit
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
xedit
[
i
]
->
arstr
,
cfg
);
cfg
->
xedit
[
i
]
->
ar
=
ARSTR
(
cfg
->
xedit
[
i
]
->
arstr
,
cfg
);
get_int
(
cfg
->
xedit
[
i
]
->
type
,
instream
);
get_int
(
c
,
instream
);
...
...
@@ -514,7 +514,7 @@ BOOL read_xtrn_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
xtrnsec
[
i
]
->
name
,
instream
);
get_str
(
cfg
->
xtrnsec
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
xtrnsec
[
i
]
->
arstr
,
instream
);
cfg
->
xtrnsec
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
xtrnsec
[
i
]
->
arstr
,
cfg
);
cfg
->
xtrnsec
[
i
]
->
ar
=
ARSTR
(
cfg
->
xtrnsec
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -545,8 +545,8 @@ BOOL read_xtrn_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
xtrn
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
xtrn
[
i
]
->
arstr
,
instream
);
get_str
(
cfg
->
xtrn
[
i
]
->
run_arstr
,
instream
);
cfg
->
xtrn
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
xtrn
[
i
]
->
arstr
,
cfg
);
cfg
->
xtrn
[
i
]
->
run_ar
=
arstr
(
NULL
,
cfg
->
xtrn
[
i
]
->
run_arstr
,
cfg
);
cfg
->
xtrn
[
i
]
->
ar
=
ARSTR
(
cfg
->
xtrn
[
i
]
->
arstr
,
cfg
);
cfg
->
xtrn
[
i
]
->
run_ar
=
ARSTR
(
cfg
->
xtrn
[
i
]
->
run_arstr
,
cfg
);
get_int
(
cfg
->
xtrn
[
i
]
->
type
,
instream
);
get_int
(
cfg
->
xtrn
[
i
]
->
misc
,
instream
);
...
...
@@ -695,7 +695,7 @@ BOOL read_chat_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
guru
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
guru
[
i
]
->
arstr
,
instream
);
cfg
->
guru
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
guru
[
i
]
->
arstr
,
cfg
);
cfg
->
guru
[
i
]
->
ar
=
ARSTR
(
cfg
->
guru
[
i
]
->
arstr
,
cfg
);
for
(
j
=
0
;
j
<
8
;
j
++
)
get_int
(
n
,
instream
);
...
...
@@ -777,7 +777,7 @@ BOOL read_chat_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
chan
[
i
]
->
code
,
instream
);
get_str
(
cfg
->
chan
[
i
]
->
arstr
,
instream
);
cfg
->
chan
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
chan
[
i
]
->
arstr
,
cfg
);
cfg
->
chan
[
i
]
->
ar
=
ARSTR
(
cfg
->
chan
[
i
]
->
arstr
,
cfg
);
get_int
(
cfg
->
chan
[
i
]
->
cost
,
instream
);
get_int
(
cfg
->
chan
[
i
]
->
guru
,
instream
);
...
...
@@ -809,7 +809,7 @@ BOOL read_chat_cfg(scfg_t* cfg, char* error)
get_str
(
cfg
->
page
[
i
]
->
cmd
,
instream
);
get_str
(
cfg
->
page
[
i
]
->
arstr
,
instream
);
cfg
->
page
[
i
]
->
ar
=
arstr
(
NULL
,
cfg
->
page
[
i
]
->
arstr
,
cfg
);
cfg
->
page
[
i
]
->
ar
=
ARSTR
(
cfg
->
page
[
i
]
->
arstr
,
cfg
);
get_int
(
cfg
->
page
[
i
]
->
misc
,
instream
);
for
(
j
=
0
;
j
<
8
;
j
++
)
...
...
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