diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a944fc7..4bf6eacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,9 @@ add_library(sftpclient STATIC add_subdirectory(ssh) add_library(otherbackends STATIC - telnet.c rlogin.c raw.c supdup.c $ $) +add_subdirectory(otherbackends) add_executable(testcrypt testcrypt.c sshpubk.c ssh/crc-attack-detector.c) diff --git a/otherbackends/CMakeLists.txt b/otherbackends/CMakeLists.txt new file mode 100644 index 00000000..099d1253 --- /dev/null +++ b/otherbackends/CMakeLists.txt @@ -0,0 +1,6 @@ +add_sources_from_current_dir(otherbackends + raw.c + rlogin.c + supdup.c + telnet.c + testback.c) diff --git a/raw.c b/otherbackends/raw.c similarity index 100% rename from raw.c rename to otherbackends/raw.c diff --git a/rlogin.c b/otherbackends/rlogin.c similarity index 100% rename from rlogin.c rename to otherbackends/rlogin.c diff --git a/supdup.c b/otherbackends/supdup.c similarity index 100% rename from supdup.c rename to otherbackends/supdup.c diff --git a/telnet.c b/otherbackends/telnet.c similarity index 100% rename from telnet.c rename to otherbackends/telnet.c diff --git a/testback.c b/otherbackends/testback.c similarity index 94% rename from testback.c rename to otherbackends/testback.c index 173786ed..8a158439 100644 --- a/testback.c +++ b/otherbackends/testback.c @@ -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) {