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/sam/cmd.c | 4 ++-- src/cmd/sam/mesg.c | 4 ++-- src/cmd/sam/mesg.h | 18 +++++++++--------- src/cmd/sam/moveto.c | 1 - src/cmd/sam/plumb.h | 1 - src/cmd/sam/rasp.c | 1 - src/cmd/sam/sam.c | 2 +- src/cmd/sam/unix.c | 18 ++++++++---------- 8 files changed, 22 insertions(+), 27 deletions(-) (limited to 'src/cmd/sam') diff --git a/src/cmd/sam/cmd.c b/src/cmd/sam/cmd.c index 12510689..386fe8d4 100644 --- a/src/cmd/sam/cmd.c +++ b/src/cmd/sam/cmd.c @@ -446,7 +446,7 @@ parsecmd(int nest) if(nextc() == 'g') cmd.flag = getch(); } - + } } } @@ -537,7 +537,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/sam/mesg.c b/src/cmd/sam/mesg.c index d9dd42ac..2899f28e 100644 --- a/src/cmd/sam/mesg.c +++ b/src/cmd/sam/mesg.c @@ -615,7 +615,7 @@ vlong invlong(void) { vlong v; - + v = (inp[7]<<24) | (inp[6]<<16) | (inp[5]<<8) | inp[4]; v = (v<<16) | (inp[3]<<8) | inp[2]; v = (v<<16) | (inp[1]<<8) | inp[0]; @@ -778,7 +778,7 @@ void outshort(int s) { *outp++ = s; - *outp++ = s>>8; + *outp++ = s>>8; } void diff --git a/src/cmd/sam/mesg.h b/src/cmd/sam/mesg.h index 23441499..0acf861c 100644 --- a/src/cmd/sam/mesg.h +++ b/src/cmd/sam/mesg.h @@ -79,27 +79,27 @@ typedef struct Header{ /* * File transfer protocol schematic, a la Holzmann * #define N 6 - * + * * chan h = [4] of { mtype }; * chan t = [4] of { mtype }; - * + * * mtype = { Hgrow, Hdata, * Hcheck, Hcheck0, * Trequest, Tcheck, * }; - * + * * active proctype host() * { byte n; - * + * * do * :: n < N -> n++; t!Hgrow * :: n == N -> n++; t!Hcheck0 - * + * * :: h?Trequest -> t!Hdata * :: h?Tcheck -> t!Hcheck * od * } - * + * * active proctype term() * { * do @@ -118,14 +118,14 @@ typedef struct Header{ * From: gerard@research.bell-labs.com * Date: Tue Jul 17 13:47:23 EDT 2001 * To: rob@research.bell-labs.com - * + * * spin -c (or -a) spec * pcc -DNP -o pan pan.c * pan -l - * + * * proves that there are no non-progress cycles * (infinite executions *not* passing through * the statement marked with a label starting * with the prefix "progress") - * + * */ diff --git a/src/cmd/sam/moveto.c b/src/cmd/sam/moveto.c index 94fad3e7..68207cd6 100644 --- a/src/cmd/sam/moveto.c +++ b/src/cmd/sam/moveto.c @@ -170,4 +170,3 @@ doubleclick(File *f, Posn p1) while(--p >= 0 && alnum(filereadc(f, p))) f->dot.r.p1--; } - diff --git a/src/cmd/sam/plumb.h b/src/cmd/sam/plumb.h index d376acd0..f1158621 100644 --- a/src/cmd/sam/plumb.h +++ b/src/cmd/sam/plumb.h @@ -14,4 +14,3 @@ char *plumbunpackattr(char*); char *plumbpack(Plumbmsg *, int *); int plumbfree(Plumbmsg *); char *cleanname(char*); - diff --git a/src/cmd/sam/rasp.c b/src/cmd/sam/rasp.c index 0bce4141..c96101df 100644 --- a/src/cmd/sam/rasp.c +++ b/src/cmd/sam/rasp.c @@ -337,4 +337,3 @@ rdata(List *r, Posn p1, Posn n) } return rg; } - diff --git a/src/cmd/sam/sam.c b/src/cmd/sam/sam.c index f180290b..84e015f5 100644 --- a/src/cmd/sam/sam.c +++ b/src/cmd/sam/sam.c @@ -44,7 +44,7 @@ main(int _argc, char **_argv) char **volatile argv; String *t; char *termargs[10], **ap; - + argc = _argc; argv = _argv; ap = termargs; diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c index a745a5bc..97f2fce8 100644 --- a/src/cmd/sam/unix.c +++ b/src/cmd/sam/unix.c @@ -10,7 +10,7 @@ #include "sam.h" Rune samname[] = { '~', '~', 's', 'a', 'm', '~', '~', 0 }; - + static Rune l1[] = { '{', '[', '(', '<', 0253, 0}; static Rune l2[] = { '\n', 0}; static Rune l3[] = { '\'', '"', '`', 0}; @@ -85,15 +85,15 @@ getuser(void) return user; } -int -statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly) +int +statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly) { struct stat dirb; if (stat(name, &dirb) == -1) return -1; if (dev) - *dev = dirb.st_dev; + *dev = dirb.st_dev; if (id) *id = dirb.st_ino; if (time) @@ -110,11 +110,11 @@ statfd(int fd, ulong *dev, uvlong *id, long *time, long *length, long *appendonl { struct stat dirb; - if (fstat(fd, &dirb) == -1) + if (fstat(fd, &dirb) == -1) return -1; if (dev) *dev = dirb.st_dev; - if (id) + if (id) *id = dirb.st_ino; if (time) *time = dirb.st_mtime; @@ -174,11 +174,11 @@ tempdisk(void) int fd = temp_file(buf, sizeof buf); if (fd >= 0) remove(buf); - return fd; + return fd; } #undef waitfor -int +int samwaitfor(int pid) { int r; @@ -218,5 +218,3 @@ erealloc(void *p, ulong n) panic("realloc fails"); return p; } - - -- cgit v1.2.3