antiright-devel
[Top][All Lists]
Advanced

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

[Antiright-devel] antiright Makefile configure gtkshell/gtkshell....


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright Makefile configure gtkshell/gtkshell....
Date: Sat, 04 Sep 2010 08:06:20 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 10/09/04 08:06:20

Modified files:
        .              : Makefile configure 
        gtkshell       : gtkshell.c macros.h main.c options.c 

Log message:
        Rename bzball target package to guishell.  Avoid redefining usage
        in options.c multiple times, and isolate the usage variable to prevent
        multiple dereferences.  Switch back to stack allocation of GSH.
        Add flag to macros.h to indicate whether or not GSH was allocated on the
        heap.  Test for such a flag before calling arfree on GSH.  

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/Makefile?cvsroot=antiright&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/antiright/configure?cvsroot=antiright&r1=1.127&r2=1.128
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gtkshell.c?cvsroot=antiright&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/macros.h?cvsroot=antiright&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/main.c?cvsroot=antiright&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/options.c?cvsroot=antiright&r1=1.54&r2=1.55

Patches:
Index: Makefile
===================================================================
RCS file: /sources/antiright/antiright/Makefile,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- Makefile    25 Aug 2010 20:50:49 -0000      1.29
+++ Makefile    4 Sep 2010 08:06:20 -0000       1.30
@@ -86,7 +86,7 @@
 endif
 
 bzball: distclean
-       cd .. && cp -R antiright antiright-$(VERSION) \
-       && tar cjf antiright-$(VERSION).tar.bz2 antiright-$(VERSION) \
-       && rm -rf antiright-$(VERSION)
+       cd .. && cp -R antiright guishell-$(VERSION) \
+       && tar cjf guishell-$(VERSION).tar.bz2 guishell-$(VERSION) \
+       && rm -rf guishell-$(VERSION)
 

Index: configure
===================================================================
RCS file: /sources/antiright/antiright/configure,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- configure   26 Aug 2010 18:50:18 -0000      1.127
+++ configure   4 Sep 2010 08:06:20 -0000       1.128
@@ -24,7 +24,7 @@
 #
 ###############################################################################
 
-VERSION=3.10
+VERSION=3.11
 
 TRUE=0
 FALSE=1

Index: gtkshell/gtkshell.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/gtkshell.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- gtkshell/gtkshell.c 3 Sep 2010 09:17:41 -0000       1.60
+++ gtkshell/gtkshell.c 4 Sep 2010 08:06:20 -0000       1.61
@@ -37,6 +37,7 @@
   /* Delete atomic members.  */
   GSH_FREE_IF (gsh->geometry);
   delete_child_classes(gsh);
+  if(GSH_FLAG(GSH_HEAP_ALLOCATED))
   arfree(gsh);
 }
 
@@ -149,6 +150,7 @@
 
   gsh = (GSH *) armalloc (sizeof (GSH));
   gsh_GSH (gsh);
+  GSH_SET(GSH_HEAP_ALLOCATED);
 
   return gsh;
 }

Index: gtkshell/macros.h
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/macros.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- gtkshell/macros.h   31 Aug 2010 19:57:20 -0000      1.30
+++ gtkshell/macros.h   4 Sep 2010 08:06:20 -0000       1.31
@@ -44,6 +44,7 @@
 #define GSH_ICON_SIZE_IS_CUSTOM GSHBIT(16)
 #define GSH_NO_RELIEF          GSHBIT(17)
 #define GSH_HORIZ_CLOCK        GSHBIT(18)
+#define GSH_HEAP_ALLOCATED      GSHBIT(19)
 
 typedef guint32 Bitmask;
 

Index: gtkshell/main.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/main.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- gtkshell/main.c     31 Aug 2010 19:57:20 -0000      1.42
+++ gtkshell/main.c     4 Sep 2010 08:06:20 -0000       1.43
@@ -31,7 +31,7 @@
   GC_INIT();
 #endif /* LIBGC */
   gtk_init (&argc, &argv);
-  gsh = ARNEW(gsh, GSH);
+  gsh = g_newa(GSH, 1);
   gsh_GSH (gsh);
   $ (gsh, parse, (const gint) argc, (const gchar **) argv);
   $ (gsh, finalize);

Index: gtkshell/options.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/options.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- gtkshell/options.c  31 Aug 2010 19:57:20 -0000      1.54
+++ gtkshell/options.c  4 Sep 2010 08:06:20 -0000       1.55
@@ -66,28 +66,30 @@
   common_guidl_handler (gsh);
 }
 
-static inline void
-add_to_usage (GSH * gsh, const gchar * key, const gchar * descr)
+static inline gchar *
+add_to_usage (gchar *usage, const gchar * key, const gchar * descr)
 {
-  gchar *tmp = gsh->usage;
+  gchar *tmp = usage;
 
-  gsh->usage = g_strconcat (tmp, "\n", key, "\t", descr, NULL);
+  usage = g_strconcat (tmp, "\n", key, "\t", descr, NULL);
   g_free (tmp);
-}
-
 
+  return usage;
+}
 
 static ARTupleVector *
 gsh_define_command_line_options (GSH * gsh)
 {
   ARTupleVector *dictionary;
+  const bool usage_defined=(gsh->usage);
+  gchar *usage;
 
-  if (!(gsh->usage))
-    gsh->usage = g_strdup ("Usage:  ");
+  if(!usage_defined)
+    usage = g_strdup ("Usage:  ");
 
 #define ARTDEF(key, cb, descr)\
        $(dictionary, add, key, (const gchar *)cb);\
-        add_to_usage(gsh, key, descr)
+        if(!usage_defined)usage=add_to_usage(usage, key, descr)
 
   dictionary = ARNEW (ar, ARTupleVector);
 
@@ -174,6 +176,7 @@
   /* GUIDL file */
   ARTDEF ("-f", guidl_file_cb, "open GUIDL file");
 
+  gsh->usage=usage;
   return dictionary;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]