diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-10-13 20:52:43 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-10-13 20:52:43 +0300 |
commit | 3b42cfaf73fbe63c1332f9cf2c8e4d90ab686f05 (patch) | |
tree | 5eb762eb83229cbd64f59d7fa3e4ba2c3580f97a /lex.c | |
parent | 9804285af0866f90731a6e0ce767ab0e7b23b6c6 (diff) | |
download | one-true-awk-3b42cfaf73fbe63c1332f9cf2c8e4d90ab686f05.tar.gz |
Make it compile with g++.
Diffstat (limited to 'lex.c')
-rw-r--r-- | lex.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -173,7 +173,7 @@ int yylex(void) static char *buf = NULL; static int bufsize = 5; /* BUG: setting this small causes core dump! */ - if (buf == NULL && (buf = malloc(bufsize)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsize)) == NULL) FATAL( "out of space in yylex" ); if (sc) { sc = false; @@ -370,7 +370,7 @@ int string(void) static char *buf = NULL; static int bufsz = 500; - if (buf == NULL && (buf = malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL) FATAL("out of space for strings"); for (bp = buf; (c = input()) != '"'; ) { if (!adjbuf(&buf, &bufsz, bp-buf+2, 500, &bp, "string")) @@ -519,7 +519,7 @@ int regexpr(void) static int bufsz = 500; char *bp; - if (buf == NULL && (buf = malloc(bufsz)) == NULL) + if (buf == NULL && (buf = (char *) malloc(bufsz)) == NULL) FATAL("out of space for rex expr"); bp = buf; for ( ; (c = input()) != '/' && c != 0; ) { |