mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Handle the -batch option centrally in cmdline.c.
This removes one case from several of the individual tools' command-line parsers, and moves it into a central place where it will automatically be supported by any tool containing console.c. In order to make that not cause a link failure, there's now a stubs/no-console.c which GUI clients of cmdline.c must include.
This commit is contained in:
@ -101,6 +101,7 @@ add_executable(putty
|
||||
window.c
|
||||
putty.c
|
||||
help.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
putty.rc)
|
||||
be_list(putty PuTTY SSH SERIAL OTHERBACKENDS)
|
||||
add_dependencies(putty generated_licence_h)
|
||||
@ -119,6 +120,7 @@ add_executable(puttytel
|
||||
help.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-ca-config.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-rand.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nocproxy.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
@ -161,6 +163,7 @@ if(HAVE_CONPTY)
|
||||
conpty.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-ca-config.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-console.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/no-rand.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
pterm.rc)
|
||||
|
@ -340,8 +340,6 @@ int main(int argc, char **argv)
|
||||
--argc, ++argv;
|
||||
} else if (ret == 1) {
|
||||
continue;
|
||||
} else if (!strcmp(p, "-batch")) {
|
||||
console_batch_mode = true;
|
||||
} else if (!strcmp(p, "-s")) {
|
||||
/* Save status to write to conf later. */
|
||||
use_subsystem = true;
|
||||
|
Reference in New Issue
Block a user