Difference for common/image.c from version 1.13 to 1.14


version 1.13 version 1.14
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_image_c =   * static char *rcsid_image_c =
  *   "$Id: image.c,v 1.13 2005/09/04 16:58:12 akirschbaum Exp $";   *   "$Id: image.c,v 1.14 2005/10/01 16:36:35 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 209
 
Line 209
     char buf[MAX_BUF], *p, *q;      char buf[MAX_BUF], *p, *q;
     FILE *fp;      FILE *fp;
     int value, nrofbmaps = 0, i;      int value, nrofbmaps = 0, i;
       size_t l;
   
     bmaps_checksum=0;      bmaps_checksum=0;
     sprintf (buf,"%s/bmaps", settings.datadir);      sprintf (buf,"%s/bmaps", settings.datadir);
Line 253
 
Line 254
  ROTATE_RIGHT(bmaps_checksum);   ROTATE_RIGHT(bmaps_checksum);
  bmaps_checksum += (value >> 8) & 0xff;   bmaps_checksum += (value >> 8) & 0xff;
  bmaps_checksum &= 0xffffffff;   bmaps_checksum &= 0xffffffff;
  for (i=0; i<strlen(q); i++) {   for (l=0; l<strlen(q); l++) {
      ROTATE_RIGHT(bmaps_checksum);       ROTATE_RIGHT(bmaps_checksum);
      bmaps_checksum += q[i];       bmaps_checksum += q[l];
      bmaps_checksum &= 0xffffffff;       bmaps_checksum &= 0xffffffff;
  }   }
    
Line 353
 
Line 354
   
     return bp ? bp->number : error;      return bp ? bp->number : error;
 }  }
 /* According to docs, faces are saved in an array  
  * The number associated with each face is it's  
  * position in the array. Right, this should  
  * be easy to convert a facenumber to a facename.  
  * Hope this is so. Tchize  
  * Damn, this is not, have to work around a little. Tchize  
  */  
 char* FindFaceName (int facenbr, char* error) {  
     int i=0;  
     if ( (facenbr>=nroffiles) ||(facenbr<0))   
         return error;  
     /*xbm[facenbr] is 'near' the face we are seeking*/  
     if (xbm[facenbr].number==facenbr)  
         return xbm[facenbr].name;  
     for (i=1;;i++){  
         if ( ((facenbr-i)<0) && ((facenbr+i)>nroffiles))  
             return error;  
         if (xbm[facenbr-i].number==facenbr){  
             return xbm[facenbr-i].name;  
         }  
         if (xbm[facenbr+i].number==facenbr){  
             return xbm[facenbr+i].name;  
         }  
     }  
 }  
 /* Reads the smooth file to know how to smooth datas.  /* Reads the smooth file to know how to smooth datas.
  * the smooth file if made of 2 elements lines.   * the smooth file if made of 2 elements lines.
  * lines starting with # are comment   * lines starting with # are comment


Legend:
line(s) removed in v.1.13 
line(s) changed
 line(s) added in v.1.14

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:06