Skip to content

Commit

Permalink
Prepare to remove MOD_CUGTERM patch
Browse files Browse the repository at this point in the history
  • Loading branch information
cyd01 committed Jan 8, 2020
1 parent 4f1b406 commit e9be5bd
Show file tree
Hide file tree
Showing 32 changed files with 8 additions and 2,691 deletions.
3 changes: 0 additions & 3 deletions 0.73_My_PuTTY/be_all_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const struct BackendVtable *const backends[] = {
&rlogin_backend,
&raw_backend,
&serial_backend,
#ifdef MOD_CYGTERM
&cygterm_backend,
#endif
#ifdef MOD_ADB
&adb_backend,
#endif
Expand Down
3 changes: 0 additions & 3 deletions 0.73_My_PuTTY/be_nos_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const struct BackendVtable *const backends[] = {
&adb_backend,
#endif
&serial_backend,
#ifdef MOD_CYGTERM
&cygterm_backend,
#endif
NULL
};

Expand Down
3 changes: 0 additions & 3 deletions 0.73_My_PuTTY/be_nossh.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ const struct BackendVtable *const backends[] = {
&raw_backend,
#ifdef MOD_ADB
&adb_backend,
#endif
#ifdef MOD_CYGTERM
&cygterm_backend,
#endif
NULL
};
Expand Down
17 changes: 0 additions & 17 deletions 0.73_My_PuTTY/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ static bool cmdline_check_unavailable(int flag, const char *p)
static bool seen_hostname_argument = false;
static bool seen_port_argument = false;

#ifdef MOD_CYGTERM
void cygterm_set_flag( int flag ) ;
bool get_got_host(void){ return seen_hostname_argument ; }
void set_got_host(bool val ){ seen_hostname_argument = val ; }
#endif

int cmdline_process_param(const char *p, char *value,
int need_save, Conf *conf)
{
Expand Down Expand Up @@ -533,17 +527,6 @@ int cmdline_process_param(const char *p, char *value,
SetAutoStoreSSHKey();
}
#endif
#ifdef MOD_CYGTERM
if (!strcmp(p, "-cygterm")) {
RETURN(1);
UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);
cygterm_set_flag( 1 ) ;
//default_protocol = cfg->protocol = PROT_CYGTERM;
default_protocol = PROT_CYGTERM;
conf_set_int(conf, CONF_protocol, default_protocol) ;
return 1;
}
#endif
#ifdef MOD_ADB
if (!strcmp(p, "-adb") && GetADBFlag()) {
RETURN(1);
Expand Down
25 changes: 0 additions & 25 deletions 0.73_My_PuTTY/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
#ifdef MOD_RUTTY
#include "script.h"
#endif /* rutty */
#ifdef MOD_CYGTERM
int cygterm_get_flag( void ) ;
#endif
#ifdef MOD_PERSO
#include "kitty.h"
union control * ctrlHostnameEdit = NULL ;
Expand Down Expand Up @@ -256,11 +253,6 @@ static void config_host_handler(union control *ctrl, dlgparam *dlg,
*/
dlg_label_change(ctrl, dlg, "Serial line");
dlg_editbox_set(ctrl, dlg, conf_get_str(conf, CONF_serline));
#ifdef MOD_CYGTERM
} else if( cygterm_get_flag() && (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM) ) {
dlg_label_change(ctrl, dlg, "Command (use - for login shell, ? for exe)");
dlg_editbox_set(ctrl, dlg, conf_get_str(conf, CONF_cygcmd) );
#endif
#ifdef MOD_ADB
} else if (conf_get_int(conf, CONF_protocol) == PROT_ADB) {
char *saved_host = conf_get_str(conf, CONF_host);
Expand All @@ -277,12 +269,6 @@ static void config_host_handler(union control *ctrl, dlgparam *dlg,
char *s = dlg_editbox_get(ctrl, dlg);
if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
conf_set_str(conf, CONF_serline, s);
#ifdef MOD_CYGTERM
else if( cygterm_get_flag() && (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM) ) {
char *s = dlg_editbox_get(ctrl, dlg);
conf_set_str(conf, CONF_cygcmd, s);
}
#endif
else
conf_set_str(conf, CONF_host, s);
sfree(s);
Expand All @@ -308,11 +294,6 @@ static void config_port_handler(union control *ctrl, dlgparam *dlg,
*/
dlg_label_change(ctrl, dlg, "Speed");
sprintf(buf, "%d", conf_get_int(conf, CONF_serspeed));
#ifdef MOD_CYGTERM
} else if( cygterm_get_flag() && (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM) ) {
dlg_label_change(ctrl, dlg, "Port (ignored)");
strcpy(buf, "-");
#endif
} else {
dlg_label_change(ctrl, dlg, PORT_BOX_TITLE);
if (conf_get_int(conf, CONF_port) != 0)
Expand All @@ -329,9 +310,6 @@ static void config_port_handler(union control *ctrl, dlgparam *dlg,

if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
conf_set_int(conf, CONF_serspeed, i);
#ifdef MOD_CYGTERM
else if( cygterm_get_flag() && (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM) ) ;
#endif
else
conf_set_int(conf, CONF_port, i);
}
Expand Down Expand Up @@ -2298,9 +2276,6 @@ void setup_config_box(struct controlbox *b, bool midsession,
ssd->listbox->listbox.height = GetConfigBoxHeight() ;
#else
ssd->listbox->listbox.height = 7;
#endif
#ifdef MOD_CYGTERM
if( cygterm_get_flag() ) ssd->listbox->listbox.height-- ;
#endif
if (!midsession) {
ssd->loadbutton = ctrl_pushbutton(s, "Load", 'l',
Expand Down
8 changes: 0 additions & 8 deletions 0.73_My_PuTTY/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ bool conf_launchable(Conf *conf)
{
if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
return conf_get_str(conf, CONF_serline)[0] != 0;
#ifdef MOD_CYGTERM
else if (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM)
return conf_get_str(conf, CONF_cygcmd)[0] != 0;
#endif
else
return conf_get_str(conf, CONF_host)[0] != 0;
}
Expand All @@ -117,10 +113,6 @@ char const *conf_dest(Conf *conf)
{
if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
return conf_get_str(conf, CONF_serline);
#ifdef MOD_CYGTERM
else if (conf_get_int(conf, CONF_protocol) == PROT_CYGTERM)
return conf_get_str(conf, CONF_cygcmd) ;
#endif
else
return conf_get_str(conf, CONF_host);
}
Expand Down
4 changes: 0 additions & 4 deletions 0.73_My_PuTTY/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ Socket *sk_new(SockAddr *addr, int port, bool privport, bool oobinline,
Socket *sk_newlistener(const char *srcaddr, int port, Plug *plug,
bool local_host_only, int address_family);

#ifdef MOD_CYGTERM
int sk_getport(Socket *s);
#endif

static inline Plug *sk_plug(Socket *s, Plug *p)
{ return s->vt->plug(s, p); }
static inline void sk_close(Socket *s)
Expand Down
18 changes: 0 additions & 18 deletions 0.73_My_PuTTY/putty.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,6 @@ enum {
enum {
/* Protocol back ends. (CONF_protocol) */
PROT_RAW, PROT_TELNET, PROT_RLOGIN, PROT_SSH,
#ifdef MOD_CYGTERM
PROT_CYGTERM,
#endif
#ifdef MOD_ADB
PROT_ADB,
#endif
Expand Down Expand Up @@ -1586,13 +1583,6 @@ NORETURN void cleanup_exit(int);
X(STR, NONE, script_waitfor) \
X(STR, NONE, script_halton) \
/* #endif */ \
/* #ifdef MOD_CYGTERM */ \
/* Cygterm options */ \
X(INT, NONE, cygautopath) \
X(INT, NONE, cygterm64) \
X(STR, NONE, cygcmd) \
X(INT, NONE, alt_metabit) /* set meta instead of escape */ \
/* #endif */ \
/* #if (defined MOD_BACKGROUNDIMAGE) && (!defined FDJ) */\
X(INT, NONE, bg_opacity) \
X(INT, NONE, bg_slideshow) \
Expand Down Expand Up @@ -1932,14 +1922,6 @@ extern const struct BackendVtable raw_backend;

//extern Backend adb_backend;
extern const struct BackendVtable adb_backend ;
#endif
#ifdef MOD_CYGTERM
/*
* Exports from cygterm.c.
*/
extern const struct BackendVtable cygterm_backend;
void cygterm_setup_config_box(struct controlbox *b, int midsession);

#endif

/*
Expand Down
13 changes: 0 additions & 13 deletions 0.73_My_PuTTY/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,13 +866,6 @@ void save_open_settings(settings_w *sesskey, Conf *conf)
write_setting_s(sesskey, "HyperlinkRegularExpression", conf_get_str(conf, CONF_url_regex));
#endif
#endif
#ifdef MOD_CYGTERM
//if (do_host)
write_setting_i(sesskey, "CygtermAltMetabit", conf_get_int(conf, CONF_alt_metabit));
write_setting_i(sesskey, "CygtermAutoPath", conf_get_int(conf, CONF_cygautopath) );
write_setting_i(sesskey, "Cygterm64", conf_get_int(conf, CONF_cygterm64));
write_setting_s(sesskey, "CygtermCommand", conf_get_str(conf, CONF_cygcmd) );
#endif
#ifdef MOD_ZMODEM
write_setting_filename(sesskey, "rzCommand", conf_get_filename(conf, CONF_rzcommand) );
write_setting_s(sesskey, "rzOptions", conf_get_str(conf, CONF_rzoptions) );
Expand Down Expand Up @@ -1506,12 +1499,6 @@ void load_open_settings(settings_r *sesskey, Conf *conf)
gpps(sesskey, "HyperlinkRegularExpression", urlhack_default_regex, conf, CONF_url_regex);
#endif
#endif
#ifdef MOD_CYGTERM
gppi(sesskey, "CygtermAltMetabit", 0, conf, CONF_alt_metabit);
gppi(sesskey, "CygtermAutoPath", 1, conf, CONF_cygautopath );
gppi(sesskey, "Cygterm64", 0, conf, CONF_cygterm64);
gpps(sesskey, "CygtermCommand", "", conf, CONF_cygcmd );
#endif
#ifdef MOD_ZMODEM
gppfile(sesskey, "rzCommand", conf, CONF_rzcommand );
gpps(sesskey, "rzOptions", "-e -v", conf, CONF_rzoptions );
Expand Down
19 changes: 6 additions & 13 deletions 0.73_My_PuTTY/windows/MAKEFILE.MINGW
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ CFLAGS += -D_WIN32_IE=0x0500
################################################################################
CFLAGS += -DWINVER=0x0501 -D_WIN32_WINDOWS=0x0410 -D_WIN32_WINNT=0x0501

# -DMOD_PERSO -DMOD_CYGTERM -DMOD_BACKGROUNDIMAGE -DMOD_RECONNECT -DMOD_HYPERLINK -DMOD_ZMODEM -DMOD_STARTBUTTON -DMOD_LAUNCHER -DMOD_SAVEDUMP -DMOD_KEYMAPPING -DMOD_WINCRYPT -DMOD_TUTTY -DMOD_PORTKNOCKING -DMOD_PUTTYX -DMOD_WTS -DMOD_PRINTCLIP -DMOD_RUTTY -DMOD_ADB \
# -DMOD_PERSO -DMOD_BACKGROUNDIMAGE -DMOD_RECONNECT -DMOD_HYPERLINK -DMOD_ZMODEM -DMOD_STARTBUTTON -DMOD_LAUNCHER -DMOD_SAVEDUMP -DMOD_KEYMAPPING -DMOD_WINCRYPT -DMOD_TUTTY -DMOD_PORTKNOCKING -DMOD_PUTTYX -DMOD_WTS -DMOD_PRINTCLIP -DMOD_RUTTY -DMOD_ADB \


# Flag special FDJ
Expand Down Expand Up @@ -166,7 +166,6 @@ CFLAGS += -D__WINE__ \
-I../../bcrypt \
-I../../md5 -I../../regex -I../../url -I../../wincrypt -I../../rutty

# -DMOD_CYGTERM \
# -DHAS_WINX509 -DMOD_WINCRYPT \
# -DMOD_ZMODEM \

Expand All @@ -181,7 +180,7 @@ CFLAGS += -D__WINE__ \
# MOD_INTEGRATED_KEYGEN: intègre le key generator directement

CFLAGS_PLINK = -Wall -O2 -D_WINDOWS -DWIN32S_COMPAT \
-DMOD_PERSO -DPUTTYCYG -DMOD_RECONNECT -DNO_MOD_RUTTY \
-DMOD_PERSO -DMOD_RECONNECT -DNO_MOD_RUTTY \
-D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -I../. \
-I../charset -I../windows -I../unix -I../mac -I.\
-I../macosx \
Expand Down Expand Up @@ -381,7 +380,7 @@ putty.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o \
winmiscs.o winnet.o winnoise.o winnpc.o winnps.o winpgntc.o \
winprint.o winproxy.o winsecur.o winser.o winshare.o \
winstore.o wintime.o winucs.o winutils.o winx11.o x11fwd.o \
adb.o cygcfg.o cygterm.o \
adb.o \
kitty.o kitty_commun.o kitty_crypt.o kitty_image.o kitty_registry.o kitty_ssh.o \
kitty_store.o kitty_tools.o kitty_win.o \
urlhack.o pageant_integrated.o wincrypto.o winpgnt_integrated.o winpgen_integrated.o winpzmodem.o \
Expand Down Expand Up @@ -409,7 +408,7 @@ putty.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o \
winnps.o winpgntc.o winprint.o winproxy.o winsecur.o \
winser.o winshare.o winstore.o wintime.o winucs.o winutils.o \
winx11.o x11fwd.o \
adb.o cygcfg.o cygterm.o \
adb.o \
kitty.o kitty_commun.o kitty_crypt.o kitty_image.o kitty_registry.o kitty_ssh.o \
kitty_store.o kitty_tools.o kitty_win.o \
urlhack.o pageant_integrated.o wincrypto.o winpgnt_integrated.o winpgen_integrated.o winpzmodem.o \
Expand Down Expand Up @@ -1806,12 +1805,6 @@ FORCE:
################################################################################
# BEGIN MOD_PERSO
################################################################################
cygcfg.o: ../../cygterm/cygcfg.c
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../../cygterm/cygcfg.c -I../../cygterm/ -I../../

cygterm.o: ../../cygterm/cygterm.c
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) -c ../../cygterm/cygterm.c -I../../cygterm -I../../

be_all_s_plink.o: ../be_all_s.c ../putty.h ../puttyps.h ../network.h ../misc.h \
../windows/winstuff.h \
../unix/unix.h ../puttymem.h ../tree234.h \
Expand Down Expand Up @@ -2087,7 +2080,7 @@ putty_portable.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o
winmiscs.o winnet.o winnoise.o winnpc.o winnps.o winpgntc.o \
winprint.o winproxy.o winsecur.o winser.o winshare.o \
winstore.o wintime.o winucs.o winutils.o winx11.o x11fwd.o \
adb.o cygcfg.o cygterm.o \
adb.o \
kitty_portable.o kitty_commun_portable.o kitty_crypt.o kitty_image.o kitty_registry.o kitty_ssh.o \
kitty_store.o kitty_tools.o kitty_win.o \
urlhack.o pageant_integrated.o winpgnt_integrated.o winpgen_integrated.o winpzmodem.o \
Expand Down Expand Up @@ -2117,7 +2110,7 @@ putty_portable.exe: agentf.o aqsync.o be_all_s.o be_misc.o callback.o cmdline.o
winnps.o winpgntc.o winprint.o winproxy.o winsecur.o \
winser.o winshare.o winstore.o wintime.o winucs.o winutils.o \
winx11.o x11fwd.o \
adb.o cygcfg.o cygterm.o \
adb.o \
kitty_portable.o kitty_commun_portable.o kitty_crypt.o kitty_image.o kitty_registry.o kitty_ssh.o \
kitty_store.o kitty_tools.o kitty_win.o \
urlhack.o pageant_integrated.o winpgnt_integrated.o winpgen_integrated.o winpzmodem.o \
Expand Down
14 changes: 0 additions & 14 deletions 0.73_My_PuTTY/windows/wincfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,6 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, bool has_help,
ctrl_checkbox(s, "Control-Alt is different from AltGr", 'd',
HELPCTX(keyboard_ctrlalt),
conf_checkbox_handler, I(CONF_ctrlaltkeys));
#ifdef MOD_CYGTERM
if( cygterm_get_flag() )
ctrl_checkbox(s, "Set meta bit on alt (instead of escape)", NO_SHORTCUT,
HELPCTX(no_help),
conf_checkbox_handler, I(CONF_alt_metabit));
#endif

/*
* Windows allows an arbitrary .WAV to be played as a bell, and
Expand Down Expand Up @@ -610,14 +604,6 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, bool has_help,
HELPCTX(ssh_tunnels_xauthority),
conf_filesel_handler, I(CONF_xauthfile));
}
#ifdef MOD_CYGTERM
/*
* cygterm back end is available on Windows.
*/
if( cygterm_get_flag() )
if (!midsession || (protocol == PROT_CYGTERM))
cygterm_setup_config_box(b, midsession);
#endif
#ifdef MOD_PERSO
if( !GetPuttyFlag() && 0 ) {

Expand Down
Loading

0 comments on commit e9be5bd

Please sign in to comment.