1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Move other backends into a subdirectory.

This is the last of the subdirectory creations I had planned. This one
is almost too footling to bother with (it hardly declutters the top
level very much).

One useful side effect is that I've included testback.c (containing
the null and loopback backends) in the otherbackends library, which
means it will now actually be _compiled_ even when nothing's using it,
and we'll spot bit-rot promptly when internal APIs change.

(And, to prove the point, I've immediately had to fix some bit-rot.)
This commit is contained in:
Simon Tatham 2021-04-22 18:17:35 +01:00
parent 8f0f5b69c0
commit 419e5e2230
7 changed files with 16 additions and 10 deletions

View File

@ -51,9 +51,9 @@ add_library(sftpclient STATIC
add_subdirectory(ssh)
add_library(otherbackends STATIC
telnet.c rlogin.c raw.c supdup.c
$<TARGET_OBJECTS:all-backends>
$<TARGET_OBJECTS:logging>)
add_subdirectory(otherbackends)
add_executable(testcrypt
testcrypt.c sshpubk.c ssh/crc-attack-detector.c)

View File

@ -0,0 +1,6 @@
add_sources_from_current_dir(otherbackends
raw.c
rlogin.c
supdup.c
telnet.c
testback.c)

View File

@ -45,10 +45,10 @@ static size_t null_sendbuffer(Backend *);
static void null_size(Backend *, int, int);
static void null_special(Backend *, SessionSpecialCode, int);
static const SessionSpecial *null_get_specials(Backend *);
static int null_connected(Backend *);
static bool null_connected(Backend *);
static int null_exitcode(Backend *);
static int null_sendok(Backend *);
static int null_ldisc(Backend *, int);
static bool null_sendok(Backend *);
static bool null_ldisc(Backend *, int);
static void null_provide_ldisc(Backend *, Ldisc *);
static void null_unthrottle(Backend *, size_t);
static int null_cfg_info(Backend *);
@ -172,9 +172,9 @@ static const SessionSpecial *null_get_specials (Backend *be) {
return NULL;
}
static int null_connected(Backend *be) {
static bool null_connected(Backend *be) {
return 0;
return false;
}
static int null_exitcode(Backend *be) {
@ -182,18 +182,18 @@ static int null_exitcode(Backend *be) {
return 0;
}
static int null_sendok(Backend *be) {
static bool null_sendok(Backend *be) {
return 1;
return true;
}
static void null_unthrottle(Backend *be, size_t backlog) {
}
static int null_ldisc(Backend *be, int option) {
static bool null_ldisc(Backend *be, int option) {
return 0;
return false;
}
static void null_provide_ldisc (Backend *be, Ldisc *ldisc) {