aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acid
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/acid
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
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>
Diffstat (limited to 'src/cmd/acid')
-rw-r--r--src/cmd/acid/builtin.c16
-rw-r--r--src/cmd/acid/dot.c12
-rw-r--r--src/cmd/acid/expr.c12
-rw-r--r--src/cmd/acid/lex.c6
-rw-r--r--src/cmd/acid/list.c2
-rw-r--r--src/cmd/acid/main.c4
-rw-r--r--src/cmd/acid/proc.c3
-rw-r--r--src/cmd/acid/util.c10
8 files changed, 32 insertions, 33 deletions
diff --git a/src/cmd/acid/builtin.c b/src/cmd/acid/builtin.c
index ddc326a4..be387abe 100644
--- a/src/cmd/acid/builtin.c
+++ b/src/cmd/acid/builtin.c
@@ -635,7 +635,7 @@ includepipe(Node *r, Node *args)
if(pipe(pip) < 0)
error("pipe: %r");
-
+
pid = fork();
switch(pid) {
case -1:
@@ -657,7 +657,7 @@ includepipe(Node *r, Node *args)
close(pip[1]);
pushfd(pip[0]);
-
+
isave = interactive;
interactive = 0;
r->store.u.ival = yyparse();
@@ -746,7 +746,7 @@ doaccess(Node *r, Node *args)
r->op = OCONST;
r->type = TINT;
r->store.fmt = 'D';
- r->store.u.ival = 0;
+ r->store.u.ival = 0;
if(access(res.store.u.string->string, 4) == 0)
r->store.u.ival = 1;
}
@@ -974,7 +974,7 @@ map(Node *r, Node *args)
i = findseg(m, nam, fil);
}
if(i < 0)
- error("%s %s is not a map entry", nam, fil);
+ error("%s %s is not a map entry", nam, fil);
l = l->next;
if(l->type != TINT)
error("map entry not int");
@@ -1008,7 +1008,7 @@ map(Node *r, Node *args)
}
}
-void
+void
flatten(Node **av, Node *n)
{
if(n == 0)
@@ -1086,7 +1086,7 @@ strace(Node *r, Node *args)
l = l->next;
}
regs.rw = straceregrw;
-
+
tracelist = 0;
if(stacktrace(cormap, &regs, trlist) <= 0)
error("no stack frame");
@@ -1482,7 +1482,7 @@ pcfile(Node *r, Node *args)
if(p == 0)
error("pcfile(addr): funny file %s", buf);
*p = '\0';
- r->store.u.string = strnode(buf);
+ r->store.u.string = strnode(buf);
}
void
@@ -1507,7 +1507,7 @@ pcline(Node *r, Node *args)
p = strrchr(buf, ':');
if(p == 0)
error("pcline(addr): funny file %s", buf);
- r->store.u.ival = atoi(p+1);
+ r->store.u.ival = atoi(p+1);
}
void
diff --git a/src/cmd/acid/dot.c b/src/cmd/acid/dot.c
index fd446492..80ec2d02 100644
--- a/src/cmd/acid/dot.c
+++ b/src/cmd/acid/dot.c
@@ -46,9 +46,9 @@ odot(Node *n, Node *r)
error("no tag for (expr).%s", s);
/* Propagate types */
- if(t->type)
+ if(t->type)
r->store.comt = t->type->lt;
-
+
addr = res.store.u.ival+t->offset;
if(t->fmt == 'a') {
r->op = OCONST;
@@ -56,7 +56,7 @@ odot(Node *n, Node *r)
r->type = TINT;
r->store.u.ival = addr;
}
- else
+ else
indir(cormap, addr, t->fmt, r);
}
@@ -74,7 +74,7 @@ buildtype(Node *m, int d)
switch(m->op) {
case OLIST:
- buildtype(m->left, d);
+ buildtype(m->left, d);
buildtype(m->right, d);
break;
@@ -90,7 +90,7 @@ buildtype(Node *m, int d)
t->offset = m->store.u.ival;
if(m->left) {
t->type = m->left->sym;
- t->fmt = 'a';
+ t->fmt = 'a';
}
else {
t->type = 0;
@@ -101,7 +101,7 @@ buildtype(Node *m, int d)
*tail = t;
tail = &t->next;
- }
+ }
}
void
diff --git a/src/cmd/acid/expr.c b/src/cmd/acid/expr.c
index 088b98f8..dc2f59c7 100644
--- a/src/cmd/acid/expr.c
+++ b/src/cmd/acid/expr.c
@@ -74,7 +74,7 @@ chklval(Node *lp)
if(lp->op == OCALL){
s = chklval(lp->left);
- if(strcmp(s->name, "var") == 0
+ if(strcmp(s->name, "var") == 0
&& (lp->builtin || s->proc == 0)){
if(lp->right == 0)
error("var(string): arg count");
@@ -85,7 +85,7 @@ chklval(Node *lp)
}
}
error("need l-value");
- return nil;
+ return nil;
}
void
@@ -177,7 +177,7 @@ oframe(Node *n, Node *res)
lp = n->left;
if(localaddr(cormap, acidregs, p, lp->sym->name, &ival) < 0)
error("colon: %r");
-
+
res->store.u.ival = ival;
res->op = OCONST;
res->store.fmt = 'X';
@@ -397,7 +397,7 @@ oadd(Node *n, Node *res)
if(r.type == TSTRING) {
res->type = TSTRING;
res->store.fmt = 's';
- res->store.u.string = stradd(l.store.u.string, r.store.u.string);
+ res->store.u.string = stradd(l.store.u.string, r.store.u.string);
break;
}
error("bad rhs for +");
@@ -916,7 +916,7 @@ oeinc(Node *n, Node *res)
v->store.u.ival -= fmtsize(v);
else
v->store.u.ival += fmtsize(v);
- break;
+ break;
case TFLOAT:
if(n->op == OEDEC)
v->store.u.fval--;
@@ -944,7 +944,7 @@ opinc(Node *n, Node *res)
v->store.u.ival -= fmtsize(v);
else
v->store.u.ival += fmtsize(v);
- break;
+ break;
case TFLOAT:
if(n->op == OPDEC)
v->store.u.fval--;
diff --git a/src/cmd/acid/lex.c b/src/cmd/acid/lex.c
index 19581eab..90e23f78 100644
--- a/src/cmd/acid/lex.c
+++ b/src/cmd/acid/lex.c
@@ -61,7 +61,7 @@ kinit(void)
initcmap();
- for(i = 0; keywds[i].name; i++)
+ for(i = 0; keywds[i].name; i++)
enter(keywds[i].name, keywds[i].terminal);
}
@@ -415,7 +415,7 @@ loop:
return numsym('.');
return '.';
-
+
case '(':
case ')':
case '[':
@@ -671,7 +671,7 @@ delsym(Lsym *s)
for(q = s->name; *q; q++)
h = h*3 + *q;
h %= Hashsize;
-
+
if(hash[h] == s)
hash[h] = s->hash;
else{
diff --git a/src/cmd/acid/list.c b/src/cmd/acid/list.c
index 2c26426e..af9f77ae 100644
--- a/src/cmd/acid/list.c
+++ b/src/cmd/acid/list.c
@@ -54,7 +54,7 @@ build(Node *n)
l = al(res.type);
l->store = res.store;
*tail = l;
- tail = &l->next;
+ tail = &l->next;
}
}
diff --git a/src/cmd/acid/main.c b/src/cmd/acid/main.c
index 59ae90b1..ba3ce46e 100644
--- a/src/cmd/acid/main.c
+++ b/src/cmd/acid/main.c
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
default:
usage();
}ARGEND
-
+
USED(pid);
fmtinstall('Z', Zfmt);
@@ -198,7 +198,7 @@ attachfiles(int argc, char **argv)
pid = 0;
interactive = 0;
USED(pid);
-
+
if(setjmp(err))
return -1;
diff --git a/src/cmd/acid/proc.c b/src/cmd/acid/proc.c
index e6efc95a..ff37cd5f 100644
--- a/src/cmd/acid/proc.c
+++ b/src/cmd/acid/proc.c
@@ -29,7 +29,7 @@ sproc(int xpid)
free(correg);
correg = regs;
}else{
- /* XXX should only change register set here if cormap already mapped */
+ /* XXX should only change register set here if cormap already mapped */
if(xpid <= 0)
error("bad pid");
unmapproc(cormap);
@@ -245,4 +245,3 @@ getstatus(int pid)
{
return "unknown";
}
-
diff --git a/src/cmd/acid/util.c b/src/cmd/acid/util.c
index 29db6d8b..e44cb5e2 100644
--- a/src/cmd/acid/util.c
+++ b/src/cmd/acid/util.c
@@ -40,7 +40,7 @@ unique(char *buf, Symbol *s)
if(l == 0)
l = enter(buf, Tid);
s->aux = l;
- return l;
+ return l;
}
void
@@ -122,22 +122,22 @@ addvarsym(Fhdr *fp)
tl->store.u.l = list;
list->store.u.string = strnode(buf);
list->store.fmt = 's';
-
+
list->next = al(TINT);
list = list->next;
list->store.fmt = 'c';
list->store.u.ival = s.type;
-
+
list->next = al(TINT);
list = list->next;
list->store.fmt = 'X';
list->store.u.ival = v;
-
+
list->next = al(TSTRING);
list = list->next;
list->store.fmt = 's';
list->store.u.string = file;
-
+
list->next = al(TSTRING);
list = list->next;
list->store.fmt = 's';