Trivial changes: whitespace and modes.

Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.

Signed-off-by: Dan Cross <cross@gajendra.net>
This commit is contained in:
Dan Cross 2020-01-10 14:44:21 +00:00
parent 77a0a5b519
commit fa325e9b42
1021 changed files with 5688 additions and 6193 deletions

View file

@ -134,7 +134,7 @@ extern Node *nullnode;
#define CCOPY 6
#define CCON 5
#define CTEMP 4
#define CNAME 3
#define CNAME 3
#define CVAR 2
#define CFLD 1
#define CUNK 0
@ -182,4 +182,3 @@ extern int pairstack[], paircnt;
#define freeable(p) ( ((p)->tval & (STR|DONTFREE)) == STR )
#include "proto.h"

View file

@ -140,7 +140,7 @@ int gettok(char **pbuf, int *psz) /* get next input token */
if (bp-buf >= sz)
if (!adjbuf(&buf, &sz, bp-buf+2, 100, &bp, 0))
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 {
@ -191,7 +191,7 @@ int yylex(void)
/* should this also have STR set? */
RET(NUMBER);
}
yylval.i = c;
switch (c) {
case '\n': /* {EOL} */
@ -220,7 +220,7 @@ int yylex(void)
case '&':
if (peek() == '&') {
input(); RET(AND);
} else
} else
RET('&');
case '|':
if (peek() == '|') {
@ -295,7 +295,7 @@ int yylex(void)
input(); yylval.i = POWEQ; RET(ASGNOP);
} else
RET(POWER);
case '$':
/* BUG: awkward, if not wrong */
c = gettok(&buf, &bufsize);
@ -313,7 +313,7 @@ int yylex(void)
unputstr(buf);
RET(INDIRECT);
}
case '}':
if (--bracecnt < 0)
SYNTAX( "extra }" );
@ -336,10 +336,10 @@ int yylex(void)
case '(':
parencnt++;
RET('(');
case '"':
return string(); /* BUG: should be like tran.c ? */
default:
RET(c);
}
@ -369,7 +369,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;
@ -406,7 +406,7 @@ int string(void)
break;
}
default:
default:
*bp++ = c;
break;
}
@ -416,7 +416,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);
@ -442,7 +442,7 @@ int binsearch(char *w, Keyword *kp, int n)
return -1;
}
int word(char *w)
int word(char *w)
{
Keyword *kp;
int c, n;
@ -504,11 +504,11 @@ int regexpr(void)
if (!adjbuf(&buf, &bufsz, bp-buf+3, 500, &bp, 0))
FATAL("out of space for reg expr %.10s...", buf);
if (c == '\n') {
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;
@ -567,4 +567,3 @@ void unputstr(char *s) /* put a string back on input */
for (i = strlen(s)-1; i >= 0; i--)
unput(s[i]);
}

View file

@ -435,7 +435,7 @@ int refldbld(char *rec, char *fs) /* build fields from reg expr in FS */
break;
}
}
return i;
return i;
}
void recbld(void) /* create $0 from $1..$NF if necessary */
@ -715,4 +715,3 @@ int is_number(char *s)
else
return 0;
}

View file

@ -195,4 +195,3 @@ char *cursource(void) /* current source file name */
else
return NULL;
}

View file

@ -166,4 +166,3 @@ int main(int argc, char *argv[])
printf("}\n");
return 0;
}

View file

@ -269,4 +269,3 @@ Node *itonp(int i) /* and vice versa */
{
return (Node *) (long) i;
}

View file

@ -177,4 +177,3 @@ extern Cell *gsub(Node **, int);
extern FILE *popen(const char *, const char *);
extern int pclose(FILE *);

View file

@ -215,7 +215,7 @@ nematch(void *p, char *s, char *start)
if (pmatch(p, s, start) == 1 && patlen > 0)
return 1;
patlen = -1;
patbeg = start;
patbeg = start;
return 0;
}
/* in the parsing of regular expressions, metacharacters like . have */
@ -322,4 +322,3 @@ overflow(void)
{
FATAL("%s", "regular expression too big");
}

View file

@ -506,7 +506,7 @@ Cell *awkdelete(Node **a, int n) /* a[0] is symtab, a[1] is list of subscripts *
s = getsval(y);
if (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, 0))
FATAL("out of memory deleting %s[%s...]", x->nval, buf);
strcat(buf, s);
strcat(buf, s);
if (np->nnext)
strcat(buf, *SUBSEP);
tempfree(y);
@ -1914,4 +1914,3 @@ void backsub(char **pb_ptr, char **sptr_ptr) /* handle \\& variations */
*pb_ptr = pb;
*sptr_ptr = sptr;
}

View file

@ -167,7 +167,7 @@ void freesymtab(Cell *ap) /* free a symbol table */
if (freeable(cp))
xfree(cp->sval);
temp = cp->cnext; /* avoids freeing then using */
free(cp);
free(cp);
}
tp->tab[i] = 0;
}
@ -180,7 +180,7 @@ void freeelem(Cell *ap, char *s) /* free elem s from ap (i.e., ap["s"] */
Array *tp;
Cell *p, *prev = NULL;
int h;
tp = (Array *) ap->sval;
h = hash(s, tp->size);
for (p = tp->tab[h]; p != NULL; prev = p, p = p->cnext)
@ -275,7 +275,7 @@ Awkfloat setfval(Cell *vp, Awkfloat f) /* set float val of a Cell */
{
int fldno;
if ((vp->tval & (NUM | STR)) == 0)
if ((vp->tval & (NUM | STR)) == 0)
funnyvar(vp, "assign to");
if (isfld(vp)) {
donerec = 0; /* mark $0 invalid */
@ -405,7 +405,7 @@ char *qstring(char *s, int delim) /* collect string up to next delim */
if (c == 0) { /* \ at end */
*bp++ = '\\';
break; /* for loop */
}
}
switch (c) {
case '\\': *bp++ = '\\'; break;
case 'n': *bp++ = '\n'; break;
@ -432,4 +432,3 @@ char *qstring(char *s, int delim) /* collect string up to next delim */
*bp++ = 0;
return buf;
}