From 031dce697f15de5d362fe4610230edfdf77b7ce5 Mon Sep 17 00:00:00 2001 From: Ivan Sorokin Date: Thu, 27 Jan 2022 16:51:30 +0300 Subject: [PATCH] fix far2l extensions support --- 0.76_My_PuTTY/settings.c | 2 +- 0.76_My_PuTTY/terminal.c | 10 +++++----- 0.76_My_PuTTY/terminal.h | 6 +++--- 0.76_My_PuTTY/windows/window.c | 8 ++++---- 0.76_My_PuTTY/windows/winseat.h | 2 +- far2l/cdecode.c | 2 +- far2l/cdecode.h | 2 +- far2l/cencode.c | 2 +- far2l/cencode.h | 2 +- kitty_settings.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/0.76_My_PuTTY/settings.c b/0.76_My_PuTTY/settings.c index 250575b..0211980 100644 --- a/0.76_My_PuTTY/settings.c +++ b/0.76_My_PuTTY/settings.c @@ -1295,7 +1295,7 @@ void load_open_settings(settings_r *sesskey, Conf *conf) gppb(sesskey, "HideMousePtr", false, conf, CONF_hide_mouseptr); gppb(sesskey, "SunkenEdge", false, conf, CONF_sunken_edge); gppi(sesskey, "WindowBorder", 1, conf, CONF_window_border); -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L gppi(sesskey, "CurType", 1, conf, CONF_cursor_type); gppb(sesskey, "BlinkCur", true, conf, CONF_blink_cur); #else diff --git a/0.76_My_PuTTY/terminal.c b/0.76_My_PuTTY/terminal.c index bdf579a..4c2367d 100644 --- a/0.76_My_PuTTY/terminal.c +++ b/0.76_My_PuTTY/terminal.c @@ -13,7 +13,7 @@ #include "putty.h" #include "terminal.h" -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* base64 library - needed for far2l extensions support */ #include #include @@ -2005,7 +2005,7 @@ Terminal *term_init(Conf *myconf, struct unicode_data *ucsdata, TermWin *win) * that need it. */ term = snew(Terminal); -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l */ term->far2l_ext = 0; // far2l extensions mode is enabled? term->is_apc = 0; // currently processing incoming APC sequence? @@ -3215,7 +3215,7 @@ static void toggle_mode(Terminal *term, int mode, int query, bool state) */ static void do_osc(Terminal *term) { -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support */ if (term->is_apc) { @@ -4689,7 +4689,7 @@ static void term_out(Terminal *term) term->esc_args[0] = ARG_DEFAULT; term->esc_query = 0; break; -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L case '_': /* far2l: processing APC is almost the same as processing OSC */ term->is_apc = 1; //break; @@ -5922,7 +5922,7 @@ static void term_out(Terminal *term) } else { term->termstate = OSC_STRING; term->osc_strlen = 0; -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l */ if (term->is_apc) { term->osc_string[term->osc_strlen++] = (char)c; diff --git a/0.76_My_PuTTY/terminal.h b/0.76_My_PuTTY/terminal.h index 53d5f83..3549453 100644 --- a/0.76_My_PuTTY/terminal.h +++ b/0.76_My_PuTTY/terminal.h @@ -185,7 +185,7 @@ struct terminal_tag { #define ANSI(x,y) ((x)+((y)*256)) #define ANSI_QUE(x) ANSI(x,1) -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support */ //#define OSC_STR_MAX 2048 // todo: allocate osc_string dynamically @@ -197,7 +197,7 @@ struct terminal_tag { char osc_string[OSC_STR_MAX + 1]; bool osc_w; -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l */ int far2l_ext; // extensions mode on bool is_apc; // currently processing APC sequence @@ -219,7 +219,7 @@ struct terminal_tag { SEEN_OSC_P, OSC_STRING, OSC_MAYBE_ST, -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support */ SEEN_APC, VT52_ESC, #else diff --git a/0.76_My_PuTTY/windows/window.c b/0.76_My_PuTTY/windows/window.c index fa17866..0ebef1e 100644 --- a/0.76_My_PuTTY/windows/window.c +++ b/0.76_My_PuTTY/windows/window.c @@ -10,7 +10,7 @@ #include #include -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support - base64 encode/decode libs */ #include #include @@ -618,7 +618,7 @@ static const SeatVtable win_seat_vt = { .interactive = nullseat_interactive_yes, .get_cursor_position = win_seat_get_cursor_position, }; -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L // "static" removed by far2l extensions support patch // we need to access wgs from terminal.c to open dialog boxes, etc WinGuiSeat wgs = { .seat.vt = &win_seat_vt, @@ -4843,7 +4843,7 @@ free(cmd); ignore_clip = wParam; /* don't panic on DESTROYCLIPBOARD */ break; case WM_DESTROYCLIPBOARD: -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support */ // In far2l extensions mode we should not do anything here, @@ -5620,7 +5620,7 @@ if( (GetKeyState(VK_MENU)&0x8000) && (wParam==VK_SPACE) ) { * number noise. */ noise_ultralight(NOISE_SOURCE_KEY, lParam); -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* far2l extensions support */ if (term->far2l_ext) { diff --git a/0.76_My_PuTTY/windows/winseat.h b/0.76_My_PuTTY/windows/winseat.h index a72ce85..05d0bc3 100644 --- a/0.76_My_PuTTY/windows/winseat.h +++ b/0.76_My_PuTTY/windows/winseat.h @@ -3,7 +3,7 @@ * and windlg.c. */ -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L #pragma once #endif typedef struct WinGuiSeat WinGuiSeat; diff --git a/far2l/cdecode.c b/far2l/cdecode.c index e7cc9ce..fbc8709 100644 --- a/far2l/cdecode.c +++ b/far2l/cdecode.c @@ -1,4 +1,4 @@ -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* cdecoder.c - c source to a base64 decoding algorithm implementation This is part of the libb64 project, and has been placed in the public domain. diff --git a/far2l/cdecode.h b/far2l/cdecode.h index f703fbd..e821b59 100644 --- a/far2l/cdecode.h +++ b/far2l/cdecode.h @@ -1,4 +1,4 @@ -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* cdecode.h - c header for a base64 decoding algorithm This is part of the libb64 project, and has been placed in the public domain. diff --git a/far2l/cencode.c b/far2l/cencode.c index bb798bd..abe0f6d 100644 --- a/far2l/cencode.c +++ b/far2l/cencode.c @@ -1,4 +1,4 @@ -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* cencoder.c - c source to a base64 encoding algorithm implementation This is part of the libb64 project, and has been placed in the public domain. diff --git a/far2l/cencode.h b/far2l/cencode.h index b6b28ce..9de26bd 100644 --- a/far2l/cencode.h +++ b/far2l/cencode.h @@ -1,4 +1,4 @@ -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L /* cencode.h - c header for a base64 encoding algorithm This is part of the libb64 project, and has been placed in the public domain. diff --git a/kitty_settings.c b/kitty_settings.c index bab024a..f7560cf 100644 --- a/kitty_settings.c +++ b/kitty_settings.c @@ -759,7 +759,7 @@ void load_open_settings_forced(char *filename, Conf *conf) { gppb_forced(sesskey, "HideMousePtr", false, conf, CONF_hide_mouseptr); gppb_forced(sesskey, "SunkenEdge", false, conf, CONF_sunken_edge); gppi_forced(sesskey, "WindowBorder", 1, conf, CONF_window_border); -#ifdef DMOD_FAR2L +#ifdef MOD_FAR2L gppi_forced(sesskey, "CurType", 1, conf, CONF_cursor_type); gppb_forced(sesskey, "BlinkCur", true, conf, CONF_blink_cur); #else