diff --git a/src/include/rules.mak.in b/src/include/rules.mak.in index a48e239..e975655 100644 --- a/src/include/rules.mak.in +++ b/src/include/rules.mak.in @@ -37,7 +37,7 @@ EXEEXT=@EXEEXT@ LIB3270_CFLAGS ?= `pkg-config --cflags lib3270` LIB3270_LIBS ?= `pkg-config --libs lib3270` -DEBUG_CFLAGS=-DDEBUG=1 -g +DEBUG_CFLAGS=-DDEBUG=1 -g -Wall DEPENDS ?= *.h ../include/*.h ../include/lib3270/*.h #---[ Tools ]------------------------------------------------------------------ diff --git a/src/lib3270/Makefile.in b/src/lib3270/Makefile.in index 500ef06..f73a607 100644 --- a/src/lib3270/Makefile.in +++ b/src/lib3270/Makefile.in @@ -36,7 +36,7 @@ LDFLAGS=@LDFLAGS@ -Wl,-soname,@DLLPREFIX@3270@DLLEXT@.@VERSION@ LIBS=@LIBS@ @LIBSSL_LIBS@ @INTL_LIBS@ @SOCKET_LIBS@ -DEBUG_CFLAGS=-DDEBUG=1 -g +DEBUG_CFLAGS=-DDEBUG=1 -g -Wall DEPENDS ?= *.h ../include/*.h ../include/lib3270/*.h Makefile #---[ Paths ]------------------------------------------------------------------ diff --git a/src/lib3270/telnet.c b/src/lib3270/telnet.c index f35851b..55baa0e 100644 --- a/src/lib3270/telnet.c +++ b/src/lib3270/telnet.c @@ -224,8 +224,8 @@ static const char *tn3270e_function_names(const unsigned char *, int); #endif /*]*/ static void tn3270e_subneg_send(H3270 *hSession, unsigned char, unsigned long); static unsigned long tn3270e_fdecode(const unsigned char *, int); -static void tn3270e_ack(void); -static void tn3270e_nak(enum pds); +static void tn3270e_ack(H3270 *hSession); +static void tn3270e_nak(H3270 *hSession, enum pds); #endif /*]*/ #if defined(X3270_ANSI) /*[*/ @@ -236,9 +236,9 @@ static void do_cerase(H3270 *hSession, char c); static void do_werase(H3270 *hSession, char c); static void do_kill(H3270 *hSession, char c); static void do_rprnt(H3270 *hSession, char c); -static void do_eof(char c); -static void do_eol(char c); -static void do_lnext(char c); +static void do_eof(H3270 *hSession, char c); +static void do_eol(H3270 *hSession, char c); +static void do_lnext(H3270 *hSession, char c); static char parse_ctlchar(char *s); static void cooked_init(H3270 *hSession); #endif /*]*/ @@ -1891,10 +1891,10 @@ process_eor(void) (h3270.ibptr - h3270.ibuf) - EH_SIZE); if (rv < 0 && h3270.response_required != TN3270E_RSF_NO_RESPONSE) - tn3270e_nak(rv); + tn3270e_nak(&h3270,rv); else if (rv == PDS_OKAY_NO_OUTPUT && h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE) - tn3270e_ack(); + tn3270e_ack(&h3270); h3270.response_required = TN3270E_RSF_NO_RESPONSE; return 0; case TN3270E_DT_BIND_IMAGE: @@ -2158,7 +2158,7 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) /* Control chars. */ if (c == '\n') - do_eol(c); + do_eol(hSession,c); else if (c == vintr) do_intr(hSession, c); else if (c == vquit) @@ -2172,9 +2172,9 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) else if (c == vrprnt) do_rprnt(hSession,c); else if (c == veof) - do_eof(c); + do_eof(hSession,c); else if (c == vlnext) - do_lnext(c); + do_lnext(hSession,c); else if (c == 0x08 || c == 0x7f) /* Yes, a hack. */ do_cerase(hSession,c); else @@ -2343,16 +2343,15 @@ static void do_rprnt(H3270 *hSession, char c) ansi_process_s(ctl_see((int) *p)); } -static void -do_eof(char c) +static void do_eof(H3270 *hSession, char c) { - if (h3270.backslashed) { - h3270.lbptr--; + if (hSession->backslashed) { + hSession->lbptr--; ansi_process_s("\b"); do_data(c); return; } - if (h3270.lnext) { + if (hSession->lnext) { do_data(c); return; } @@ -2360,31 +2359,29 @@ do_eof(char c) forward_data(); } -static void -do_eol(char c) +static void do_eol(H3270 *hSession, char c) { - if (h3270.lnext) { + if (hSession->lnext) { do_data(c); return; } - if (h3270.lbptr+2 >= h3270.lbuf + BUFSZ) { + if (hSession->lbptr+2 >= hSession->lbuf + BUFSZ) { ansi_process_s("\007"); return; } - *h3270.lbptr++ = '\r'; - *h3270.lbptr++ = '\n'; + *hSession->lbptr++ = '\r'; + *hSession->lbptr++ = '\n'; ansi_process_s("\r\n"); forward_data(); } -static void -do_lnext(char c) +static void do_lnext(H3270 *hSession, char c) { - if (h3270.lnext) { + if (hSession->lnext) { do_data(c); return; } - h3270.lnext = 1; + hSession->lnext = 1; ansi_process_s("^\b"); } #endif /*]*/ @@ -2679,7 +2676,7 @@ net_output(void) /* Check for sending a TN3270E response. */ if (h3270.response_required == TN3270E_RSF_ALWAYS_RESPONSE) { - tn3270e_ack(); + tn3270e_ack(&h3270); h3270.response_required = TN3270E_RSF_NO_RESPONSE; } @@ -2727,11 +2724,10 @@ net_output(void) #if defined(X3270_TN3270E) /*[*/ /* Send a TN3270E positive response to the server. */ -static void -tn3270e_ack(void) +static void tn3270e_ack(H3270 *hSession) { unsigned char rsp_buf[10]; - tn3270e_header *h_in = (tn3270e_header *) h3270.ibuf; + tn3270e_header *h_in = (tn3270e_header *) hSession->ibuf; int rsp_len = 0; rsp_len = 0; @@ -2739,26 +2735,28 @@ tn3270e_ack(void) rsp_buf[rsp_len++] = 0; /* request_flag */ rsp_buf[rsp_len++] = TN3270E_RSF_POSITIVE_RESPONSE; /* response_flag */ rsp_buf[rsp_len++] = h_in->seq_number[0]; /* seq_number[0] */ + if (h_in->seq_number[0] == IAC) rsp_buf[rsp_len++] = IAC; + rsp_buf[rsp_len++] = h_in->seq_number[1]; /* seq_number[1] */ + if (h_in->seq_number[1] == IAC) rsp_buf[rsp_len++] = IAC; + rsp_buf[rsp_len++] = TN3270E_POS_DEVICE_END; rsp_buf[rsp_len++] = IAC; rsp_buf[rsp_len++] = EOR; - trace_dsn("SENT TN3270E(RESPONSE POSITIVE-RESPONSE " - "%u) DEVICE-END\n", + trace_dsn("SENT TN3270E(RESPONSE POSITIVE-RESPONSE %u) DEVICE-END\n", h_in->seq_number[0] << 8 | h_in->seq_number[1]); - net_rawout(&h3270, rsp_buf, rsp_len); + net_rawout(hSession, rsp_buf, rsp_len); } /* Send a TN3270E negative response to the server. */ -static void -tn3270e_nak(enum pds rv) +static void tn3270e_nak(H3270 *hSession, enum pds rv) { unsigned char rsp_buf[10]; - tn3270e_header *h_in = (tn3270e_header *) h3270.ibuf; + tn3270e_header *h_in = (tn3270e_header *) hSession->ibuf; int rsp_len = 0; char *neg = NULL; @@ -2785,7 +2783,7 @@ tn3270e_nak(enum pds rv) rsp_buf[rsp_len++] = IAC; rsp_buf[rsp_len++] = EOR; trace_dsn("SENT TN3270E(RESPONSE NEGATIVE-RESPONSE %u) %s\n",h_in->seq_number[0] << 8 | h_in->seq_number[1], neg); - net_rawout(&h3270, rsp_buf, rsp_len); + net_rawout(hSession, rsp_buf, rsp_len); } #if defined(X3270_TRACE) /*[*/ @@ -2908,7 +2906,7 @@ net_send_werase(void) #if defined(X3270_MENUS) /*[*/ /* * External entry points to negotiate line or character mode. - */ + */ /* void net_linemode(void) { @@ -2925,6 +2923,7 @@ net_linemode(void) trace_dsn("SENT %s %s\n", cmd(DONT), opt(TELOPT_SGA)); } } +*/ void net_charmode(void) @@ -3044,7 +3043,7 @@ parse_ctlchar(char *s) /* * net_linemode_chars * Report line-mode characters. - */ + */ /* struct ctl_char * net_linemode_chars(void) { @@ -3061,14 +3060,14 @@ net_linemode_chars(void) c[8].name = 0; return c; -} +} */ #endif /*]*/ #if defined(X3270_TRACE) /*[*/ /* * Construct a string to reproduce the current TELNET options. * Returns a Boolean indicating whether it is necessary. - */ + */ /* Boolean net_snap_options(void) { @@ -3084,7 +3083,7 @@ net_snap_options(void) h3270.obptr = h3270.obuf; - /* Do TTYPE first. */ + // Do TTYPE first. if (h3270.myopts[TELOPT_TTYPE]) { unsigned j; @@ -3093,7 +3092,7 @@ net_snap_options(void) *h3270.obptr++ = ttype_str[j]; } - /* Do the other options. */ + // Do the other options. for (i = 0; i < LIB3270_TELNET_N_OPTS; i++) { space3270out(6); if (i == TELOPT_TTYPE) @@ -3112,8 +3111,8 @@ net_snap_options(void) } } -#if defined(X3270_TN3270E) /*[*/ - /* If we're in TN3270E mode, snap the subnegotations as well. */ +#if defined(X3270_TN3270E) + // If we're in TN3270E mode, snap the subnegotations as well. if (h3270.myopts[TELOPT_TN3270E]) { any = True; @@ -3160,15 +3159,17 @@ net_snap_options(void) h->seq_number[0] = 0; h->seq_number[1] = 0; h3270.obptr += EH_SIZE; - *h3270.obptr++ = 1; /* dummy */ + *h3270.obptr++ = 1; // dummy *h3270.obptr++ = IAC; *h3270.obptr++ = EOR; } } -#endif /*]*/ +#endif return any; } -#endif /*]*/ +*/ +#endif + /* * 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) return getsockname(session->sock, buf, (socklen_t *)(void *)len); } -/* Return a text version of the current proxy type, or NULL. */ +/* Return a text version of the current proxy type, or NULL. */ /* char * net_proxy_type(void) { @@ -3445,8 +3446,9 @@ net_proxy_type(void) else return NULL; } +*/ -/* Return the current proxy host, or NULL. */ +/* Return the current proxy host, or NULL. */ /* char * net_proxy_host(void) { @@ -3455,8 +3457,9 @@ net_proxy_host(void) else return NULL; } +*/ -/* Return the current proxy port, or NULL. */ +/* Return the current proxy port, or NULL. */ /* char * net_proxy_port(void) { @@ -3465,6 +3468,7 @@ net_proxy_port(void) else return NULL; } +*/ LIB3270_EXPORT LIB3270_SSL_STATE lib3270_get_secure(H3270 *session) { diff --git a/src/lib3270/telnetc.h b/src/lib3270/telnetc.h index e9a37b6..9acfffe 100644 --- a/src/lib3270/telnetc.h +++ b/src/lib3270/telnetc.h @@ -40,8 +40,8 @@ LIB3270_INTERNAL void net_exception(H3270 *session); // LIB3270_INTERNAL void net_hexansi_out(unsigned char *buf, int len); LIB3270_INTERNAL void net_input(H3270 *session); LIB3270_INTERNAL void net_interrupt(void); -LIB3270_INTERNAL void net_linemode(void); -LIB3270_INTERNAL struct ctl_char *net_linemode_chars(void); +// LIB3270_INTERNAL void net_linemode(void); +// LIB3270_INTERNAL struct ctl_char *net_linemode_chars(void); LIB3270_INTERNAL void net_output(void); LIB3270_INTERNAL const char *net_query_bind_plu_name(void); LIB3270_INTERNAL const char *net_query_connection_state(void); @@ -52,12 +52,12 @@ LIB3270_INTERNAL void net_sends(const char *s); LIB3270_INTERNAL void net_send_erase(void); LIB3270_INTERNAL void net_send_kill(void); LIB3270_INTERNAL void net_send_werase(void); -LIB3270_INTERNAL Boolean net_snap_options(void); +// LIB3270_INTERNAL Boolean net_snap_options(void); LIB3270_INTERNAL void space3270out(int n); // LIB3270_INTERNAL const char *tn3270e_current_opts(void); -LIB3270_INTERNAL char *net_proxy_type(void); -LIB3270_INTERNAL char *net_proxy_host(void); -LIB3270_INTERNAL char *net_proxy_port(void); +// LIB3270_INTERNAL char *net_proxy_type(void); +//LIB3270_INTERNAL char *net_proxy_host(void); +// LIB3270_INTERNAL char *net_proxy_port(void); #if defined(X3270_TRACE) LIB3270_INTERNAL void trace_netdata(char direction, unsigned const char *buf, int len); diff --git a/src/pw3270/actions.c b/src/pw3270/actions.c index dc6f055..3a0c577 100644 --- a/src/pw3270/actions.c +++ b/src/pw3270/actions.c @@ -87,10 +87,12 @@ static void connect_action(GtkAction *action, GtkWidget *widget) hostname_action(action,widget); } +/* static void nop_action(GtkAction *action, GtkWidget *widget) { trace_action(action,widget); } +*/ static void disconnect_action(GtkAction *action, GtkWidget *widget) { @@ -131,7 +133,7 @@ static void copy_action(GtkAction *action, GtkWidget *widget) for(f=0;f #include "globals.h" #include "uiparser/parser.h" #include "filetransfer.h" @@ -231,7 +232,7 @@ static void add_transfer_options(GObject *action, struct ftdialog *dlg) GtkTable * table = GTK_TABLE(gtk_table_new(3,2,TRUE)); GtkWidget * frame = gtk_frame_new( _( "Transfer options" ) ); - GtkWidget * label = gtk_frame_get_label_widget(GTK_FRAME(frame)); +// GtkWidget * label = gtk_frame_get_label_widget(GTK_FRAME(frame)); int row, col, f; row=0; @@ -246,7 +247,7 @@ static void add_transfer_options(GObject *action, struct ftdialog *dlg) gtk_widget_set_name(widget,option[f].name); if(val) - active = g_strcasecmp(val,"yes") == 0 ? TRUE : FALSE; + active = g_ascii_strcasecmp(val,"yes") == 0 ? TRUE : FALSE; else active = get_boolean_from_config(dlg->name,option[f].name,FALSE); @@ -284,7 +285,7 @@ static void setup_dft(GObject *action, struct ftdialog *dlg, GtkWidget **label) gtk_entry_set_max_length(dlg->parm[4],10); gtk_entry_set_width_chars(dlg->parm[4],10); - gtk_entry_set_text(GTK_ENTRY(dlg->parm[4]),"4096"); + gtk_entry_set_text(GTK_ENTRY(dlg->parm[4]),val ? val : "4096"); gtk_label_set_mnemonic_widget(GTK_LABEL(*label),GTK_WIDGET(dlg->parm[4])); @@ -479,7 +480,7 @@ static void run_ft_dialog(GObject *action, GtkWidget *widget, struct ftdialog *d ftdialog = gtk_dialog_new_with_buttons( _( "File transfer" ), GTK_WINDOW(gtk_widget_get_toplevel(widget)), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE ); + GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE,NULL ); #if GTK_CHECK_VERSION(3,0,0) @@ -623,7 +624,7 @@ static void run_ft_dialog(GObject *action, GtkWidget *widget, struct ftdialog *d static void add_buttons(struct ftdialog *dlg) { dlg->ready = gtk_dialog_add_button(GTK_DIALOG(dlg->dialog), - dlg->option & LIB3270_FT_OPTION_RECEIVE != 0 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, + (dlg->option & LIB3270_FT_OPTION_RECEIVE) != 0 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive(dlg->ready,FALSE); @@ -644,10 +645,9 @@ void download_action(GtkAction *action, GtkWidget *widget) memset(&dlg,0,sizeof(dlg)); - dlg.dialog = gtk_dialog_new_with_buttons( _( "Receive file from host" ), \ - GTK_WINDOW(gtk_widget_get_toplevel(widget)), - GTK_DIALOG_DESTROY_WITH_PARENT, \ - NULL ); + dlg.dialog = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(dlg.dialog),_( "Receive file from host" )); + gtk_window_set_transient_for(GTK_WINDOW(dlg.dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); dlg.name = gtk_action_get_name(action); dlg.option = LIB3270_FT_OPTION_RECEIVE; @@ -706,10 +706,9 @@ void upload_action(GtkAction *action, GtkWidget *widget) memset(&dlg,0,sizeof(dlg)); - dlg.dialog = gtk_dialog_new_with_buttons( _( "Send file to host" ), \ - GTK_WINDOW(gtk_widget_get_toplevel(widget)), - GTK_DIALOG_DESTROY_WITH_PARENT, \ - NULL ); + dlg.dialog = gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(dlg.dialog),_( "Send file to host" )); + gtk_window_set_transient_for(GTK_WINDOW(dlg.dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); dlg.name = gtk_action_get_name(action); dlg.option = LIB3270_FT_OPTION_SEND; @@ -777,7 +776,7 @@ void upload_action(GtkAction *action, GtkWidget *widget) g_signal_connect(G_OBJECT(widget),"toggled", G_CALLBACK(toggle_format),(gpointer) &fdesk[f].option[p]); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),!g_strcasecmp(fdesk[f].option[p].name,setup)); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),!g_ascii_strcasecmp(fdesk[f].option[p].name,setup)); group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(widget)); gtk_box_pack_start(GTK_BOX(vbox),widget,TRUE,TRUE,0); } diff --git a/src/pw3270/fonts.c b/src/pw3270/fonts.c index 8223163..9b1cd4c 100644 --- a/src/pw3270/fonts.c +++ b/src/pw3270/fonts.c @@ -67,7 +67,7 @@ gtk_widget_show(item); gtk_menu_shell_append(GTK_MENU_SHELL(menu),item); - if(!g_strcasecmp(name,selected)) + if(!g_ascii_strcasecmp(name,selected)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),TRUE); } diff --git a/src/pw3270/main.c b/src/pw3270/main.c index da24586..23e0a48 100644 --- a/src/pw3270/main.c +++ b/src/pw3270/main.c @@ -30,8 +30,9 @@ */ #include +#include #include "globals.h" - #include +#include #include "v3270/accessible.h" #include diff --git a/src/pw3270/uiparser/action.c b/src/pw3270/uiparser/action.c index 55591a5..94a40fe 100644 --- a/src/pw3270/uiparser/action.c +++ b/src/pw3270/uiparser/action.c @@ -36,7 +36,7 @@ static gboolean get_boolean(const gchar *value) { - if(!g_strcasecmp(value,"yes") || atoi(value)) + if(!g_ascii_strcasecmp(value,"yes") || atoi(value)) return TRUE; return FALSE; } @@ -47,14 +47,14 @@ for(f=0;name[f];f++) { - if(!g_strcasecmp(name[f],"group")) + if(!g_ascii_strcasecmp(name[f],"group")) { int id = -1; int p; for(p=0;info->group[p] && id == -1;p++) { - if(!g_strcasecmp(value[f],info->group[p])) + if(!g_ascii_strcasecmp(value[f],info->group[p])) id = p; } @@ -67,43 +67,43 @@ g_object_set_data(G_OBJECT(action),"id_group",(gpointer) id); } - else if(!g_strcasecmp(name[f],"icon")) + else if(!g_ascii_strcasecmp(name[f],"icon")) { gchar * stock = g_strconcat("gtk-",value[f],NULL); gtk_action_set_stock_id(action,stock); g_free(stock); } - else if(!g_strcasecmp(name[f],"sensitive")) + else if(!g_ascii_strcasecmp(name[f],"sensitive")) { gtk_action_set_sensitive(action,get_boolean(value[f])); } - else if(!g_strcasecmp(name[f],"label")) + else if(!g_ascii_strcasecmp(name[f],"label")) { gtk_action_set_label(action,gettext(value[f])); } - else if(!g_strcasecmp(name[f],"short-label")) + else if(!g_ascii_strcasecmp(name[f],"short-label")) { gtk_action_set_short_label(action,gettext(value[f])); } - else if(!g_strcasecmp(name[f],"tooltip")) + else if(!g_ascii_strcasecmp(name[f],"tooltip")) { gtk_action_set_tooltip(action,gettext(value[f])); } - else if(!g_strcasecmp(name[f],"important")) + else if(!g_ascii_strcasecmp(name[f],"important")) { gtk_action_set_is_important(action,get_boolean(value[f])); } - else if(!g_strcasecmp(name[f],"key")) + else if(!g_ascii_strcasecmp(name[f],"key")) { g_object_set_data_full(G_OBJECT(action),"accel_attr",g_strdup(value[f]),g_free); } - else if(!g_strcasecmp(name[f],"target")) + else if(!g_ascii_strcasecmp(name[f],"target")) { } - else if(!g_strcasecmp(name[f],"direction")) + else if(!g_ascii_strcasecmp(name[f],"direction")) { } - else if(!g_strcasecmp(name[f],"id")) + else if(!g_ascii_strcasecmp(name[f],"id")) { g_object_set_data(G_OBJECT(action),"action_id",(gpointer) atoi(value[f])); } diff --git a/src/pw3270/uiparser/menuitem.c b/src/pw3270/uiparser/menuitem.c index bcee9be..c6b5fa5 100644 --- a/src/pw3270/uiparser/menuitem.c +++ b/src/pw3270/uiparser/menuitem.c @@ -99,7 +99,7 @@ int f; for(f=0;info->setup[f].name;f++) { - if(!g_strcasecmp(name,info->setup[f].name)) + if(!g_ascii_strcasecmp(name,info->setup[f].name)) { info->setup[f].setup(widget,info->center_widget); break; diff --git a/src/pw3270/uiparser/parsefile.c b/src/pw3270/uiparser/parsefile.c index 30a7f21..7400f20 100644 --- a/src/pw3270/uiparser/parsefile.c +++ b/src/pw3270/uiparser/parsefile.c @@ -61,7 +61,7 @@ for(f=0;name[f];f++) { - if(!g_strcasecmp(key,name[f])) + if(!g_ascii_strcasecmp(key,name[f])) return value[f]; } @@ -75,7 +75,7 @@ if(!val) return def; - if(!g_strcasecmp(val,"yes") || atoi(val)) + if(!g_ascii_strcasecmp(val,"yes") || atoi(val)) return TRUE; return FALSE; @@ -140,7 +140,7 @@ { GtkAction *action; - if(!g_strcasecmp(name,"quit")) + if(!g_ascii_strcasecmp(name,"quit")) { action = g_hash_table_lookup(info->actions,name); if(!action) @@ -177,7 +177,7 @@ for(f=0;felement,info,error); break; diff --git a/src/pw3270/uiparser/popup.c b/src/pw3270/uiparser/popup.c index 2cd4003..9c1d753 100644 --- a/src/pw3270/uiparser/popup.c +++ b/src/pw3270/uiparser/popup.c @@ -64,7 +64,7 @@ for(f=0;info->popupname[f] && pos < 0;f++) { - if(!g_strcasecmp(info->popupname[f],id)) + if(!g_ascii_strcasecmp(info->popupname[f],id)) { pos = f; break; diff --git a/src/pw3270/v3270/accessible.c b/src/pw3270/v3270/accessible.c index 3ffefb6..d4dace0 100644 --- a/src/pw3270/v3270/accessible.c +++ b/src/pw3270/v3270/accessible.c @@ -42,6 +42,10 @@ #include "private.h" #include "accessible.h" + #ifdef GDK_WINDOWING_X11 + #include + #endif // GDK_WINDOWING_X11 + // References: // // http://git.gnome.org/browse/gtk+/tree/gtk/a11y/gtkwidgetaccessible.c @@ -226,7 +230,7 @@ static gint v3270_accessible_get_caret_offset(AtkText *text) static gint v3270_accessible_get_character_count(AtkText *text) { - int rows,cols; +// int rows,cols; GtkWidget *widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(text)); if(!widget) @@ -328,7 +332,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse { GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); H3270 * host; - char * text; + char * text = NULL; int rows,cols,pos; if(!widget) @@ -520,7 +524,7 @@ static gboolean v3270_accessible_add_selection(AtkText *text, gint start_pos, gi static gboolean v3270_accessible_set_selection(AtkText *text, gint selection_num, gint start_pos, gint end_pos) { GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); - gint start, end; +// gint start, end; if(widget == NULL || selection_num != 0) return FALSE; @@ -846,6 +850,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id) case LIB3270_MESSAGE_MINUS: case LIB3270_MESSAGE_INHIBIT: case LIB3270_MESSAGE_X: + case LIB3270_MESSAGE_USER: break; case LIB3270_MESSAGE_PROTECTED: diff --git a/src/pw3270/v3270/oia.c b/src/pw3270/v3270/oia.c index fdb4808..8e24755 100644 --- a/src/pw3270/v3270/oia.c +++ b/src/pw3270/v3270/oia.c @@ -41,6 +41,7 @@ #include #include "private.h" + #include "accessible.h" /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ @@ -307,7 +308,7 @@ void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metri { cairo_surface_t * icon; double sz = rect->width < rect->height ? rect->width : rect->height; - int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; +// int idx = 0; // lib3270_get_ssl_state(host) ? 1 : 0; unsigned short width; unsigned short height; unsigned char * bits; diff --git a/src/pw3270/v3270/selection.c b/src/pw3270/v3270/selection.c index a4a973f..f973445 100644 --- a/src/pw3270/v3270/selection.c +++ b/src/pw3270/v3270/selection.c @@ -33,6 +33,7 @@ #include "private.h" #include #include + #include /*--[ Globals ]--------------------------------------------------------------------------------------*/ @@ -155,7 +156,7 @@ const gchar * v3270_get_selected_text(GtkWidget *widget) { int c; gchar * ptr = ln[l]; - GString * buffer; +// GString * buffer; for(c=0;c cols ? GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT : GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; } +*/ void get_preferred_height(GtkWidget *widget, gint *minimum_height, gint *natural_height) { @@ -1239,7 +1241,7 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) if(terminal->font_family) { - if(!g_strcasecmp(terminal->font_family,name)) + if(!g_ascii_strcasecmp(terminal->font_family,name)) return; g_free(terminal->font_family); terminal->font_family = NULL; diff --git a/src/pw3270/window.c b/src/pw3270/window.c index eed9737..0b99299 100644 --- a/src/pw3270/window.c +++ b/src/pw3270/window.c @@ -32,6 +32,7 @@ #include "globals.h" #include "uiparser/parser.h" #include +#include /*--[ Widget definition ]----------------------------------------------------------------------------*/ @@ -148,7 +149,7 @@ static void pw3270_class_init(pw3270Class *klass) { - GObjectClass * gobject_class = G_OBJECT_CLASS(klass); +// GObjectClass * gobject_class = G_OBJECT_CLASS(klass); GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass); @@ -195,7 +196,7 @@ gboolean pw3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix) { - g_return_if_fail(GTK_IS_PW3270(widget)); + g_return_val_if_fail(GTK_IS_PW3270(widget),FALSE); return v3270_get_toggle(GTK_PW3270(widget)->terminal,ix); } -- libgit2 0.21.2