[xiph-commits] r2955 - in liboggz/trunk: . src/examples src/liboggz src/tests src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Sat Jun 16 02:24:45 PDT 2007


Author: conrad
Date: 2007-06-16 02:24:45 -0700 (Sat, 16 Jun 2007)
New Revision: 2955

Modified:
   liboggz/trunk/configure.ac
   liboggz/trunk/src/examples/Makefile.am
   liboggz/trunk/src/liboggz/Makefile.am
   liboggz/trunk/src/liboggz/oggz_auto.c
   liboggz/trunk/src/liboggz/oggz_comments.c
   liboggz/trunk/src/liboggz/oggz_private.h
   liboggz/trunk/src/liboggz/oggz_vector.c
   liboggz/trunk/src/liboggz/oggz_vector.h
   liboggz/trunk/src/tests/Makefile.am
   liboggz/trunk/src/tools/Makefile.am
   liboggz/trunk/src/tools/oggz-scan.c
   liboggz/trunk/src/tools/oggz_tools.c
   liboggz/trunk/src/tools/oggzdump.c
   liboggz/trunk/src/tools/oggzrip.c
Log:
clean up handling of CFLAGS in Makefile.am throughout, set -std=c99 and get
rid of most compile errors (XXX: except delcarations for random, fileno, strsep)


Modified: liboggz/trunk/configure.ac
===================================================================
--- liboggz/trunk/configure.ac	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/configure.ac	2007-06-16 09:24:45 UTC (rev 2955)
@@ -286,17 +286,11 @@
 dnl Use -Wall if we have gcc.
 dnl changequote(,)dnl
 if test "x$ac_cv_prog_gcc" = xyes ; then
-  CFLAGS="$CFLAGS -Wall -g"
+  CFLAGS="$CFLAGS -Wall -g -std=c99 -Wdeclaration-after-statement"
 fi
 dnl changequote([,])dnl
 
 case "$target_os" in
-  darwin* | rhapsody*)
-    dnl Disable -Wall and -pedantic for Apple Darwin/Rhapsody.
-    dnl System headers on these systems are broken.
-    temp_CFLAGS=`echo $CFLAGS | sed "s/-Wall -pedantic//"`
-    CFLAGS=$temp_CFLAGS
-    ;;
   linux* | solaris*)
     SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
     ;;

Modified: liboggz/trunk/src/examples/Makefile.am
===================================================================
--- liboggz/trunk/src/examples/Makefile.am	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/examples/Makefile.am	2007-06-16 09:24:45 UTC (rev 2955)
@@ -1,7 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-AM_CFLAGS = -Wall -pedantic -g
-
 INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@
 
 OGGZDIR = ../liboggz

Modified: liboggz/trunk/src/liboggz/Makefile.am
===================================================================
--- liboggz/trunk/src/liboggz/Makefile.am	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/Makefile.am	2007-06-16 09:24:45 UTC (rev 2955)
@@ -1,7 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-AM_CFLAGS = -Wall -pedantic
-
 INCLUDES = $(INCLTDL) -I$(top_srcdir)/include @OGG_CFLAGS@
 
 EXTRA_DIST = Version_script.in

Modified: liboggz/trunk/src/liboggz/oggz_auto.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/oggz_auto.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -679,8 +679,6 @@
      */
     int mode;
     int size;
-    int prev_bit;
-    int next_bit;
     int result;
 
     mode = (op->packet[0] >> 1) & ((1 << info->log2_num_modes) - 1);
@@ -876,8 +874,8 @@
 
 int
 oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno, 
-                void * user_data) {
-  OggzReadPacket read_packet;
+                void * user_data)
+{
   int content = 0;
 
   content = oggz_stream_get_content(oggz, serialno);

Modified: liboggz/trunk/src/liboggz/oggz_comments.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_comments.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/oggz_comments.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include "oggz_private.h"
 #include "oggz_vector.h"

Modified: liboggz/trunk/src/liboggz/oggz_private.h
===================================================================
--- liboggz/trunk/src/liboggz/oggz_private.h	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/oggz_private.h	2007-06-16 09:24:45 UTC (rev 2955)
@@ -263,8 +263,7 @@
 
 int oggz_purge (OGGZ * oggz);
 
-int oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno, 
-                void * user_data);
+/* metric_internal */
 
 int
 oggz_set_granulerate (OGGZ * oggz, long serialno, 
@@ -276,10 +275,22 @@
                                     ogg_int64_t * granulerate_n,
                                     ogg_int64_t * granulerate_d);
 
+int oggz_set_granuleshift (OGGZ * oggz, long serialno, int granuleshift);
+
+int oggz_get_granuleshift (OGGZ * oggz, long serialno);
+
+/* oggz_auto */
+ 
 int
