Difference for common/porting.c from version 1.27 to 1.28


version 1.27 version 1.28
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_porting_c =   * static char *rcsid_porting_c =
  *   "$Id: porting.c,v 1.27 2005/09/04 16:58:12 akirschbaum Exp $";   *   "$Id: porting.c,v 1.28 2005/10/28 23:43:30 akirschbaum Exp $";
  */   */
   
 /*  /*
Line 408
 
Line 408
  */   */
   
 char *ltostr10(signed long n) {  char *ltostr10(signed long n) {
   static char buf[10];    static char buf[12]; /* maximum size is n=-2 billion, i.e. 11 characters+1
   char *cp=buf+9;     character for the trailing nul character */
   long flag;    snprintf(buf, sizeof(buf), "%ld", n);
     return buf;
   *cp='\0';  
   if(n<0)  
     flag= n = -n;  
   else  
     flag=0;  
   do {  
     *(--cp) = '0'+n%10;  
     n/=10;  
   } while(n);  
   if(flag)  
     *(--cp)='-';  
   return cp;  
 }  }
 char *doubletostr10(double v){  char *doubletostr10(double v){
   static char tbuf[200];    static char tbuf[200];


Legend:
line(s) removed in v.1.27 
line(s) changed
 line(s) added in v.1.28

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