antiright-devel
[Top][All Lists]
Advanced

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

[Antiright-devel] antiright/gtkshell guidl_util.c


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/gtkshell guidl_util.c
Date: Fri, 11 May 2007 13:29:34 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 07/05/11 13:29:34

Modified files:
        gtkshell       : guidl_util.c 

Log message:
        Fixed corruption of logic due to macro usage.  

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/guidl_util.c?cvsroot=antiright&r1=1.18&r2=1.19

Patches:
Index: guidl_util.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/guidl_util.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- guidl_util.c        10 May 2007 00:08:28 -0000      1.18
+++ guidl_util.c        11 May 2007 13:29:34 -0000      1.19
@@ -36,36 +36,26 @@
        EDEL(args);
 }
 
-#define APPEND_SWITCH(env, swtiches) $(env->args, add, switches)
-
-/* A command base argument (for command line 
-   switch translation) is required.  */        
-#define IF_SWITCHES_ADD(env, switches)\
-{\
-       if(switches)\
-               APPEND_SWITCH(env, switches);\
-       else\
-               return;\
-}
-
-#define ADD_ARGUMENT_IF_GIVEN(env, argument)\
-{\
-       if(argument)\
-       {\
-               APPEND_SWITCH(env, argument);\
-               g_free(argument);\
-       }\
-}
+#define APPEND_ARG(env, arg) $(env->args, add, arg)
 
 static void
 gsh_GDLEnvironment_add(struct GDLEnvironment * env, 
                       const gchar * switches, gchar * argument)
 {
+       /* A command base argument (for command line 
+          switch translation) is required.  */ 
+       if(switches)
+       {
 #ifdef DEBUG
-       ARPASSERT(switches);
+       ARPASSERT(gsh);
 #endif /* DEBUG */
-       IF_SWITCHES_ADD(env, switches);
-       ADD_ARGUMENT_IF_GIVEN(env, argument);
+               APPEND_ARG(env, switches);
+               if(argument)
+               {
+                       APPEND_ARG(env, argument);
+                       g_free(argument);
+               }
+       }
 }
 
 #define CONSTRUCT_MEMBER_CLASSES(env)\




reply via email to

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