[xiph-commits] r18630 - trunk/vorbis/doc/vorbisfile

tterribe at svn.xiph.org tterribe at svn.xiph.org
Fri Sep 21 19:09:19 PDT 2012


Author: tterribe
Date: 2012-09-21 19:09:19 -0700 (Fri, 21 Sep 2012)
New Revision: 18630

Modified:
   trunk/vorbis/doc/vorbisfile/chainingexample.html
   trunk/vorbis/doc/vorbisfile/example.html
   trunk/vorbis/doc/vorbisfile/seeking_example_c.html
   trunk/vorbis/doc/vorbisfile/seeking_test_c.html
   trunk/vorbis/doc/vorbisfile/seekingexample.html
   trunk/vorbis/doc/vorbisfile/vorbisfile_example_c.html
Log:
Escape more things in the vorbisfile docs' example code.


Modified: trunk/vorbis/doc/vorbisfile/chainingexample.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/chainingexample.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/chainingexample.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -76,7 +76,7 @@
 <tr bgcolor=#cccccc>
         <td>
 <pre><b>
-  if(ov_open_callbacks(stdin,&ov,NULL,-1,OV_CALLBACKS_NOCLOSE)<0){
+  if(ov_open_callbacks(stdin,&amp;ov,NULL,-1,OV_CALLBACKS_NOCLOSE)&lt;0){
     printf("Could not open input as an OggVorbis file.\n\n");
     exit(1);
   }

Modified: trunk/vorbis/doc/vorbisfile/example.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/example.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/example.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -99,7 +99,7 @@
 <tr bgcolor=#cccccc>
         <td>
 <pre><b>
-  if(ov_open_callbacks(stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) {
+  if(ov_open_callbacks(stdin, &amp;vf, NULL, 0, OV_CALLBACKS_NOCLOSE) &lt; 0) {
       fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
       exit(1);
   }
@@ -119,16 +119,16 @@
         <td>
 <pre><b>
   {
-    char **ptr=ov_comment(&vf,-1)->user_comments;
-    vorbis_info *vi=ov_info(&vf,-1);
+    char **ptr=ov_comment(&amp;vf,-1)-&gt;user_comments;
+    vorbis_info *vi=ov_info(&amp;vf,-1);
     while(*ptr){
       fprintf(stderr,"%s\n",*ptr);
       ++ptr;
     }
-    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
+    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi-&gt;channels,vi-&gt;rate);
     fprintf(stderr,"\nDecoded length: %ld samples\n",
-            (long)ov_pcm_total(&vf,-1));
-    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
+            (long)ov_pcm_total(&amp;vf,-1));
+    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&amp;vf,-1)-&gt;vendor);
   }
   
 </b></pre>
