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

Diff for /src/usr.bin/awk/lex.c between version 1.14 and 1.15

version 1.14, 2020/06/10 21:02:33 version 1.15, 2020/06/10 21:03:36
Line 184 
Line 184 
         static char *buf = NULL;          static char *buf = NULL;
         static int bufsize = 5; /* BUG: setting this small causes core dump! */          static int bufsize = 5; /* BUG: setting this small causes core dump! */
   
         if (buf == NULL && (buf = (char *) malloc(bufsize)) == NULL)          if (buf == NULL && (buf = malloc(bufsize)) == NULL)
                 FATAL( "out of space in yylex" );                  FATAL( "out of space in yylex" );
         if (sc) {          if (sc) {
                 sc = 0;                  sc = 0;
Line 374 
Line 374 
         static char *buf = NULL;          static char *buf = NULL;
         static int bufsz = 500;          static int bufsz = 500;
   
         if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL)          if (buf == NULL && (buf = malloc(bufsz)) == NULL)
                 FATAL("out of space for strings");                  FATAL("out of space for strings");
         for (bp = buf; (c = input()) != '"'; ) {          for (bp = buf; (c = input()) != '"'; ) {
                 if (!adjbuf(&buf, &bufsz, bp-buf+2, 500, &bp, "string"))                  if (!adjbuf(&buf, &bufsz, bp-buf+2, 500, &bp, "string"))
Line 521 
Line 521 
         static int bufsz = 500;          static int bufsz = 500;
         char *bp;          char *bp;
   
         if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL)          if (buf == NULL && (buf = malloc(bufsz)) == NULL)
                 FATAL("out of space for rex expr");                  FATAL("out of space for rex expr");
         bp = buf;          bp = buf;
         for ( ; ((c = input()) != '/' || openclass == 1) && c != 0; ) {          for ( ; ((c = input()) != '/' || openclass == 1) && c != 0; ) {

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15