[BACK]Return to bc.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / bc

Diff for /src/usr.bin/bc/bc.y between version 1.11 and 1.12

version 1.11, 2003/10/18 19:57:10 version 1.12, 2003/10/18 20:35:36
Line 628 
Line 628 
                 p = realloc(instructions, newsize * sizeof(*p));                  p = realloc(instructions, newsize * sizeof(*p));
                 if (p == NULL) {                  if (p == NULL) {
                         free(instructions);                          free(instructions);
                         err(1, "cannot realloc instruction buffer");                          err(1, NULL);
                 }                  }
                 instructions = p;                  instructions = p;
                 instr_sz = newsize;                  instr_sz = newsize;
Line 651 
Line 651 
         instructions[current].index = ALLOC_STRING;          instructions[current].index = ALLOC_STRING;
         instructions[current].u.astr = strdup(str);          instructions[current].u.astr = strdup(str);
         if (instructions[current].u.astr == NULL)          if (instructions[current].u.astr == NULL)
                 err(1, "cannot allocate string");                  err(1, NULL);
         return current++;          return current++;
 }  }
   
Line 767 
Line 767 
                 asprintf(&str, "%s: %s:%d: %s: %s unexpected",                  asprintf(&str, "%s: %s:%d: %s: %s unexpected",
                     __progname, filename, lineno, s, yytext);                      __progname, filename, lineno, s, yytext);
         if (str == NULL)          if (str == NULL)
                 err(1, "cannot allocate string");                  err(1, NULL);
   
         fputs("c[", stdout);          fputs("c[", stdout);
         for (p = str; *p != '\0'; p++) {          for (p = str; *p != '\0'; p++) {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12