diff options
author | Dodji Seketeli <dodji@gnome.org> | 2003-12-27 17:48:12 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@src.gnome.org> | 2003-12-27 17:48:12 +0000 |
commit | 0770337b2b35ea9ece19ef37de8efcb9cc828e99 (patch) | |
tree | 4a62cd48c82e6f325df88f8f9effd929c259260a /csslint/csslint.c | |
parent | d502de118110eccf135cca563f8c535759f743e4 (diff) | |
download | libcroco-0770337b2b35ea9ece19ef37de8efcb9cc828e99.tar.gz |
did some fixes/cleanup here. Make sure csslint --help shows a proper help.
2003-12-27 Dodji Seketeli <dodji@gnome.org>
* csslint/csslint.c: did some fixes/cleanup here.
Make sure csslint --help shows a proper help.
* src/parser/cr-statement.c:
(cr_statement_dump): when a NULL statement is given, do
not dump anything, instead considering this as an error.
* src/parser/cr-stylesheet.c:
(cr_stylesheet_dump): give the possibility to dump
empty sheets, instead of considering this case as
an error case.
Diffstat (limited to 'csslint/csslint.c')
-rw-r--r-- | csslint/csslint.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/csslint/csslint.c b/csslint/csslint.c index a39a3fd..a44ed2c 100644 --- a/csslint/csslint.c +++ b/csslint/csslint.c @@ -36,7 +36,7 @@ struct Options { gboolean show_version ; gboolean use_cssom ; - + gboolean display_help ; gchar ** files_list ; }; @@ -86,6 +86,11 @@ csslint_parse_cmd_line (int a_argc, char **a_argv, { a_options->use_cssom = TRUE ; } + if (!strcmp (a_argv[i], "--help") || + !strcmp (a_argv[i], "-h")) + { + a_options->display_help = TRUE ; + } } if (i >= a_argc) @@ -190,6 +195,11 @@ main (int argc, char **argv) return 0; } + if (options.display_help == TRUE) + { + csslint_usage (argv[0]) ; + return 0 ; + } if (options.use_cssom == TRUE) { if (options.files_list != NULL) @@ -200,7 +210,7 @@ main (int argc, char **argv) } else { - csslint_show_version(argv[0]); + csslint_usage (argv[0]); return 0; } |