/[xlog]/xlog/src/main.c
ViewVC logotype

Diff of /xlog/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by pa4tu, Sun Aug 17 10:25:42 2003 UTC revision 1.42 by pa4tu, Mon Aug 18 07:28:34 2003 UTC
# Line 73  extern GList *riglist; Line 73  extern GList *riglist;
73  static void  static void
74  parsecommandline (int argc, char *argv[])  parsecommandline (int argc, char *argv[])
75  {  {
76    gint i;    gint p;
77    gchar *versionstr;    gchar *versionstr;
78                                                                                    
79    for (i = 1; i < argc; i++)    while ((p = getopt (argc, argv, "hv")) != -1)
80      {
81        switch (p)
82      {      {
83        if (g_ascii_strncasecmp (argv[i], "--version", 9) == 0)        case ':':
84          {        case '?':
85            versionstr = g_strdup_printf (_("%s version %s\n"),        case 'h':
86              g_path_get_basename (argv[0]), VERSION);          g_print ("Usage: %s [option]...\n", PACKAGE);
87            g_print (versionstr);          g_print ("       -h         Display this help and exit\n");
88            g_free (versionstr);          g_print ("       -v         Output version information and exit\n");
89            exit (0);          exit (0);
90          }        case 'v':
91        else if (g_ascii_strncasecmp (argv[i], "--help", 6) == 0)          versionstr = g_strdup_printf (_("%s version %s\n"),
92          {            g_path_get_basename (argv[0]), VERSION);
93            g_print (_("Usage: %s [option]...\n"),                g_print (versionstr);
94              g_path_get_basename (argv[0]));                g_free (versionstr);
95            g_print (_("     --version     Output version information and exit\n"));                exit (0);
           g_print (_("     --help        Display this help and exit\n"));  
           exit (0);  
         }  
       else  
         {  
           g_print (_("Unknown argument, type %s --help for a list of options\n"),  
                    g_path_get_basename (argv[0]));  
           exit (1);  
         }  
96      }      }
97      }
98  }  }
99    
100  /* see if we can create the ~/.xlog directory */  /* see if we can create the ~/.xlog directory */

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26