Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.37
 
1.38
 
MAIN:ragge:20061007154735
 
cpp.c
_>711711 {
 712712         usch *t;
 713713 
<> 714+        savch(0);
714715         if (ifiles != NULL) {
 715716                 t = sheap("%s:%d: ", ifiles->fname, ifiles->lineno);
 716717                 write (2, t, strlen(t));
     
 !
12051206 }
 12061207 
 12071208 /*
<>1208 - * convert a number to an ascii string.
  1209+ * convert a number to an ascii string. Store it on the heap.
12091210  */
<>1210 -usch *
  1211+static void
12111212 num2str(int num)
 12121213 {
 12131214         static usch buf[12];
     
 !
12181219                         *b++ = num % 10 + '0', num /= 10;
 12191220         } else
 12201221                 *b++ = '0';
<>1221 -        *b = 0;
 1222 -        return buf;
  1222+        while (b > buf)
  1223+                savch(*--b);
12231224 }
 12241225 
 12251226 /*
     
 !
12411242                                 savstr(va_arg(ap, char *));
 12421243                                 break;
 12431244                         case 'd':
<>1244 -                                savstr(num2str(va_arg(ap, int)));
  1245+                                num2str(va_arg(ap, int));
<_12451246                                 break;
 12461247                         case 'c':
 12471248                                 savch(va_arg(ap, int));
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-18 13:30 +0100