From: mdw Date: Sun, 13 Jan 2002 14:43:27 +0000 (+0000) Subject: Kill some spurious warnings. Track @msg@ interface change. X-Git-Tag: 1.4.0~19 X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/commitdiff_plain/2a1038487eaf81c1474cc9dccaf02fea2245a786 Kill some spurious warnings. Track @msg@ interface change. --- diff --git a/xcatch.c b/xcatch.c index 4f99d19..8d45876 100644 --- a/xcatch.c +++ b/xcatch.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: xcatch.c,v 1.8 1999/06/19 23:42:55 mdw Exp $ + * $Id: xcatch.c,v 1.9 2002/01/13 14:43:27 mdw Exp $ * * Catch input and trap it in an X window * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: xcatch.c,v $ + * Revision 1.9 2002/01/13 14:43:27 mdw + * Kill some spurious warnings. Track @msg@ interface change. + * * Revision 1.8 1999/06/19 23:42:55 mdw * Improve signal handling. Fix options parsing to POSIX order only. * @@ -85,10 +88,8 @@ static unsigned int flags; -enum { - f_closed = 1, - f_bogus = 2 -}; +#define f_closed 1u +#define f_bogus 2u static GtkWidget *textbox = 0; static GdkFont *font; @@ -114,8 +115,8 @@ static void ready(gpointer data, gint fd, GdkInputCondition c) { char buf[1024]; int doscroll = 1; - GtkText *t; - GtkAdjustment *va; + GtkText *t = 0; + GtkAdjustment *va = 0; /* --- If not ready to read then go away --- */ @@ -150,7 +151,7 @@ static void ready(gpointer data, gint fd, GdkInputCondition c) if (r < 0) { if (errno == EWOULDBLOCK) break; - msg(":~OK", "error reading data: %s", strerror(errno)); + msg(QUIS, ":~OK", "error reading data: %s", strerror(errno)); exit(EXIT_FAILURE); } @@ -177,12 +178,13 @@ static void ready(gpointer data, gint fd, GdkInputCondition c) GtkWidget *w; win = gtk_dialog_new(); + gtk_window_set_policy(GTK_WINDOW(win), 1, 1, 0); gtk_signal_connect(GTK_OBJECT(win), "destroy", GTK_SIGNAL_FUNC(killwin), 0); tbl = gtk_table_new(2, 2, 0); gtk_container_border_width(GTK_CONTAINER(tbl), 8); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->vbox), tbl, 1, 1, 0); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->vbox), tbl, 1, 1, 1); gtk_widget_show(tbl); textbox = gtk_text_new(0, 0);