@@ -146,11 +146,11 @@
 <pre><b>
 
   while(!eof){
-    long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,&current_section);
+    long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),0,2,1,&amp;current_section);
     if (ret == 0) {
       /* EOF */
       eof=1;
-    } else if (ret < 0) {
+    } else if (ret &lt; 0) {
       /* error in the stream.  Not a problem, just reporting it in
 	 case we (the app) cares.  In this case, we don't. */
     } else {
@@ -179,7 +179,7 @@
         <td>
 <pre><b>
 
-  ov_clear(&vf);
+  ov_clear(&amp;vf);
     
   fprintf(stderr,"Done.\n");
   return(0);

Modified: trunk/vorbis/doc/vorbisfile/seeking_example_c.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/seeking_example_c.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/seeking_example_c.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -24,8 +24,8 @@
 	<td>
 <pre><b>
 
-#include <stdlib.h>
-#include <stdio.h>
+#include &lt;stdlib.h&gt;
+#include &lt;stdio.h&gt;
 #include "vorbis/codec.h"
 #include "vorbis/vorbisfile.h"
 
@@ -38,18 +38,18 @@
 #endif
 
   /* open the file/pipe on stdin */
-  if(ov_open_callbacks(stdin,&ov,NULL,-1,OV_CALLBACKS_NOCLOSE)==-1){
+  if(ov_open_callbacks(stdin,&amp;ov,NULL,-1,OV_CALLBACKS_NOCLOSE)==-1){
     printf("Could not open input as an OggVorbis file.\n\n");
     exit(1);
   }
   
   /* print details about each logical bitstream in the input */
-  if(ov_seekable(&ov)){
-    double length=ov_time_total(&ov,-1);
+  if(ov_seekable(&amp;ov)){
+    double length=ov_time_total(&amp;ov,-1);
     printf("testing seeking to random places in %g seconds....\n",length);
-    for(i=0;i<100;i++){
+    for(i=0;i&lt;100;i++){
       double val=(double)rand()/RAND_MAX*length;
-      ov_time_seek(&ov,val);
+      ov_time_seek(&amp;ov,val);
       printf("\r\t%d [%gs]...     ",i,val);
       fflush(stdout);
     }
@@ -59,7 +59,7 @@
     printf("Standard input was not seekable.\n");
   }
 
-  ov_clear(&ov);
+  ov_clear(&amp;ov);
   return 0;
 }
 

Modified: trunk/vorbis/doc/vorbisfile/seeking_test_c.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/seeking_test_c.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/seeking_test_c.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -24,8 +24,8 @@
 	<td>
 <pre><b>
 
-#include <stdlib.h>
-#include <stdio.h>
+#include &lt;stdlib.h&gt;
+#include &lt;stdio.h&gt;
 #include "vorbis/codec.h"
 #include "vorbis/vorbisfile.h"
 
@@ -38,18 +38,18 @@
 #endif
 
   /* open the file/pipe on stdin */
-  if(ov_open_callbacks(stdin,&ov,NULL,-1,OV_CALLBACKS_NOCLOSE)==-1){
+  if(ov_open_callbacks(stdin,&amp;ov,NULL,-1,OV_CALLBACKS_NOCLOSE)==-1){
     printf("Could not open input as an OggVorbis file.\n\n");
     exit(1);
   }
   
   /* print details about each logical bitstream in the input */
-  if(ov_seekable(&ov)){
-    double length=ov_time_total(&ov,-1);
+  if(ov_seekable(&amp;ov)){
+    double length=ov_time_total(&amp;ov,-1);
     printf("testing seeking to random places in %g seconds....\n",length);
-    for(i=0;i<100;i++){
+    for(i=0;i&lt;100;i++){
       double val=(double)rand()/RAND_MAX*length;
-      ov_time_seek(&ov,val);
+      ov_time_seek(&amp;ov,val);
       printf("\r\t%d [%gs]...     ",i,val);
       fflush(stdout);
     }
@@ -59,7 +59,7 @@
     printf("Standard input was not seekable.\n");
   }
 
-  ov_clear(&ov);
+  ov_clear(&amp;ov);
   return 0;
 }
 

Modified: trunk/vorbis/doc/vorbisfile/seekingexample.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/seekingexample.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/seekingexample.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -95,7 +95,7 @@
 <tr bgcolor=#cccccc>
         <td>
 <pre><b>
-  if(ov_open_callbacks(stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) {
+  if(ov_open_callbacks(stdin, &amp;vf, NULL, 0, OV_CALLBACKS_NOCLOSE) &lt; 0) {
       fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
       exit(1);
   }
@@ -115,14 +115,14 @@
         <td>
 <pre><b>
   {
-    char **ptr=ov_comment(&vf,-1)->user_comments;
-    vorbis_info *vi=ov_info(&vf,-1);
+    char **ptr=ov_comment(&amp;vf,-1)-&gt;user_comments;
+    vorbis_info *vi=ov_info(&amp;vf,-1);
     while(*ptr){
       fprintf(stderr,"%s\n",*ptr);
       ++ptr;
     }
-    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
-    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
+    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi-&gt;channels,vi-&gt;rate);
+    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&amp;vf,-1)-&gt;vendor);
   }
   
 </b></pre>
@@ -140,7 +140,7 @@
 <pre><b>
 
   while(!eof){
-    long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,&current_section);
+    long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),0,2,1,&amp;current_section);
     switch(ret){
     case 0:
       /* EOF */
@@ -172,7 +172,7 @@
         <td>
 <pre><b>
 
-  ov_clear(&vf);
+  ov_clear(&amp;vf);
     
   fprintf(stderr,"Done.\n");
   return(0);

Modified: trunk/vorbis/doc/vorbisfile/vorbisfile_example_c.html
===================================================================
--- trunk/vorbis/doc/vorbisfile/vorbisfile_example_c.html	2012-09-22 00:04:09 UTC (rev 18629)
+++ trunk/vorbis/doc/vorbisfile/vorbisfile_example_c.html	2012-09-22 02:09:19 UTC (rev 18630)
@@ -46,28 +46,28 @@
   _setmode( _fileno( stdout ), _O_BINARY );
 #endif
 
-  if(ov_open_callbacks(stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) {
+  if(ov_open_callbacks(stdin, &amp;vf, NULL, 0, OV_CALLBACKS_NOCLOSE) &lt; 0) {
       fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
       exit(1);
   }
 
   {
-    char **ptr=ov_comment(&vf,-1)->user_comments;
-    vorbis_info *vi=ov_info(&vf,-1);
+    char **ptr=ov_comment(&amp;vf,-1)-&gt;user_comments;
+    vorbis_info *vi=ov_info(&amp;vf,-1);
     while(*ptr){
       fprintf(stderr,"%s\n",*ptr);
       ++ptr;
     }
-    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
-    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
+    fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi-&gt;channels,vi-&gt;rate);
+    fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&amp;vf,-1)-&gt;vendor);
   }
   
   while(!eof){
-    long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,&current_section);
+    long ret=ov_read(&amp;vf,pcmout,sizeof(pcmout),0,2,1,&amp;current_section);
     if (ret == 0) {
       /* EOF */
       eof=1;
-    } else if (ret < 0) {
+    } else if (ret &lt; 0) {
       /* error in the stream.  Not a problem, just reporting it in
 	 case we (the app) cares.  In this case, we don't. */
     } else {
@@ -77,7 +77,7 @@
     }
   }
 
-  ov_clear(&vf);
+  ov_clear(&amp;vf);
     
   fprintf(stderr,"Done.\n");
   return(0);



More information about the commits mailing list