Commit 7846eb4a authored by Michaël Cadilhac's avatar Michaël Cadilhac
Browse files

2005-06-09 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>

	* monoburg.c: Make the `usage' message more verbose.
parent 3ca245db
2005-06-09 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* monoburg.c: Make the `usage' message more verbose.
2005-06-09 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* monoburg.c: Add a `-n' option to precise the top #define used in
......
......@@ -1149,10 +1149,32 @@ warn_cxx (const gchar *use_of)
}
static void
usage ()
usage (char *program_name)
{
fprintf (stderr,
"Usage is: monoburg -d file.h -s file.c [inputfile] \n");
"Usage: %s [OPTIONS]... [SOURCE]\n"
"Generate a code generator from SOURCE. If SOURCE is not\n"
"precised, the standard input will be processed.\n"
"\n"
"Exhaustive list of options :\n"
" -c VALUE Set the default cost to VALUE.\n"
" -d FILE FILE will be the header file.\n"
" -D\"VAR\" VAR will be defined to 1.\n"
" -e Enable DAG compatibility.\n"
" -h, --help Get this message and quit.\n"
" -I PATH Add PATH to the list of directories\n"
" -n STRING Set STRING to be the #define at the\n"
" top of the header file.\n"
" -p Terms are predefined.\n"
" -s FILE Source will be output to FILE.\n"
" for %%include.\n"
" -v, --version Output version number and quit.\n"
" --without-glib Output a code glib independent.\n"
" --without-exported-symbols Avoid exported symbols as much\n"
" as possible.\n"
" --with-references Make emit functions to take a reference,\n"
" not a pointer.\n",
program_name);
exit (1);
}
......@@ -1192,7 +1214,7 @@ main (int argc, char *argv [])
if (argv [i][0] == '-'){
/* Short options */
if (argv [i][1] == 'h') {
usage ();
usage (argv[0]);
} else if (argv [i][1] == 'v') {
version ();
} else if (argv [i][1] == 'e') {
......@@ -1227,11 +1249,11 @@ main (int argc, char *argv [])
warn_cxx ("`--with-references' option");
with_references = TRUE;
} else {
usage ();
usage (argv[0]);
}
} else {
usage ();
usage (argv[0]);
}
} else {
infiles = g_list_append (infiles, argv [i]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment