Enlightenment CVS committal

Author  : rbdpngn
Project : misc
Module  : elapse

Dir     : misc/elapse/src


Modified Files:
        gui.c main.c 


Log Message:
Fix some arg handling and obey the non-stickey arg.

===================================================================
RCS file: /cvsroot/enlightenment/misc/elapse/src/gui.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- gui.c       16 Apr 2004 18:25:30 -0000      1.3
+++ gui.c       19 Apr 2004 19:33:54 -0000      1.4
@@ -18,7 +18,8 @@
        ecore_evas_borderless_set(elapse->ee, 1);
        win = ecore_evas_software_x11_window_get(elapse->ee);
        ecore_x_window_prop_layer_set(win, ECORE_X_WINDOW_LAYER_BELOW);
-       ecore_x_window_prop_sticky_set(win, 1);
+       if (elapse->conf.sticky)
+               ecore_x_window_prop_sticky_set(win, 1);
        
        elapse->evas = ecore_evas_get(elapse->ee);
        
===================================================================
RCS file: /cvsroot/enlightenment/misc/elapse/src/main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- main.c      16 Apr 2004 18:25:30 -0000      1.3
+++ main.c      19 Apr 2004 19:33:54 -0000      1.4
@@ -26,15 +26,20 @@
                
                if (!strcmp(argv[i], "-v") ||
                    !strcmp(argv[i], "--verbose")) {
-                       if (atoi(argv[argc]) < 0 ) elapse.conf.debug = 1;
-                       else elapse.conf.debug = atoi(argv[argc]);
+                       if (i < argc - 1) {
+                               int tmp = atoi(argv[i + 1]);
+                               if (tmp < 0 ) elapse.conf.debug = 1;
+                               else {
+                                       elapse.conf.debug = tmp;
+                                       i++;
+                               }
+                       }
                }
 
                if (!strcmp(argv[i], "-f") ||
                    !strcmp(argv[i], "--format")) {
-                       if (!argv[++i]) show_help();
-                       elapse.conf.format = malloc(strlen(argv[i]) + 1);
-                       strcpy(elapse.conf.format, argv[i]);
+                       if (++i == argc) show_help();
+                       elapse.conf.format = strdup(argv[i]);
                }
 
                if (!strcmp(argv[i], "-n") ||
@@ -44,7 +49,7 @@
 
                if (!strcmp(argv[i], "-t") ||
                    !strcmp(argv[i], "--theme")) {
-                       if (!argv[++i]) show_help();
+                       if (++i == argc) show_help();
                        strncpy(elapse.conf.theme, argv[i], PATH_MAX);
                }
        }




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to