diff options
author | Dodji Seketeli <dodji@src.gnome.org> | 2003-03-02 18:58:59 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@src.gnome.org> | 2003-03-02 18:58:59 +0000 |
commit | 1217c1902e50ad1b7de22d43d1e2c0f0a652ec1f (patch) | |
tree | 0c0e1058b760186a1a2bda3a80189adab90480e1 /tests/test1-main.c | |
parent | 2e07149b250230b8415a09cd2bddbfbad3f098f7 (diff) | |
download | libcroco-1217c1902e50ad1b7de22d43d1e2c0f0a652ec1f.tar.gz |
Turned on compilation with goddamit warning options.
So I killed an awfully great number of warnings messages.
Also fixed some small regressions that occured during
the rewrite of cr_tknzr_get_next_toke().
Diffstat (limited to 'tests/test1-main.c')
-rw-r--r-- | tests/test1-main.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/tests/test1-main.c b/tests/test1-main.c index 6f8c92b..fad46c2 100644 --- a/tests/test1-main.c +++ b/tests/test1-main.c @@ -10,7 +10,7 @@ *or (at your option) any later version. * *The Croco Library is distributed in the hope - *that it will be useful, but WITHOUT ANY WARRANTY; +n *that it will be useful, but WITHOUT ANY WARRANTY; *without even the implied warranty of *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *See the GNU General Public License for more details. @@ -51,17 +51,31 @@ struct Options }; +static void +display_help (char *prg_name) ; + +static void +display_about (char *prg_name) ; + +static void +parse_command_line (int a_argc, char **a_argv, + struct Options *a_options) ; + +static enum CRStatus +test_cr_input_read_char (guchar * a_file_uri) ; + + /** *Displays the usage of the test *facility. *@param a_argc the argc variable passed to the main function. *@param a_argv the argv variable passed to the main function. */ -void -display_help (int a_argc, char ** a_argv) +static void +display_help (char *prg_name) { g_print ("\n\n") ; - g_print ("usage: %s <file-to-parse>\n", a_argv[0]) ; + g_print ("usage: %s <file-to-parse>\n", prg_name) ; g_print ("\t <file-to-parse>: the file to parse\n") ; g_print ("\n\n") ; g_print ("This test just reads the file character per character\nand sends each character to stdout\n") ; @@ -73,11 +87,11 @@ display_help (int a_argc, char ** a_argv) *@param a_argc the argc variable passed to the main function. *@param a_argv the argv variable passed to the main function. */ -void -display_about (int a_argc, char ** a_argv) +static void +display_about (char *prg_name) { g_print ("\n\n") ; - g_print ("%s is a libcroco CRInput class test program.\n", a_argv[0]) ; + g_print ("%s is a libcroco CRInput class test program.\n", prg_name) ; g_print ("It should run on GNU compliants systems.\n") ; g_print ("\n\n") ; g_print ("Initial author: Dodji Seketeli <dodji@seketeli.org>.\n") ; @@ -90,7 +104,7 @@ display_about (int a_argc, char ** a_argv) *@param a_argv the argv variable passed to the main function by the OS. *@param a_options out parameter. The abstraction of the parsed the options. */ -void +static void parse_command_line (int a_argc, char **a_argv, struct Options *a_options) { @@ -189,19 +203,19 @@ main (int argc, char ** argv) if (options.display_help == TRUE) { - display_help (argc, argv) ; + display_help (argv[0]) ; return 0 ; } if (options.display_about == TRUE) { - display_about (argc, argv) ; + display_about (argv[0]) ; return 0 ; } if (options.files_list == NULL) { - display_help (argc, argv) ; + display_help (argv[0]) ; return 0 ; } |