Enlightenment CVS committal

Author  : balony
Project : e17
Module  : proto

Dir     : e17/proto/exhibit/src/bin


Modified Files:
        exhibit_main.c 


Log Message:


segv-- and added argv/argc stuff.

===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit_main.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- exhibit_main.c      8 Sep 2006 16:54:30 -0000       1.81
+++ exhibit_main.c      13 Sep 2006 21:36:09 -0000      1.82
@@ -868,6 +868,10 @@
             int i;
             
             if ((ptr = strrchr(dir, '/'))) ptr++;
+
+            if (!ptr)
+              ptr = dir;
+
             if (!_ex_file_is_viewable(ptr))
               {
                  tab = _ex_tab_new(e, ".");
@@ -957,6 +961,30 @@
 int
 main(int argc, char *argv[])
 {
+   int i;
+
+   for (i = 1; i < argc; i++)
+     {
+       if (((!strcmp(argv[i], "-h")) ||
+                (!strcmp(argv[i], "--help"))))
+         {
+            printf("Usage\n");
+            printf("  %s <image>\n", PACKAGE);
+            printf("  %s <path>\n", PACKAGE);
+            printf("  %s <url>\n\n", PACKAGE);
+            printf("  -h, --help\t\t display this help and exit\n");
+            printf("  -v, --version\t\t output version information and 
exit\n\n");
+            exit(1);
+         }
+       else if (((!strcmp(argv[i], "-v")) ||
+                (!strcmp(argv[i], "--version"))))
+         {
+            printf("%s version %s\n", PACKAGE, VERSION);
+            exit(1);
+         }
+
+     }
+   
    if (!etk_init(&argc, &argv))
      {
        fprintf(stderr, "Could not init etk. Exiting...\n");



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to