Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rup putty-src-orig\CMDLINE.C putty-src\CMDLINE.C
- --- putty-src-orig\CMDLINE.C Thu Dec 23 17:32:28 2010
- +++ putty-src\CMDLINE.C Fri Jun 22 20:23:55 2012
- @@ -6,6 +6,9 @@
- #include <stdio.h>
- #include <assert.h>
- #include <stdlib.h>
- +/***************Patch GNS3 PuTTY *******************/
- +#include <time.h>
- +/***************************************************/
- #include "putty.h"
- /*
- @@ -165,6 +168,12 @@ static int cmdline_check_unavailable(int
- int cmdline_process_param(char *p, char *value, int need_save, Config *cfg)
- {
- int ret = 0;
- + /***************Patch GNS3 PuTTY *******************/
- + char buf[80];
- + time_t now = time(0);
- + struct tm tstruct;
- + tstruct = *localtime(&now);
- + /***************************************************/
- if (!strcmp(p, "-load")) {
- RETURN(2);
- @@ -226,6 +235,73 @@ int cmdline_process_param(char *p, char
- strncpy(cfg->username, value, sizeof(cfg->username));
- cfg->username[sizeof(cfg->username) - 1] = '\0';
- }
- + /***************Patch GNS3 PuTTY *******************/
- + if (!strcmp(p, "-wt")) {
- + RETURN(2);
- + SAVEABLE(0);
- + strncpy(cfg->wintitle, value, sizeof(cfg->wintitle));
- + cfg->wintitle[sizeof(cfg->wintitle) - 1] = '\0';
- + cfg->no_remote_wintitle = 1; //No remote title
- + cfg->win_name_always = 1; //Don't change the title when is minimized
- + }
- + if (!strcmp(p, "-gns3")) {
- + RETURN(2);
- + SAVEABLE(0);
- + cfg->close_on_exit = 1; //Never, Don't close the window
- + cfg->warn_on_close = 0; //No warn before closing the window
- + cfg->beep = 0; //No beeps (Iritating!)
- + cfg->alt_f4 = 1; //Allow Alt+F4 to close the window
- + cfg->alt_space = 1; //Allow Alt+Space to display the system menu
- + cfg->blinktext = 1; //Allow text blinking effect
- + cfg->no_remote_resize = 1; //No remote resize
- + cfg->savelines = 2500; //Scroll Lines Buffer
- + cfg->push_one_enter = 1; //Push a enter key on telnet/serial console
- + cfg->no_annoying_msgbox = 1; //Replace MsgBox errors with a message in the title
- + cfg->reconnect_after_error = atoi(value); //Automatically reconnect a inactive session on error after x seconds
- + }
- + if (!strcmp(p, "-skin")) {
- + RETURN(2);
- + SAVEABLE(0);
- + switch(atoi(value))
- + {
- + case 1: //night theme
- + cfg->colours[0][0] = 15; cfg->colours[0][1] = 15; cfg->colours[0][2] = 15; //Defauld Foreground
- + cfg->colours[2][0] = 255; cfg->colours[2][1] = 255; cfg->colours[2][2] = 255; //Defauld Background
- + break;
- + case 2: //desert theme
- + cfg->colours[0][0] = 255; cfg->colours[0][1] = 255; cfg->colours[0][2] = 255; //Defauld Foreground
- + cfg->colours[2][0] = 51; cfg->colours[2][1] = 51; cfg->colours[2][2] = 51; //Defauld Background
- + break;
- + case 3: //matrix theme
- + cfg->colours[0][0] = 27; cfg->colours[0][1] = 255; cfg->colours[0][2] = 27; //Defauld Foreground
- + cfg->colours[2][0] = 30; cfg->colours[2][1] = 30; cfg->colours[2][2] = 30; //Defauld Background
- + break;
- + case 4: //Gold theme
- + cfg->colours[0][0] = 255; cfg->colours[0][1] = 190; cfg->colours[0][2] = 27; //Defauld Foreground
- + cfg->colours[2][0] = 51; cfg->colours[2][1] = 51; cfg->colours[2][2] = 51; //Defauld Background
- + break;
- + default: //default theme
- + cfg->colours[0][0] = 187; cfg->colours[0][1] = 187; cfg->colours[0][2] = 187; //Defauld Foreground
- + cfg->colours[2][0] = 0; cfg->colours[2][1] = 0; cfg->colours[2][2] = 0; //Defauld Background
- + break;
- + }
- + }
- + if (!strcmp(p, "-log")) { //don't use "/, \, |, *, ?, <, >, :" in -wt variable! :D
- + RETURN(2);
- + SAVEABLE(0);
- + strftime(buf, sizeof(buf), "%d.%b.%y_%H.%M.%S", &tstruct);
- + if(!strlen(cfg->wintitle)){
- + sprintf(cfg->logfilename.path, "%s\\%s_%s.log\0", value, buf, cfg->host); // ex: C:\dir4.Jun.12_21.40.29_127.0.0.1.log
- + }
- + else{
- + sprintf(cfg->logfilename.path, "%s\\%s_%s.log\0", value, buf, cfg->wintitle); // ex: C:\dir4.Jun.12_21.40.29_R1.log
- + }
- + cfg->logtype = 1; //printable output
- + cfg->logflush = 1; //flush log file
- + cfg->logxfovr = 0; //append (anyway the log is created with the current date/time and will be imposible to have a append event)
- + }
- + /***************************************************/
- +
- if (!strcmp(p, "-loghost")) {
- RETURN(2);
- UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
- diff -rup putty-src-orig\CONFIG.C putty-src\CONFIG.C
- --- putty-src-orig\CONFIG.C Fri Jan 14 19:57:00 2011
- +++ putty-src\CONFIG.C Thu Jul 12 00:52:53 2012
- @@ -2385,4 +2385,39 @@ void setup_config_box(struct controlbox
- sshbug_handler, I(offsetof(Config,sshbug_maxpkt2)));
- }
- }
- + /***************Patch GNS3 PuTTY *******************/
- + /*
- + * The GNS3 panel.
- + */
- + str = dupprintf("Advanced options for GNS3 usage", appname);
- + ctrl_settitle(b, "GNS3", str);
- + sfree(str);
- +
- + s = ctrl_getset(b, "GNS3", "adv-options1", NULL);
- + ctrl_radiobuttons(s, "Push a enter key inside a telnet/serial console:", 'p', 2,
- + HELPCTX(no_help),
- + dlg_stdradiobutton_handler,
- + I(offsetof(Config, push_one_enter)),
- + "Yes", I(1),
- + "No", I(0),
- + NULL);
- + s = ctrl_getset(b, "GNS3", "adv-options2", NULL);
- + ctrl_radiobuttons(s, "Replace all MsgBox errors with a message in title bar:", 'm', 2,
- + HELPCTX(no_help),
- + dlg_stdradiobutton_handler,
- + I(offsetof(Config, no_annoying_msgbox)),
- + "Yes", I(1),
- + "No", I(0),
- + NULL);
- + s = ctrl_getset(b, "GNS3", "adv-options3", "Seconds between auto-restarts ('0' to turn off)");
- + ctrl_editbox(s, "Automatically reconnect a inactive session after:", 'r', 11,
- + HELPCTX(no_help),
- + dlg_stdeditbox_handler, I(offsetof(Config,reconnect_after_error)),
- + I(-1));
- + s = ctrl_getset(b, "GNS3", "adv-options4", "'0' is completely transparent, '255' is completely opaque");
- + ctrl_editbox(s, "Set the factor value for transparent window:", 't', 11,
- + HELPCTX(no_help),
- + dlg_stdeditbox_handler, I(offsetof(Config,transparent_factor)),
- + I(-1));
- + /***************************************************/
- }
- diff -rup putty-src-orig\PUTTY.H putty-src\PUTTY.H
- --- putty-src-orig\PUTTY.H Sat Jun 25 18:37:32 2011
- +++ putty-src\PUTTY.H Wed Jul 11 21:23:42 2012
- @@ -1,5 +1,6 @@
- #ifndef PUTTY_PUTTY_H
- #define PUTTY_PUTTY_H
- +#define SECURITY_WIN32
- #include <stddef.h> /* for wchar_t */
- @@ -523,6 +524,12 @@ struct config_tag {
- char ssh_nc_host[512]; /* host to connect to in `nc' mode */
- int ssh_nc_port; /* port to connect to in `nc' mode */
- /* Telnet options */
- + /***************Patch GNS3 PuTTY *******************/
- + int push_one_enter; /* used to pust a '\r' inside the socket */
- + int no_annoying_msgbox; /* used to replace msgbox errors with messages in title window */
- + int reconnect_after_error; /* used to automatically reconnect a telnet/serial session on error after x seconds */
- + int transparent_factor; /* used to set the window transparent */
- + /***************************************************/
- char termtype[32];
- char termspeed[32];
- char ttymodes[768]; /* MODE\tVvalue\0MODE\tA\0\0 */
- @@ -773,6 +780,9 @@ int char_width(Context ctx, int uc);
- void do_scroll(Context, int, int, int);
- #endif
- void set_title(void *frontend, char *);
- +/***************Patch GNS3 PuTTY *******************/
- +void set_title_plus_error(void *frontend, char *error);
- +/***************************************************/
- void set_icon(void *frontend, char *);
- void set_sbar(void *frontend, int, int, int);
- Context get_ctx(void *frontend);
- diff -rup putty-src-orig\SETTINGS.C putty-src\SETTINGS.C
- --- putty-src-orig\SETTINGS.C Tue Sep 13 08:35:56 2011
- +++ putty-src\SETTINGS.C Wed Jul 11 21:28:20 2012
- @@ -475,6 +475,12 @@ void save_open_settings(void *sesskey, C
- write_setting_s(sesskey, "WinTitle", cfg->wintitle);
- write_setting_i(sesskey, "TermWidth", cfg->width);
- write_setting_i(sesskey, "TermHeight", cfg->height);
- + /***************Patch GNS3 PuTTY *******************/
- + write_setting_i(sesskey, "GNS3PushOneEnter", cfg->push_one_enter); //Save the values in regs :D
- + write_setting_i(sesskey, "GNS3NoMsgBoxError", cfg->no_annoying_msgbox);
- + write_setting_i(sesskey, "GNS3AutoReconnect", cfg->reconnect_after_error);
- + write_setting_i(sesskey, "WinTransparent", cfg->transparent_factor);
- + /***************************************************/
- write_setting_fontspec(sesskey, "Font", cfg->font);
- write_setting_i(sesskey, "FontQuality", cfg->font_quality);
- write_setting_i(sesskey, "FontVTMode", cfg->vtmode);
- @@ -792,8 +798,14 @@ void load_open_settings(void *sesskey, C
- gppi(sesskey, "DisableBidi", 0, &cfg->bidi);
- gppi(sesskey, "WinNameAlways", 1, &cfg->win_name_always);
- gpps(sesskey, "WinTitle", "", cfg->wintitle, sizeof(cfg->wintitle));
- - gppi(sesskey, "TermWidth", 80, &cfg->width);
- + /***************Patch GNS3 PuTTY *******************/
- + gppi(sesskey, "TermWidth", 110, &cfg->width); //default was 80
- gppi(sesskey, "TermHeight", 24, &cfg->height);
- + gppi(sesskey, "WinTransparent", 255, &cfg->transparent_factor); //default is normal window (opaque)
- + gppi(sesskey, "GNS3PushOneEnter", 0, &cfg->push_one_enter); //default is unused
- + gppi(sesskey, "GNS3NoMsgBoxError", 0, &cfg->no_annoying_msgbox); //default is unused
- + gppi(sesskey, "GNS3AutoReconnect", 0, &cfg->reconnect_after_error); //default is unused
- + /***************************************************/
- gppfont(sesskey, "Font", &cfg->font);
- gppi(sesskey, "FontQuality", FQ_DEFAULT, &cfg->font_quality);
- gppi(sesskey, "FontVTMode", VT_UNICODE, (int *) &cfg->vtmode);
- diff -rup putty-src-orig\TELNET.C putty-src\TELNET.C
- --- putty-src-orig\TELNET.C Mon Nov 24 17:51:42 2008
- +++ putty-src\TELNET.C Mon Jun 18 20:10:54 2012
- @@ -765,6 +765,16 @@ static const char *telnet_init(void *fro
- */
- update_specials_menu(telnet->frontend);
- + /***************Patch GNS3 PuTTY *******************/
- + /*
- + * Push a enter key inside the telnet socket
- + */
- + if (telnet->cfg.push_one_enter) {
- + logevent(telnet->frontend, "client:\t *** Press a '\\r' inside the Telnet socket ***");
- + telnet->bufsize = sk_write(telnet->s, "\r", 1);
- + }
- + /***************************************************/
- +
- /*
- * loghost overrides realhost, if specified.
- */
- diff -rup putty-src-orig\VERSION.C putty-src\VERSION.C
- --- putty-src-orig\VERSION.C Sat Nov 26 17:45:52 2011
- +++ putty-src\VERSION.C Thu Jul 12 00:56:12 2012
- @@ -34,9 +34,11 @@ char ver[] = "Custom build r" STR(SVN_RE
- char sshver[] = "PuTTY-Custom-r" STR(SVN_REV);
- #else
- -
- -char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
- -char sshver[] = "PuTTY-Local: " __DATE__ " " __TIME__;
- +/***************Patch GNS3 PuTTY *******************/
- +char ver[] = "GNS3 build 0.62.1, " __DATE__ " " __TIME__;
- +//char ver[] = "GNS3 build 0.62.1 [Standalone] , " __DATE__ " " __TIME__;
- +char sshver[] = "PuTTY-GNS3-0.62.1";
- +/***************************************************/
- #endif
- diff -rup putty-src-orig\WINDOWS\PUTTY.RC putty-src\WINDOWS\Putty.rc
- --- putty-src-orig\WINDOWS\PUTTY.RC Tue Oct 04 15:13:28 2005
- +++ putty-src\WINDOWS\Putty.rc Wed Jul 11 00:48:50 2012
- @@ -1,10 +1,247 @@
- +// Microsoft Visual C++ generated resource script.
- +//
- +#include "resource.h"
- +
- +#define APSTUDIO_READONLY_SYMBOLS
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// Generated from the TEXTINCLUDE 2 resource.
- +//
- #include "rcstuff.h"
- +#include "win_res.h"
- +
- +/////////////////////////////////////////////////////////////////////////////
- +#undef APSTUDIO_READONLY_SYMBOLS
- +
- +/////////////////////////////////////////////////////////////////////////////
- +// English (U.S.) resources
- +
- +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
- +#ifdef _WIN32
- +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
- +#pragma code_page(1252)
- +#endif //_WIN32
- +
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// Icon
- +//
- +
- +// Icon with lowest ID value placed first to ensure application icon
- +// remains consistent on all systems.
- +IDI_MAINICON ICON "putty.ico"
- +IDI_CFGICON ICON "puttycfg.ico"
- +
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// Dialog
- +//
- +
- +IDD_ABOUTBOX DIALOGEX 140, 40, 309, 321
- +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- + WS_SYSMENU
- +FONT 8, "MS Shell Dlg", 0, 0, 0x0
- +BEGIN
- + DEFPUSHBUTTON "&Close",IDOK,253,303,48,14
- + PUSHBUTTON "View &Licence",IDA_LICENCE,6,303,70,14
- + PUSHBUTTON "Visit &PuTTY Site",IDA_WEB,89,303,70,14
- + PUSHBUTTON "Visit &GNS3 Site",IDA_GNS3_WEB,171,303,70,14
- + CTEXT "PuTTY",IDA_TEXT1,33,1,244,9
- + CTEXT "© 1997-2012 Simon Tatham. All rights reserved.\nModified by Piroi Ninel for the GNS3 project",
- + IDA_TEXT2,49,280,197,19
- + CTEXT " Version Number",IDA_VERSION,16,13,283,10
- + LTEXT "Usage [new options]:\nCLI: putty -wt R1 -gns3 5 -skin 3 -log ""C:\\Logs_Dir""\nGNS3: putty -wt ""%d"" -gns3 5 -skin 4 -telnet %h %p\n\n-wt ""New Title"" #Change the window title from command line\n*Will disable remote title",
- + IDA_TEXT3,4,23,283,47
- + LTEXT " -gns3 <NR> #Advanced PuTTY options tunned for GNS3 usage\n *Don't close the window when the connection is down\n *Disable warning message before closing the window\n *Disable beeps (Irritating!)\n *Allow Alt+F4 to close the window",
- + IDA_TEXT4,1,74,283,41
- + LTEXT " *Disable remote resize\n *Configure scroll lines to 2500 (default was 200)\n *Push a enter key on telnet/serial console (NEW!)\n *Replace all MessageBox errors with a message in the title bar (NEW!)",
- + IDA_TEXT6,1,114,283,41
- + LTEXT " *Automatically reconnect a inactive session on error after <NR> seconds (NEW!)\n NR = Number of seconds to wait before restarting a inactive session\n NR = 0 means no automatically restart!",
- + IDA_TEXT9,2,147,283,26
- + LTEXT "-log ""<DIR_PATH>"" #Enable logging to files (.log). Use it after the ""-wt"" option in CLI.\n*Will log all printable output\n*Ex: <DIR_PATH>\4.Jun.12_21.48.17_R1.log\n*Warning: Do not use '/, \\, |, *, ?, <, >, "", :' in -wt variable!",
- + IDA_TEXT10,3,228,284,33
- + LTEXT " * Toggle ""Always on top / Transparent Window"" from menu (Right click on title bar)",
- + IDA_TEXT11,2,265,288,11
- + LTEXT "-skin <NR> #Apply a color theme from 4 hard-coded options\n 1 - Night mode\n 2 - Desert theme\n 3 - Matrix theme :)\n 4 - Gold theme\n X - Default theme",
- + IDA_TEXT5,3,176,283,48
- +END
- +
- +IDD_MAINBOX DIALOG 0, 0, 300, 252
- +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
- +CAPTION "PuTTY Configuration"
- +CLASS "PuTTYConfigBox"
- +FONT 8, "MS Shell Dlg"
- +BEGIN
- +END
- +
- +IDD_LOGBOX DIALOGEX 100, 20, 300, 118
- +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- + WS_SYSMENU
- +CAPTION "PuTTY Event Log"
- +FONT 8, "MS Shell Dlg", 0, 0, 0x0
- +BEGIN
- + DEFPUSHBUTTON "&Close",IDOK,135,102,44,14
- + PUSHBUTTON "C&opy",IDN_COPY,81,102,44,14
- + LISTBOX IDN_LIST,3,3,294,95,LBS_HASSTRINGS | LBS_USETABSTOPS |
- + LBS_EXTENDEDSEL | WS_VSCROLL
- +END
- +
- +IDD_LICENCEBOX DIALOGEX 50, 50, 226, 263
- +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- + WS_SYSMENU
- +CAPTION "PuTTY Licence"
- +FONT 8, "MS Shell Dlg", 0, 0, 0x0
- +BEGIN
- + DEFPUSHBUTTON "OK",IDOK,98,243,44,14
- + LTEXT "Copyright © 1997-2012 Simon Tatham",1000,10,10,206,8
- + LTEXT "Portions copyright Robert de Bath, Joris van Rantwijk, Delian",
- + 1001,10,26,206,8
- + LTEXT "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas",
- + 1002,10,34,206,8
- + LTEXT "Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa,",
- + 1003,10,42,206,8
- + LTEXT "Markus Kuhn, Colin Watson, and CORE SDI S.A.",1004,10,
- + 50,206,8
- + LTEXT "Permission is hereby granted, free of charge, to any person",
- + 1005,10,66,206,8
- + LTEXT "obtaining a copy of this software and associated documentation",
- + 1006,10,74,206,8
- + LTEXT "files (the ""Software""), to deal in the Software without restriction,",
- + 1007,10,82,206,8
- + LTEXT "including without limitation the rights to use, copy, modify, merge,",
- + 1008,10,90,206,8
- + LTEXT "publish, distribute, sublicense, and/or sell copies of the Software,",
- + 1009,10,98,206,8
- + LTEXT "and to permit persons to whom the Software is furnished to do so,",
- + 1010,10,106,206,8
- + LTEXT "subject to the following conditions:",1011,10,114,206,8
- + LTEXT "The above copyright notice and this permission notice shall be",
- + 1012,10,130,206,8
- + LTEXT "included in all copies or substantial portions of the Software.",
- + 1013,10,138,206,8
- + LTEXT "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT",1014,10,
- + 154,206,8
- + LTEXT "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,",1015,10,162,
- + 206,8
- + LTEXT "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",1016,10,
- + 170,206,8
- + LTEXT "MERCHANTABILITY, FITNESS FOR A PARTICULAR",1017,10,178,
- + 206,8
- + LTEXT "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
- + 1018,10,186,206,8
- + LTEXT "COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES",
- + 1019,10,194,206,8
- + LTEXT "OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,",
- + 1020,10,202,206,8
- + LTEXT "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN",1021,10,
- + 210,206,8
- + LTEXT "CONNECTION WITH THE SOFTWARE OR THE USE OR",1022,10,218,
- + 206,8
- + LTEXT "OTHER DEALINGS IN THE SOFTWARE.",1023,10,226,206,8
- +END
- +
- +
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// Version
- +//
- +
- +VS_VERSION_INFO VERSIONINFO
- + FILEVERSION 0,62,1,0
- + PRODUCTVERSION 0,62,1,0
- + FILEFLAGSMASK 0x3L
- +#ifdef _DEBUG
- + FILEFLAGS 0x1L
- +#else
- + FILEFLAGS 0x0L
- +#endif
- + FILEOS 0x4L
- + FILETYPE 0x1L
- + FILESUBTYPE 0x0L
- +BEGIN
- + BLOCK "StringFileInfo"
- + BEGIN
- + BLOCK "080904b0"
- + BEGIN
- + VALUE "Comments", "Modified by Piroi Ninel for the GNS3 project."
- + VALUE "CompanyName", "Simon Tatham"
- + VALUE "FileDescription", "SSH, Telnet and Rlogin client, GNS3 Build"
- + VALUE "FileVersion", "Release 0.62.1, GNS3 Build"
- + VALUE "InternalName", "PuTTY"
- + VALUE "LegalCopyright", "Copyright © 1997-2012 Simon Tatham."
- + VALUE "OriginalFilename", "PuTTY"
- + VALUE "ProductName", "PuTTY suite"
- + VALUE "ProductVersion", "Release 0.62.1, GNS3 Build"
- + END
- + END
- + BLOCK "VarFileInfo"
- + BEGIN
- + VALUE "Translation", 0x809, 1200
- + END
- +END
- +
- +
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// RT_MANIFEST
- +//
- +
- +1 RT_MANIFEST "putty.mft"
- +
- +#ifdef APSTUDIO_INVOKED
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// TEXTINCLUDE
- +//
- +
- +1 TEXTINCLUDE
- +BEGIN
- + "resource.h\0"
- +END
- +
- +2 TEXTINCLUDE
- +BEGIN
- + "#include ""rcstuff.h""\r\n"
- + "#include ""win_res.h""\r\n"
- + "\0"
- +END
- +
- +3 TEXTINCLUDE
- +BEGIN
- + "\r\n"
- + "\0"
- +END
- +
- +#endif // APSTUDIO_INVOKED
- +
- +
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// DESIGNINFO
- +//
- +
- +#ifdef APSTUDIO_INVOKED
- +GUIDELINES DESIGNINFO
- +BEGIN
- + IDD_ABOUTBOX, DIALOG
- + BEGIN
- + BOTTOMMARGIN, 317
- + END
- +END
- +#endif // APSTUDIO_INVOKED
- +
- +#endif // English (U.S.) resources
- +/////////////////////////////////////////////////////////////////////////////
- +
- +
- +
- +#ifndef APSTUDIO_INVOKED
- +/////////////////////////////////////////////////////////////////////////////
- +//
- +// Generated from the TEXTINCLUDE 3 resource.
- +//
- -#define APPNAME "PuTTY"
- -#define APPDESC "SSH, Telnet and Rlogin client"
- -#include "win_res.rc2"
- +/////////////////////////////////////////////////////////////////////////////
- +#endif // not APSTUDIO_INVOKED
- -#ifndef NO_MANIFESTS
- -1 RT_MANIFEST "putty.mft"
- -#endif /* NO_MANIFESTS */
- diff -rup putty-src-orig\WINDOWS\VERSION.RC2 putty-src\WINDOWS\VERSION.RC2
- --- putty-src-orig\WINDOWS\VERSION.RC2 Sat Dec 10 12:08:10 2011
- +++ putty-src\WINDOWS\VERSION.RC2 Mon Jun 18 22:10:39 2012
- @@ -79,7 +79,7 @@
- /* We can't reliably get the same date and time as version.c, so
- * we won't bother trying. */
- -#define VERSION_TEXT "Unidentified build"
- +#define VERSION_TEXT "0.62.1 GNS3 Build"
- #define BINARY_VERSION 0,0,0,0
- #endif
- diff -rup putty-src-orig\WINDOWS\WIN_RES.H putty-src\WINDOWS\WIN_RES.H
- --- putty-src-orig\WINDOWS\WIN_RES.H Sun Apr 23 19:26:04 2006
- +++ putty-src\WINDOWS\WIN_RES.H Fri Jun 22 20:10:56 2012
- @@ -23,6 +23,7 @@
- #define IDA_TEXT2 1004
- #define IDA_LICENCE 1005
- #define IDA_WEB 1006
- +#define IDA_GNS3_WEB 1007
- #define IDC_TAB 1001
- #define IDC_TABSTATIC1 1002
- diff -rup putty-src-orig\WINDOWS\WIN_RES.RC2 putty-src\WINDOWS\WIN_RES.RC2
- --- putty-src-orig\WINDOWS\WIN_RES.RC2 Wed Jan 05 12:01:00 2011
- +++ putty-src\WINDOWS\WIN_RES.RC2 Mon May 07 22:28:03 2012
- @@ -25,7 +25,7 @@ BEGIN
- PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 52, 70, 14
- PUSHBUTTON "Visit &Web Site", IDA_WEB, 84, 52, 70, 14
- CTEXT "PuTTY", IDA_TEXT1, 10, 6, 194, 8
- - CTEXT "", IDA_VERSION, 10, 16, 194, 16
- + CTEXT "0.62.1 GNS3 Build", IDA_VERSION, 10, 16, 194, 16
- CTEXT "\251 1997-2011 Simon Tatham. All rights reserved.",
- IDA_TEXT2, 10, 34, 194, 16
- END
- diff -rup putty-src-orig\WINDOWS\WINDLG.C putty-src\WINDOWS\WINDLG.C
- --- putty-src-orig\WINDOWS\WINDLG.C Wed Dec 29 14:11:26 2010
- +++ putty-src\WINDOWS\WINDLG.C Fri Jun 22 21:33:07 2012
- @@ -220,6 +220,14 @@ static int CALLBACK AboutProc(HWND hwnd,
- "http://www.chiark.greenend.org.uk/~sgtatham/putty/",
- 0, 0, SW_SHOWDEFAULT);
- return 0;
- + /***************Patch GNS3 PuTTY *******************/
- + case IDA_GNS3_WEB:
- + /* Load web browser */
- + ShellExecute(hwnd, "open",
- + "http://www.gns3.net/putty/",
- + 0, 0, SW_SHOWDEFAULT);
- + return 0;
- + /***************************************************/
- }
- return 0;
- case WM_CLOSE:
- diff -rup putty-src-orig\WINDOWS\WINDOW.C putty-src\WINDOWS\WINDOW.C
- --- putty-src-orig\WINDOWS\WINDOW.C Sat Jul 16 12:26:20 2011
- +++ putty-src\WINDOWS\WINDOW.C Thu Jul 12 00:43:26 2012
- @@ -34,6 +34,16 @@
- * attempt to store information in them. Hence all these identifiers have
- * the low 4 bits clear. Also, identifiers should < 0xF000. */
- +/***************Patch GNS3 PuTTY *******************/
- +#define IDM_TOPMOST 0x0210
- +#define IDM_TRANSPARENT_1 0x0220
- +#define IDM_TRANSPARENT_2 0x0230
- +#define IDM_TRANSPARENT_3 0x0240
- +#define IDM_TRANSPARENT_4 0x0250
- +#define IDM_TRANSPARENT_5 0x0260
- +#define LWA_ALPHA 2 //for transparent
- +#define WS_EX_LAYERED 0x00080000L //for transparent
- +/***************************************************/
- #define IDM_SHOWLOG 0x0010
- #define IDM_NEWSESS 0x0020
- #define IDM_DUPSESS 0x0030
- @@ -76,6 +86,11 @@
- #define WHEEL_DELTA 120
- #endif
- +/***************Patch GNS3 PuTTY *******************/
- +HANDLE hThread1;
- +static BOOL init_transparent = 0;
- +/***************************************************/
- +
- static Mouse_Button translate_button(Mouse_Button button);
- static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
- static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
- @@ -94,6 +109,10 @@ static int is_full_screen(void);
- static void make_full_screen(void);
- static void clear_full_screen(void);
- static void flip_full_screen(void);
- +/***************Patch GNS3 PuTTY *******************/
- +static void flip_top_most(void);
- +static void flip_transparent(int factor);
- +/***************************************************/
- static int process_clipdata(HGLOBAL clipdata, int unicode);
- /* Window layout information */
- @@ -139,6 +158,9 @@ static struct {
- } popup_menus[2];
- enum { SYSMENU, CTXMENU };
- static HMENU savedsess_menu;
- +/***************Patch GNS3 PuTTY *******************/
- +static HMENU transparent_menu;
- +/***************************************************/
- Config cfg; /* exported to windlg.c */
- @@ -236,60 +258,101 @@ static void start_backend(void)
- cfg.host, cfg.port, &realhost, cfg.tcp_nodelay,
- cfg.tcp_keepalives);
- back->provide_logctx(backhandle, logctx);
- + /***************Patch GNS3 PuTTY *******************/
- if (error) {
- - char *str = dupprintf("%s Error", appname);
- - sprintf(msg, "Unable to open connection to\n"
- - "%.800s\n" "%s", cfg_dest(&cfg), error);
- - MessageBox(NULL, msg, str, MB_ICONERROR | MB_OK);
- - sfree(str);
- - exit(0);
- - }
- - window_name = icon_name = NULL;
- - if (*cfg.wintitle) {
- - title = cfg.wintitle;
- - } else {
- - sprintf(msg, "%s - %s", realhost, appname);
- - title = msg;
- - }
- - sfree(realhost);
- - set_title(NULL, title);
- - set_icon(NULL, title);
- + char *str = dupprintf("%s Error", appname);
- +
- + if(cfg.no_annoying_msgbox) {
- + sprintf(msg, "Unable to open: %.800s", cfg_dest(&cfg));
- + set_title_plus_error(NULL, msg);
- + logevent(NULL, msg);
- + }else{
- + sprintf(msg, "Unable to open connection to\n%.800s\n%s", cfg_dest(&cfg), error);
- + MessageBox(NULL, msg, str, MB_ICONERROR | MB_OK);
- + exit(0);
- + }
- - /*
- - * Connect the terminal to the backend for resize purposes.
- - */
- - term_provide_resize_fn(term, back->size, backhandle);
- + sfree(str);
- + must_close_session = TRUE;
- + session_closed = TRUE;
- - /*
- - * Set up a line discipline.
- - */
- - ldisc = ldisc_create(&cfg, term, back, backhandle, NULL);
- + } else {
- +
- + window_name = icon_name = NULL;
- + if (*cfg.wintitle) {
- + title = cfg.wintitle;
- + } else {
- + sprintf(msg, "%s - %s", realhost, appname);
- + title = msg;
- + }
- + sfree(realhost);
- + set_title(NULL, title);
- + set_icon(NULL, title);
- - /*
- - * Destroy the Restart Session menu item. (This will return
- - * failure if it's already absent, as it will be the very first
- - * time we call this function. We ignore that, because as long
- - * as the menu item ends up not being there, we don't care
- - * whether it was us who removed it or not!)
- - */
- - for (i = 0; i < lenof(popup_menus); i++) {
- - DeleteMenu(popup_menus[i].menu, IDM_RESTART, MF_BYCOMMAND);
- - }
- + /*
- + * Connect the terminal to the backend for resize purposes.
- + */
- + term_provide_resize_fn(term, back->size, backhandle);
- - must_close_session = FALSE;
- - session_closed = FALSE;
- + /*
- + * Set up a line discipline.
- + */
- + ldisc = ldisc_create(&cfg, term, back, backhandle, NULL);
- +
- + /*
- + * Destroy the Restart Session menu item. (This will return
- + * failure if it's already absent, as it will be the very first
- + * time we call this function. We ignore that, because as long
- + * as the menu item ends up not being there, we don't care
- + * whether it was us who removed it or not!)
- + */
- + for (i = 0; i < lenof(popup_menus); i++) {
- + DeleteMenu(popup_menus[i].menu, IDM_RESTART, MF_BYCOMMAND);
- + }
- +
- + must_close_session = FALSE;
- + session_closed = FALSE;
- + }
- + /**************************************************/
- +}
- +
- +/***************Patch GNS3 PuTTY *******************/
- +void WINAPI TimerRoutine(void)
- +{
- + int i;
- + char morestuff[255], title[155];
- + GetWindowText(hwnd, title, sizeof(title));
- + for (i = cfg.reconnect_after_error; i >= 1; i--) {
- + sprintf(morestuff, "%s - [Restart in %ds]", title, i);
- + set_title(NULL, morestuff);
- + set_icon(NULL, morestuff);
- + Sleep(1000);
- + }
- +
- + sprintf(morestuff, "%s - [Restarting...]", title, i);
- + set_title(NULL, morestuff);
- + set_icon(NULL, morestuff);
- + Sleep(250);
- +
- + PostMessage(hwnd, IDM_RESTART, 0, 0);
- }
- +/**************************************************/
- static void close_session(void)
- {
- - char morestuff[100];
- int i;
- + /***************Patch GNS3 PuTTY *******************/
- + char morestuff[255], title[155];
- - session_closed = TRUE;
- - sprintf(morestuff, "%.70s (inactive)", appname);
- - set_icon(NULL, morestuff);
- - set_title(NULL, morestuff);
- + session_closed = TRUE;
- + GetWindowText(hwnd, title, sizeof(title));
- + sprintf(morestuff, "%s - (inactive)", title);
- + set_icon(NULL, morestuff);
- + set_title(NULL, morestuff);
- + //SetSysColors(2, COLOR_WINDOW, RGB(0x255, 0x0, 0x0));
- + /***************************************************/
- +
- if (ldisc) {
- ldisc_free(ldisc);
- ldisc = NULL;
- @@ -320,6 +383,11 @@ static void close_session(void)
- * window title change above.
- */
- must_close_session = FALSE;
- + /***************Patch GNS3 PuTTY *******************/
- + if(cfg.reconnect_after_error) {
- + hThread1 = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)TimerRoutine, NULL, 0, NULL);
- + }
- + /***************************************************/
- }
- int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
- @@ -777,6 +845,15 @@ int WINAPI WinMain(HINSTANCE inst, HINST
- get_sesslist(&sesslist, TRUE);
- update_savedsess_menu();
- + /***************Patch GNS3 PuTTY *******************/
- + transparent_menu = CreateMenu();
- + AppendMenu(transparent_menu, MF_ENABLED, IDM_TRANSPARENT_5, "Off");
- + AppendMenu(transparent_menu, MF_ENABLED, IDM_TRANSPARENT_4, "20%");
- + AppendMenu(transparent_menu, MF_ENABLED, IDM_TRANSPARENT_3, "40%");
- + AppendMenu(transparent_menu, MF_ENABLED, IDM_TRANSPARENT_2, "60%");
- + AppendMenu(transparent_menu, MF_ENABLED, IDM_TRANSPARENT_1, "80%");
- + /***************************************************/
- +
- for (j = 0; j < lenof(popup_menus); j++) {
- m = popup_menus[j].menu;
- @@ -795,6 +872,10 @@ int WINAPI WinMain(HINSTANCE inst, HINST
- AppendMenu(m, MF_SEPARATOR, 0, 0);
- AppendMenu(m, (cfg.resize_action == RESIZE_DISABLED) ?
- MF_GRAYED : MF_ENABLED, IDM_FULLSCREEN, "&Full Screen");
- + /***************Patch GNS3 PuTTY *******************/
- + AppendMenu(m, MF_ENABLED, IDM_TOPMOST, "Alwa&ys on Top");
- + AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT) transparent_menu, "Transparent W&indow");
- + /***************************************************/
- AppendMenu(m, MF_SEPARATOR, 0, 0);
- if (has_help())
- AppendMenu(m, MF_ENABLED, IDM_HELP, "&Help");
- @@ -811,6 +892,10 @@ int WINAPI WinMain(HINSTANCE inst, HINST
- */
- set_input_locale(GetKeyboardLayout(0));
- + /***************Patch GNS3 PuTTY *******************/
- + flip_transparent(cfg.transparent_factor); //init transparent window
- + /***************************************************/
- +
- /*
- * Finally show the window!
- */
- @@ -1082,8 +1167,16 @@ void connection_fatal(void *frontend, ch
- va_start(ap, fmt);
- stuff = dupvprintf(fmt, ap);
- va_end(ap);
- - sprintf(morestuff, "%.70s Fatal Error", appname);
- - MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
- +
- + /***************Patch GNS3 PuTTY *******************/
- + if(cfg.no_annoying_msgbox) {
- + set_title_plus_error(NULL, stuff);
- + }else{
- + sprintf(morestuff, "%.70s Fatal Error", appname);
- + MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
- + }
- + /***************************************************/
- +
- sfree(stuff);
- if (cfg.close_on_exit == FORCE_ON)
- @@ -1969,9 +2062,16 @@ void notify_remote_exit(void *fe)
- /* exitcode == INT_MAX indicates that the connection was closed
- * by a fatal error, so an error box will be coming our way and
- * we should not generate this informational one. */
- - if (exitcode != INT_MAX)
- - MessageBox(hwnd, "Connection closed by remote host",
- - appname, MB_OK | MB_ICONINFORMATION);
- + /***************Patch GNS3 PuTTY *******************/
- + if (exitcode != INT_MAX) {
- + if(cfg.no_annoying_msgbox) {
- + set_title_plus_error(NULL, "Connection closed by remote host");
- + logevent(NULL, "Connection closed by remote host");
- + }else{
- + MessageBox(hwnd, "Connection closed by remote host", appname, MB_OK | MB_ICONINFORMATION);
- + }
- + }
- + /***************************************************/
- }
- }
- }
- @@ -2027,6 +2127,18 @@ static LRESULT CALLBACK WndProc(HWND hwn
- show_mouseptr(1);
- PostQuitMessage(0);
- return 0;
- + /***************Patch GNS3 PuTTY *******************/
- + case IDM_RESTART:
- + if (!back) {
- + char morestuff[200];
- + sprintf(morestuff, "----- Session auto-restarted on error (every %ds) -----", cfg.reconnect_after_error);
- + logevent(NULL, morestuff);
- +
- + if (cfg.protocol != PROT_SERIAL) { term_pwron(term, FALSE); }
- + start_backend();
- + }
- + break;
- + /***************************************************/
- case WM_INITMENUPOPUP:
- if ((HMENU)wParam == savedsess_menu) {
- /* About to pop up Saved Sessions sub-menu.
- @@ -2116,11 +2228,13 @@ static LRESULT CALLBACK WndProc(HWND hwn
- break;
- case IDM_RESTART:
- if (!back) {
- - logevent(NULL, "----- Session restarted -----");
- - term_pwron(term, FALSE);
- + /***************Patch GNS3 PuTTY *******************/
- + logevent(NULL, "----- Session restarted manually -----");
- + if (hThread1 != NULL) TerminateThread(hThread1, 0);
- + if (cfg.protocol != PROT_SERIAL) { term_pwron(term, FALSE); }
- + /***************************************************/
- start_backend();
- }
- -
- break;
- case IDM_RECONF:
- {
- @@ -2181,6 +2295,11 @@ static LRESULT CALLBACK WndProc(HWND hwn
- if (back)
- back->reconfig(backhandle, &cfg);
- + /***************Patch GNS3 PuTTY *******************/
- + /* Change transparent settings if modified */
- + if (cfg.transparent_factor != prev_cfg.transparent_factor) flip_transparent(cfg.transparent_factor);
- + /***************************************************/
- +
- /* Screen size changed ? */
- if (cfg.height != prev_cfg.height ||
- cfg.width != prev_cfg.width ||
- @@ -2320,6 +2439,26 @@ static LRESULT CALLBACK WndProc(HWND hwn
- case IDM_FULLSCREEN:
- flip_full_screen();
- break;
- + /***************Patch GNS3 PuTTY *******************/
- + case IDM_TOPMOST:
- + flip_top_most();
- + break;
- + case IDM_TRANSPARENT_1:
- + flip_transparent(50);
- + break;
- + case IDM_TRANSPARENT_2:
- + flip_transparent(100);
- + break;
- + case IDM_TRANSPARENT_3:
- + flip_transparent(150);
- + break;
- + case IDM_TRANSPARENT_4:
- + flip_transparent(200);
- + break;
- + case IDM_TRANSPARENT_5:
- + flip_transparent(255);
- + break;
- + /***************************************************/
- default:
- if (wParam >= IDM_SAVED_MIN && wParam < IDM_SAVED_MAX) {
- SendMessage(hwnd, WM_SYSCOMMAND, IDM_SAVEDSESS, wParam);
- @@ -4527,6 +4666,31 @@ void set_title(void *frontend, char *tit
- SetWindowText(hwnd, title);
- }
- +/***************Patch GNS3 PuTTY *******************/
- +void set_title_plus_error(void *frontend, char *error)
- +{
- + char title[512];
- +
- + if (strlen(cfg.wintitle) >= 1) {
- + if (cfg.protocol == PROT_SERIAL) {
- + sprintf(title, "Serial Error (%s) - %s!\0", cfg.wintitle, error); //serial with title
- + } else {
- + sprintf(title, "%s:%d (%s) - %s!\0", cfg.host, cfg.port, cfg.wintitle, error); //telnet with title
- + }
- + } else {
- + if (cfg.protocol == PROT_SERIAL) {
- + sprintf(title, "Serial Error - %s!\0", error); //serial without title
- + } else {
- + sprintf(title, "%s:%d - %s!\0", cfg.host, cfg.port, error); //telnet without title
- + }
- + }
- + sfree(window_name);
- + window_name = snewn(1 + strlen(title), char);
- + strcpy(window_name, title);
- + SetWindowText(hwnd, title);
- +}
- +/***************************************************/
- +
- void set_icon(void *frontend, char *title)
- {
- sfree(icon_name);
- @@ -5504,6 +5668,62 @@ static void flip_full_screen()
- ShowWindow(hwnd, SW_MAXIMIZE);
- }
- }
- +
- +/***************Patch GNS3 PuTTY *******************/
- +/*
- + * Toggle always on top mode.
- + */
- +static void flip_top_most()
- +{
- + int i;
- + if (!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)){
- + SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TOPMOST, MF_CHECKED); //Tick the menu item in the System and context menus.
- + }
- + else{
- + SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TOPMOST, MF_UNCHECKED); //Untick the menu item in the System and context menus.
- + }
- +}
- +
- +DECL_WINDOWS_FUNCTION(static, BOOL, SetLayeredWindowAttributes, (HWND, COLORREF, BYTE, DWORD));
- +
- +static void flip_transparent(int factor)
- +{
- + int i;
- +
- + if(!init_transparent) // do this once
- + {
- + HMODULE user32_module = load_system32_dll("user32.dll");
- + GET_WINDOWS_FUNCTION (user32_module, SetLayeredWindowAttributes);
- + init_transparent = 1;
- + }
- +
- + factor = factor % 256;
- + cfg.transparent_factor = factor;
- +
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_1, MF_UNCHECKED); //Untick all
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_2, MF_UNCHECKED);
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_3, MF_UNCHECKED);
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_4, MF_UNCHECKED);
- + for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_5, MF_UNCHECKED);
- +
- + if((factor >= 0) && (factor <= 50)) for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_1, MF_CHECKED); //Tick one of them
- + else if((factor > 50) && (factor <= 100)) for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_2, MF_CHECKED);
- + else if((factor > 100) && (factor <= 150)) for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_3, MF_CHECKED);
- + else if((factor > 150) && (factor <= 254)) for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_4, MF_CHECKED);
- + else if(factor == 255) for (i = 0; i < lenof(popup_menus); i++) CheckMenuItem(popup_menus[i].menu, IDM_TRANSPARENT_5, MF_CHECKED);
- +
- + if(factor != 255)
- + {
- + SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); //enable layers for transparent (do this once per window that shall become transparent)
- + p_SetLayeredWindowAttributes(hwnd, 0, factor, LWA_ALPHA); // do this everytime you want to change the transparency value
- + }
- + else{
- + SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED); //disable transparent
- + }
- +}
- +/***************************************************/
- void frontend_keypress(void *handle)
- {
- diff -rup putty-src-orig\WINDOWS\WINPGNTC.C putty-src\WINDOWS\WINPGNTC.C
- --- putty-src-orig\WINDOWS\WINPGNTC.C Wed Jun 08 21:47:08 2011
- +++ putty-src\WINDOWS\WINPGNTC.C Wed Jun 13 22:16:15 2012
- @@ -86,10 +86,13 @@ DECL_WINDOWS_FUNCTION(static, BOOL, Init
- (PSECURITY_DESCRIPTOR, DWORD));
- DECL_WINDOWS_FUNCTION(static, BOOL, SetSecurityDescriptorOwner,
- (PSECURITY_DESCRIPTOR, PSID, BOOL));
- -DECL_WINDOWS_FUNCTION(, DWORD, GetSecurityInfo,
- +/***************Patch GNS3 PuTTY *******************/
- +// the word "static" was missing!
- +DECL_WINDOWS_FUNCTION(static, DWORD, GetSecurityInfo,
- (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID *, PSID *, PACL *, PACL *,
- PSECURITY_DESCRIPTOR *));
- +/***************************************************/
- int init_advapi(void)
- {
- advapi = load_system32_dll("advapi32.dll");
- @@ -100,6 +103,7 @@ int init_advapi(void)
- GET_WINDOWS_FUNCTION(advapi, InitializeSecurityDescriptor) &&
- GET_WINDOWS_FUNCTION(advapi, SetSecurityDescriptorOwner);
- }
- +
- PSID get_user_sid(void)
- {
- diff -rup putty-src-orig\WINDOWS\WINSER.C putty-src\WINDOWS\WINSER.C
- --- putty-src-orig\WINDOWS\WINSER.C Tue Aug 10 18:21:26 2010
- +++ putty-src\WINDOWS\WINSER.C Tue Jun 19 23:54:04 2012
- @@ -276,6 +276,14 @@ static const char *serial_init(void *fro
- */
- update_specials_menu(serial->frontend);
- +
- + /***************Patch GNS3 PuTTY *******************/
- + if (cfg->push_one_enter) {
- + logevent(serial->frontend, "*** Press a '\\r' inside the serial port/pipe ***");
- + serial->bufsize = handle_write(serial->out, "\r", 1); //press a enter on the serial
- + }
- + /***************************************************/
- +
- return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement