[xiph-commits] r14463 - in trunk/ogg: include/ogg src

erikd at svn.xiph.org erikd at svn.xiph.org
Sat Feb 9 03:16:57 PST 2008


Author: erikd
Date: 2008-02-09 03:16:55 -0800 (Sat, 09 Feb 2008)
New Revision: 14463

Modified:
   trunk/ogg/include/ogg/ogg.h
   trunk/ogg/src/framing.c
Log:
six const correct-ness fixes

Modified: trunk/ogg/include/ogg/ogg.h
===================================================================
--- trunk/ogg/include/ogg/ogg.h	2008-02-07 01:31:46 UTC (rev 14462)
+++ trunk/ogg/include/ogg/ogg.h	2008-02-09 11:16:55 UTC (rev 14463)
@@ -184,14 +184,14 @@
 
 extern void     ogg_page_checksum_set(ogg_page *og);
 
-extern int      ogg_page_version(ogg_page *og);
-extern int      ogg_page_continued(ogg_page *og);
-extern int      ogg_page_bos(ogg_page *og);
-extern int      ogg_page_eos(ogg_page *og);
-extern ogg_int64_t  ogg_page_granulepos(ogg_page *og);
-extern int      ogg_page_serialno(ogg_page *og);
-extern long     ogg_page_pageno(ogg_page *og);
-extern int      ogg_page_packets(ogg_page *og);
+extern int      ogg_page_version(const ogg_page *og);
+extern int      ogg_page_continued(const ogg_page *og);
+extern int      ogg_page_bos(const ogg_page *og);
+extern int      ogg_page_eos(const ogg_page *og);
+extern ogg_int64_t  ogg_page_granulepos(const ogg_page *og);
+extern int      ogg_page_serialno(const ogg_page *og);
+extern long     ogg_page_pageno(const ogg_page *og);
+extern int      ogg_page_packets(const ogg_page *og);
 
 extern void     ogg_packet_clear(ogg_packet *op);
 

Modified: trunk/ogg/src/framing.c
===================================================================
--- trunk/ogg/src/framing.c	2008-02-07 01:31:46 UTC (rev 14462)
+++ trunk/ogg/src/framing.c	2008-02-09 11:16:55 UTC (rev 14463)
@@ -26,23 +26,23 @@
 
 /* A complete description of Ogg framing exists in docs/framing.html */
 
-int ogg_page_version(ogg_page *og){
+int ogg_page_version(const ogg_page *og){
   return((int)(og->header[4]));
 }
 
-int ogg_page_continued(ogg_page *og){
+int ogg_page_continued(const ogg_page *og){
   return((int)(og->header[5]&0x01));
 }
 
-int ogg_page_bos(ogg_page *og){
+int ogg_page_bos(const ogg_page *og){
   return((int)(og->header[5]&0x02));
 }
 
-int ogg_page_eos(ogg_page *og){
+int ogg_page_eos(const ogg_page *og){
   return((int)(og->header[5]&0x04));
 }
 
-ogg_int64_t ogg_page_granulepos(ogg_page *og){
+ogg_int64_t ogg_page_granulepos(const ogg_page *og){
   unsigned char *page=og->header;
   ogg_int64_t granulepos=page[13]&(0xff);
   granulepos= (granulepos<<8)|(page[12]&0xff);
@@ -55,14 +55,14 @@
   return(granulepos);
 }
 
-int ogg_page_serialno(ogg_page *og){
+int ogg_page_serialno(const ogg_page *og){
   return(og->header[14] |
 	 (og->header[15]<<8) |
 	 (og->header[16]<<16) |
 	 (og->header[17]<<24));
 }
  
-long ogg_page_pageno(ogg_page *og){
+long ogg_page_pageno(const ogg_page *og){
   return(og->header[18] |
 	 (og->header[19]<<8) |
 	 (og->header[20]<<16) |
@@ -88,7 +88,7 @@
   ogg_page_continued(page) !=0
 */
 
-int ogg_page_packets(ogg_page *og){
+int ogg_page_packets(const ogg_page *og){
   int i,n=og->header[26],count=0;
   for(i=0;i<n;i++)
     if(og->header[27+i]<255)count++;



More information about the commits mailing list