[xiph-cvs] cvs commit: ogg-tools/oggmerge oggmerge.c oggmerge.h

Ralph Giles giles at xiph.org
Sun Oct 14 19:20:53 PDT 2001



giles       01/10/14 19:20:51

  Modified:    oggmerge oggmerge.c oggmerge.h
  Log:
  minor cleanup:
    add 'static' to local functions in oggmerge.c
    use params.verbose=0,1,2 instead of seperate verbose and quiet
    fix variable initialization

Revision  Changes    Path
1.6       +10 -12    ogg-tools/oggmerge/oggmerge.c

Index: oggmerge.c
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggmerge/oggmerge.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- oggmerge.c	2001/09/04 03:01:37	1.5
+++ oggmerge.c	2001/10/15 02:20:49	1.6
@@ -29,7 +29,7 @@
 
 param_t params;
 
-void _usage(void)
+static void _usage(void)
 {
         /* prefer stdout to stderr to coddle win32 */
         FILE *out = stdout;
@@ -46,14 +46,13 @@
         );
 }
 
-void _set_defaults(void)
+static void _set_defaults(void)
 {
         /* set defaults */
         params.outfile = NULL;
-	params.outfile = NULL;
+	params.out = NULL;
         params.input = NULL;
-	params.quiet = 0;
-	params.verbose = 0;
+	params.verbose = 1;
 }
 
 struct option long_options[] = {
@@ -65,7 +64,7 @@
         {NULL, 0, NULL, 0}
 };
 
-void _parse_args(int argc, char **argv)
+static void _parse_args(int argc, char **argv)
 {
         int ret;
         int option_index = 1;
@@ -77,12 +76,11 @@
                         exit(1);
                         break;
                 case 'q':
-			params.quiet = 1;
+			/* default is 1. quiet is 0, verbose is > 1 */
                         params.verbose = 0;
                         break;
                 case 'v':
-			params.quiet = 0;
-			params.verbose = 1;
+			params.verbose = 2;
                         break;
                 case 'h':
                         _usage();
@@ -106,7 +104,7 @@
         }
 }
 
-int _get_type(char *filename)
+static int _get_type(char *filename)
 {
         char *ext;
 
@@ -122,7 +120,7 @@
         return TYPEUNKNOWN;
 }
 
-void _add_file(filelist_t *file)
+static void _add_file(filelist_t *file)
 {
         filelist_t *temp;
 
@@ -135,7 +133,7 @@
         }
 }
 
-int _unique_serialno(int serialno)
+static int _unique_serialno(int serialno)
 {
         filelist_t *file;
 

1.3       +0 -5      ogg-tools/oggmerge/oggmerge.h

Index: oggmerge.h
===================================================================
RCS file: /usr/local/cvsroot/ogg-tools/oggmerge/oggmerge.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- oggmerge.h	2001/09/03 23:27:01	1.2
+++ oggmerge.h	2001/10/15 02:20:50	1.3
@@ -38,7 +38,6 @@
         char *outfile;
         FILE *out;
         filelist_t *input;
-	int quiet;
         int verbose;
 } param_t;
 
@@ -56,8 +55,4 @@
 #define TYPEMNG 3
 
 #endif  /* __OGGMERGE_H__ */
-
-
-
-
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list