[xiph-cvs] cvs commit: vorbis/vq distribution.c

Monty xiphmont at xiph.org
Sun Dec 31 15:56:09 PST 2000



xiphmont    00/12/31 15:56:08

  Modified:    vq       Tag: monty_branch_20001226 distribution.c
  Log:
  Whoops.  Distribution.c was only looking at the first scalar on a line
  due to a bug.  Aaaagh.
  
  Monty

Revision  Changes    Path
No                   revision

No                   revision

1.1.2.3   +4 -1      vorbis/vq/Attic/distribution.c

Index: distribution.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vq/Attic/distribution.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- distribution.c	2000/12/30 06:30:58	1.1.2.2
+++ distribution.c	2000/12/31 23:56:07	1.1.2.3
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: utility for finding the distribution in a data set
- last mod: $Id: distribution.c,v 1.1.2.2 2000/12/30 06:30:58 xiphmont Exp $
+ last mod: $Id: distribution.c,v 1.1.2.3 2000/12/31 23:56:07 xiphmont Exp $
 
  ********************************************************************/
 
@@ -158,6 +158,7 @@
       
       while(sscanf(line,"%f",&code)==1){
         line=strchr(line,',');
+	if(line)line++;
         if(code<min)min=code;
         if(code>max)max=code;
       }
@@ -189,6 +190,7 @@
       
       while(sscanf(line,"%f",&code)==1){
         line=strchr(line,',');
+	if(line)line++;
         
         code-=min;
         code/=(max-min);
@@ -209,6 +211,7 @@
         if(countarray[i]>maxcount)maxcount=countarray[i];
       
       printf("\r                                                     \r");
+      printf("Total scalars: %ld\n",total);
       for(i=0;i<bins+1;i++){
         int stars=rint(50./maxcount*countarray[i]);
         printf("%08f (%8ld) |",(max-min)/bins*i+min,countarray[i]);

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list