Fix shift by negative value when reading blocksize.
[platform/upstream/libvorbis.git] / vq / latticebuild.c
index 6171193..acfe9ff 100644 (file)
@@ -24,7 +24,7 @@
 /* The purpose of this util is just to finish packaging the
    description into a static codebook.  It used to count hits for a
    histogram, but I've divorced that out to add some flexibility (it
-   currently generates an equal probability codebook) 
+   currently generates an equal probability codebook)
 
    command line:
    latticebuild description.vql
@@ -33,7 +33,7 @@
 
    <n> <dim> <multiplicitavep> <sequentialp>
    <value_0> <value_1> <value_2> ... <value_n-1>
-   
+
    a threshmap (or pigeonmap) struct is generated by latticehint;
    there are fun tricks one can do with the threshmap and cascades,
    but the utils don't know them...
@@ -81,7 +81,7 @@ int main(int argc,char *argv[]){
       fprintf(stderr,"Could not open input file %s\n",filename);
       exit(1);
     }
-    
+
     ptr=strrchr(filename,'.');
     if(ptr){
       *ptr='\0';
@@ -91,7 +91,7 @@ int main(int argc,char *argv[]){
     }
 
   }
-  
+
   /* read the description */
   line=get_line(in);
   if(sscanf(line,"%d %d %d %d",&quantvals,&dim,&addmul,&sequencep)!=4){
@@ -115,7 +115,7 @@ int main(int argc,char *argv[]){
 
   reset_next_value();
   line=setup_line(in);
-  for(j=0;j<quantvals;j++){ 
+  for(j=0;j<quantvals;j++){
     char *temp;
     if(!line || sscanf(line,"%lf",quantlist+j)!=1){
       fprintf(stderr,"Ran out of data on line 2 of description file\n");