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

@ -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

View file

@ -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

View file

@ -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--;

View file

@ -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{

View file

@ -54,7 +54,7 @@ build(Node *n)
l = al(res.type);
l->store = res.store;
*tail = l;
tail = &l->next;
tail = &l->next;
}
}

View file

@ -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;

View file

@ -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";
}

View file

@ -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';