[BACK]Return to run.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/run.c between version 1.47 and 1.48

version 1.47, 2020/06/10 21:00:01 version 1.48, 2020/06/10 21:00:31
Line 119 
Line 119 
                 if (rminlen)                  if (rminlen)
                         minlen += quantum - rminlen;                          minlen += quantum - rminlen;
                 tbuf = (char *) realloc(*pbuf, minlen);                  tbuf = (char *) realloc(*pbuf, minlen);
                 DPRINTF( ("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, *pbuf, tbuf) );                  DPRINTF( ("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, (void *) *pbuf, (void *) tbuf) );
                 if (tbuf == NULL) {                  if (tbuf == NULL) {
                         if (whatrtn)                          if (whatrtn)
                                 FATAL("out of memory in %s", whatrtn);                                  FATAL("out of memory in %s", whatrtn);
Line 862 
Line 862 
                                 FATAL("format item %.30s... ran format() out of memory", os);                                  FATAL("format item %.30s... ran format() out of memory", os);
                         if (isalpha((uschar)*s) && *s != 'l' && *s != 'h' && *s != 'L')                          if (isalpha((uschar)*s) && *s != 'l' && *s != 'h' && *s != 'L')
                                 break;  /* the ansi panoply */                                  break;  /* the ansi panoply */
                           if (*s == '$') {
                                   FATAL("'$' not permitted in awk formats");
                           }
                         if (*s == '*') {                          if (*s == '*') {
                                 if (a == NULL)                                  if (a == NULL)
                                         FATAL("not enough args in printf(%s)", os);                                          FATAL("not enough args in printf(%s)", os);
Line 879 
Line 882 
                 if (fmtwd < 0)                  if (fmtwd < 0)
                         fmtwd = -fmtwd;                          fmtwd = -fmtwd;
                 adjbuf(&buf, &bufsize, fmtwd+1+p-buf, recsize, &p, "format4");                  adjbuf(&buf, &bufsize, fmtwd+1+p-buf, recsize, &p, "format4");
   
                 switch (*s) {                  switch (*s) {
                 case 'a': case 'A':                  case 'a': case 'A':
                         if (have_a_format)                          if (have_a_format)
Line 1717 
Line 1719 
   
 Cell *nullproc(Node **a, int n)  Cell *nullproc(Node **a, int n)
 {  {
         n = n;  
         a = a;  
         return 0;          return 0;
 }  }
   
Line 1832 
Line 1832 
         Cell *x;          Cell *x;
         int i, stat;          int i, stat;
   
         n = n;  
         x = execute(a[0]);          x = execute(a[0]);
         getsval(x);          getsval(x);
         stat = -1;          stat = -1;

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48