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

@ -76,26 +76,26 @@ command(char *buf, int defcom)
break;
case '>':
lastcom = savecom;
lastcom = savecom;
savc=rdc();
if (reg=regname(savc))
rput(correg, reg, dot);
else
else
error("bad variable");
break;
case '!':
lastcom=savecom;
shell();
shell();
break;
case '$':
lastcom=savecom;
printdollar(nextchar());
printdollar(nextchar());
break;
case ':':
if (!executing) {
if (!executing) {
executing=TRUE;
subpcs(nextchar());
executing=FALSE;
@ -107,7 +107,7 @@ command(char *buf, int defcom)
prints(DBNAME);
break;
default:
default:
error("bad command");
}
flushbuf();
@ -159,21 +159,21 @@ acommand(int pc)
{
case 'm':
if (eqcom)
error(BADEQ);
error(BADEQ);
cmdmap(map);
break;
case 'L':
case 'l':
if (eqcom)
error(BADEQ);
error(BADEQ);
cmdsrc(lastc, map);
break;
case 'W':
case 'w':
if (eqcom)
error(BADEQ);
error(BADEQ);
cmdwrite(lastc, map);
break;
@ -199,10 +199,10 @@ cmdsrc(int c, Map *map)
else
dotinc = 2;
savdot=dot;
expr(1);
expr(1);
locval=expv;
if (expr(0))
locmsk=expv;
locmsk=expv;
else
locmsk = ~0;
if (c == 'L')
@ -211,8 +211,8 @@ cmdsrc(int c, Map *map)
else
while ((ret = get2(map, dot, &sh)) > 0 && (sh&locmsk) != locval)
dot = inkdot(dotinc);
if (ret < 0) {
dot=savdot;
if (ret < 0) {
dot=savdot;
error("%r");
}
symoff(buf, 512, dot, CANY);
@ -235,7 +235,7 @@ cmdwrite(int wcom, Map *map)
expr(1);
pass = 0;
do {
pass++;
pass++;
savdot=dot;
exform(1, 1, format, map, 0, pass);
dot=savdot;
@ -247,7 +247,7 @@ cmdwrite(int wcom, Map *map)
error(badwrite);
}
savdot=dot;
dprint("=%8t");
dprint("=%8t");
exform(1, 0, format, map, 0, pass);
newline();
} while (expr(0));
@ -305,7 +305,7 @@ shell(void)
}
break;
}
prints("!");
prints("!");
reread();
}
}

View file

@ -186,7 +186,7 @@ item(int a)
return 1;
}
error("bad file location");
} else if (symchar(0)) {
} else if (symchar(0)) {
readsym(gsym);
if (lastc=='.') {
readchar(); /* ugh */
@ -212,7 +212,7 @@ item(int a)
reread();
} else if (getnum(readchar)) {
;
} else if (lastc=='.') {
} else if (lastc=='.') {
readchar();
if (!symchar(0) && lastc != '.') {
expv = dot;
@ -228,7 +228,7 @@ item(int a)
if (localaddr(cormap, correg, s.name, lsym, &u) < 0)
error("%r");
expv = u;
}
}
reread();
} else if (lastc=='"') {
expv=ditto;
@ -245,7 +245,7 @@ item(int a)
expv = ascval();
else if (a)
error("address expected");
else {
else {
reread();
return(0);
}

View file

@ -144,7 +144,7 @@ getformat(char *deformat)
*
* we handle this case specially because we have to look ahead
* at the token after the colon to decide if it is a file reference
* or a colon-command with a symbol name prefix.
* or a colon-command with a symbol name prefix.
*/
int

View file

@ -77,7 +77,7 @@ iclose(int stack, int err)
infile = STDIN;
} else {
if (infile) {
close(infile);
close(infile);
infile=STDIN;
}
if (ifiledepth > 0) {

View file

@ -29,7 +29,7 @@ subpcs(int modif)
switch (modif) {
/* delete breakpoint */
case 'd':
case 'd':
case 'D':
if ((bk=scanbkpt(dot)) == 0)
error("no breakpoint set");
@ -37,7 +37,7 @@ subpcs(int modif)
return;
/* set breakpoint */
case 'b':
case 'b':
case 'B':
if (bk=scanbkpt(dot))
bk->flag=BKPTCLR;
@ -80,7 +80,7 @@ subpcs(int modif)
return;
/* run program */
case 'r':
case 'r':
case 'R':
endpcs();
setup();
@ -88,7 +88,7 @@ subpcs(int modif)
break;
/* single step */
case 's':
case 's':
if (pid == 0) {
setup();
loopcnt--;
@ -119,8 +119,8 @@ subpcs(int modif)
loopcnt = 0;
break;
/* continue with optional note */
case 'c':
case 'C':
case 'c':
case 'C':
if (pid==0)
error(NOPCS);
runmode=CONTIN;

View file

@ -100,15 +100,15 @@ cmdmap(Map *map)
/* textseg(expv, &fhdr); */
map->seg[i].base = expv;
} else
error("Invalid base address");
error("Invalid base address");
if (expr(0))
map->seg[i].size = expv - map->seg[i].base;
else
error("Invalid end address");
error("Invalid end address");
if (expr(0))
map->seg[i].offset = expv;
map->seg[i].offset = expv;
else
error("Invalid file offset");
error("Invalid file offset");
/*
if (rdc()=='?' && map == cormap) {
if (fcor)