aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/db')
-rw-r--r--src/cmd/db/command.c32
-rw-r--r--src/cmd/db/expr.c8
-rw-r--r--src/cmd/db/input.c2
-rw-r--r--src/cmd/db/output.c2
-rw-r--r--src/cmd/db/pcs.c12
-rw-r--r--src/cmd/db/setup.c8
6 files changed, 32 insertions, 32 deletions
diff --git a/src/cmd/db/command.c b/src/cmd/db/command.c
index 55ed02a8..b89318e8 100644
--- a/src/cmd/db/command.c
+++ b/src/cmd/db/command.c
@@ -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();
}
}
diff --git a/src/cmd/db/expr.c b/src/cmd/db/expr.c
index 74c9319a..72b8c906 100644
--- a/src/cmd/db/expr.c
+++ b/src/cmd/db/expr.c
@@ -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);
}
diff --git a/src/cmd/db/input.c b/src/cmd/db/input.c
index 8cd091b0..bd97cd70 100644
--- a/src/cmd/db/input.c
+++ b/src/cmd/db/input.c
@@ -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
diff --git a/src/cmd/db/output.c b/src/cmd/db/output.c
index 176cec28..db4d0fa2 100644
--- a/src/cmd/db/output.c
+++ b/src/cmd/db/output.c
@@ -77,7 +77,7 @@ iclose(int stack, int err)
infile = STDIN;
} else {
if (infile) {
- close(infile);
+ close(infile);
infile=STDIN;
}
if (ifiledepth > 0) {
diff --git a/src/cmd/db/pcs.c b/src/cmd/db/pcs.c
index b876f50a..681819da 100644
--- a/src/cmd/db/pcs.c
+++ b/src/cmd/db/pcs.c
@@ -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;
diff --git a/src/cmd/db/setup.c b/src/cmd/db/setup.c
index eaeb61f2..15a196e1 100644
--- a/src/cmd/db/setup.c
+++ b/src/cmd/db/setup.c
@@ -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)