aboutsummaryrefslogtreecommitdiff
path: root/lex.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-07-28 05:51:52 -0600
committerArnold D. Robbins <arnold@skeeve.com>2019-07-28 05:51:52 -0600
commit795a06b58cdea7f8bb1858e7c383582c660fdf85 (patch)
tree580654df6413567487f89b62506bd74ea28cacff /lex.c
parentcebda366a942aed45f7087b4ff74921da431cdbf (diff)
downloadone-true-awk-795a06b58cdea7f8bb1858e7c383582c660fdf85.tar.gz
Remove trailing whitespace on lines in all files.
Diffstat (limited to 'lex.c')
-rw-r--r--lex.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lex.c b/lex.c
index e27324b..93acb53 100644
--- a/lex.c
+++ b/lex.c
@@ -136,7 +136,7 @@ int gettok(char **pbuf, int *psz) /* get next input token */
if (bp-buf >= sz)
if (!adjbuf(&buf, &sz, bp-buf+2, 100, &bp, "gettok"))
FATAL( "out of space for number %.10s...", buf );
- if (isdigit(c) || c == 'e' || c == 'E'
+ if (isdigit(c) || c == 'e' || c == 'E'
|| c == '.' || c == '+' || c == '-')
*bp++ = c;
else {
@@ -194,7 +194,7 @@ int yylex(void)
/* should this also have STR set? */
RET(NUMBER);
}
-
+
yylval.i = c;
switch (c) {
case '\n': /* {EOL} */
@@ -225,7 +225,7 @@ int yylex(void)
case '&':
if (peek() == '&') {
input(); RET(AND);
- } else
+ } else
RET('&');
case '|':
if (peek() == '|') {
@@ -323,7 +323,7 @@ int yylex(void)
unputstr(buf);
RET(INDIRECT);
}
-
+
case '}':
if (--bracecnt < 0)
SYNTAX( "extra }" );
@@ -346,10 +346,10 @@ int yylex(void)
case '(':
parencnt++;
RET('(');
-
+
case '"':
return string(); /* BUG: should be like tran.c ? */
-
+
default:
RET(c);
}
@@ -382,7 +382,7 @@ int string(void)
c = input();
switch (c) {
case '"': *bp++ = '"'; break;
- case 'n': *bp++ = '\n'; break;
+ case 'n': *bp++ = '\n'; break;
case 't': *bp++ = '\t'; break;
case 'f': *bp++ = '\f'; break;
case 'r': *bp++ = '\r'; break;
@@ -419,7 +419,7 @@ int string(void)
break;
}
- default:
+ default:
*bp++ = c;
break;
}
@@ -429,7 +429,7 @@ int string(void)
break;
}
}
- *bp = 0;
+ *bp = 0;
s = tostring(buf);
*bp++ = ' '; *bp++ = 0;
yylval.cp = setsymtab(buf, s, 0.0, CON|STR|DONTFREE, symtab);
@@ -455,7 +455,7 @@ int binsearch(char *w, Keyword *kp, int n)
return -1;
}
-int word(char *w)
+int word(char *w)
{
Keyword *kp;
int c, n;
@@ -519,11 +519,11 @@ int regexpr(void)
FATAL("out of space for reg expr %.10s...", buf);
if (c == '\n') {
*bp = '\0';
- SYNTAX( "newline in regular expression %.10s...", buf );
+ SYNTAX( "newline in regular expression %.10s...", buf );
unput('\n');
break;
} else if (c == '\\') {
- *bp++ = '\\';
+ *bp++ = '\\';
*bp++ = input();
} else {
*bp++ = c;