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
816f239e
Commit
816f239e
authored
7 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Address GCC warnings and add -import option to usage output.
parent
7cd354b2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/sbbs3/scfg/scfg.c
+8
-2
8 additions, 2 deletions
src/sbbs3/scfg/scfg.c
src/sbbs3/scfg/scfg.h
+11
-10
11 additions, 10 deletions
src/sbbs3/scfg/scfg.h
src/sbbs3/scfg/scfgsub.c
+2
-0
2 additions, 0 deletions
src/sbbs3/scfg/scfgsub.c
src/sbbs3/scfg/scfgxfr2.c
+2
-0
2 additions, 0 deletions
src/sbbs3/scfg/scfgxfr2.c
with
23 additions
and
12 deletions
src/sbbs3/scfg/scfg.c
+
8
−
2
View file @
816f239e
...
...
@@ -55,7 +55,7 @@ char **opt;
char
tmp
[
256
];
char
error
[
256
];
int
backup_level
=
5
;
char
*
area_sort_desc
[]
=
{
"Index Position"
,
"Long Name"
,
"Short Name"
,
"Internal Code"
,
NULL
};
char
*
area_sort_desc
[]
=
{
"Index Position"
,
"Long Name"
,
"Short Name"
,
"Internal Code"
};
char
*
invalid_code
=
"`Invalid Internal Code:`
\n\n
"
...
...
@@ -292,6 +292,7 @@ int main(int argc, char **argv)
"-c = force color mode
\r\n
"
"-m = force monochrome mode
\r\n
"
"-e# = set escape delay to #msec
\r\n
"
"-import=<filename> = import a message area list file
\r\n
"
"-g# = set group number to import into
\r\n
"
"-iX = set interface mode to X (default=auto) where X is one of:
\r\n
"
#ifdef __unix__
...
...
@@ -331,7 +332,7 @@ int main(int argc, char **argv)
backslashcolon
(
cfg
.
ctrl_dir
);
if
(
import
!=
NULL
&&
*
import
!=
0
)
{
enum
{
msgbase
=
'M'
,
filebase
=
'F'
,
xtrns
=
'X'
}
base
=
msgbase
;
enum
{
msgbase
=
'M'
,
filebase
=
'F'
}
base
=
msgbase
;
char
fname
[
MAX_PATH
+
1
];
SAFECOPY
(
fname
,
import
);
p
=
strchr
(
fname
,
','
);
...
...
@@ -374,6 +375,11 @@ int main(int argc, char **argv)
ported
=
import_msg_areas
(
list_type
,
fp
,
grpnum
,
1
,
99999
,
/* qhub: */
NULL
,
&
added
);
break
;
}
case
filebase
:
{
fprintf
(
stderr
,
"!Not yet supported
\n
"
);
break
;
}
}
fclose
(
fp
);
if
(
ported
<
0
)
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfg/scfg.h
+
11
−
10
View file @
816f239e
...
...
@@ -53,6 +53,16 @@
#define SUB_HDRMOD (1L<<31)
/* Modified sub-board header info */
#define MAX_UNIQUE_CODE_ATTEMPTS (36*36*36)
enum
import_list_type
{
IMPORT_LIST_TYPE_SUBS_TXT
,
IMPORT_LIST_TYPE_QWK_CONTROL_DAT
,
IMPORT_LIST_TYPE_GENERIC_AREAS_BBS
,
IMPORT_LIST_TYPE_SBBSECHO_AREAS_BBS
,
IMPORT_LIST_TYPE_BACKBONE_NA
,
};
/************/
/* Typedefs */
/************/
...
...
@@ -70,7 +80,7 @@ extern char *nulstr;
extern
char
*
invalid_code
,
*
num_flags
;
extern
int
backup_level
;
extern
BOOL
new_install
;
char
*
area_sort_desc
[];
char
*
area_sort_desc
[
AREA_SORT_TYPES
];
/***********************/
/* Function Prototypes */
...
...
@@ -119,15 +129,6 @@ void sort_dirs(int libnum);
unsigned
subs_in_group
(
unsigned
grpnum
);
char
random_code_char
(
void
);
#define MAX_UNIQUE_CODE_ATTEMPTS (36*36*36)
enum
import_list_type
{
IMPORT_LIST_TYPE_SUBS_TXT
,
IMPORT_LIST_TYPE_QWK_CONTROL_DAT
,
IMPORT_LIST_TYPE_GENERIC_AREAS_BBS
,
IMPORT_LIST_TYPE_SBBSECHO_AREAS_BBS
,
IMPORT_LIST_TYPE_BACKBONE_NA
,
};
long
import_msg_areas
(
enum
import_list_type
,
FILE
*
,
unsigned
grpnum
,
int
min_confnum
,
int
max_confnum
,
qhub_t
*
,
long
*
added
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfg/scfgsub.c
+
2
−
0
View file @
816f239e
...
...
@@ -169,6 +169,8 @@ while(1) {
name
=
cfg
.
sub
[
i
]
->
code_suffix
;
name_len
=
LEN_CODE
;
break
;
default:
/* Defeat stupid GCC warning */
break
;
}
sprintf
(
str
,
"%-*s %c"
,
name_len
,
name
,
cfg
.
sub
[
i
]
->
misc
&
SUB_TEMPLATE
?
'*'
:
' '
);
truncsp
(
str
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfg/scfgxfr2.c
+
2
−
0
View file @
816f239e
...
...
@@ -959,6 +959,8 @@ void dir_cfg(uint libnum)
name
=
cfg
.
dir
[
i
]
->
code_suffix
;
name_len
=
LEN_CODE
;
break
;
default:
/* Defeat stupid GCC warning */
break
;
}
sprintf
(
str
,
"%-*s %c"
,
name_len
,
name
,
cfg
.
dir
[
i
]
->
misc
&
DIR_TEMPLATE
?
'*'
:
' '
);
truncsp
(
str
);
...
...
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