From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: 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 --- src/cmd/acme/acme.c | 129 +++++++++++++++++++++++----------------------- src/cmd/acme/cols.c | 12 ++--- src/cmd/acme/ecmd.c | 8 +-- src/cmd/acme/edit.c | 4 +- src/cmd/acme/elog.c | 4 +- src/cmd/acme/fsys.c | 2 +- src/cmd/acme/logf.c | 16 +++--- src/cmd/acme/mail/dat.h | 1 - src/cmd/acme/mail/html.c | 2 +- src/cmd/acme/mail/mail.c | 15 +++--- src/cmd/acme/mail/mesg.c | 16 +++--- src/cmd/acme/mail/reply.c | 8 +-- src/cmd/acme/mail/util.c | 1 - src/cmd/acme/mail/win.c | 2 +- src/cmd/acme/text.c | 22 ++++---- src/cmd/acme/util.c | 4 +- src/cmd/acme/wind.c | 16 +++--- 17 files changed, 129 insertions(+), 133 deletions(-) (limited to 'src/cmd/acme') diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c index 12701f23..e5658a4e 100644 --- a/src/cmd/acme/acme.c +++ b/src/cmd/acme/acme.c @@ -968,69 +968,69 @@ Cursor boxcursor = { Cursor2 boxcursor2 = { {-15, -15}, - {0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xC0, 0x03, 0xFF, - 0xFF, 0xC0, 0x03, 0xFF, - 0xFF, 0xC0, 0x03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0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0x00, 0x00, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x3F, 0xFF, 0xFF, 0xFC, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; @@ -1047,7 +1047,7 @@ iconinit(void) tagcols[BORD] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPurpleblue); tagcols[TEXT] = display->black; tagcols[HTEXT] = display->black; - + /* Yellow */ textcols[BACK] = allocimagemix(display, DPaleyellow, DWhite); textcols[HIGH] = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DDarkyellow); @@ -1055,7 +1055,7 @@ iconinit(void) textcols[TEXT] = display->black; textcols[HTEXT] = display->black; } - + r = Rect(0, 0, Scrollwid+ButtonBorder, font->height+1); if(button && eqrect(r, button->r)) return; @@ -1169,4 +1169,3 @@ timefmt(Fmt *f) return fmtprint(f, "%04d/%02d/%02d %02d:%02d:%02d", tm->year+1900, tm->mon+1, tm->mday, tm->hour, tm->min, tm->sec); } - diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 6215e044..63c33ac1 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -89,19 +89,19 @@ coladd(Column *c, Window *w, Window *clone, int y) /* * figure out where to split v to make room for w */ - + /* new window stops where next window begins */ if(i < c->nw) ymax = c->w[i]->r.min.y-Border; else ymax = c->r.max.y; - + /* new window must start after v's tag ends */ y = max(y, v->tagtop.max.y+Border); - + /* new window must start early enough to end before ymax */ y = min(y, ymax - minht); - + /* if y is too small, too many windows in column */ if(y < v->tagtop.max.y+Border) buggered = 1; @@ -118,7 +118,7 @@ coladd(Column *c, Window *w, Window *clone, int y) r1.min.y = winresize(v, r1, FALSE, FALSE); r1.max.y = r1.min.y+Border; draw(screen, r1, display->black, nil, ZP); - + /* * leave r with w's coordinates */ @@ -142,7 +142,7 @@ coladd(Column *c, Window *w, Window *clone, int y) c->nw++; c->w[i] = w; c->safe = TRUE; - + /* if there were too many windows, redraw the whole column */ if(buggered) colresize(c, c->r); diff --git a/src/cmd/acme/ecmd.c b/src/cmd/acme/ecmd.c index ef92e339..75cf710f 100644 --- a/src/cmd/acme/ecmd.c +++ b/src/cmd/acme/ecmd.c @@ -633,8 +633,8 @@ runpipe(Text *t, int cmd, Rune *cr, int ncr, int state) /* * The editoutlk exists only so that we can tell when * the editout file has been closed. It can get closed *after* - * the process exits because, since the process cannot be - * connected directly to editout (no 9P kernel support), + * the process exits because, since the process cannot be + * connected directly to editout (no 9P kernel support), * the process is actually connected to a pipe to another * process (arranged via 9pserve) that reads from the pipe * and then writes the data in the pipe to editout using @@ -704,7 +704,7 @@ printposn(Text *t, int mode) if (t != nil && t->file != nil && t->file->name != nil) warning(nil, "%.*S:", t->file->nname, t->file->name); - + switch(mode) { case PosnChars: warning(nil, "#%d", addr.r.q0); @@ -712,7 +712,7 @@ printposn(Text *t, int mode) warning(nil, ",#%d", addr.r.q1); warning(nil, "\n"); return; - + default: case PosnLine: l1 = 1+nlcount(t, 0, addr.r.q0, nil); diff --git a/src/cmd/acme/edit.c b/src/cmd/acme/edit.c index d3f82059..81f80300 100644 --- a/src/cmd/acme/edit.c +++ b/src/cmd/acme/edit.c @@ -515,7 +515,7 @@ parsecmd(int nest) if(nextc() == 'g') cmd.flag = getch(); } - + } } } @@ -613,7 +613,7 @@ simpleaddr(void) addr.num = getnum(1); break; case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': + case '5': case '6': case '7': case '8': case '9': addr.num = getnum(1); addr.type='l'; break; diff --git a/src/cmd/acme/elog.c b/src/cmd/acme/elog.c index c5650f03..8a8951fb 100644 --- a/src/cmd/acme/elog.c +++ b/src/cmd/acme/elog.c @@ -243,7 +243,7 @@ elogapply(File *f) * but using coordinates relative to the unmodified buffer. As we apply the log, * we have to update the coordinates to be relative to the modified buffer. * Textinsert and textdelete will do this for us; our only work is to apply the - * convention that an insertion at t->q0==t->q1 is intended to select the + * convention that an insertion at t->q0==t->q1 is intended to select the * inserted text. */ @@ -337,7 +337,7 @@ elogapply(File *f) } fbuffree(buf); elogterm(f); - + /* * Bad addresses will cause bufload to crash, so double check. * If changes were out of order, we expect problems so don't complain further. diff --git a/src/cmd/acme/fsys.c b/src/cmd/acme/fsys.c index 4c395eb2..d9d4b30d 100644 --- a/src/cmd/acme/fsys.c +++ b/src/cmd/acme/fsys.c @@ -463,7 +463,7 @@ fsyswalk(Xfid *x, Fid *f) qunlock(&row.lk); dir = dirtabw; goto Accept; - + Regular: if(strcmp(x->fcall.wname[i], "new") == 0){ if(w) diff --git a/src/cmd/acme/logf.c b/src/cmd/acme/logf.c index 567b8383..562026c9 100644 --- a/src/cmd/acme/logf.c +++ b/src/cmd/acme/logf.c @@ -20,7 +20,7 @@ struct Log Rendez r; vlong start; // msg[0] corresponds to 'start' in the global sequence of events - + // queued events (nev=entries in ev, mev=capacity of p) char **ev; int nev; @@ -30,7 +30,7 @@ struct Log Fid **f; int nf; int mf; - + // active (blocked) reads waiting for events Xfid **read; int nread; @@ -43,7 +43,7 @@ void xfidlogopen(Xfid *x) { qlock(&eventlog.lk); - if(eventlog.nf >= eventlog.mf) { + if(eventlog.nf >= eventlog.mf) { eventlog.mf = eventlog.mf*2; if(eventlog.mf == 0) eventlog.mf = 8; @@ -78,20 +78,20 @@ xfidlogread(Xfid *x) Fcall fc; qlock(&eventlog.lk); - if(eventlog.nread >= eventlog.mread) { + if(eventlog.nread >= eventlog.mread) { eventlog.mread = eventlog.mread*2; if(eventlog.mread == 0) eventlog.mread = 8; eventlog.read = erealloc(eventlog.read, eventlog.mread*sizeof eventlog.read[0]); } eventlog.read[eventlog.nread++] = x; - + if(eventlog.r.l == nil) eventlog.r.l = &eventlog.lk; x->flushed = FALSE; while(x->f->logoff >= eventlog.start+eventlog.nev && !x->flushed) rsleep(&eventlog.r); - + for(i=0; i= eventlog.mev) { eventlog.mev = eventlog.mev*2; diff --git a/src/cmd/acme/mail/dat.h b/src/cmd/acme/mail/dat.h index a7ac6a0b..66bb3a5d 100644 --- a/src/cmd/acme/mail/dat.h +++ b/src/cmd/acme/mail/dat.h @@ -178,4 +178,3 @@ extern int shortmenu; extern CFsys *mailfs; extern CFsys *acmefs; - diff --git a/src/cmd/acme/mail/html.c b/src/cmd/acme/mail/html.c index e3a956b0..e193fc4d 100644 --- a/src/cmd/acme/mail/html.c +++ b/src/cmd/acme/mail/html.c @@ -67,7 +67,7 @@ char* readbody(char *type, char *dir, int *np) { char *body; - + body = readfile(dir, "body", np); if(body != nil && strcmp(type, "text/html") == 0) return formathtml(body, np); diff --git a/src/cmd/acme/mail/mail.c b/src/cmd/acme/mail/mail.c index d79721f8..e1047bb8 100644 --- a/src/cmd/acme/mail/mail.c +++ b/src/cmd/acme/mail/mail.c @@ -558,16 +558,16 @@ mainctl(void *v) Unknown: print("unknown message %c%c\n", e->c1, e->c2); break; - + case 'E': /* write to body; can't affect us */ break; - + case 'F': /* generated by our actions; ignore */ break; - + case 'K': /* type away; we don't care */ break; - + case 'M': switch(e->c2){ case 'x': @@ -597,7 +597,7 @@ mainctl(void *v) if(na) free(s); break; - + case 'l': case 'L': buf = nil; @@ -628,17 +628,16 @@ mainctl(void *v) winwriteevent(w, e); free(buf); break; - + case 'I': /* modify away; we don't care */ case 'D': case 'd': case 'i': break; - + default: goto Unknown; } } } } - diff --git a/src/cmd/acme/mail/mesg.c b/src/cmd/acme/mail/mesg.c index 9bfe10e1..739ce10a 100644 --- a/src/cmd/acme/mail/mesg.c +++ b/src/cmd/acme/mail/mesg.c @@ -85,7 +85,7 @@ mkaddrs(char *t, char **colon) int i, nf, inquote; char **f, *s; Fmt fmt; - + inquote = 0; nf = 2; for(s=t; *s; s++){ @@ -127,7 +127,7 @@ loadinfo(Message *m, char *dir) data = readfile(dir, "info", &n); if(data == nil) return 0; - + p = data; while((s = line(p, &p)) != nil && *s != 0){ t = strchr(s, ' '); @@ -282,7 +282,7 @@ mesgadd(Message *mbox, char *dir, Dir *d, char *digest) if (m->level != 1){ m->recursed = 1; - readmbox(m, dir, m->name); + readmbox(m, dir, m->name); } return 1; } @@ -351,7 +351,7 @@ readfile(char *dir, char *name, int *np) fsseek(fid, 0, 0); free(d); d = fsdirfstat(fid); - } + } free(file); len = 0; if(d != nil) @@ -400,13 +400,13 @@ info(Message *m, int ind, int ogf) i = estrdup(s); return i; - } + } i = estrdup(""); i = eappend(i, "\t", p); i = egrow(i, "\t", stripdate(m->date)); if(ind == 0){ - if(strcmp(m->type, "text")!=0 && strncmp(m->type, "text/", 5)!=0 && + if(strcmp(m->type, "text")!=0 && strncmp(m->type, "text/", 5)!=0 && strncmp(m->type, "multipart/", 10)!=0) i = egrow(i, "\t(", estrstrdup(m->type, ")")); }else if(strncmp(m->type, "multipart/", 10) != 0) @@ -647,7 +647,7 @@ mesgsave(Message *m, char *s, int save) } return 1; } - + t = estrstrdup(mbox.name, m->name); raw = readfile(t, "raw", &n); unixheader = readfile(t, "unixheader", &k); @@ -1160,7 +1160,7 @@ tokenizec(char *str, char **args, int max, char *splitc) if(max <= 0) return 0; - + /* if(strchr(str, ',') || strchr(str, '"') || strchr(str, '<') || strchr(str, '(')) */ /* splitc = ","; */ for(na=0; *str != '\0';str++){ diff --git a/src/cmd/acme/mail/reply.c b/src/cmd/acme/mail/reply.c index 5dda0edc..f28cbef1 100644 --- a/src/cmd/acme/mail/reply.c +++ b/src/cmd/acme/mail/reply.c @@ -78,7 +78,7 @@ mkreply(Message *m, char *label, char *to, Plumbattr *attr, char *quotetext) Plumbattr *a; quotereply = (label[0] == 'Q'); - + if(quotereply && m && m->replywinid > 0){ snprint(buf, sizeof buf, "%d/body", m->replywinid); if((fd = fsopen(acmefs, buf, OWRITE)) != nil){ @@ -88,7 +88,7 @@ mkreply(Message *m, char *label, char *to, Plumbattr *attr, char *quotetext) return; } } - + r = emalloc(sizeof(Message)); r->isreply = 1; if(m != nil) @@ -212,7 +212,7 @@ execproc(void *v) q[0] = e->q[0]; q[1] = e->q[1]; prog = e->prog; /* known not to be malloc'ed */ - + fd[0] = dup(p[0], -1); if(q[0]) fd[1] = dup(q[1], -1); @@ -224,7 +224,7 @@ execproc(void *v) free(e->argv); chanfree(e->sync); free(e); - + threadexec(nil, fd, prog, argv); close(fd[0]); close(fd[1]); diff --git a/src/cmd/acme/mail/util.c b/src/cmd/acme/mail/util.c index 888e7e72..8ac9f946 100644 --- a/src/cmd/acme/mail/util.c +++ b/src/cmd/acme/mail/util.c @@ -104,4 +104,3 @@ ctlprint(CFid *fd, char *fmt, ...) if(n <= 0) error("control file write error: %r"); } - diff --git a/src/cmd/acme/mail/win.c b/src/cmd/acme/mail/win.c index 84c9cee0..1cf776dd 100644 --- a/src/cmd/acme/mail/win.c +++ b/src/cmd/acme/mail/win.c @@ -196,7 +196,7 @@ wingeter(Window *w, char *buf, int *nb) while(!fullrune(buf, n)) buf[n++] = wingetec(w); chartorune(&r, buf); - } + } *nb = n; return r; } diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index 8ff5884d..09422dda 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -388,7 +388,7 @@ textinsert(Text *t, uint q0, Rune *r, uint n, int tofile) textscrdraw(u); } } - + } if(q0 < t->iq1) t->iq1 += n; @@ -549,7 +549,7 @@ textbswidth(Text *t, Rune c) if(r == '\n'){ /* eat at most one more character */ if(q == t->q0) /* eat the newline */ --q; - break; + break; } if(c == 0x17){ eq = isalnum(r); @@ -771,7 +771,7 @@ texttype(Text *t, Rune r) case Kcmd+'Z': /* %-shift-Z: redo */ typecommit(t); undo(t, nil, nil, FALSE, 0, nil, 0); - return; + return; Tagdown: /* expand tag to show all text */ @@ -780,7 +780,7 @@ texttype(Text *t, Rune r) winresize(t->w, t->w->r, FALSE, TRUE); } return; - + Tagup: /* shrink tag to single line */ if(t->w->tagexpand){ @@ -1192,7 +1192,7 @@ void textsetselect(Text *t, uint q0, uint q1) { int p0, p1, ticked; - + /* t->fr.p0 and t->fr.p1 are always right; t->q0 and t->q1 may be off */ t->q0 = q0; t->q1 = q1; @@ -1345,7 +1345,7 @@ textselect23(Text *t, uint *q0, uint *q1, Image *high, int mask) { uint p0, p1; int buts; - + p0 = xselect(&t->fr, mousectl, high, &p1); buts = mousectl->m.buttons; if((buts & mask) == 0){ @@ -1412,7 +1412,7 @@ textdoubleclick(Text *t, uint *q0, uint *q1) if(textclickhtmlmatch(t, q0, q1)) return; - + for(i=0; left[i]!=nil; i++){ q = *q0; l = left[i]; @@ -1444,7 +1444,7 @@ textdoubleclick(Text *t, uint *q0, uint *q1) return; } } - + /* try filling out word to right */ while(*q1file->b.nc && isalnum(textreadc(t, *q1))) (*q1)++; @@ -1518,7 +1518,7 @@ static int ishtmlend(Text *t, uint q, uint *q0) { int c, c1, c2; - + if(q < 2) return 0; if(textreadc(t, --q) != '>') @@ -1546,7 +1546,7 @@ textclickhtmlmatch(Text *t, uint *q0, uint *q1) { int depth, n; uint q, nq; - + q = *q0; // after opening tag? scan forward for closing tag if(ishtmlend(t, q, nil) == 1) { @@ -1583,7 +1583,7 @@ textclickhtmlmatch(Text *t, uint *q0, uint *q1) q--; } } - + return 0; } diff --git a/src/cmd/acme/util.c b/src/cmd/acme/util.c index dc978095..c153f8c1 100644 --- a/src/cmd/acme/util.c +++ b/src/cmd/acme/util.c @@ -132,7 +132,7 @@ errorwin(Mntdir *md, int owner) } /* - * Incoming window should be locked. + * Incoming window should be locked. * It will be unlocked and returned window * will be locked in its place. */ @@ -189,7 +189,7 @@ void addwarningtext(Mntdir *md, Rune *r, int nr) { Warning *warn; - + for(warn = warnings; warn; warn=warn->next){ if(warn->md == md){ bufinsert(&warn->buf, warn->buf.nc, r, nr); diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c index b4f1a1cb..820955b0 100644 --- a/src/cmd/acme/wind.c +++ b/src/cmd/acme/wind.c @@ -97,7 +97,7 @@ windrawbutton(Window *w) { Image *b; Rectangle br; - + b = button; if(!w->isdir && !w->isscratch && (w->body.file->mod || w->body.ncache)) b = modbutton; @@ -112,7 +112,7 @@ delrunepos(Window *w) { int n; Rune rune; - + for(n=0; ntag.file->b.nc; n++) { bufread(&w->tag.file->b, n, &rune, 1); if(rune == ' ') @@ -128,7 +128,7 @@ void movetodel(Window *w) { int n; - + n = delrunepos(w); if(n < 0) return; @@ -153,7 +153,7 @@ wintaglines(Window *w, Rectangle r) textresize(&w->tag, r, TRUE); w->tag.fr.noredraw = 0; w->tagsafe = FALSE; - + if(!w->tagexpand) { /* use just as many lines as needed to show the Del */ n = delrunepos(w); @@ -162,7 +162,7 @@ wintaglines(Window *w, Rectangle r) p = subpt(frptofchar(&w->tag.fr, n), w->tag.fr.r.min); return 1 + p.y / w->tag.fr.font->height; } - + /* can't use more than we have */ if(w->tag.fr.nlines >= w->tag.fr.maxlines) return w->tag.fr.maxlines; @@ -224,7 +224,7 @@ winresize(Window *w, Rectangle r, int safe, int keepextra) moveto(mousectl, p); } } - + /* If needed, resize & redraw body. */ r1 = r; r1.min.y = y; @@ -293,7 +293,7 @@ winunlock(Window *w) void winmousebut(Window *w) { - moveto(mousectl, addpt(w->tag.scrollr.min, + moveto(mousectl, addpt(w->tag.scrollr.min, divpt(Pt(Dx(w->tag.scrollr), font->height), 2))); } @@ -673,7 +673,7 @@ winctlprint(Window *w, char *buf, int fonts) sprint(buf, "%11d %11d %11d %11d %11d ", w->id, w->tag.file->b.nc, w->body.file->b.nc, w->isdir, w->dirty); if(fonts) - return smprint("%s%11d %q %11d ", buf, Dx(w->body.fr.r), + return smprint("%s%11d %q %11d ", buf, Dx(w->body.fr.r), w->body.reffont->f->name, w->body.fr.maxtab); return buf; } -- cgit v1.2.3