Commit 4bc8f93885a3b2bb9f464ab6439f30eb0a0845c3
1 parent
11f4b82e
Exists in
master
and in
5 other branches
Removendo warnings
Showing
19 changed files
with
145 additions
and
129 deletions
Show diff stats
src/include/rules.mak.in
... | ... | @@ -37,7 +37,7 @@ EXEEXT=@EXEEXT@ |
37 | 37 | LIB3270_CFLAGS ?= `pkg-config --cflags lib3270` |
38 | 38 | LIB3270_LIBS ?= `pkg-config --libs lib3270` |
39 | 39 | |
40 | -DEBUG_CFLAGS=-DDEBUG=1 -g | |
40 | +DEBUG_CFLAGS=-DDEBUG=1 -g -Wall | |
41 | 41 | DEPENDS ?= *.h ../include/*.h ../include/lib3270/*.h |
42 | 42 | |
43 | 43 | #---[ Tools ]------------------------------------------------------------------ | ... | ... |
src/lib3270/Makefile.in
... | ... | @@ -36,7 +36,7 @@ LDFLAGS=@LDFLAGS@ -Wl,-soname,@DLLPREFIX@3270@DLLEXT@.@VERSION@ |
36 | 36 | |
37 | 37 | LIBS=@LIBS@ @LIBSSL_LIBS@ @INTL_LIBS@ @SOCKET_LIBS@ |
38 | 38 | |
39 | -DEBUG_CFLAGS=-DDEBUG=1 -g | |
39 | +DEBUG_CFLAGS=-DDEBUG=1 -g -Wall | |
40 | 40 | DEPENDS ?= *.h ../include/*.h ../include/lib3270/*.h Makefile |
41 | 41 | |
42 | 42 | #---[ Paths ]------------------------------------------------------------------ | ... | ... |
src/lib3270/telnet.c
... | ... | @@ -224,8 +224,8 @@ static const char *tn3270e_function_names(const unsigned char *, int); |
224 | 224 | #endif /*]*/ |
225 | 225 | static void tn3270e_subneg_send(H3270 *hSession, unsigned char, unsigned long); |
226 | 226 | static unsigned long tn3270e_fdecode(const unsigned char *, int); |
227 | -static void tn3270e_ack(void); | |
228 | -static void tn3270e_nak(enum pds); | |
227 | +static void tn3270e_ack(H3270 *hSession); | |
228 | +static void tn3270e_nak(H3270 *hSession, enum pds); | |
229 | 229 | #endif /*]*/ |
230 | 230 | |
231 | 231 | #if defined(X3270_ANSI) /*[*/ |
... | ... | @@ -236,9 +236,9 @@ static void do_cerase(H3270 *hSession, char c); |
236 | 236 | static void do_werase(H3270 *hSession, char c); |
237 | 237 | static void do_kill(H3270 *hSession, char c); |
238 | 238 | static void do_rprnt(H3270 *hSession, char c); |
239 | -static void do_eof(char c); | |
240 | -static void do_eol(char c); | |
241 | -static void do_lnext(char c); | |
239 | +static void do_eof(H3270 *hSession, char c); | |
240 | +static void do_eol(H3270 *hSession, char c); | |
241 | +static void do_lnext(H3270 *hSession, char c); | |
242 | 242 | static char parse_ctlchar(char *s); |
243 | 243 | static void cooked_init(H3270 *hSession); |
244 | 244 | #endif /*]*/ |
... | ... | @@ -1891,10 +1891,10 @@ process_eor(void) |
1891 | 1891 | (h3270.ibptr - h3270.ibuf) - EH_SIZE); |
1892 | 1892 | if (rv < 0 && |
1893 | 1893 | h3270.response_required != TN3270E_RSF_NO_RESPONSE) |
1894 | - tn3270e_nak(rv); | |
1894 | + tn3270e_nak(&h3270,rv); | |
1895 | 1895 | else if (rv == PDS_OKAY_NO_OUTPUT && |
1896 | 1896 | h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE) |
1897 | - tn3270e_ack(); | |
1897 | + tn3270e_ack(&h3270); | |
1898 | 1898 | h3270.response_required = TN3270E_RSF_NO_RESPONSE; |
1899 | 1899 | return 0; |
1900 | 1900 | case TN3270E_DT_BIND_IMAGE: |
... | ... | @@ -2158,7 +2158,7 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) |
2158 | 2158 | |
2159 | 2159 | /* Control chars. */ |
2160 | 2160 | if (c == '\n') |
2161 | - do_eol(c); | |
2161 | + do_eol(hSession,c); | |
2162 | 2162 | else if (c == vintr) |
2163 | 2163 | do_intr(hSession, c); |
2164 | 2164 | else if (c == vquit) |
... | ... | @@ -2172,9 +2172,9 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) |
2172 | 2172 | else if (c == vrprnt) |
2173 | 2173 | do_rprnt(hSession,c); |
2174 | 2174 | else if (c == veof) |
2175 | - do_eof(c); | |
2175 | + do_eof(hSession,c); | |
2176 | 2176 | else if (c == vlnext) |
2177 | - do_lnext(c); | |
2177 | + do_lnext(hSession,c); | |
2178 | 2178 | else if (c == 0x08 || c == 0x7f) /* Yes, a hack. */ |
2179 | 2179 | do_cerase(hSession,c); |
2180 | 2180 | else |
... | ... | @@ -2343,16 +2343,15 @@ static void do_rprnt(H3270 *hSession, char c) |
2343 | 2343 | ansi_process_s(ctl_see((int) *p)); |
2344 | 2344 | } |
2345 | 2345 | |
2346 | -static void | |
2347 | -do_eof(char c) | |
2346 | +static void do_eof(H3270 *hSession, char c) | |
2348 | 2347 | { |
2349 | - if (h3270.backslashed) { | |
2350 | - h3270.lbptr--; | |
2348 | + if (hSession->backslashed) { | |
2349 | + hSession->lbptr--; | |
2351 | 2350 | ansi_process_s("\b"); |
2352 | 2351 | do_data(c); |
2353 | 2352 | return; |
2354 | 2353 | } |
2355 | - if (h3270.lnext) { | |
2354 | + if (hSession->lnext) { | |
2356 | 2355 | do_data(c); |
2357 | 2356 | return; |
2358 | 2357 | } |
... | ... | @@ -2360,31 +2359,29 @@ do_eof(char c) |
2360 | 2359 | forward_data(); |
2361 | 2360 | } |
2362 | 2361 | |
2363 | -static void | |
2364 | -do_eol(char c) | |
2362 | +static void do_eol(H3270 *hSession, char c) | |
2365 | 2363 | { |
2366 | - if (h3270.lnext) { | |
2364 | + if (hSession->lnext) { | |
2367 | 2365 | do_data(c); |
2368 | 2366 | return; |
2369 | 2367 | } |
2370 | - if (h3270.lbptr+2 >= h3270.lbuf + BUFSZ) { | |
2368 | + if (hSession->lbptr+2 >= hSession->lbuf + BUFSZ) { | |
2371 | 2369 | ansi_process_s("\007"); |
2372 | 2370 | return; |
2373 | 2371 | } |
2374 | - *h3270.lbptr++ = '\r'; | |
2375 | - *h3270.lbptr++ = '\n'; | |
2372 | + *hSession->lbptr++ = '\r'; | |
2373 | + *hSession->lbptr++ = '\n'; | |
2376 | 2374 | ansi_process_s("\r\n"); |
2377 | 2375 | forward_data(); |
2378 | 2376 | } |
2379 | 2377 | |
2380 | -static void | |
2381 | -do_lnext(char c) | |
2378 | +static void do_lnext(H3270 *hSession, char c) | |
2382 | 2379 | { |
2383 | - if (h3270.lnext) { | |
2380 | + if (hSession->lnext) { | |
2384 | 2381 | do_data(c); |
2385 | 2382 | return; |
2386 | 2383 | } |
2387 | - h3270.lnext = 1; | |
2384 | + hSession->lnext = 1; | |
2388 | 2385 | ansi_process_s("^\b"); |
2389 | 2386 | } |
2390 | 2387 | #endif /*]*/ |
... | ... | @@ -2679,7 +2676,7 @@ net_output(void) |
2679 | 2676 | |
2680 | 2677 | /* Check for sending a TN3270E response. */ |
2681 | 2678 | if (h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE) { |
2682 | - tn3270e_ack(); | |
2679 | + tn3270e_ack(&h3270); | |
2683 | 2680 | h3270.response_required = TN3270E_RSF_NO_RESPONSE; |
2684 | 2681 | } |
2685 | 2682 | |
... | ... | @@ -2727,11 +2724,10 @@ net_output(void) |
2727 | 2724 | |
2728 | 2725 | #if defined(X3270_TN3270E) /*[*/ |
2729 | 2726 | /* Send a TN3270E positive response to the server. */ |
2730 | -static void | |
2731 | -tn3270e_ack(void) | |
2727 | +static void tn3270e_ack(H3270 *hSession) | |
2732 | 2728 | { |
2733 | 2729 | unsigned char rsp_buf[10]; |
2734 | - tn3270e_header *h_in = (tn3270e_header *) h3270.ibuf; | |
2730 | + tn3270e_header *h_in = (tn3270e_header *) hSession->ibuf; | |
2735 | 2731 | int rsp_len = 0; |
2736 | 2732 | |
2737 | 2733 | rsp_len = 0; |
... | ... | @@ -2739,26 +2735,28 @@ tn3270e_ack(void) |
2739 | 2735 | rsp_buf[rsp_len++] = 0; /* request_flag */ |
2740 | 2736 | rsp_buf[rsp_len++] = TN3270E_RSF_POSITIVE_RESPONSE; /* response_flag */ |
2741 | 2737 | rsp_buf[rsp_len++] = h_in->seq_number[0]; /* seq_number[0] */ |
2738 | + | |
2742 | 2739 | if (h_in->seq_number[0] == IAC) |
2743 | 2740 | rsp_buf[rsp_len++] = IAC; |
2741 | + | |
2744 | 2742 | rsp_buf[rsp_len++] = h_in->seq_number[1]; /* seq_number[1] */ |
2743 | + | |
2745 | 2744 | if (h_in->seq_number[1] == IAC) |
2746 | 2745 | rsp_buf[rsp_len++] = IAC; |
2746 | + | |
2747 | 2747 | rsp_buf[rsp_len++] = TN3270E_POS_DEVICE_END; |
2748 | 2748 | rsp_buf[rsp_len++] = IAC; |
2749 | 2749 | rsp_buf[rsp_len++] = EOR; |
2750 | - trace_dsn("SENT TN3270E(RESPONSE POSITIVE-RESPONSE " | |
2751 | - "%u) DEVICE-END\n", | |
2750 | + trace_dsn("SENT TN3270E(RESPONSE POSITIVE-RESPONSE %u) DEVICE-END\n", | |
2752 | 2751 | h_in->seq_number[0] << 8 | h_in->seq_number[1]); |
2753 | - net_rawout(&h3270, rsp_buf, rsp_len); | |
2752 | + net_rawout(hSession, rsp_buf, rsp_len); | |
2754 | 2753 | } |
2755 | 2754 | |
2756 | 2755 | /* Send a TN3270E negative response to the server. */ |
2757 | -static void | |
2758 | -tn3270e_nak(enum pds rv) | |
2756 | +static void tn3270e_nak(H3270 *hSession, enum pds rv) | |
2759 | 2757 | { |
2760 | 2758 | unsigned char rsp_buf[10]; |
2761 | - tn3270e_header *h_in = (tn3270e_header *) h3270.ibuf; | |
2759 | + tn3270e_header *h_in = (tn3270e_header *) hSession->ibuf; | |
2762 | 2760 | int rsp_len = 0; |
2763 | 2761 | char *neg = NULL; |
2764 | 2762 | |
... | ... | @@ -2785,7 +2783,7 @@ tn3270e_nak(enum pds rv) |
2785 | 2783 | rsp_buf[rsp_len++] = IAC; |
2786 | 2784 | rsp_buf[rsp_len++] = EOR; |
2787 | 2785 | trace_dsn("SENT TN3270E(RESPONSE NEGATIVE-RESPONSE %u) %s\n",h_in->seq_number[0] << 8 | h_in->seq_number[1], neg); |
2788 | - net_rawout(&h3270, rsp_buf, rsp_len); | |
2786 | + net_rawout(hSession, rsp_buf, rsp_len); | |
2789 | 2787 | } |
2790 | 2788 | |
2791 | 2789 | #if defined(X3270_TRACE) /*[*/ |
... | ... | @@ -2908,7 +2906,7 @@ net_send_werase(void) |
2908 | 2906 | #if defined(X3270_MENUS) /*[*/ |
2909 | 2907 | /* |
2910 | 2908 | * External entry points to negotiate line or character mode. |
2911 | - */ | |
2909 | + */ /* | |
2912 | 2910 | void |
2913 | 2911 | net_linemode(void) |
2914 | 2912 | { |
... | ... | @@ -2925,6 +2923,7 @@ net_linemode(void) |
2925 | 2923 | trace_dsn("SENT %s %s\n", cmd(DONT), opt(TELOPT_SGA)); |
2926 | 2924 | } |
2927 | 2925 | } |
2926 | +*/ | |
2928 | 2927 | |
2929 | 2928 | void |
2930 | 2929 | net_charmode(void) |
... | ... | @@ -3044,7 +3043,7 @@ parse_ctlchar(char *s) |
3044 | 3043 | /* |
3045 | 3044 | * net_linemode_chars |
3046 | 3045 | * Report line-mode characters. |
3047 | - */ | |
3046 | + */ /* | |
3048 | 3047 | struct ctl_char * |
3049 | 3048 | net_linemode_chars(void) |
3050 | 3049 | { |
... | ... | @@ -3061,14 +3060,14 @@ net_linemode_chars(void) |
3061 | 3060 | c[8].name = 0; |
3062 | 3061 | |
3063 | 3062 | return c; |
3064 | -} | |
3063 | +} */ | |
3065 | 3064 | #endif /*]*/ |
3066 | 3065 | |
3067 | 3066 | #if defined(X3270_TRACE) /*[*/ |
3068 | 3067 | /* |
3069 | 3068 | * Construct a string to reproduce the current TELNET options. |
3070 | 3069 | * Returns a Boolean indicating whether it is necessary. |
3071 | - */ | |
3070 | + */ /* | |
3072 | 3071 | Boolean |
3073 | 3072 | net_snap_options(void) |
3074 | 3073 | { |
... | ... | @@ -3084,7 +3083,7 @@ net_snap_options(void) |
3084 | 3083 | |
3085 | 3084 | h3270.obptr = h3270.obuf; |
3086 | 3085 | |
3087 | - /* Do TTYPE first. */ | |
3086 | + // Do TTYPE first. | |
3088 | 3087 | if (h3270.myopts[TELOPT_TTYPE]) { |
3089 | 3088 | unsigned j; |
3090 | 3089 | |
... | ... | @@ -3093,7 +3092,7 @@ net_snap_options(void) |
3093 | 3092 | *h3270.obptr++ = ttype_str[j]; |
3094 | 3093 | } |
3095 | 3094 | |
3096 | - /* Do the other options. */ | |
3095 | + // Do the other options. | |
3097 | 3096 | for (i = 0; i < LIB3270_TELNET_N_OPTS; i++) { |
3098 | 3097 | space3270out(6); |
3099 | 3098 | if (i == TELOPT_TTYPE) |
... | ... | @@ -3112,8 +3111,8 @@ net_snap_options(void) |
3112 | 3111 | } |
3113 | 3112 | } |
3114 | 3113 | |
3115 | -#if defined(X3270_TN3270E) /*[*/ | |
3116 | - /* If we're in TN3270E mode, snap the subnegotations as well. */ | |
3114 | +#if defined(X3270_TN3270E) | |
3115 | + // If we're in TN3270E mode, snap the subnegotations as well. | |
3117 | 3116 | if (h3270.myopts[TELOPT_TN3270E]) { |
3118 | 3117 | any = True; |
3119 | 3118 | |
... | ... | @@ -3160,15 +3159,17 @@ net_snap_options(void) |
3160 | 3159 | h->seq_number[0] = 0; |
3161 | 3160 | h->seq_number[1] = 0; |
3162 | 3161 | h3270.obptr += EH_SIZE; |
3163 | - *h3270.obptr++ = 1; /* dummy */ | |
3162 | + *h3270.obptr++ = 1; // dummy | |
3164 | 3163 | *h3270.obptr++ = IAC; |
3165 | 3164 | *h3270.obptr++ = EOR; |
3166 | 3165 | } |
3167 | 3166 | } |
3168 | -#endif /*]*/ | |
3167 | +#endif | |
3169 | 3168 | return any; |
3170 | 3169 | } |
3171 | -#endif /*]*/ | |
3170 | +*/ | |
3171 | +#endif | |
3172 | + | |
3172 | 3173 | |
3173 | 3174 | /* |
3174 | 3175 | * Set blocking/non-blocking mode on the socket. On error, pops up an error |
... | ... | @@ -3436,7 +3437,7 @@ int net_getsockname(const H3270 *session, void *buf, int *len) |
3436 | 3437 | return getsockname(session->sock, buf, (socklen_t *)(void *)len); |
3437 | 3438 | } |
3438 | 3439 | |
3439 | -/* Return a text version of the current proxy type, or NULL. */ | |
3440 | +/* Return a text version of the current proxy type, or NULL. */ /* | |
3440 | 3441 | char * |
3441 | 3442 | net_proxy_type(void) |
3442 | 3443 | { |
... | ... | @@ -3445,8 +3446,9 @@ net_proxy_type(void) |
3445 | 3446 | else |
3446 | 3447 | return NULL; |
3447 | 3448 | } |
3449 | +*/ | |
3448 | 3450 | |
3449 | -/* Return the current proxy host, or NULL. */ | |
3451 | +/* Return the current proxy host, or NULL. */ /* | |
3450 | 3452 | char * |
3451 | 3453 | net_proxy_host(void) |
3452 | 3454 | { |
... | ... | @@ -3455,8 +3457,9 @@ net_proxy_host(void) |
3455 | 3457 | else |
3456 | 3458 | return NULL; |
3457 | 3459 | } |
3460 | +*/ | |
3458 | 3461 | |
3459 | -/* Return the current proxy port, or NULL. */ | |
3462 | +/* Return the current proxy port, or NULL. */ /* | |
3460 | 3463 | char * |
3461 | 3464 | net_proxy_port(void) |
3462 | 3465 | { |
... | ... | @@ -3465,6 +3468,7 @@ net_proxy_port(void) |
3465 | 3468 | else |
3466 | 3469 | return NULL; |
3467 | 3470 | } |
3471 | +*/ | |
3468 | 3472 | |
3469 | 3473 | LIB3270_EXPORT LIB3270_SSL_STATE lib3270_get_secure(H3270 *session) |
3470 | 3474 | { | ... | ... |
src/lib3270/telnetc.h
... | ... | @@ -40,8 +40,8 @@ LIB3270_INTERNAL void net_exception(H3270 *session); |
40 | 40 | // LIB3270_INTERNAL void net_hexansi_out(unsigned char *buf, int len); |
41 | 41 | LIB3270_INTERNAL void net_input(H3270 *session); |
42 | 42 | LIB3270_INTERNAL void net_interrupt(void); |
43 | -LIB3270_INTERNAL void net_linemode(void); | |
44 | -LIB3270_INTERNAL struct ctl_char *net_linemode_chars(void); | |
43 | +// LIB3270_INTERNAL void net_linemode(void); | |
44 | +// LIB3270_INTERNAL struct ctl_char *net_linemode_chars(void); | |
45 | 45 | LIB3270_INTERNAL void net_output(void); |
46 | 46 | LIB3270_INTERNAL const char *net_query_bind_plu_name(void); |
47 | 47 | LIB3270_INTERNAL const char *net_query_connection_state(void); |
... | ... | @@ -52,12 +52,12 @@ LIB3270_INTERNAL void net_sends(const char *s); |
52 | 52 | LIB3270_INTERNAL void net_send_erase(void); |
53 | 53 | LIB3270_INTERNAL void net_send_kill(void); |
54 | 54 | LIB3270_INTERNAL void net_send_werase(void); |
55 | -LIB3270_INTERNAL Boolean net_snap_options(void); | |
55 | +// LIB3270_INTERNAL Boolean net_snap_options(void); | |
56 | 56 | LIB3270_INTERNAL void space3270out(int n); |
57 | 57 | // LIB3270_INTERNAL const char *tn3270e_current_opts(void); |
58 | -LIB3270_INTERNAL char *net_proxy_type(void); | |
59 | -LIB3270_INTERNAL char *net_proxy_host(void); | |
60 | -LIB3270_INTERNAL char *net_proxy_port(void); | |
58 | +// LIB3270_INTERNAL char *net_proxy_type(void); | |
59 | +//LIB3270_INTERNAL char *net_proxy_host(void); | |
60 | +// LIB3270_INTERNAL char *net_proxy_port(void); | |
61 | 61 | |
62 | 62 | #if defined(X3270_TRACE) |
63 | 63 | LIB3270_INTERNAL void trace_netdata(char direction, unsigned const char *buf, int len); | ... | ... |
src/pw3270/actions.c
... | ... | @@ -87,10 +87,12 @@ static void connect_action(GtkAction *action, GtkWidget *widget) |
87 | 87 | hostname_action(action,widget); |
88 | 88 | } |
89 | 89 | |
90 | +/* | |
90 | 91 | static void nop_action(GtkAction *action, GtkWidget *widget) |
91 | 92 | { |
92 | 93 | trace_action(action,widget); |
93 | 94 | } |
95 | +*/ | |
94 | 96 | |
95 | 97 | static void disconnect_action(GtkAction *action, GtkWidget *widget) |
96 | 98 | { |
... | ... | @@ -131,7 +133,7 @@ static void copy_action(GtkAction *action, GtkWidget *widget) |
131 | 133 | |
132 | 134 | for(f=0;f<G_N_ELEMENTS(format);f++) |
133 | 135 | { |
134 | - if(!g_strcasecmp(format[f].name,str)) | |
136 | + if(!g_ascii_strcasecmp(format[f].name,str)) | |
135 | 137 | { |
136 | 138 | mode = format[f].mode; |
137 | 139 | break; |
... | ... | @@ -254,7 +256,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const |
254 | 256 | // Search for lib3270 predefined actions |
255 | 257 | for(f=0;f<G_N_ELEMENTS(lib3270_entry);f++) |
256 | 258 | { |
257 | - if(!g_strcasecmp(name,lib3270_entry[f].name)) | |
259 | + if(!g_ascii_strcasecmp(name,lib3270_entry[f].name)) | |
258 | 260 | { |
259 | 261 | g_object_set_data(G_OBJECT(action),"lib3270_call",lib3270_entry[f].call); |
260 | 262 | g_signal_connect(action,"activate",G_CALLBACK(lib3270_action),widget); |
... | ... | @@ -265,14 +267,14 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const |
265 | 267 | // Search for application actions |
266 | 268 | for(f=0;f<G_N_ELEMENTS(gtk_action);f++) |
267 | 269 | { |
268 | - if(!g_strcasecmp(name,gtk_action[f].name)) | |
270 | + if(!g_ascii_strcasecmp(name,gtk_action[f].name)) | |
269 | 271 | { |
270 | 272 | g_signal_connect(action,"activate",G_CALLBACK(gtk_action[f].call),widget); |
271 | 273 | return; |
272 | 274 | } |
273 | 275 | } |
274 | 276 | |
275 | - if(!g_strcasecmp(name,"screensizes")) | |
277 | + if(!g_ascii_strcasecmp(name,"screensizes")) | |
276 | 278 | return; |
277 | 279 | |
278 | 280 | // Not-found, disable action |
... | ... | @@ -318,12 +320,12 @@ static void connect_move_action(GtkAction *action, GtkWidget *widget, const gcha |
318 | 320 | return; |
319 | 321 | } |
320 | 322 | |
321 | - if(!g_strcasecmp(target,"selection")) | |
323 | + if(!g_ascii_strcasecmp(target,"selection")) | |
322 | 324 | { |
323 | 325 | g_object_set_data(G_OBJECT(action),"direction",(gpointer) (flags & 3)); |
324 | 326 | g_signal_connect(action,"activate",G_CALLBACK(selection_move_action),widget); |
325 | 327 | } |
326 | - else if(!g_strcasecmp(target,"cursor")) | |
328 | + else if(!g_ascii_strcasecmp(target,"cursor")) | |
327 | 329 | { |
328 | 330 | g_object_set_data(G_OBJECT(action),"move_flags",(gpointer) ((int) flags)); |
329 | 331 | g_signal_connect(action,"activate",G_CALLBACK(cursor_move_action),widget); |
... | ... | @@ -393,7 +395,7 @@ static int id_from_array(const gchar *key, const gchar **array, GError **error) |
393 | 395 | |
394 | 396 | for(f = 0;array[f];f++) |
395 | 397 | { |
396 | - if(!g_strcasecmp(key,array[f])) | |
398 | + if(!g_ascii_strcasecmp(key,array[f])) | |
397 | 399 | return f; |
398 | 400 | } |
399 | 401 | |
... | ... | @@ -461,7 +463,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
461 | 463 | const gchar * direction = ui_get_attribute("direction",names,values); |
462 | 464 | unsigned short flags = 0; |
463 | 465 | const GCallback * callback = NULL; |
464 | - const gchar * attr; | |
466 | + const gchar * attr = NULL; | |
465 | 467 | int id = 0; |
466 | 468 | gchar * nm = NULL; |
467 | 469 | int f; |
... | ... | @@ -486,7 +488,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
486 | 488 | |
487 | 489 | for(f=0;f<G_N_ELEMENTS(dirname);f++) |
488 | 490 | { |
489 | - if(!g_strcasecmp(direction,dirname[f])) | |
491 | + if(!g_ascii_strcasecmp(direction,dirname[f])) | |
490 | 492 | { |
491 | 493 | flags |= f; |
492 | 494 | break; |
... | ... | @@ -498,14 +500,14 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
498 | 500 | flags |= 0x80; |
499 | 501 | |
500 | 502 | // Build action name & type |
501 | - if(!g_strcasecmp(name,"toggle")) | |
503 | + if(!g_ascii_strcasecmp(name,"toggle")) | |
502 | 504 | { |
503 | 505 | action_type = ACTION_TYPE_TOGGLE; |
504 | 506 | attr = ui_get_attribute("id",names,values); |
505 | 507 | if(!attr) |
506 | 508 | attr = ui_get_attribute("toggle",names,values); |
507 | 509 | |
508 | - if(g_strcasecmp(attr,"gdkdebug")) | |
510 | + if(g_ascii_strcasecmp(attr,"gdkdebug")) | |
509 | 511 | { |
510 | 512 | id = lib3270_get_toggle_id(attr); |
511 | 513 | if(id < 0) |
... | ... | @@ -520,7 +522,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
520 | 522 | } |
521 | 523 | nm = g_strconcat(name,attr,NULL); |
522 | 524 | } |
523 | - else if(!g_strcasecmp(name,"move")) | |
525 | + else if(!g_ascii_strcasecmp(name,"move")) | |
524 | 526 | { |
525 | 527 | action_type = ACTION_TYPE_MOVE; |
526 | 528 | attr = ui_get_attribute("target",names,values); |
... | ... | @@ -534,7 +536,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
534 | 536 | nm = g_strconcat((flags & 0x80) ? "select" : "move",attr,direction, NULL); |
535 | 537 | |
536 | 538 | } |
537 | - else if(!g_strcasecmp(name,"paste")) | |
539 | + else if(!g_ascii_strcasecmp(name,"paste")) | |
538 | 540 | { |
539 | 541 | static const GCallback cbk[] = { G_CALLBACK(paste_clipboard_action), |
540 | 542 | G_CALLBACK(paste_next_action), |
... | ... | @@ -550,7 +552,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
550 | 552 | return NULL; |
551 | 553 | |
552 | 554 | } |
553 | - else if(!g_strcasecmp(name,"copy")) | |
555 | + else if(!g_ascii_strcasecmp(name,"copy")) | |
554 | 556 | { |
555 | 557 | static const GCallback cbk[] = { G_CALLBACK(copy_action), |
556 | 558 | G_CALLBACK(append_action) |
... | ... | @@ -560,7 +562,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
560 | 562 | id = ui_get_bool_attribute("append",names,values,FALSE) ? 1 : 0; |
561 | 563 | nm = g_strconcat(id == 0 ? "copy" : "append",ui_get_attribute("format",names,values),NULL); |
562 | 564 | } |
563 | - else if(!g_strcasecmp(name,"select")) | |
565 | + else if(!g_ascii_strcasecmp(name,"select")) | |
564 | 566 | { |
565 | 567 | static const gchar * src[] = { "all", "field", "none", "last", NULL }; |
566 | 568 | |
... | ... | @@ -575,7 +577,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
575 | 577 | if(id < 0) |
576 | 578 | return NULL; |
577 | 579 | } |
578 | - else if(!g_strcasecmp(name,"save")) | |
580 | + else if(!g_ascii_strcasecmp(name,"save")) | |
579 | 581 | { |
580 | 582 | static const GCallback cbk[] = { G_CALLBACK(save_all_action), |
581 | 583 | G_CALLBACK(save_selected_action), |
... | ... | @@ -590,7 +592,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
590 | 592 | return NULL; |
591 | 593 | nm = g_strconcat(name,attr,NULL); |
592 | 594 | } |
593 | - else if(!g_strcasecmp(name,"print")) | |
595 | + else if(!g_ascii_strcasecmp(name,"print")) | |
594 | 596 | { |
595 | 597 | static const GCallback cbk[] = { G_CALLBACK(print_all_action), |
596 | 598 | G_CALLBACK(print_selected_action), |
... | ... | @@ -605,7 +607,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
605 | 607 | return NULL; |
606 | 608 | nm = g_strconcat(name,attr,NULL); |
607 | 609 | } |
608 | - else if(!g_strcasecmp(name,"set")) | |
610 | + else if(!g_ascii_strcasecmp(name,"set")) | |
609 | 611 | { |
610 | 612 | action_type = ACTION_TYPE_SET; |
611 | 613 | attr = ui_get_attribute("toggle",names,values); |
... | ... | @@ -617,7 +619,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
617 | 619 | } |
618 | 620 | nm = g_strconcat("set",attr,NULL); |
619 | 621 | } |
620 | - else if(!g_strcasecmp(name,"reset")) | |
622 | + else if(!g_ascii_strcasecmp(name,"reset")) | |
621 | 623 | { |
622 | 624 | action_type = ACTION_TYPE_RESET; |
623 | 625 | attr = ui_get_attribute("toggle",names,values); |
... | ... | @@ -629,7 +631,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
629 | 631 | } |
630 | 632 | nm = g_strconcat("reset",attr,NULL); |
631 | 633 | } |
632 | - else if(!g_strcasecmp(name,"pfkey")) | |
634 | + else if(!g_ascii_strcasecmp(name,"pfkey")) | |
633 | 635 | { |
634 | 636 | action_type = ACTION_TYPE_PFKEY; |
635 | 637 | attr = ui_get_attribute("id",names,values); |
... | ... | @@ -641,7 +643,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
641 | 643 | id = atoi(attr); |
642 | 644 | nm = g_strdup_printf("pf%02d",id); |
643 | 645 | } |
644 | - else if(!g_strcasecmp(name,"pakey")) | |
646 | + else if(!g_ascii_strcasecmp(name,"pakey")) | |
645 | 647 | { |
646 | 648 | action_type = ACTION_TYPE_PAKEY; |
647 | 649 | attr = ui_get_attribute("id",names,values); |
... | ... | @@ -721,7 +723,7 @@ GtkAction * ui_get_action(GtkWidget *widget, const gchar *name, GHashTable *hash |
721 | 723 | |
722 | 724 | for(f=0;f<ACTION_COUNT;f++) |
723 | 725 | { |
724 | - if(!g_strcasecmp(actionname[f],nm)) | |
726 | + if(!g_ascii_strcasecmp(actionname[f],nm)) | |
725 | 727 | { |
726 | 728 | GtkAction **named_action = (GtkAction **) g_object_get_data(G_OBJECT(widget),"named_actions"); |
727 | 729 | named_action[f] = action; | ... | ... |
src/pw3270/colors.c
... | ... | @@ -79,7 +79,7 @@ static void load_color_scheme(GKeyFile *conf, const gchar *group, GdkColor *clr) |
79 | 79 | } |
80 | 80 | else |
81 | 81 | { |
82 | - g_warning("Color scheme [%d] has no \"base\" entry, using green on black",group); | |
82 | + g_warning("Color scheme [%s] has no \"base\" entry, using green on black",group); | |
83 | 83 | |
84 | 84 | gdk_color_parse("black",clr); |
85 | 85 | gdk_color_parse("green",clr+1); |
... | ... | @@ -358,7 +358,7 @@ static void load_color_scheme(GKeyFile *conf, const gchar *group, GdkColor *clr) |
358 | 358 | |
359 | 359 | void editcolors_action(GtkAction *action, GtkWidget *widget) |
360 | 360 | { |
361 | - static const gchar *custom = N_( "Custom colors" ); | |
361 | +// static const gchar *custom = N_( "Custom colors" ); | |
362 | 362 | |
363 | 363 | static const struct _node |
364 | 364 | { | ... | ... |
src/pw3270/dialog.c
... | ... | @@ -167,7 +167,7 @@ |
167 | 167 | { |
168 | 168 | GError * error = NULL; |
169 | 169 | |
170 | - if(g_strcasecmp(encoding,"UTF-8")) | |
170 | + if(g_ascii_strcasecmp(encoding,"UTF-8")) | |
171 | 171 | { |
172 | 172 | // Convert to target charset and save |
173 | 173 | gsize bytes_written; |
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | GtkFileChooserConfirmation ret = GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME; |
211 | 211 | GtkWidget * dialog; |
212 | 212 | |
213 | - if(attr && !g_strcasecmp(attr,"yes")) | |
213 | + if(attr && !g_ascii_strcasecmp(attr,"yes")) | |
214 | 214 | return ret; |
215 | 215 | |
216 | 216 | dialog = gtk_message_dialog_new_with_markup( GTK_WINDOW(chooser), | ... | ... |
src/pw3270/filetransfer.c
... | ... | @@ -31,6 +31,7 @@ |
31 | 31 | * |
32 | 32 | */ |
33 | 33 | |
34 | +#include <stdlib.h> | |
34 | 35 | #include "globals.h" |
35 | 36 | #include "uiparser/parser.h" |
36 | 37 | #include "filetransfer.h" |
... | ... | @@ -231,7 +232,7 @@ static void add_transfer_options(GObject *action, struct ftdialog *dlg) |
231 | 232 | |
232 | 233 | GtkTable * table = GTK_TABLE(gtk_table_new(3,2,TRUE)); |
233 | 234 | GtkWidget * frame = gtk_frame_new( _( "Transfer options" ) ); |
234 | - GtkWidget * label = gtk_frame_get_label_widget(GTK_FRAME(frame)); | |
235 | +// GtkWidget * label = gtk_frame_get_label_widget(GTK_FRAME(frame)); | |
235 | 236 | int row, col, f; |
236 | 237 | |
237 | 238 | row=0; |
... | ... | @@ -246,7 +247,7 @@ static void add_transfer_options(GObject *action, struct ftdialog *dlg) |
246 | 247 | gtk_widget_set_name(widget,option[f].name); |
247 | 248 | |
248 | 249 | if(val) |
249 | - active = g_strcasecmp(val,"yes") == 0 ? TRUE : FALSE; | |
250 | + active = g_ascii_strcasecmp(val,"yes") == 0 ? TRUE : FALSE; | |
250 | 251 | else |
251 | 252 | active = get_boolean_from_config(dlg->name,option[f].name,FALSE); |
252 | 253 | |
... | ... | @@ -284,7 +285,7 @@ static void setup_dft(GObject *action, struct ftdialog *dlg, GtkWidget **label) |
284 | 285 | gtk_entry_set_max_length(dlg->parm[4],10); |
285 | 286 | gtk_entry_set_width_chars(dlg->parm[4],10); |
286 | 287 | |
287 | - gtk_entry_set_text(GTK_ENTRY(dlg->parm[4]),"4096"); | |
288 | + gtk_entry_set_text(GTK_ENTRY(dlg->parm[4]),val ? val : "4096"); | |
288 | 289 | |
289 | 290 | gtk_label_set_mnemonic_widget(GTK_LABEL(*label),GTK_WIDGET(dlg->parm[4])); |
290 | 291 | |
... | ... | @@ -479,7 +480,7 @@ static void run_ft_dialog(GObject *action, GtkWidget *widget, struct ftdialog *d |
479 | 480 | ftdialog = gtk_dialog_new_with_buttons( _( "File transfer" ), |
480 | 481 | GTK_WINDOW(gtk_widget_get_toplevel(widget)), |
481 | 482 | GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, |
482 | - GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE ); | |
483 | + GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE,NULL ); | |
483 | 484 | |
484 | 485 | |
485 | 486 | #if GTK_CHECK_VERSION(3,0,0) |
... | ... | @@ -623,7 +624,7 @@ static void run_ft_dialog(GObject *action, GtkWidget *widget, struct ftdialog *d |
623 | 624 | static void add_buttons(struct ftdialog *dlg) |
624 | 625 | { |
625 | 626 | dlg->ready = gtk_dialog_add_button(GTK_DIALOG(dlg->dialog), |
626 | - dlg->option & LIB3270_FT_OPTION_RECEIVE != 0 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, | |
627 | + (dlg->option & LIB3270_FT_OPTION_RECEIVE) != 0 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, | |
627 | 628 | GTK_RESPONSE_ACCEPT); |
628 | 629 | |
629 | 630 | gtk_widget_set_sensitive(dlg->ready,FALSE); |
... | ... | @@ -644,10 +645,9 @@ void download_action(GtkAction *action, GtkWidget *widget) |
644 | 645 | |
645 | 646 | memset(&dlg,0,sizeof(dlg)); |
646 | 647 | |
647 | - dlg.dialog = gtk_dialog_new_with_buttons( _( "Receive file from host" ), \ | |
648 | - GTK_WINDOW(gtk_widget_get_toplevel(widget)), | |
649 | - GTK_DIALOG_DESTROY_WITH_PARENT, \ | |
650 | - NULL ); | |
648 | + dlg.dialog = gtk_dialog_new(); | |
649 | + gtk_window_set_title(GTK_WINDOW(dlg.dialog),_( "Receive file from host" )); | |
650 | + gtk_window_set_transient_for(GTK_WINDOW(dlg.dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); | |
651 | 651 | |
652 | 652 | dlg.name = gtk_action_get_name(action); |
653 | 653 | dlg.option = LIB3270_FT_OPTION_RECEIVE; |
... | ... | @@ -706,10 +706,9 @@ void upload_action(GtkAction *action, GtkWidget *widget) |
706 | 706 | |
707 | 707 | memset(&dlg,0,sizeof(dlg)); |
708 | 708 | |
709 | - dlg.dialog = gtk_dialog_new_with_buttons( _( "Send file to host" ), \ | |
710 | - GTK_WINDOW(gtk_widget_get_toplevel(widget)), | |
711 | - GTK_DIALOG_DESTROY_WITH_PARENT, \ | |
712 | - NULL ); | |
709 | + dlg.dialog = gtk_dialog_new(); | |
710 | + gtk_window_set_title(GTK_WINDOW(dlg.dialog),_( "Send file to host" )); | |
711 | + gtk_window_set_transient_for(GTK_WINDOW(dlg.dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); | |
713 | 712 | |
714 | 713 | dlg.name = gtk_action_get_name(action); |
715 | 714 | dlg.option = LIB3270_FT_OPTION_SEND; |
... | ... | @@ -777,7 +776,7 @@ void upload_action(GtkAction *action, GtkWidget *widget) |
777 | 776 | |
778 | 777 | g_signal_connect(G_OBJECT(widget),"toggled", G_CALLBACK(toggle_format),(gpointer) &fdesk[f].option[p]); |
779 | 778 | |
780 | - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),!g_strcasecmp(fdesk[f].option[p].name,setup)); | |
779 | + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),!g_ascii_strcasecmp(fdesk[f].option[p].name,setup)); | |
781 | 780 | group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(widget)); |
782 | 781 | gtk_box_pack_start(GTK_BOX(vbox),widget,TRUE,TRUE,0); |
783 | 782 | } | ... | ... |
src/pw3270/fonts.c
src/pw3270/main.c
src/pw3270/uiparser/action.c
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | |
37 | 37 | static gboolean get_boolean(const gchar *value) |
38 | 38 | { |
39 | - if(!g_strcasecmp(value,"yes") || atoi(value)) | |
39 | + if(!g_ascii_strcasecmp(value,"yes") || atoi(value)) | |
40 | 40 | return TRUE; |
41 | 41 | return FALSE; |
42 | 42 | } |
... | ... | @@ -47,14 +47,14 @@ |
47 | 47 | |
48 | 48 | for(f=0;name[f];f++) |
49 | 49 | { |
50 | - if(!g_strcasecmp(name[f],"group")) | |
50 | + if(!g_ascii_strcasecmp(name[f],"group")) | |
51 | 51 | { |
52 | 52 | int id = -1; |
53 | 53 | int p; |
54 | 54 | |
55 | 55 | for(p=0;info->group[p] && id == -1;p++) |
56 | 56 | { |
57 | - if(!g_strcasecmp(value[f],info->group[p])) | |
57 | + if(!g_ascii_strcasecmp(value[f],info->group[p])) | |
58 | 58 | id = p; |
59 | 59 | } |
60 | 60 | |
... | ... | @@ -67,43 +67,43 @@ |
67 | 67 | g_object_set_data(G_OBJECT(action),"id_group",(gpointer) id); |
68 | 68 | |
69 | 69 | } |
70 | - else if(!g_strcasecmp(name[f],"icon")) | |
70 | + else if(!g_ascii_strcasecmp(name[f],"icon")) | |
71 | 71 | { |
72 | 72 | gchar * stock = g_strconcat("gtk-",value[f],NULL); |
73 | 73 | gtk_action_set_stock_id(action,stock); |
74 | 74 | g_free(stock); |
75 | 75 | } |
76 | - else if(!g_strcasecmp(name[f],"sensitive")) | |
76 | + else if(!g_ascii_strcasecmp(name[f],"sensitive")) | |
77 | 77 | { |
78 | 78 | gtk_action_set_sensitive(action,get_boolean(value[f])); |
79 | 79 | } |
80 | - else if(!g_strcasecmp(name[f],"label")) | |
80 | + else if(!g_ascii_strcasecmp(name[f],"label")) | |
81 | 81 | { |
82 | 82 | gtk_action_set_label(action,gettext(value[f])); |
83 | 83 | } |
84 | - else if(!g_strcasecmp(name[f],"short-label")) | |
84 | + else if(!g_ascii_strcasecmp(name[f],"short-label")) | |
85 | 85 | { |
86 | 86 | gtk_action_set_short_label(action,gettext(value[f])); |
87 | 87 | } |
88 | - else if(!g_strcasecmp(name[f],"tooltip")) | |
88 | + else if(!g_ascii_strcasecmp(name[f],"tooltip")) | |
89 | 89 | { |
90 | 90 | gtk_action_set_tooltip(action,gettext(value[f])); |
91 | 91 | } |
92 | - else if(!g_strcasecmp(name[f],"important")) | |
92 | + else if(!g_ascii_strcasecmp(name[f],"important")) | |
93 | 93 | { |
94 | 94 | gtk_action_set_is_important(action,get_boolean(value[f])); |
95 | 95 | } |
96 | - else if(!g_strcasecmp(name[f],"key")) | |
96 | + else if(!g_ascii_strcasecmp(name[f],"key")) | |
97 | 97 | { |
98 | 98 | g_object_set_data_full(G_OBJECT(action),"accel_attr",g_strdup(value[f]),g_free); |
99 | 99 | } |
100 | - else if(!g_strcasecmp(name[f],"target")) | |
100 | + else if(!g_ascii_strcasecmp(name[f],"target")) | |
101 | 101 | { |
102 | 102 | } |
103 | - else if(!g_strcasecmp(name[f],"direction")) | |
103 | + else if(!g_ascii_strcasecmp(name[f],"direction")) | |
104 | 104 | { |
105 | 105 | } |
106 | - else if(!g_strcasecmp(name[f],"id")) | |
106 | + else if(!g_ascii_strcasecmp(name[f],"id")) | |
107 | 107 | { |
108 | 108 | g_object_set_data(G_OBJECT(action),"action_id",(gpointer) atoi(value[f])); |
109 | 109 | } | ... | ... |
src/pw3270/uiparser/menuitem.c
src/pw3270/uiparser/parsefile.c
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | |
62 | 62 | for(f=0;name[f];f++) |
63 | 63 | { |
64 | - if(!g_strcasecmp(key,name[f])) | |
64 | + if(!g_ascii_strcasecmp(key,name[f])) | |
65 | 65 | return value[f]; |
66 | 66 | } |
67 | 67 | |
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | if(!val) |
76 | 76 | return def; |
77 | 77 | |
78 | - if(!g_strcasecmp(val,"yes") || atoi(val)) | |
78 | + if(!g_ascii_strcasecmp(val,"yes") || atoi(val)) | |
79 | 79 | return TRUE; |
80 | 80 | |
81 | 81 | return FALSE; |
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | { |
141 | 141 | GtkAction *action; |
142 | 142 | |
143 | - if(!g_strcasecmp(name,"quit")) | |
143 | + if(!g_ascii_strcasecmp(name,"quit")) | |
144 | 144 | { |
145 | 145 | action = g_hash_table_lookup(info->actions,name); |
146 | 146 | if(!action) |
... | ... | @@ -177,7 +177,7 @@ |
177 | 177 | |
178 | 178 | for(f=0;f<G_N_ELEMENTS(element_builder);f++) |
179 | 179 | { |
180 | - if(!g_strcasecmp(element_name,element_builder[f].name)) | |
180 | + if(!g_ascii_strcasecmp(element_name,element_builder[f].name)) | |
181 | 181 | { |
182 | 182 | id = f; |
183 | 183 | break; |
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | |
256 | 256 | for(f=0;f<G_N_ELEMENTS(element_builder);f++) |
257 | 257 | { |
258 | - if(!g_strcasecmp(element_name,element_builder[f].name)) | |
258 | + if(!g_ascii_strcasecmp(element_name,element_builder[f].name)) | |
259 | 259 | { |
260 | 260 | element_builder[f].end(info->element,info,error); |
261 | 261 | break; | ... | ... |
src/pw3270/uiparser/popup.c
src/pw3270/v3270/accessible.c
... | ... | @@ -42,6 +42,10 @@ |
42 | 42 | #include "private.h" |
43 | 43 | #include "accessible.h" |
44 | 44 | |
45 | + #ifdef GDK_WINDOWING_X11 | |
46 | + #include <gdk/gdkx.h> | |
47 | + #endif // GDK_WINDOWING_X11 | |
48 | + | |
45 | 49 | // References: |
46 | 50 | // |
47 | 51 | // http://git.gnome.org/browse/gtk+/tree/gtk/a11y/gtkwidgetaccessible.c |
... | ... | @@ -226,7 +230,7 @@ static gint v3270_accessible_get_caret_offset(AtkText *text) |
226 | 230 | |
227 | 231 | static gint v3270_accessible_get_character_count(AtkText *text) |
228 | 232 | { |
229 | - int rows,cols; | |
233 | +// int rows,cols; | |
230 | 234 | GtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(text)); |
231 | 235 | |
232 | 236 | if(!widget) |
... | ... | @@ -328,7 +332,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse |
328 | 332 | { |
329 | 333 | GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); |
330 | 334 | H3270 * host; |
331 | - char * text; | |
335 | + char * text = NULL; | |
332 | 336 | int rows,cols,pos; |
333 | 337 | |
334 | 338 | if(!widget) |
... | ... | @@ -520,7 +524,7 @@ static gboolean v3270_accessible_add_selection(AtkText *text, gint start_pos, gi |
520 | 524 | static gboolean v3270_accessible_set_selection(AtkText *text, gint selection_num, gint start_pos, gint end_pos) |
521 | 525 | { |
522 | 526 | GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); |
523 | - gint start, end; | |
527 | +// gint start, end; | |
524 | 528 | |
525 | 529 | if(widget == NULL || selection_num != 0) |
526 | 530 | return FALSE; |
... | ... | @@ -846,6 +850,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id) |
846 | 850 | case LIB3270_MESSAGE_MINUS: |
847 | 851 | case LIB3270_MESSAGE_INHIBIT: |
848 | 852 | case LIB3270_MESSAGE_X: |
853 | + case LIB3270_MESSAGE_USER: | |
849 | 854 | break; |
850 | 855 | |
851 | 856 | case LIB3270_MESSAGE_PROTECTED: | ... | ... |
src/pw3270/v3270/oia.c
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | |
42 | 42 | #include <lib3270/v3270.h> |
43 | 43 | #include "private.h" |
44 | + #include "accessible.h" | |
44 | 45 | |
45 | 46 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ |
46 | 47 | |
... | ... | @@ -307,7 +308,7 @@ void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metri |
307 | 308 | { |
308 | 309 | cairo_surface_t * icon; |
309 | 310 | double sz = rect->width < rect->height ? rect->width : rect->height; |
310 | - int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; | |
311 | +// int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; | |
311 | 312 | unsigned short width; |
312 | 313 | unsigned short height; |
313 | 314 | unsigned char * bits; | ... | ... |
src/pw3270/v3270/selection.c
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | #include "private.h" |
34 | 34 | #include <lib3270/selection.h> |
35 | 35 | #include <lib3270/log.h> |
36 | + #include <lib3270/actions.h> | |
36 | 37 | |
37 | 38 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
38 | 39 | |
... | ... | @@ -155,7 +156,7 @@ const gchar * v3270_get_selected_text(GtkWidget *widget) |
155 | 156 | { |
156 | 157 | int c; |
157 | 158 | gchar * ptr = ln[l]; |
158 | - GString * buffer; | |
159 | +// GString * buffer; | |
159 | 160 | |
160 | 161 | for(c=0;c<width && *ptr;c++) |
161 | 162 | { |
... | ... | @@ -310,7 +311,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod |
310 | 311 | |
311 | 312 | if(!text) |
312 | 313 | return; |
313 | - else if(g_strcasecmp(encoding,charset)) | |
314 | + else if(g_ascii_strcasecmp(encoding,charset)) | |
314 | 315 | buffer = g_convert(text, -1, charset, encoding, NULL, NULL, NULL); |
315 | 316 | else |
316 | 317 | buffer = g_strdup(text); | ... | ... |
src/pw3270/v3270/widget.c
... | ... | @@ -163,6 +163,7 @@ static gboolean v3270_popup_menu(GtkWidget * widget) |
163 | 163 | |
164 | 164 | #if GTK_CHECK_VERSION(3,0,0) |
165 | 165 | |
166 | +/* | |
166 | 167 | static GtkSizeRequestMode get_request_mode(GtkWidget *widget) |
167 | 168 | { |
168 | 169 | int rows, cols; |
... | ... | @@ -172,6 +173,7 @@ static GtkSizeRequestMode get_request_mode(GtkWidget *widget) |
172 | 173 | return rows > cols ? GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT : GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; |
173 | 174 | |
174 | 175 | } |
176 | +*/ | |
175 | 177 | |
176 | 178 | void get_preferred_height(GtkWidget *widget, gint *minimum_height, gint *natural_height) |
177 | 179 | { |
... | ... | @@ -1239,7 +1241,7 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) |
1239 | 1241 | |
1240 | 1242 | if(terminal->font_family) |
1241 | 1243 | { |
1242 | - if(!g_strcasecmp(terminal->font_family,name)) | |
1244 | + if(!g_ascii_strcasecmp(terminal->font_family,name)) | |
1243 | 1245 | return; |
1244 | 1246 | g_free(terminal->font_family); |
1245 | 1247 | terminal->font_family = NULL; | ... | ... |
src/pw3270/window.c
... | ... | @@ -32,6 +32,7 @@ |
32 | 32 | #include "globals.h" |
33 | 33 | #include "uiparser/parser.h" |
34 | 34 | #include <lib3270/popup.h> |
35 | +#include <lib3270/actions.h> | |
35 | 36 | |
36 | 37 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
37 | 38 | |
... | ... | @@ -148,7 +149,7 @@ |
148 | 149 | |
149 | 150 | static void pw3270_class_init(pw3270Class *klass) |
150 | 151 | { |
151 | - GObjectClass * gobject_class = G_OBJECT_CLASS(klass); | |
152 | +// GObjectClass * gobject_class = G_OBJECT_CLASS(klass); | |
152 | 153 | GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass); |
153 | 154 | |
154 | 155 | |
... | ... | @@ -195,7 +196,7 @@ |
195 | 196 | |
196 | 197 | gboolean pw3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix) |
197 | 198 | { |
198 | - g_return_if_fail(GTK_IS_PW3270(widget)); | |
199 | + g_return_val_if_fail(GTK_IS_PW3270(widget),FALSE); | |
199 | 200 | return v3270_get_toggle(GTK_PW3270(widget)->terminal,ix); |
200 | 201 | } |
201 | 202 | ... | ... |