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/test0-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/test0-main.c')
-rw-r--r-- | tests/test0-main.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/tests/test0-main.c b/tests/test0-main.c index ee6cf72..26d5124 100644 --- a/tests/test0-main.c +++ b/tests/test0-main.c @@ -50,6 +50,18 @@ struct Options gchar ** files_list ; }; +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_byte (guchar * a_file_uri) ; /** *Displays the usage of the test @@ -57,11 +69,11 @@ struct Options *@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 byte per byte\nand sends each byte to stdout\n") ; @@ -73,11 +85,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 +102,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) { @@ -135,7 +147,7 @@ parse_command_line (int a_argc, char **a_argv, *@return CR_OK upon successfull completion of the *function, an error code otherwise. */ -enum CRStatus +static enum CRStatus test_cr_input_read_byte (guchar * a_file_uri) { enum CRStatus status = CR_OK ; @@ -193,19 +205,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 ; } |