[xiph-commits] r17182 - in trunk/vorbis: . include/vorbis lib

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Apr 28 20:48:32 PDT 2010


Author: xiphmont
Date: 2010-04-28 20:48:32 -0700 (Wed, 28 Apr 2010)
New Revision: 17182

Modified:
   trunk/vorbis/configure.ac
   trunk/vorbis/include/vorbis/vorbisfile.h
   trunk/vorbis/lib/vorbisfile.c
Log:
Commit vorbisfile constification patch; affects API but not ABI.
Closes #1593.



Modified: trunk/vorbis/configure.ac
===================================================================
--- trunk/vorbis/configure.ac	2010-04-29 02:13:28 UTC (rev 17181)
+++ trunk/vorbis/configure.ac	2010-04-29 03:48:32 UTC (rev 17182)
@@ -29,7 +29,7 @@
 V_LIB_AGE=4
 
 VF_LIB_CURRENT=6
-VF_LIB_REVISION=2
+VF_LIB_REVISION=3
 VF_LIB_AGE=3
 
 VE_LIB_CURRENT=2

Modified: trunk/vorbis/include/vorbis/vorbisfile.h
===================================================================
--- trunk/vorbis/include/vorbis/vorbisfile.h	2010-04-29 02:13:28 UTC (rev 17181)
+++ trunk/vorbis/include/vorbis/vorbisfile.h	2010-04-29 03:48:32 UTC (rev 17182)
@@ -147,14 +147,14 @@
 
 
 extern int ov_clear(OggVorbis_File *vf);
-extern int ov_fopen(char *path,OggVorbis_File *vf);
-extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_fopen(const char *path,OggVorbis_File *vf);
+extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
 extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf,
-                char *initial, long ibytes, ov_callbacks callbacks);
+                const char *initial, long ibytes, ov_callbacks callbacks);
 
-extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
+extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes);
 extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf,
-                char *initial, long ibytes, ov_callbacks callbacks);
+                const char *initial, long ibytes, ov_callbacks callbacks);
 extern int ov_test_open(OggVorbis_File *vf);
 
 extern long ov_bitrate(OggVorbis_File *vf,int i);

Modified: trunk/vorbis/lib/vorbisfile.c
===================================================================
--- trunk/vorbis/lib/vorbisfile.c	2010-04-29 02:13:28 UTC (rev 17181)
+++ trunk/vorbis/lib/vorbisfile.c	2010-04-29 03:48:32 UTC (rev 17182)
@@ -871,7 +871,7 @@
   return fseek(f,off,whence);
 }
 
-static int _ov_open1(void *f,OggVorbis_File *vf,char *initial,
+static int _ov_open1(void *f,OggVorbis_File *vf,const char *initial,
                      long ibytes, ov_callbacks callbacks){
   int offsettest=((f && callbacks.seek_func)?callbacks.seek_func(f,0,SEEK_CUR):-1);
   long *serialno_list=NULL;
@@ -987,14 +987,14 @@
             0) OK
 */
 
-int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
-    ov_callbacks callbacks){
+int ov_open_callbacks(void *f,OggVorbis_File *vf,
+    const char *initial,long ibytes,ov_callbacks callbacks){
   int ret=_ov_open1(f,vf,initial,ibytes,callbacks);
   if(ret)return ret;
   return _ov_open2(vf);
 }
 
-int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){
   ov_callbacks callbacks = {
     (size_t (*)(void *, size_t, size_t, void *))  fread,
     (int (*)(void *, ogg_int64_t, int))              _fseek64_wrap,
@@ -1005,7 +1005,7 @@
   return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks);
 }
 
-int ov_fopen(char *path,OggVorbis_File *vf){
+int ov_fopen(const char *path,OggVorbis_File *vf){
   int ret;
   FILE *f = fopen(path,"rb");
   if(!f) return -1;
@@ -1049,13 +1049,13 @@
    seekability).  Use ov_test_open to finish opening the file, else
    ov_clear to close/free it. Same return codes as open. */
 
-int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
-    ov_callbacks callbacks)
+int ov_test_callbacks(void *f,OggVorbis_File *vf,
+    const char *initial,long ibytes,ov_callbacks callbacks)
 {
   return _ov_open1(f,vf,initial,ibytes,callbacks);
 }
 
-int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){
+int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){
   ov_callbacks callbacks = {
     (size_t (*)(void *, size_t, size_t, void *))  fread,
     (int (*)(void *, ogg_int64_t, int))              _fseek64_wrap,



More information about the commits mailing list