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
c1284baa
Commit
c1284baa
authored
6 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Use enum values for field names
Easier to match up than numbers.
parent
2ff66c27
No related branches found
No related tags found
No related merge requests found
Pipeline
#7239
failed
6 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/bbslist.c
+99
-59
99 additions, 59 deletions
src/syncterm/bbslist.c
with
99 additions
and
59 deletions
src/syncterm/bbslist.c
+
99
−
59
View file @
c1284baa
...
@@ -1125,6 +1125,47 @@ edit_name(char *itemname, struct bbslist **list, str_list_t inifile, bool edit_t
...
@@ -1125,6 +1125,47 @@ edit_name(char *itemname, struct bbslist **list, str_list_t inifile, bool edit_t
return
false
;
return
false
;
}
}
enum
{
BBSLIST_FIELD_NONE
,
BBSLIST_FIELD_NAME
,
BBSLIST_FIELD_ADDR
,
BBSLIST_FIELD_PORT
,
BBSLIST_FIELD_ADDED
,
BBSLIST_FIELD_CONNECTED
,
BBSLIST_FIELD_CALLS
,
BBSLIST_FIELD_USER
,
BBSLIST_FIELD_PASSWORD
,
BBSLIST_FIELD_SYSPASS
,
BBSLIST_FIELD_TYPE
,
BBSLIST_FIELD_CONN_TYPE
,
BBSLIST_FIELD_ID
,
BBSLIST_FIELD_SCREEN_MODE
,
BBSLIST_FIELD_NOSTATUS
,
BBSLIST_FIELD_DLDIR
,
BBSLIST_FIELD_ULDIR
,
BBSLIST_FIELD_LOGFILE
,
BBSLIST_FIELD_APPEND_LOGFILE
,
BBSLIST_FIELD_XFER_LOGLEVEL
,
BBSLIST_FIELD_TELNET_LOGLEVEL
,
BBSLIST_FIELD_BPSRATE
,
BBSLIST_FIELD_MUSIC
,
BBSLIST_FIELD_ADDRESS_FAMILY
,
BBSLIST_FIELD_FONT
,
BBSLIST_FIELD_HIDEPOPUPS
,
BBSLIST_FIELD_GHOST_PROGRAM
,
BBSLIST_FIELD_RIP
,
BBSLIST_FIELD_FLOW_CONTROL
,
BBSLIST_FIELD_COMMENT
,
BBSLIST_FIELD_FORCE_LCF
,
BBSLIST_FIELD_YELLOW_IS_YELLOW
,
BBSLIST_FIELD_HAS_FINGERPRINT
,
BBSLIST_FIELD_SSH_FINGERPRINT
,
BBSLIST_FIELD_SFTP_PUBLIC_KEY
,
BBSLIST_FIELD_STOP_BITS
,
BBSLIST_FIELD_DATA_BITS
,
BBSLIST_FIELD_PARITY
,
ꪪ
};
void
void
build_edit_list
(
struct
bbslist
*
item
,
char
opt
[][
69
],
int
*
optmap
,
char
**
opts
,
int
isdefault
,
char
*
itemname
)
build_edit_list
(
struct
bbslist
*
item
,
char
opt
[][
69
],
int
*
optmap
,
char
**
opts
,
int
isdefault
,
char
*
itemname
)
{
{
...
@@ -1132,9 +1173,9 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
...
@@ -1132,9 +1173,9 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
char
str
[
64
];
char
str
[
64
];
if
(
!
isdefault
)
{
if
(
!
isdefault
)
{
optmap
[
i
]
=
1
;
optmap
[
i
]
=
BBSLIST_FIELD_NAME
;
sprintf
(
opt
[
i
++
],
"Name %s"
,
itemname
);
sprintf
(
opt
[
i
++
],
"Name %s"
,
itemname
);
optmap
[
i
]
=
2
;
optmap
[
i
]
=
BBSLIST_FIELD_ADDR
;
switch
(
item
->
conn_type
)
{
switch
(
item
->
conn_type
)
{
case
CONN_TYPE_MODEM
:
case
CONN_TYPE_MODEM
:
sprintf
(
opt
[
i
++
],
"Phone Number %s"
,
item
->
addr
);
sprintf
(
opt
[
i
++
],
"Phone Number %s"
,
item
->
addr
);
...
@@ -1151,83 +1192,83 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
...
@@ -1151,83 +1192,83 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
break
;
break
;
}
}
}
}
optmap
[
i
]
=
3
;
optmap
[
i
]
=
BBSLIST_FIELD_CONN_TYPE
;
sprintf
(
opt
[
i
++
],
"Connection Type %s"
,
conn_types
[
item
->
conn_type
]);
sprintf
(
opt
[
i
++
],
"Connection Type %s"
,
conn_types
[
item
->
conn_type
]);
if
((
item
->
conn_type
==
CONN_TYPE_MODEM
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL_NORTS
))
{
if
((
item
->
conn_type
==
CONN_TYPE_MODEM
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL_NORTS
))
{
optmap
[
i
]
=
4
;
optmap
[
i
]
=
BBSLIST_FIELD_FLOW_CONTROL
;
fc_str
(
opt
[
i
++
],
item
->
flow_control
);
fc_str
(
opt
[
i
++
],
item
->
flow_control
);
optmap
[
i
]
=
5
;
optmap
[
i
]
=
BBSLIST_FIELD_STOP_BITS
;
sprintf
(
opt
[
i
++
],
"Stop Bits %hu"
,
item
->
stop_bits
);
sprintf
(
opt
[
i
++
],
"Stop Bits %hu"
,
item
->
stop_bits
);
optmap
[
i
]
=
6
;
optmap
[
i
]
=
BBSLIST_FIELD_DATA_BITS
;
sprintf
(
opt
[
i
++
],
"Data Bits %hu"
,
item
->
data_bits
);
sprintf
(
opt
[
i
++
],
"Data Bits %hu"
,
item
->
data_bits
);
optmap
[
i
]
=
7
;
optmap
[
i
]
=
BBSLIST_FIELD_PARITY
;
sprintf
(
opt
[
i
++
],
"Parity %s"
,
parity_enum
[
item
->
parity
]);
sprintf
(
opt
[
i
++
],
"Parity %s"
,
parity_enum
[
item
->
parity
]);
}
}
else
if
(
item
->
conn_type
!=
CONN_TYPE_SHELL
)
{
else
if
(
item
->
conn_type
!=
CONN_TYPE_SHELL
)
{
optmap
[
i
]
=
8
;
optmap
[
i
]
=
BBSLIST_FIELD_PORT
;
sprintf
(
opt
[
i
++
],
"TCP Port %hu"
,
item
->
port
);
sprintf
(
opt
[
i
++
],
"TCP Port %hu"
,
item
->
port
);
}
}
if
(
item
->
conn_type
==
CONN_TYPE_MBBS_GHOST
)
{
if
(
item
->
conn_type
==
CONN_TYPE_MBBS_GHOST
)
{
optmap
[
i
]
=
9
;
optmap
[
i
]
=
BBSLIST_FIELD_USER
;
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Username %s"
,
item
->
user
);
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Username %s"
,
item
->
user
);
i
++
;
i
++
;
optmap
[
i
]
=
10
;
optmap
[
i
]
=
BBSLIST_FIELD_PASSWORD
;
sprintf
(
opt
[
i
++
],
"GHost Program %s"
,
item
->
password
);
sprintf
(
opt
[
i
++
],
"GHost Program %s"
,
item
->
password
);
optmap
[
i
]
=
11
;
optmap
[
i
]
=
BBSLIST_FIELD_SYSPASS
;
sprintf
(
opt
[
i
++
],
"System Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
sprintf
(
opt
[
i
++
],
"System Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
}
}
else
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
else
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
optmap
[
i
]
=
9
;
optmap
[
i
]
=
BBSLIST_FIELD_USER
;
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"SSH Username %s"
,
item
->
user
);
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"SSH Username %s"
,
item
->
user
);
i
++
;
i
++
;
optmap
[
i
]
=
10
;
optmap
[
i
]
=
BBSLIST_FIELD_PASSWORD
;
sprintf
(
opt
[
i
++
],
"BBS Username %s"
,
item
->
password
);
sprintf
(
opt
[
i
++
],
"BBS Username %s"
,
item
->
password
);
optmap
[
i
]
=
11
;
optmap
[
i
]
=
BBSLIST_FIELD_SYSPASS
;
sprintf
(
opt
[
i
++
],
"BBS Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
sprintf
(
opt
[
i
++
],
"BBS Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
}
}
else
{
else
{
optmap
[
i
]
=
9
;
optmap
[
i
]
=
BBSLIST_FIELD_USER
;
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Username %s"
,
item
->
user
);
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Username %s"
,
item
->
user
);
i
++
;
i
++
;
optmap
[
i
]
=
10
;
optmap
[
i
]
=
BBSLIST_FIELD_PASSWORD
;
sprintf
(
opt
[
i
++
],
"Password %s"
,
item
->
password
[
0
]
?
"********"
:
"<none>"
);
sprintf
(
opt
[
i
++
],
"Password %s"
,
item
->
password
[
0
]
?
"********"
:
"<none>"
);
optmap
[
i
]
=
11
;
optmap
[
i
]
=
BBSLIST_FIELD_SYSPASS
;
sprintf
(
opt
[
i
++
],
"System Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
sprintf
(
opt
[
i
++
],
"System Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
}
}
optmap
[
i
]
=
12
;
optmap
[
i
]
=
BBSLIST_FIELD_SCREEN_MODE
;
sprintf
(
opt
[
i
++
],
"Screen Mode %s"
,
screen_modes
[
item
->
screen_mode
]);
sprintf
(
opt
[
i
++
],
"Screen Mode %s"
,
screen_modes
[
item
->
screen_mode
]);
optmap
[
i
]
=
13
;
optmap
[
i
]
=
BBSLIST_FIELD_NOSTATUS
;
sprintf
(
opt
[
i
++
],
"Hide Status Line %s"
,
item
->
nostatus
?
"Yes"
:
"No"
);
sprintf
(
opt
[
i
++
],
"Hide Status Line %s"
,
item
->
nostatus
?
"Yes"
:
"No"
);
optmap
[
i
]
=
14
;
optmap
[
i
]
=
BBSLIST_FIELD_DLDIR
;
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Download Path %s"
,
item
->
dldir
);
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Download Path %s"
,
item
->
dldir
);
i
++
;
i
++
;
optmap
[
i
]
=
15
;
optmap
[
i
]
=
BBSLIST_FIELD_ULDIR
;
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Upload Path %s"
,
item
->
uldir
);
printf_trunc
(
opt
[
i
],
sizeof
(
opt
[
i
]),
"Upload Path %s"
,
item
->
uldir
);
i
++
;
i
++
;
optmap
[
i
]
=
16
;
optmap
[
i
]
=
BBSLIST_FIELD_LOGFILE
;
strcpy
(
opt
[
i
++
],
"Log Configuration"
);
strcpy
(
opt
[
i
++
],
"Log Configuration"
);
if
(
item
->
bpsrate
)
if
(
item
->
bpsrate
)
sprintf
(
str
,
"%ubps"
,
item
->
bpsrate
);
sprintf
(
str
,
"%ubps"
,
item
->
bpsrate
);
else
else
strcpy
(
str
,
"Current"
);
strcpy
(
str
,
"Current"
);
optmap
[
i
]
=
17
;
optmap
[
i
]
=
BBSLIST_FIELD_BPSRATE
;
sprintf
(
opt
[
i
++
],
"Comm Rate %s"
,
str
);
sprintf
(
opt
[
i
++
],
"Comm Rate %s"
,
str
);
optmap
[
i
]
=
18
;
optmap
[
i
]
=
BBSLIST_FIELD_MUSIC
;
sprintf
(
opt
[
i
++
],
"ANSI Music %s"
,
music_names
[
item
->
music
]);
sprintf
(
opt
[
i
++
],
"ANSI Music %s"
,
music_names
[
item
->
music
]);
optmap
[
i
]
=
19
;
optmap
[
i
]
=
BBSLIST_FIELD_ADDRESS_FAMILY
;
sprintf
(
opt
[
i
++
],
"Address Family %s"
,
address_family_names
[
item
->
address_family
]);
sprintf
(
opt
[
i
++
],
"Address Family %s"
,
address_family_names
[
item
->
address_family
]);
optmap
[
i
]
=
20
;
optmap
[
i
]
=
BBSLIST_FIELD_FONT
;
sprintf
(
opt
[
i
++
],
"Font %s"
,
item
->
font
);
sprintf
(
opt
[
i
++
],
"Font %s"
,
item
->
font
);
optmap
[
i
]
=
21
;
optmap
[
i
]
=
BBSLIST_FIELD_HIDEPOPUPS
;
sprintf
(
opt
[
i
++
],
"Hide Popups %s"
,
item
->
hidepopups
?
"Yes"
:
"No"
);
sprintf
(
opt
[
i
++
],
"Hide Popups %s"
,
item
->
hidepopups
?
"Yes"
:
"No"
);
optmap
[
i
]
=
22
;
optmap
[
i
]
=
BBSLIST_FIELD_RIP
;
sprintf
(
opt
[
i
++
],
"RIP %s"
,
rip_versions
[
item
->
rip
]);
sprintf
(
opt
[
i
++
],
"RIP %s"
,
rip_versions
[
item
->
rip
]);
optmap
[
i
]
=
23
;
optmap
[
i
]
=
BBSLIST_FIELD_FORCE_LCF
;
sprintf
(
opt
[
i
++
],
"Force LCF Mode %s"
,
item
->
force_lcf
?
"Yes"
:
"No"
);
sprintf
(
opt
[
i
++
],
"Force LCF Mode %s"
,
item
->
force_lcf
?
"Yes"
:
"No"
);
optmap
[
i
]
=
24
;
optmap
[
i
]
=
BBSLIST_FIELD_YELLOW_IS_YELLOW
;
sprintf
(
opt
[
i
++
],
"Yellow is Yellow %s"
,
item
->
yellow_is_yellow
?
"Yes"
:
"No"
);
sprintf
(
opt
[
i
++
],
"Yellow is Yellow %s"
,
item
->
yellow_is_yellow
?
"Yes"
:
"No"
);
if
(
item
->
conn_type
==
CONN_TYPE_SSH
||
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
if
(
item
->
conn_type
==
CONN_TYPE_SSH
||
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
optmap
[
i
]
=
25
;
optmap
[
i
]
=
BBSLIST_FIELD_SFTP_PUBLIC_KEY
;
sprintf
(
opt
[
i
++
],
"SFTP Public Key %s"
,
item
->
sftp_public_key
?
"Yes"
:
"No"
);
sprintf
(
opt
[
i
++
],
"SFTP Public Key %s"
,
item
->
sftp_public_key
?
"Yes"
:
"No"
);
}
}
opt
[
i
][
0
]
=
0
;
opt
[
i
][
0
]
=
0
;
...
@@ -1392,10 +1433,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1392,10 +1433,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
itemname
=
NULL
;
itemname
=
NULL
;
else
else
itemname
=
item
->
name
;
itemname
=
item
->
name
;
memset
(
optmap
,
0
,
sizeof
(
optmap
));
build_edit_list
(
item
,
opt
,
optmap
,
opts
,
isdefault
,
itemname
);
build_edit_help
(
item
,
isdefault
,
helpbuf
,
sizeof
(
helpbuf
));
build_edit_help
(
item
,
isdefault
,
helpbuf
,
sizeof
(
helpbuf
));
for
(;
!
quitting
;)
{
for
(;
!
quitting
;)
{
memset
(
optmap
,
0
,
sizeof
(
optmap
));
build_edit_list
(
item
,
opt
,
optmap
,
opts
,
isdefault
,
itemname
);
build_edit_list
(
item
,
opt
,
optmap
,
opts
,
isdefault
,
itemname
);
uifc
.
changes
=
0
;
uifc
.
changes
=
0
;
uifc
.
helpbuf
=
helpbuf
;
uifc
.
helpbuf
=
helpbuf
;
...
@@ -1409,7 +1449,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1409,7 +1449,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
continue
;
continue
;
}
}
if
(
i
>=
0
)
{
if
(
i
>=
0
)
{
if
(
optmap
[
i
]
==
0
)
if
(
optmap
[
i
]
==
BBSLIST_FIELD_NONE
)
continue
;
continue
;
i
=
optmap
[
i
];
i
=
optmap
[
i
];
strcpy
(
optname
,
opt
[
i
]);
strcpy
(
optname
,
opt
[
i
]);
...
@@ -1449,17 +1489,17 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1449,17 +1489,17 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
}
}
strListFree
(
&
inifile
);
strListFree
(
&
inifile
);
return
changed
;
return
changed
;
case
1
:
// name
case
BBSLIST_FIELD_NAME
:
edit_name
(
itemname
,
list
,
inifile
,
false
);
edit_name
(
itemname
,
list
,
inifile
,
false
);
break
;
break
;
case
2
:
// address
case
BBSLIST_FIELD_ADDR
:
uifc
.
helpbuf
=
address_help
;
uifc
.
helpbuf
=
address_help
;
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
optname
,
item
->
addr
,
LIST_ADDR_MAX
,
K_EDIT
);
0
,
0
,
optname
,
item
->
addr
,
LIST_ADDR_MAX
,
K_EDIT
);
check_exit
(
false
);
check_exit
(
false
);
iniSetString
(
&
inifile
,
itemname
,
"Address"
,
item
->
addr
,
&
ini_style
);
iniSetString
(
&
inifile
,
itemname
,
"Address"
,
item
->
addr
,
&
ini_style
);
break
;
break
;
case
3
:
// conn_type
case
BBSLIST_FIELD_CONN_TYPE
:
i
=
item
->
conn_type
;
i
=
item
->
conn_type
;
item
->
conn_type
--
;
item
->
conn_type
--
;
uifc
.
helpbuf
=
conn_type_help
;
uifc
.
helpbuf
=
conn_type_help
;
...
@@ -1512,7 +1552,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1512,7 +1552,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
memset
(
optmap
,
0
,
sizeof
(
optmap
));
memset
(
optmap
,
0
,
sizeof
(
optmap
));
build_edit_help
(
item
,
isdefault
,
helpbuf
,
sizeof
(
helpbuf
));
build_edit_help
(
item
,
isdefault
,
helpbuf
,
sizeof
(
helpbuf
));
break
;
break
;
case
4
:
// flow_control
case
BBSLIST_FIELD_FLOW_CONTROL
:
uifc
.
helpbuf
=
"`Flow Control`
\n\n
"
uifc
.
helpbuf
=
"`Flow Control`
\n\n
"
"Select the desired flow control type.
\n
"
"Select the desired flow control type.
\n
"
"This should usually be left as
\"
RTS/CTS
\"
.
\n
"
;
"This should usually be left as
\"
RTS/CTS
\"
.
\n
"
;
...
@@ -1536,7 +1576,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1536,7 +1576,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
break
;
break
;
}
}
break
;
break
;
case
5
:
// stop_bits
case
BBSLIST_FIELD_STOP_BITS
:
switch
(
item
->
stop_bits
)
{
switch
(
item
->
stop_bits
)
{
case
1
:
case
1
:
item
->
stop_bits
=
2
;
item
->
stop_bits
=
2
;
...
@@ -1552,7 +1592,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1552,7 +1592,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
&
ini_style
);
&
ini_style
);
uifc
.
changes
=
1
;
uifc
.
changes
=
1
;
break
;
break
;
case
6
:
// data_bits
case
BBSLIST_FIELD_DATA_BITS
:
switch
(
item
->
data_bits
)
{
switch
(
item
->
data_bits
)
{
case
8
:
case
8
:
item
->
data_bits
=
7
;
item
->
data_bits
=
7
;
...
@@ -1568,7 +1608,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1568,7 +1608,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
&
ini_style
);
&
ini_style
);
uifc
.
changes
=
1
;
uifc
.
changes
=
1
;
break
;
break
;
case
7
:
// Parity
case
BBSLIST_FIELD_PARITY
:
uifc
.
helpbuf
=
"`Parity`
\n\n
"
uifc
.
helpbuf
=
"`Parity`
\n\n
"
"Select the parity setting."
;
"Select the parity setting."
;
i
=
item
->
parity
;
i
=
item
->
parity
;
...
@@ -1582,7 +1622,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1582,7 +1622,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
changed
=
1
;
changed
=
1
;
}
}
break
;
break
;
case
8
:
// port
case
BBSLIST_FIELD_PORT
:
i
=
item
->
port
;
i
=
item
->
port
;
sprintf
(
str
,
"%hu"
,
item
->
port
);
sprintf
(
str
,
"%hu"
,
item
->
port
);
uifc
.
helpbuf
=
"`TCP Port`
\n\n
"
uifc
.
helpbuf
=
"`TCP Port`
\n\n
"
...
@@ -1601,7 +1641,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1601,7 +1641,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
else
else
uifc
.
changes
=
0
;
uifc
.
changes
=
0
;
break
;
break
;
case
9
:
// user
case
BBSLIST_FIELD_USER
:
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
uifc
.
helpbuf
=
"`SSH Username`
\n\n
"
uifc
.
helpbuf
=
"`SSH Username`
\n\n
"
"Enter the username for passwordless SSH authentication."
;
"Enter the username for passwordless SSH authentication."
;
...
@@ -1615,7 +1655,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1615,7 +1655,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
check_exit
(
false
);
check_exit
(
false
);
iniSetString
(
&
inifile
,
itemname
,
"UserName"
,
item
->
user
,
&
ini_style
);
iniSetString
(
&
inifile
,
itemname
,
"UserName"
,
item
->
user
,
&
ini_style
);
break
;
break
;
case
10
:
// password
case
BBSLIST_FIELD_PASSWORD
:
if
(
item
->
conn_type
==
CONN_TYPE_MBBS_GHOST
)
{
if
(
item
->
conn_type
==
CONN_TYPE_MBBS_GHOST
)
{
uifc
.
helpbuf
=
"`GHost Program`
\n\n
"
uifc
.
helpbuf
=
"`GHost Program`
\n\n
"
"Enter the program name to be sent."
;
"Enter the program name to be sent."
;
...
@@ -1633,7 +1673,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1633,7 +1673,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
check_exit
(
false
);
check_exit
(
false
);
iniSetString
(
&
inifile
,
itemname
,
"Password"
,
item
->
password
,
&
ini_style
);
iniSetString
(
&
inifile
,
itemname
,
"Password"
,
item
->
password
,
&
ini_style
);
break
;
break
;
case
11
:
// syspass
case
BBSLIST_FIELD_SYSPASS
:
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
if
(
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
uifc
.
helpbuf
=
"`BBS Password`
\n\n
"
uifc
.
helpbuf
=
"`BBS Password`
\n\n
"
"Enter your password for auto-login. (ALT-L)
\n
"
;
"Enter your password for auto-login. (ALT-L)
\n
"
;
...
@@ -1655,7 +1695,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1655,7 +1695,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
check_exit
(
false
);
check_exit
(
false
);
iniSetString
(
&
inifile
,
itemname
,
"SystemPassword"
,
item
->
syspass
,
&
ini_style
);
iniSetString
(
&
inifile
,
itemname
,
"SystemPassword"
,
item
->
syspass
,
&
ini_style
);
break
;
break
;
case
12
:
// screen_mode
case
BBSLIST_FIELD_SCREEN_MODE
:
i
=
item
->
screen_mode
;
i
=
item
->
screen_mode
;
uifc
.
helpbuf
=
"`Screen Mode`
\n\n
"
uifc
.
helpbuf
=
"`Screen Mode`
\n\n
"
"Select the screen size for this connection
\n
"
;
"Select the screen size for this connection
\n
"
;
...
@@ -1757,12 +1797,12 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1757,12 +1797,12 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
break
;
break
;
}
}
break
;
break
;
case
13
:
// nostatus
case
BBSLIST_FIELD_NOSTATUS
:
item
->
nostatus
=
!
item
->
nostatus
;
item
->
nostatus
=
!
item
->
nostatus
;
changed
=
1
;
changed
=
1
;
iniSetBool
(
&
inifile
,
itemname
,
"NoStatus"
,
item
->
nostatus
,
&
ini_style
);
iniSetBool
(
&
inifile
,
itemname
,
"NoStatus"
,
item
->
nostatus
,
&
ini_style
);
break
;
break
;
case
14
:
// dldir
case
BBSLIST_FIELD_DLDIR
:
uifc
.
helpbuf
=
"`Download Path`
\n\n
"
uifc
.
helpbuf
=
"`Download Path`
\n\n
"
"Enter the path where downloads will be placed."
;
"Enter the path where downloads will be placed."
;
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Download Path"
,
item
->
dldir
,
MAX_PATH
,
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Download Path"
,
item
->
dldir
,
MAX_PATH
,
...
@@ -1771,7 +1811,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1771,7 +1811,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
else
else
check_exit
(
false
);
check_exit
(
false
);
break
;
break
;
case
15
:
// uldir
case
BBSLIST_FIELD_ULDIR
:
uifc
.
helpbuf
=
"`Upload Path`
\n\n
"
uifc
.
helpbuf
=
"`Upload Path`
\n\n
"
"Enter the path where uploads will be browsed from."
;
"Enter the path where uploads will be browsed from."
;
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Upload Path"
,
item
->
uldir
,
MAX_PATH
,
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Upload Path"
,
item
->
uldir
,
MAX_PATH
,
...
@@ -1780,10 +1820,10 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1780,10 +1820,10 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
else
else
check_exit
(
false
);
check_exit
(
false
);
break
;
break
;
case
16
:
// log
case
BBSLIST_FIELD_LOGFILE
:
configure_log
(
item
,
itemname
,
inifile
,
&
changed
);
configure_log
(
item
,
itemname
,
inifile
,
&
changed
);
break
;
break
;
case
17
:
// bpsrate
case
BBSLIST_FIELD_BPSRATE
:
uifc
.
helpbuf
=
"`Comm Rate (in bits-per-second)`
\n\n
"
uifc
.
helpbuf
=
"`Comm Rate (in bits-per-second)`
\n\n
"
"`For TCP connections:`
\n
"
"`For TCP connections:`
\n
"
"Select the rate which received characters will be displayed.
\n\n
"
"Select the rate which received characters will be displayed.
\n\n
"
...
@@ -1802,7 +1842,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1802,7 +1842,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
changed
=
1
;
changed
=
1
;
}
}
break
;
break
;
case
18
:
// music
case
BBSLIST_FIELD_MUSIC
:
uifc
.
helpbuf
=
music_helpbuf
;
uifc
.
helpbuf
=
music_helpbuf
;
i
=
item
->
music
;
i
=
item
->
music
;
if
(
uifc
.
list
(
WIN_SAV
,
0
,
0
,
0
,
&
i
,
NULL
,
"ANSI Music Setup"
,
music_names
)
!=
-
1
)
{
if
(
uifc
.
list
(
WIN_SAV
,
0
,
0
,
0
,
&
i
,
NULL
,
"ANSI Music Setup"
,
music_names
)
!=
-
1
)
{
...
@@ -1814,7 +1854,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1814,7 +1854,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
check_exit
(
false
);
check_exit
(
false
);
}
}
break
;
break
;
case
19
:
// address_family
case
BBSLIST_FIELD_ADDRESS_FAMILY
:
uifc
.
helpbuf
=
address_family_help
;
uifc
.
helpbuf
=
address_family_help
;
i
=
item
->
address_family
;
i
=
item
->
address_family
;
if
(
uifc
.
list
(
WIN_SAV
,
0
,
0
,
0
,
&
i
,
NULL
,
"Address Family"
,
if
(
uifc
.
list
(
WIN_SAV
,
0
,
0
,
0
,
&
i
,
NULL
,
"Address Family"
,
...
@@ -1832,7 +1872,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1832,7 +1872,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
check_exit
(
false
);
check_exit
(
false
);
}
}
break
;
break
;
case
20
:
// font
case
BBSLIST_FIELD_FONT
:
uifc
.
helpbuf
=
"`Font`
\n\n
"
uifc
.
helpbuf
=
"`Font`
\n\n
"
"Select the desired font for this connection.
\n\n
"
"Select the desired font for this connection.
\n\n
"
"Some fonts do not allow some modes. When this is the case, an
\n
"
"Some fonts do not allow some modes. When this is the case, an
\n
"
...
@@ -1851,12 +1891,12 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1851,12 +1891,12 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
}
}
}
}
break
;
break
;
case
21
:
// hidepopups
case
BBSLIST_FIELD_HIDEPOPUPS
:
item
->
hidepopups
=
!
item
->
hidepopups
;
item
->
hidepopups
=
!
item
->
hidepopups
;
changed
=
1
;
changed
=
1
;
iniSetBool
(
&
inifile
,
itemname
,
"HidePopups"
,
item
->
hidepopups
,
&
ini_style
);
iniSetBool
(
&
inifile
,
itemname
,
"HidePopups"
,
item
->
hidepopups
,
&
ini_style
);
break
;
break
;
case
22
:
// rip
case
BBSLIST_FIELD_RIP
:
item
->
rip
=
get_rip_version
(
item
->
rip
,
&
changed
);
item
->
rip
=
get_rip_version
(
item
->
rip
,
&
changed
);
if
(
item
->
rip
==
RIP_VERSION_1
)
{
if
(
item
->
rip
==
RIP_VERSION_1
)
{
item
->
screen_mode
=
SCREEN_MODE_80X43
;
item
->
screen_mode
=
SCREEN_MODE_80X43
;
...
@@ -1869,17 +1909,17 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
...
@@ -1869,17 +1909,17 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
}
}
iniSetEnum
(
&
inifile
,
itemname
,
"RIP"
,
rip_versions
,
item
->
rip
,
&
ini_style
);
iniSetEnum
(
&
inifile
,
itemname
,
"RIP"
,
rip_versions
,
item
->
rip
,
&
ini_style
);
break
;
break
;
case
23
:
// force_lcf
case
BBSLIST_FIELD_FORCE_LCF
:
item
->
force_lcf
=
!
item
->
force_lcf
;
item
->
force_lcf
=
!
item
->
force_lcf
;
changed
=
1
;
changed
=
1
;
iniSetBool
(
&
inifile
,
itemname
,
"ForceLCF"
,
item
->
force_lcf
,
&
ini_style
);
iniSetBool
(
&
inifile
,
itemname
,
"ForceLCF"
,
item
->
force_lcf
,
&
ini_style
);
break
;
break
;
case
24
:
// yellow_is_yellow
case
BBSLIST_FIELD_YELLOW_IS_YELLOW
:
item
->
yellow_is_yellow
=
!
item
->
yellow_is_yellow
;
item
->
yellow_is_yellow
=
!
item
->
yellow_is_yellow
;
changed
=
1
;
changed
=
1
;
iniSetBool
(
&
inifile
,
itemname
,
"YellowIsYellow"
,
item
->
yellow_is_yellow
,
&
ini_style
);
iniSetBool
(
&
inifile
,
itemname
,
"YellowIsYellow"
,
item
->
yellow_is_yellow
,
&
ini_style
);
break
;
break
;
case
25
:
// sftp_public_key
case
BBSLIST_FIELD_SFTP_PUBLIC_KEY
:
item
->
sftp_public_key
=
!
item
->
sftp_public_key
;
item
->
sftp_public_key
=
!
item
->
sftp_public_key
;
changed
=
1
;
changed
=
1
;
iniSetBool
(
&
inifile
,
itemname
,
"SFTPPublicKey"
,
item
->
sftp_public_key
,
&
ini_style
);
iniSetBool
(
&
inifile
,
itemname
,
"SFTPPublicKey"
,
item
->
sftp_public_key
,
&
ini_style
);
...
...
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