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
1b4370c9
Commit
1b4370c9
authored
7 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Re-order entry fields.
This makes more sense. Also, ones that are meaningless are hidden now.
parent
548763fd
No related branches found
No related tags found
No related merge requests found
Pipeline
#7285
passed
7 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/CHANGES
+5
-0
5 additions, 0 deletions
src/syncterm/CHANGES
src/syncterm/bbslist.c
+78
-49
78 additions, 49 deletions
src/syncterm/bbslist.c
src/syncterm/term.c
+17
-0
17 additions, 0 deletions
src/syncterm/term.c
with
100 additions
and
49 deletions
src/syncterm/CHANGES
+
5
−
0
View file @
1b4370c9
Version 1.4a
------------
Re-order BBS list entry fields
Fix various Prestel mode bugs
Version 1.3
-----------
Fix critical bug when editing a BBS listing
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/bbslist.c
+
78
−
49
View file @
1b4370c9
...
...
@@ -1171,6 +1171,8 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
{
int
i
=
0
;
char
str
[
64
];
bool
is_ansi
=
true
;
bool
is_serial
=
((
item
->
conn_type
==
CONN_TYPE_MODEM
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL_NORTS
));
if
(
!
isdefault
)
{
optmap
[
i
]
=
BBSLIST_FIELD_NAME
;
...
...
@@ -1194,9 +1196,19 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
}
optmap
[
i
]
=
BBSLIST_FIELD_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
(
IS_NETWORK_CONN
(
item
->
conn_type
))
{
optmap
[
i
]
=
BBSLIST_FIELD_ADDRESS_FAMILY
;
sprintf
(
opt
[
i
++
],
"Address Family %s"
,
address_family_names
[
item
->
address_family
]);
}
if
(
is_serial
)
{
optmap
[
i
]
=
BBSLIST_FIELD_FLOW_CONTROL
;
fc_str
(
opt
[
i
++
],
item
->
flow_control
);
if
(
item
->
bpsrate
)
sprintf
(
str
,
"%ubps"
,
item
->
bpsrate
);
else
strcpy
(
str
,
"Current"
);
optmap
[
i
]
=
BBSLIST_FIELD_BPSRATE
;
sprintf
(
opt
[
i
++
],
"Comm Rate %s"
,
str
);
optmap
[
i
]
=
BBSLIST_FIELD_STOP_BITS
;
sprintf
(
opt
[
i
++
],
"Stop Bits %hu"
,
item
->
stop_bits
);
optmap
[
i
]
=
BBSLIST_FIELD_DATA_BITS
;
...
...
@@ -1235,8 +1247,26 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
optmap
[
i
]
=
BBSLIST_FIELD_SYSPASS
;
sprintf
(
opt
[
i
++
],
"System Password %s"
,
item
->
syspass
[
0
]
?
"********"
:
"<none>"
);
}
if
(
item
->
conn_type
==
CONN_TYPE_SSH
||
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
optmap
[
i
]
=
BBSLIST_FIELD_SFTP_PUBLIC_KEY
;
sprintf
(
opt
[
i
++
],
"SFTP Public Key %s"
,
item
->
sftp_public_key
?
"Yes"
:
"No"
);
}
optmap
[
i
]
=
BBSLIST_FIELD_SCREEN_MODE
;
sprintf
(
opt
[
i
++
],
"Screen Mode %s"
,
screen_modes
[
item
->
screen_mode
]);
optmap
[
i
]
=
BBSLIST_FIELD_FONT
;
sprintf
(
opt
[
i
++
],
"Font %s"
,
item
->
font
);
if
(
get_emulation
(
item
)
!=
CTERM_EMULATION_ANSI_BBS
)
is_ansi
=
false
;
if
(
is_ansi
)
{
optmap
[
i
]
=
BBSLIST_FIELD_MUSIC
;
sprintf
(
opt
[
i
++
],
"ANSI Music %s"
,
music_names
[
item
->
music
]);
optmap
[
i
]
=
BBSLIST_FIELD_RIP
;
sprintf
(
opt
[
i
++
],
"RIP %s"
,
rip_versions
[
item
->
rip
]);
optmap
[
i
]
=
BBSLIST_FIELD_FORCE_LCF
;
sprintf
(
opt
[
i
++
],
"Force LCF Mode %s"
,
item
->
force_lcf
?
"Yes"
:
"No"
);
optmap
[
i
]
=
BBSLIST_FIELD_YELLOW_IS_YELLOW
;
sprintf
(
opt
[
i
++
],
"Yellow is Yellow %s"
,
item
->
yellow_is_yellow
?
"Yes"
:
"No"
);
}
optmap
[
i
]
=
BBSLIST_FIELD_NOSTATUS
;
sprintf
(
opt
[
i
++
],
"Hide Status Line %s"
,
item
->
nostatus
?
"Yes"
:
"No"
);
optmap
[
i
]
=
BBSLIST_FIELD_DLDIR
;
...
...
@@ -1247,30 +1277,16 @@ build_edit_list(struct bbslist *item, char opt[][69], int *optmap, char **opts,
i
++
;
optmap
[
i
]
=
BBSLIST_FIELD_LOGFILE
;
strcpy
(
opt
[
i
++
],
"Log Configuration"
);
if
(
!
is_serial
)
{
if
(
item
->
bpsrate
)
sprintf
(
str
,
"%ubps"
,
item
->
bpsrate
);
else
strcpy
(
str
,
"Current"
);
optmap
[
i
]
=
BBSLIST_FIELD_BPSRATE
;
sprintf
(
opt
[
i
++
],
"Comm Rate %s"
,
str
);
optmap
[
i
]
=
BBSLIST_FIELD_MUSIC
;
sprintf
(
opt
[
i
++
],
"ANSI Music %s"
,
music_names
[
item
->
music
]);
optmap
[
i
]
=
BBSLIST_FIELD_ADDRESS_FAMILY
;
sprintf
(
opt
[
i
++
],
"Address Family %s"
,
address_family_names
[
item
->
address_family
]);
optmap
[
i
]
=
BBSLIST_FIELD_FONT
;
sprintf
(
opt
[
i
++
],
"Font %s"
,
item
->
font
);
sprintf
(
opt
[
i
++
],
"Fake Comm Rate %s"
,
str
);
}
optmap
[
i
]
=
BBSLIST_FIELD_HIDEPOPUPS
;
sprintf
(
opt
[
i
++
],
"Hide Popups %s"
,
item
->
hidepopups
?
"Yes"
:
"No"
);
optmap
[
i
]
=
BBSLIST_FIELD_RIP
;
sprintf
(
opt
[
i
++
],
"RIP %s"
,
rip_versions
[
item
->
rip
]);
optmap
[
i
]
=
BBSLIST_FIELD_FORCE_LCF
;
sprintf
(
opt
[
i
++
],
"Force LCF Mode %s"
,
item
->
force_lcf
?
"Yes"
:
"No"
);
optmap
[
i
]
=
BBSLIST_FIELD_YELLOW_IS_YELLOW
;
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
)
{
optmap
[
i
]
=
BBSLIST_FIELD_SFTP_PUBLIC_KEY
;
sprintf
(
opt
[
i
++
],
"SFTP Public Key %s"
,
item
->
sftp_public_key
?
"Yes"
:
"No"
);
}
opt
[
i
][
0
]
=
0
;
}
...
...
@@ -1278,6 +1294,11 @@ void
build_edit_help
(
struct
bbslist
*
item
,
int
isdefault
,
char
*
helpbuf
,
size_t
hbsz
)
{
size_t
hblen
=
0
;
bool
is_ansi
=
true
;
bool
is_serial
=
((
item
->
conn_type
==
CONN_TYPE_MODEM
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL_NORTS
));
if
(
get_emulation
(
item
)
!=
CTERM_EMULATION_ANSI_BBS
)
is_ansi
=
false
;
/*
* Not using strncpy() here because memset()ing the whole thing
...
...
@@ -1317,8 +1338,14 @@ build_edit_help(struct bbslist *item, int isdefault, char *helpbuf, size_t hbsz)
}
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Conection Type ~
\n
"
" Type of connection
\n\n
"
,
hbsz
-
hblen
);
if
((
item
->
conn_type
==
CONN_TYPE_MODEM
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL
)
||
(
item
->
conn_type
==
CONN_TYPE_SERIAL_NORTS
))
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Flow Control ~
\n
"
if
(
IS_NETWORK_CONN
(
item
->
conn_type
))
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Address Family ~
\n
"
" IPv4 or IPv6
\n\n
"
,
hbsz
-
hblen
);
}
if
(
is_serial
)
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Comm Rate ~
\n
"
" Port speed
\n\n
"
"~ Flow Control ~
\n
"
" Type of flow control to use
\n\n
"
"~ Stop Bits ~
\n
"
" Number of stop bits for each byte
\n\n
"
...
...
@@ -1355,27 +1382,20 @@ build_edit_help(struct bbslist *item, int isdefault, char *helpbuf, size_t hbsz)
"~ System Password ~
\n
"
" System Password sent by auto-login command (not securely stored)
\n\n
"
,
hbsz
-
hblen
);
}
if
(
item
->
conn_type
==
CONN_TYPE_SSH
||
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ SFTP Public Key ~
\n
"
" Open an SFTP channel and transfer the public key to
\n
"
" .ssh/authorized_keys
\n\n
"
,
hbsz
-
hblen
);
}
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Screen Mode ~
\n
"
" Display mode to use
\n\n
"
"~ Hide Status Line ~
\n
"
" Selects if the status line should be hidden, giving an extra
\n
"
" display row
\n\n
"
"~ Download Path ~
\n
"
" Default path to store downloaded files
\n\n
"
"~ Upload Path ~
\n
"
" Default path for uploads
\n\n
"
"~ Log Configuration ~
\n
"
" Configure logging settings
\n\n
"
"~ Comm Rate ~
\n
"
" Display speed
\n\n
"
"~ ANSI Music ~
\n
"
" ANSI music type selection
\n\n
"
"~ Address Family ~
\n
"
" IPv4 or IPv6
\n\n
"
"~ Font ~
\n
"
" Display mode to use
\n\n
"
,
hbsz
-
hblen
);
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Font ~
\n
"
" Select font to use for the entry
\n\n
"
"~ Hide Popups ~
\n
"
" Hide all popup dialogs (i.e., Connecting, Disconnected, etc.)
\n\n
"
" Hide all popup dialogs (i.e., Connecting, Disconnected, etc.)
\n\n
"
,
hbsz
-
hblen
);
if
(
is_ansi
)
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ ANSI Music ~
\n
"
" ANSI music type selection
\n\n
"
"~ RIP ~
\n
"
" Enable/Disable RIP modes
\n\n
"
"~ Force LCF Mode ~
\n
"
...
...
@@ -1383,10 +1403,19 @@ build_edit_help(struct bbslist *item, int isdefault, char *helpbuf, size_t hbsz)
"~ Yellow Is Yellow ~
\n
"
" Make the dark yellow colour actually yellow instead of the brown
\n
"
" used in IBM CGA monitors
\n\n
"
,
hbsz
-
hblen
);
if
(
item
->
conn_type
==
CONN_TYPE_SSH
||
item
->
conn_type
==
CONN_TYPE_SSHNA
)
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ SFTP Public Key ~
\n
"
" Open an SFTP channel and transfer the public key to
\n
"
" .ssh/authorized_keys
\n\n
"
,
hbsz
-
hblen
);
}
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Hide Status Line ~
\n
"
" Selects if the status line should be hidden, giving an extra
\n
"
" display row
\n\n
"
"~ Download Path ~
\n
"
" Default path to store downloaded files
\n\n
"
"~ Upload Path ~
\n
"
" Default path for uploads
\n\n
"
"~ Log Configuration ~
\n
"
" Configure logging settings
\n\n
"
,
hbsz
-
hblen
);
if
(
!
is_serial
)
{
hblen
+=
strlcat
(
helpbuf
+
hblen
,
"~ Fake Comm Rate ~
\n
"
" Display speed
\n\n
"
,
hbsz
-
hblen
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
17
−
0
View file @
1b4370c9
...
...
@@ -3681,6 +3681,22 @@ send_login(struct bbslist *bbs) {
}
}
static
void
normalize_entry
(
struct
bbslist
*
bbs
)
{
cterm_emulation_t
emu
=
get_emulation
(
bbs
);
switch
(
emu
)
{
case
CTERM_EMULATION_ANSI_BBS
:
break
;
default:
bbs
->
rip
=
RIP_VERSION_NONE
;
bbs
->
force_lcf
=
false
;
bbs
->
yellow_is_yellow
=
false
;
break
;
}
}
bool
doterm
(
struct
bbslist
*
bbs
)
{
...
...
@@ -3732,6 +3748,7 @@ doterm(struct bbslist *bbs)
int
speedwatch
=
0
;
bool
atascii_inverse
=
false
;
normalize_entry
(
bbs
);
freepixels
(
pixmap_buffer
[
0
]);
freepixels
(
pixmap_buffer
[
1
]);
pixmap_buffer
[
0
]
=
NULL
;
...
...
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