mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Stop linking cmdline.c into the gtkapp-based programs.
They don't do normal command-line processing, so they don't need it. A few stray references to machinery provided in there are now satisfied instead by a new stub module nocmdline.c.
This commit is contained in:
parent
61f3e3e299
commit
c99338b750
19
Recipe
19
Recipe
@ -241,6 +241,7 @@ GUITERM = TERMINAL window windlg winctrls sizetip winprint winutils
|
||||
UXTERM = TERMINAL uxcfg sercfg uxucs uxprint timing callback miscucs
|
||||
GTKTERM = UXTERM gtkwin gtkcfg gtkdlg gtkfont gtkcols gtkmisc xkeysym
|
||||
+ x11misc gtkcomm
|
||||
GTKMAIN = gtkmain cmdline
|
||||
|
||||
# Non-SSH back ends (putty, puttytel, plink).
|
||||
NONSSH = telnet raw rlogin ldisc pinger
|
||||
@ -255,14 +256,14 @@ WINSSH = SSH winnoise wincapi winpgntc wingss winshare winnps winnpc
|
||||
UXSSH = SSH uxnoise uxagentc uxgss uxshare
|
||||
|
||||
# SFTP implementation (pscp, psftp).
|
||||
SFTP = sftp int64 logging
|
||||
SFTP = sftp int64 logging cmdline
|
||||
|
||||
# Miscellaneous objects appearing in all the network utilities (not
|
||||
# Pageant or PuTTYgen).
|
||||
MISC = timing callback misc version settings tree234 proxy conf be_misc
|
||||
WINMISC = MISC winstore winnet winhandl cmdline windefs winmisc winproxy
|
||||
+ wintime winhsock errsock winsecur winucs miscucs
|
||||
UXMISC = MISC uxstore uxsel uxnet uxpeer cmdline uxmisc uxproxy time
|
||||
UXMISC = MISC uxstore uxsel uxnet uxpeer uxmisc uxproxy time
|
||||
|
||||
# import.c and dependencies, for PuTTYgen-like utilities that have to
|
||||
# load foreign key files.
|
||||
@ -315,16 +316,16 @@ puttygen : [G] winpgen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
|
||||
|
||||
pterm : [X] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
|
||||
+ uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
|
||||
+ nogss gtkmain
|
||||
+ nogss GTKMAIN
|
||||
putty : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
|
||||
+ uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
|
||||
+ xpmpucfg gtkmain
|
||||
+ xpmpucfg GTKMAIN
|
||||
puttytel : [X] GTKTERM uxmisc misc ldisc settings uxsel U_BE_NOSSH
|
||||
+ uxstore uxsignal CHARSET uxputty NONSSH UXMISC xpmputty xpmpucfg
|
||||
+ nogss gtkmain
|
||||
+ nogss GTKMAIN
|
||||
|
||||
plink : [U] uxplink uxcons NONSSH UXSSH U_BE_ALL logging UXMISC uxsignal
|
||||
+ ux_x11 noterm uxnogtk
|
||||
+ ux_x11 noterm uxnogtk cmdline
|
||||
|
||||
PUTTYGEN_UNIX = sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
|
||||
+ sshrand uxnoise sshsha misc sshrsa sshdss uxcons uxstore uxmisc
|
||||
@ -342,11 +343,11 @@ pageant : [X] uxpgnt uxagentc aqsync pageant sshrsa sshpubk sshdes sshbn
|
||||
+ gtkask gtkmisc UXMISC
|
||||
|
||||
ptermapp : [XT] GTKTERM uxmisc misc ldisc settings uxpty uxsel BE_NONE uxstore
|
||||
+ uxsignal CHARSET cmdline uxpterm version time xpmpterm xpmptcfg
|
||||
+ nogss gtkapp
|
||||
+ uxsignal CHARSET uxpterm version time xpmpterm xpmptcfg
|
||||
+ nogss gtkapp nocmdline
|
||||
puttyapp : [XT] GTKTERM uxmisc misc ldisc settings uxsel U_BE_ALL uxstore
|
||||
+ uxsignal CHARSET uxputty NONSSH UXSSH UXMISC ux_x11 xpmputty
|
||||
+ xpmpucfg gtkapp
|
||||
+ xpmpucfg gtkapp nocmdline
|
||||
osxlaunch : [UT] osxlaunch
|
||||
|
||||
fuzzterm : [UT] UXTERM CHARSET misc version uxmisc uxucs fuzzterm time settings
|
||||
|
42
nocmdline.c
Normal file
42
nocmdline.c
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* nocmdline.c - stubs in applications which don't do the
|
||||
* standard(ish) PuTTY tools' command-line parsing
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include "putty.h"
|
||||
|
||||
/*
|
||||
* Stub version of the function in cmdline.c which provides the
|
||||
* password to SSH authentication by remembering it having been passed
|
||||
* as a command-line option. If we're not doing normal command-line
|
||||
* handling, then there is no such option, so that function always
|
||||
* returns failure.
|
||||
*/
|
||||
int cmdline_get_passwd_input(prompts_t *p, const unsigned char *in, int inlen)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* The main cmdline_process_param function is normally called from
|
||||
* applications' main(). An application linking against this stub
|
||||
* module shouldn't have a main() that calls it in the first place :-)
|
||||
* but it is just occasionally called by other supporting functions,
|
||||
* such as one in uxputty.c which sometimes handles a non-option
|
||||
* argument by making up equivalent options and passing them back to
|
||||
* this function. So we have to provide a link-time stub of this
|
||||
* function, but it had better not end up being called at run time.
|
||||
*/
|
||||
int cmdline_process_param(const char *p, char *value,
|
||||
int need_save, Conf *conf)
|
||||
{
|
||||
assert(FALSE && "cmdline_process_param should never be called");
|
||||
}
|
||||
|
||||
/*
|
||||
* This variable will be referred to, so it has to exist. It's ignored.
|
||||
*/
|
||||
int cmdline_tooltype = 0;
|
Loading…
Reference in New Issue
Block a user