pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xfce4-xkb-plugin Fix some C99 variable defini...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6bad0b872f18
branches:  trunk
changeset: 477213:6bad0b872f18
user:      kristerw <kristerw%pkgsrc.org@localhost>
date:      Mon Jun 28 01:12:09 2004 +0000

description:
Fix some C99 variable definitions, to make this build with gcc 2.95.

diffstat:

 sysutils/xfce4-xkb-plugin/distinfo         |    4 +-
 sysutils/xfce4-xkb-plugin/patches/patch-aa |   25 ++++++
 sysutils/xfce4-xkb-plugin/patches/patch-ab |  108 +++++++++++++++++++++++++++++
 3 files changed, 136 insertions(+), 1 deletions(-)

diffs (152 lines):

diff -r 685c5b0a138e -r 6bad0b872f18 sysutils/xfce4-xkb-plugin/distinfo
--- a/sysutils/xfce4-xkb-plugin/distinfo        Mon Jun 28 00:47:40 2004 +0000
+++ b/sysutils/xfce4-xkb-plugin/distinfo        Mon Jun 28 01:12:09 2004 +0000
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/06/21 06:08:34 martti Exp $
+$NetBSD: distinfo,v 1.2 2004/06/28 01:12:09 kristerw Exp $
 
 SHA1 (xfce4-xkb-plugin-0.3.1.tar.gz) = 19e1c72bda1d9bffaafa08ef512c17dc1b84c130
 Size (xfce4-xkb-plugin-0.3.1.tar.gz) = 334044 bytes
+SHA1 (patch-aa) = c7f554bf8c64c370930b302129b413f406dab98c
+SHA1 (patch-ab) = bd4263562d4268e4dc4b89b75a3a5cdebe128672
diff -r 685c5b0a138e -r 6bad0b872f18 sysutils/xfce4-xkb-plugin/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xfce4-xkb-plugin/patches/patch-aa        Mon Jun 28 01:12:09 2004 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-aa,v 1.1 2004/06/28 01:12:09 kristerw Exp $
+
+--- panel-plugin/xfce4-xkb-plugin.c.orig       Mon Jun 28 02:48:38 2004
++++ panel-plugin/xfce4-xkb-plugin.c    Mon Jun 28 02:50:08 2004
+@@ -87,7 +87,7 @@
+   
+   xkb_refresh_gui(xkb);
+ 
+-  char *initial_group = initialize_xkb(xkb);
++  initialize_xkb(xkb);
+ 
+   channel = g_io_channel_unix_new(get_connection_number());
+   source_id = g_io_add_watch(channel, G_IO_IN | G_IO_PRI, (GIOFunc) &gio_callback, (gpointer) xkb);
+@@ -113,10 +113,9 @@
+ }
+ 
+ static void xkb_free(Control *ctrl) {
++  t_xkb *xkb;
+   g_source_remove(source_id);
+   deinitialize_xkb();
+-
+-  t_xkb *xkb;
+ 
+   g_return_if_fail(ctrl != NULL);
+   g_return_if_fail(ctrl->data != NULL);
diff -r 685c5b0a138e -r 6bad0b872f18 sysutils/xfce4-xkb-plugin/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xfce4-xkb-plugin/patches/patch-ab        Mon Jun 28 01:12:09 2004 +0000
@@ -0,0 +1,108 @@
+$NetBSD: patch-ab,v 1.1 2004/06/28 01:12:09 kristerw Exp $
+
+--- panel-plugin/xkb.c.orig    Mon Jun 28 02:50:20 2004
++++ panel-plugin/xkb.c Mon Jun 28 02:57:50 2004
+@@ -105,16 +105,16 @@
+   const Atom *group_source;
+   Bool status;
+   int major, minor, oppcode;
++  XkbStateRec xkb_state;
++  XkbDescRec *kbd_desc_ptr = NULL;
++  int i;
+ 
+   // Initialize the Xkb extension
+   status = XkbQueryExtension(dsp, &oppcode,
+     &base_event_code, &base_error_code, &major, &minor);
+ 
+-  XkbStateRec xkb_state;
+   device_id = XkbUseCoreKbd;
+ 
+-  XkbDescRec *kbd_desc_ptr = NULL;
+-
+   kbd_desc_ptr = XkbAllocKeyboard();
+   if (kbd_desc_ptr == NULL) {
+     fprintf(stderr, "Failed to get keyboard description\n");
+@@ -146,12 +146,12 @@
+ 
+   if (group_count == 0) group_count=1;
+ 
+-  int i;
+   for (i = 0; i < group_count; i++) {
+     group_names[i] = NULL;
+     symbol_names[i] = NULL;
+   }
+ 
++  {
+   const Atom *tmp_group_source = kbd_desc_ptr->names->groups;
+   Atom cur_group_atom;
+   char *ptr;
+@@ -163,6 +163,7 @@
+         *ptr = '\0';
+     }
+   }
++  {
+   Atom sym_name_atom = kbd_desc_ptr->names->symbols;
+   char *sym_name;
+   char *ptr1;
+@@ -251,7 +252,8 @@
+   current_group_xkb_no = xkb_state.group;
+ 
+   status = True;
+-
++  }
++  }
+ HastaLaVista:
+   if (kbd_desc_ptr) XkbFreeKeyboard(kbd_desc_ptr, 0, True);
+   return status;
+@@ -286,13 +288,14 @@
+ void set_new_locale(t_xkb *ctrl) {
+   t_xkb *plugin = (t_xkb *) ctrl;
+   char filename[255];
++  GdkPixbuf *pixbuf, *tmp;
++  int size;
+ 
+   // Set the label  
+   gtk_label_set_label((GtkLabel *) plugin->label, get_symbol_name_by_res_no(current_group_xkb_no));
+   
+   // Set the image
+-  GdkPixbuf *pixbuf, *tmp;
+-  int size = plugin->size - 4;
++  size = plugin->size - 4;
+   tmp = gdk_pixbuf_new_from_file(get_current_gourp_flag_name(filename), NULL);
+   if (tmp == NULL) { // could not be loaded for some reason
+     printf("in set_new_locale: tmp is NULL\n");
+@@ -335,10 +338,10 @@
+ char * initialize_xkb(t_xkb *ctrl) {
+   XkbEvent evnt;
+   int event_code, error_rtrn, major, minor, reason_rtrn;
++  char * display_name;
+   major = XkbMajorVersion;
+   minor = XkbMinorVersion;
+ 
+-  char * display_name;
+   display_name = "";
+   XkbIgnoreExtension(False);
+   dsp = XkbOpenDisplay(display_name, &event_code, &error_rtrn, &major, &minor, &reason_rtrn);
+@@ -362,12 +365,12 @@
+ 
+   if (do_init_xkb() != True) return "N/A";
+ 
++  {
+   char *group = get_symbol_name_by_res_no(current_group_xkb_no);
+-
++  XkbStateRec state;
+   XkbSelectEventDetails(dsp, XkbUseCoreKbd, XkbStateNotify,
+                         XkbAllStateComponentsMask, XkbGroupStateMask);
+ 
+-  XkbStateRec state;
+   XkbGetState(dsp, device_id, &state);
+   current_group_xkb_no = (current_group_xkb_no != state.group) ? state.group : current_group_xkb_no;
+   accomodate_group_xkb();
+@@ -375,6 +378,7 @@
+   if (ctrl != NULL) set_new_locale(ctrl);
+ 
+   return group;
++  }
+ }
+ 
+ static void deinit_group_names() {



Home | Main Index | Thread Index | Old Index