+oggz_auto_get_granulerate (OGGZ * oggz, ogg_packet * op, long serialno, 
+                           void * user_data);
+
+int
 oggz_auto_read_comments (OGGZ * oggz, oggz_stream_t * stream, long serialno,
                          ogg_packet * op);
 
+int oggz_auto_identify (OGGZ *oggz, ogg_page *og, long serialno);
+
 /* comments */
 int oggz_comments_init (oggz_stream_t * stream);
 int oggz_comments_free (oggz_stream_t * stream);

Modified: liboggz/trunk/src/liboggz/oggz_vector.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_vector.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/oggz_vector.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -40,7 +40,7 @@
 
 typedef int (*OggzFunc) (void * data);
 typedef int (*OggzFindFunc) (void * data, long serialno);
-typedef int (*OggzCmpFunc) (void * a, void * b, void * user_data);
+typedef int (*OggzCmpFunc) (const void * a, const void * b, void * user_data);
 
 typedef struct _OggzVector OggzVector;
 
@@ -141,7 +141,7 @@
   void * d;
   int i;
 
-  if (vector->compare == NULL) -1;
+  if (vector->compare == NULL) return NULL;
 
   for (i = 0; i < vector->nr_elements; i++) {
     d = vector->data[i].p;
@@ -158,7 +158,7 @@
   void * d;
   int i;
 
-  if (vector->compare == NULL) -1;
+  if (vector->compare == NULL) return -1;
 
   for (i = 0; i < vector->nr_elements; i++) {
     d = vector->data[i].p;

Modified: liboggz/trunk/src/liboggz/oggz_vector.h
===================================================================
--- liboggz/trunk/src/liboggz/oggz_vector.h	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/liboggz/oggz_vector.h	2007-06-16 09:24:45 UTC (rev 2955)
@@ -37,7 +37,7 @@
 
 typedef int (*OggzFunc) (void * data);
 typedef int (*OggzFindFunc) (void * data, long serialno);
-typedef int (*OggzCmpFunc) (void * a, void * b, void * user_data);
+typedef int (*OggzCmpFunc) (const void * a, const void * b, void * user_data);
 
 OggzVector *
 oggz_vector_new (void);

Modified: liboggz/trunk/src/tests/Makefile.am
===================================================================
--- liboggz/trunk/src/tests/Makefile.am	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tests/Makefile.am	2007-06-16 09:24:45 UTC (rev 2955)
@@ -1,7 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-AM_CFLAGS = -Wall -pedantic
-
 INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@
 
 OGGZDIR = ../liboggz

Modified: liboggz/trunk/src/tools/Makefile.am
===================================================================
--- liboggz/trunk/src/tools/Makefile.am	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tools/Makefile.am	2007-06-16 09:24:45 UTC (rev 2955)
@@ -1,7 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-AM_CFLAGS = -Wall -pedantic -g
-
 EXTRA_DIST = oggzdiff
 
 bin_SCRIPTS = oggzdiff

Modified: liboggz/trunk/src/tools/oggz-scan.c
===================================================================
--- liboggz/trunk/src/tools/oggz-scan.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tools/oggz-scan.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include <getopt.h>
 #include <errno.h>

Modified: liboggz/trunk/src/tools/oggz_tools.c
===================================================================
--- liboggz/trunk/src/tools/oggz_tools.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tools/oggz_tools.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -188,7 +188,7 @@
 
   samplerate = (ogg_int64_t) (data[27] << 12) | (data[28] << 4) | 
                ((data[29] >> 4)&0xf);
-  channels = 1 + (data[29] >> 1)&0x7;
+  channels = 1 + ((data[29] >> 1)&0x7);
 
   snprintf (buf, 60,
 	    "\tAudio-Samplerate: %d Hz\n\tAudio-Channels: %d\n",
@@ -272,7 +272,7 @@
    * stream content name using oggz_stream_get_content_type
    */
   
-  serial_no = ogg_page_serialno(og);
+  serial_no = ogg_page_serialno((ogg_page *)og);
   
   content = oggz_stream_get_content(oggz, serial_no);
   if (content == OGGZ_ERR_BAD_SERIALNO) return NULL;

Modified: liboggz/trunk/src/tools/oggzdump.c
===================================================================
--- liboggz/trunk/src/tools/oggzdump.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tools/oggzdump.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -35,6 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 
 #ifdef HAVE_INTTYPES_H

Modified: liboggz/trunk/src/tools/oggzrip.c
===================================================================
--- liboggz/trunk/src/tools/oggzrip.c	2007-06-16 09:23:33 UTC (rev 2954)
+++ liboggz/trunk/src/tools/oggzrip.c	2007-06-16 09:24:45 UTC (rev 2955)
@@ -39,6 +39,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <fcntl.h>
 #include <assert.h>
 



More information about the commits mailing list