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

Diff of /beaver/src/main.c

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

revision 1.6 by mikix, Wed May 14 20:42:07 2003 UTC revision 1.7 by mikix, Thu May 22 00:54:51 2003 UTC
# Line 38  int main (int argc, char *argv[]) Line 38  int main (int argc, char *argv[])
38  {  {
39    gchar *ConfDir;              gchar *ConfDir;          
40    
41    setlocale(LC_ALL, "");    setlocale (LC_ALL, "");
42    bindtextdomain(PACKAGE, LOCALEDIR);    bindtextdomain (PACKAGE, LOCALEDIR);
43    textdomain(PACKAGE);    textdomain (PACKAGE);
44    
45      g_set_prgname (PACKAGE_NAME);
46    
47    if (argc >= 2)    if (argc >= 2)
48      {      {
49        gint i;        gint i;
       gchar *AppName;  
50                
       AppName = g_ascii_strdown(APP_NAME, -1);  
51        for (i = 1; i < argc; i++)        for (i = 1; i < argc; i++)
52          {          {
53            if (!strcmp (argv[i], "--help") || !strcmp (argv[i], "-?"))            if (!strcmp (argv[i], "--help") || !strcmp (argv[i], "-?"))
54              {              {
55                g_print                g_print
56                  (g_strconcat                  (g_strconcat
57                   (_("Usage: "), AppName, " [", _("OPTION"), "...] [", _("FILE"), "...]",                   (_("Usage: "), PACKAGE, " [", _("OPTION"), "...] [", _("FILE"), "...]",
58                    "\n\n",                    "\n\n",
59                    _("Help options"), "\n",                    _("Help options"), "\n",
60                    "  -?, --help\t\t\t", _("Show this help message"), "\n",                    "  -?, --help\t\t\t", _("Show this help message"), "\n",
# Line 81  int main (int argc, char *argv[]) Line 81  int main (int argc, char *argv[])
81              {              {
82                g_print                g_print
83                  (g_strconcat                  (g_strconcat
84                   (_("Usage: "), AppName, " [-?] [--version] [--usage] "                   (_("Usage: "), PACKAGE, " [-?] [--version] [--usage] "
85                    "[--gdk-debug=FLAGS]\n\t[--gdk-no-debug=FLAGS] "                    "[--gdk-debug=FLAGS]\n\t[--gdk-no-debug=FLAGS] "
86                    "[--display=DISPLAY] [--sync] [--no-xshm]\n\t"                    "[--display=DISPLAY] [--sync] [--no-xshm]\n\t"
87                    "[--name=NAME] [--class=CLASS] [--gtk-debug=FLAGS] "                    "[--name=NAME] [--class=CLASS] [--gtk-debug=FLAGS] "
# Line 91  int main (int argc, char *argv[]) Line 91  int main (int argc, char *argv[])
91              }              }
92            else if (!strcmp (argv[i], "--version"))            else if (!strcmp (argv[i], "--version"))
93              {              {
94                g_print (g_strconcat (AppName, " " VERSION_NUMBER "\n", NULL));                g_print ("%s\n", PACKAGE_STRING);
95                return (1);                return (1);
96              }              }
97            else if (!strcmp (argv[i], "--"))            else if (!strcmp (argv[i], "--"))
# Line 99  int main (int argc, char *argv[]) Line 99  int main (int argc, char *argv[])
99                break;                break;
100              }              }
101          }          }
       g_free (AppName);  
102      }      }
103    ConfDir = g_strconcat (g_get_home_dir (), PATH_SEP_STRING, CONF_DIR, NULL);    ConfDir = g_build_filename (g_get_home_dir (), CONF_DIR, NULL);
104    mkdir (ConfDir, 0755);    mkdir (ConfDir, 0755);
105    g_free (ConfDir);    g_free (ConfDir);
106    interface (argc, argv);    interface (argc, argv);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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