Commit 7e2e81e44c39433cdef1b3b2af12e8affd486065
1 parent
a1854e26
Exists in
master
and in
3 other branches
Removendo includes e globais que nao sao mais usados
Showing
18 changed files
with
59 additions
and
53 deletions
Show diff stats
XtGlue.c
ansi.c
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | #include <X11/Shell.h> |
44 | 44 | #endif /*]*/ |
45 | 45 | |
46 | -#include "appres.h" | |
46 | +//#include "appres.h" | |
47 | 47 | // #include "ctlr.h" |
48 | 48 | #if defined(X3270_DBCS) /*[*/ |
49 | 49 | #include "3270ds.h" |
... | ... | @@ -1715,7 +1715,7 @@ ansi_process(unsigned int c) |
1715 | 1715 | // scroll_to_bottom(); |
1716 | 1716 | |
1717 | 1717 | #if defined(X3270_TRACE) /*[*/ |
1718 | - if (lib3270_get_toggle(&h3270,SCREEN_TRACE)) | |
1718 | + if (lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SCREEN_TRACE)) | |
1719 | 1719 | trace_char((char)c); |
1720 | 1720 | #endif /*]*/ |
1721 | 1721 | ... | ... |
appres.h
... | ... | @@ -38,6 +38,8 @@ struct toggle { |
38 | 38 | // #define toggle_toggle(t) { (t)->value = !(t)->value; } |
39 | 39 | */ |
40 | 40 | |
41 | +#error Deprecated | |
42 | + | |
41 | 43 | #define toggled(ix) lib3270_get_toggle(NULL,ix) |
42 | 44 | |
43 | 45 | /* Application resources */ |
... | ... | @@ -86,9 +88,9 @@ typedef struct { |
86 | 88 | // char secure; |
87 | 89 | // char oerr_lock; |
88 | 90 | // char typeahead; |
89 | - char debug_tracing; | |
90 | - char disconnect_clear; | |
91 | - char highlight_bold; | |
91 | +// char debug_tracing; | |
92 | +// char disconnect_clear; | |
93 | +// char highlight_bold; | |
92 | 94 | // char color8; |
93 | 95 | // char bsd_tm; |
94 | 96 | // char unlock_delay; |
... | ... | @@ -171,7 +173,7 @@ typedef struct { |
171 | 173 | // char *oversize; |
172 | 174 | #if defined(X3270_FT) /*[*/ |
173 | 175 | // char *ft_command; |
174 | - int dft_buffer_size; | |
176 | +// int dft_buffer_size; | |
175 | 177 | #endif /*]*/ |
176 | 178 | // char *connectfile_name; |
177 | 179 | // char *idle_command; |
... | ... | @@ -184,9 +186,9 @@ typedef struct { |
184 | 186 | #endif |
185 | 187 | */ |
186 | 188 | |
187 | -#if defined(HAVE_LIBSSL) /*[*/ | |
188 | - char *cert_file; | |
189 | -#endif /*]*/ | |
189 | +//#if defined(HAVE_LIBSSL) | |
190 | +// char *cert_file; | |
191 | +//#endif | |
190 | 192 | // char *proxy; |
191 | 193 | |
192 | 194 | /* Toggles */ | ... | ... |
charset.c
ctlr.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | #include "globals.h" |
42 | 42 | #include <errno.h> |
43 | 43 | #include "3270ds.h" |
44 | -#include "appres.h" | |
44 | +//#include "appres.h" | |
45 | 45 | // #include "ctlr.h" |
46 | 46 | #include "screen.h" |
47 | 47 | #include "resources.h" |
... | ... | @@ -2319,7 +2319,7 @@ ctlr_clear(H3270 *session, Boolean can_snap) |
2319 | 2319 | /* Snap any data that is about to be lost into the trace file. */ |
2320 | 2320 | if (ctlr_any_data()) { |
2321 | 2321 | #if defined(X3270_TRACE) /*[*/ |
2322 | - if (can_snap && !trace_skipping && lib3270_get_toggle(session,SCREEN_TRACE)) | |
2322 | + if (can_snap && !trace_skipping && lib3270_get_toggle(session,LIB3270_TOGGLE_SCREEN_TRACE)) | |
2323 | 2323 | trace_screen(); |
2324 | 2324 | #endif /*]*/ |
2325 | 2325 | // scroll_save(session->maxROWS, ever_3270 ? False : True); |
... | ... | @@ -2379,7 +2379,7 @@ void ctlr_add(int baddr, unsigned char c, unsigned char cs) |
2379 | 2379 | if (trace_primed && !IsBlank(oc)) |
2380 | 2380 | { |
2381 | 2381 | #if defined(X3270_TRACE) /*[*/ |
2382 | - if (lib3270_get_toggle(&h3270,SCREEN_TRACE)) | |
2382 | + if (lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SCREEN_TRACE)) | |
2383 | 2383 | trace_screen(); |
2384 | 2384 | #endif /*]*/ |
2385 | 2385 | trace_primed = False; |
... | ... | @@ -2739,7 +2739,7 @@ void ticking_start(H3270 *session, Boolean anyway) |
2739 | 2739 | |
2740 | 2740 | if(session->set_timer) |
2741 | 2741 | { |
2742 | - if(lib3270_get_toggle(&h3270,SHOW_TIMING) || anyway) | |
2742 | + if(lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SHOW_TIMING) || anyway) | |
2743 | 2743 | session->set_timer(session,1); |
2744 | 2744 | } |
2745 | 2745 | else |
... | ... | @@ -2748,7 +2748,7 @@ void ticking_start(H3270 *session, Boolean anyway) |
2748 | 2748 | |
2749 | 2749 | mticking = True; |
2750 | 2750 | |
2751 | - if (!lib3270_get_toggle(&h3270,SHOW_TIMING) && !anyway) | |
2751 | + if (!lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SHOW_TIMING) && !anyway) | |
2752 | 2752 | return; |
2753 | 2753 | |
2754 | 2754 | status_untiming(session); | ... | ... |
ft_cut.c
ft_dft.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | |
42 | 42 | #if defined(X3270_FT) /*[*/ |
43 | 43 | |
44 | -#include "appres.h" | |
44 | +//#include "appres.h" | |
45 | 45 | #include "3270ds.h" |
46 | 46 | #include "ft_dft_ds.h" |
47 | 47 | |
... | ... | @@ -548,9 +548,10 @@ dft_read_modified(void) |
548 | 548 | void |
549 | 549 | set_dft_buffersize(void) |
550 | 550 | { |
551 | - if (dft_buffersize == 0) { | |
552 | - dft_buffersize = appres.dft_buffer_size; | |
553 | - if (dft_buffersize == 0) | |
551 | + if (dft_buffersize == 0) | |
552 | + { | |
553 | +// dft_buffersize = appres.dft_buffer_size; | |
554 | +// if (dft_buffersize == 0) | |
554 | 555 | dft_buffersize = DFT_BUF; |
555 | 556 | } |
556 | 557 | if (dft_buffersize > DFT_MAX_BUF) | ... | ... |
globals.h
... | ... | @@ -350,3 +350,5 @@ LIB3270_INTERNAL void lib3270_initialize(void); |
350 | 350 | LIB3270_INTERNAL int cursor_move(H3270 *session, int baddr); |
351 | 351 | |
352 | 352 | LIB3270_INTERNAL void add_input_calls(H3270 *, void (*)(H3270 *), void (*)(H3270 *)); |
353 | + | |
354 | +LIB3270_INTERNAL void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt); | ... | ... |
glue.c
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | #include <errno.h> |
52 | 52 | #include <stdarg.h> |
53 | 53 | |
54 | -#include "appres.h" | |
54 | +//#include "appres.h" | |
55 | 55 | #include "3270ds.h" |
56 | 56 | #include "resources.h" |
57 | 57 | |
... | ... | @@ -102,7 +102,7 @@ |
102 | 102 | |
103 | 103 | /*---[ Globals ]--------------------------------------------------------------------------------------------------------------*/ |
104 | 104 | // const char * programname; |
105 | - AppRes appres; | |
105 | +// AppRes appres; | |
106 | 106 | // int children = 0; |
107 | 107 | // Boolean exiting = False; |
108 | 108 | // char * command_string = CN; |
... | ... | @@ -116,15 +116,15 @@ |
116 | 116 | */ |
117 | 117 | static void initialize(void) |
118 | 118 | { |
119 | - memset(&appres,0,sizeof(appres)); | |
119 | +// memset(&appres,0,sizeof(appres)); | |
120 | 120 | |
121 | 121 | #ifdef DEBUG |
122 | 122 | init_calls++; |
123 | 123 | trace("Initializing library (calls: %d)",init_calls); |
124 | 124 | #endif |
125 | 125 | |
126 | - h3270.selected = 0; | |
127 | - h3270.select.start = h3270.select.end = 0; | |
126 | +// h3270.selected = 0; | |
127 | +// h3270.select.start = h3270.select.end = 0; | |
128 | 128 | // initialize_toggles(&h3270); |
129 | 129 | |
130 | 130 | #if defined(_WIN32) |
... | ... | @@ -137,9 +137,9 @@ static void initialize(void) |
137 | 137 | // appres.mono = False; |
138 | 138 | // appres.extended = True; |
139 | 139 | |
140 | -#if defined(C3270) /*[*/ | |
141 | - h3270.m3279 = True; | |
142 | -#endif /*]*/ | |
140 | +//#if defined(C3270) /*[*/ | |
141 | +// h3270.m3279 = True; | |
142 | +//#endif /*]*/ | |
143 | 143 | |
144 | 144 | // appres.modified_sel = False; |
145 | 145 | // appres.apl_mode = False; |
... | ... | @@ -162,13 +162,13 @@ static void initialize(void) |
162 | 162 | #endif /*]*/ |
163 | 163 | |
164 | 164 | // appres.typeahead = True; |
165 | - appres.debug_tracing = True; | |
165 | +// appres.debug_tracing = True; | |
166 | 166 | |
167 | 167 | //#if defined(C3270) |
168 | 168 | // appres.compose_map = "latin1"; |
169 | 169 | //#endif |
170 | 170 | |
171 | - appres.model = ""; | |
171 | +// appres.model = ""; | |
172 | 172 | // appres.hostsfile = CN; |
173 | 173 | // appres.port = "telnet"; |
174 | 174 | |
... | ... | @@ -225,9 +225,9 @@ static void initialize(void) |
225 | 225 | |
226 | 226 | // appres.unlock_delay = True; |
227 | 227 | |
228 | -#if defined(X3270_FT) /*[*/ | |
229 | - appres.dft_buffer_size = DFT_BUF; | |
230 | -#endif /*]*/ | |
228 | +//#if defined(X3270_FT) /*[*/ | |
229 | +// appres.dft_buffer_size = DFT_BUF; | |
230 | +//#endif /*]*/ | |
231 | 231 | |
232 | 232 | /* |
233 | 233 | #if defined(C3270) && !defined(LIB3270) | ... | ... |
paste.c
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | // #include <malloc.h> |
49 | 49 | |
50 | 50 | #include "3270ds.h" |
51 | -#include "appres.h" | |
51 | +//#include "appres.h" | |
52 | 52 | #include "resources.h" |
53 | 53 | |
54 | 54 | #include "actionsc.h" |
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | static int paste_char(H3270 *session, PASTE_DATA *data, unsigned char c) |
139 | 139 | { |
140 | 140 | |
141 | - if(lib3270_get_toggle(session,SMART_PASTE)) | |
141 | + if(lib3270_get_toggle(session,LIB3270_TOGGLE_SMART_PASTE)) | |
142 | 142 | { |
143 | 143 | int faddr = find_field_attribute(session,session->cursor_addr); |
144 | 144 | if(FA_IS_PROTECTED(session->ea_buf[faddr].fa)) | ... | ... |
proxy.c
screen.c
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | |
38 | 38 | #include "globals.h" |
39 | 39 | #include <signal.h> |
40 | -#include "appres.h" | |
40 | +//#include "appres.h" | |
41 | 41 | #include "3270ds.h" |
42 | 42 | #include "resources.h" |
43 | 43 | // #include "ctlr.h" |
... | ... | @@ -342,7 +342,7 @@ void screen_update(H3270 *session, int bstart, int bend) |
342 | 342 | } |
343 | 343 | else |
344 | 344 | { |
345 | - if(lib3270_get_toggle(session,MONOCASE)) | |
345 | + if(lib3270_get_toggle(session,LIB3270_TOGGLE_MONOCASE)) | |
346 | 346 | addch(session,baddr,asc2uc[ebc2asc[session->ea_buf[baddr].cc]],attr,&first,&last); |
347 | 347 | else |
348 | 348 | addch(session,baddr,ebc2asc[session->ea_buf[baddr].cc],attr,&first,&last); | ... | ... |
selection.c
session.c
... | ... | @@ -174,19 +174,18 @@ static void lib3270_session_init(H3270 *hSession, const char *model) |
174 | 174 | hSession->display = screen_disp; |
175 | 175 | |
176 | 176 | // Set the defaults. |
177 | - hSession->extended = 1; | |
178 | - hSession->typeahead = 1; | |
179 | - hSession->oerr_lock = 1; | |
180 | - hSession->unlock_delay = 1; | |
181 | - hSession->icrnl = 1; | |
182 | - hSession->onlcr = 1; | |
177 | + hSession->extended = 1; | |
178 | + hSession->typeahead = 1; | |
179 | + hSession->oerr_lock = 1; | |
180 | + hSession->unlock_delay = 1; | |
181 | + hSession->icrnl = 1; | |
182 | + hSession->onlcr = 1; | |
183 | 183 | hSession->host_charset = "bracket"; |
184 | 184 | hSession->sock = -1; |
185 | 185 | hSession->model_num = -1; |
186 | 186 | hSession->cstate = LIB3270_NOT_CONNECTED; |
187 | 187 | hSession->oia_status = -1; |
188 | 188 | |
189 | - | |
190 | 189 | #ifdef _WIN32 |
191 | 190 | hSession->sockEvent = NULL; |
192 | 191 | #endif // _WIN32 | ... | ... |
toggles.c
trace_ds.c
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | #include <stdarg.h> |
54 | 54 | #include <fcntl.h> |
55 | 55 | #include "3270ds.h" |
56 | -#include "appres.h" | |
56 | +//#include "appres.h" | |
57 | 57 | #include "objects.h" |
58 | 58 | #include "resources.h" |
59 | 59 | // #include "ctlr.h" |
... | ... | @@ -69,6 +69,7 @@ |
69 | 69 | #include "trace_dsc.h" |
70 | 70 | #include "utilc.h" |
71 | 71 | #include "w3miscc.h" |
72 | +#include "toggle.h" | |
72 | 73 | |
73 | 74 | /* Maximum size of a tracefile header. */ |
74 | 75 | #define MAX_HEADER_SIZE (10*1024) |
... | ... | @@ -815,14 +816,14 @@ void trace_screen(void) |
815 | 816 | { |
816 | 817 | trace_skipping = False; |
817 | 818 | |
818 | - if (!lib3270_get_toggle(&h3270,SCREEN_TRACE)) | |
819 | + if (!lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SCREEN_TRACE)) | |
819 | 820 | do_screentrace(); |
820 | 821 | } |
821 | 822 | |
822 | 823 | /* Called from ANSI emulation code to log a single character. */ |
823 | 824 | void trace_char(char c) |
824 | 825 | { |
825 | - if (lib3270_get_toggle(&h3270,SCREEN_TRACE)) | |
826 | + if (lib3270_get_toggle(&h3270,LIB3270_TOGGLE_SCREEN_TRACE)) | |
826 | 827 | wtrace("%c",c); |
827 | 828 | return; |
828 | 829 | } | ... | ... |