aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/nfs/sx.c
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/upas/nfs/sx.c
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/upas/nfs/sx.c')
-rw-r--r--src/cmd/upas/nfs/sx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cmd/upas/nfs/sx.c b/src/cmd/upas/nfs/sx.c
index 65d338c2..55e2934e 100644
--- a/src/cmd/upas/nfs/sx.c
+++ b/src/cmd/upas/nfs/sx.c
@@ -7,7 +7,7 @@ Brdsx(Biobuf *b)
{
Sx **sx, *x;
int nsx;
-
+
nsx = 0;
sx = nil;
while((x = Brdsx1(b)) != nil){
@@ -21,11 +21,11 @@ Brdsx(Biobuf *b)
return x;
}
-int
+int
sxwalk(Sx *sx)
{
int i, n;
-
+
if(sx == nil)
return 1;
switch(sx->type){
@@ -46,7 +46,7 @@ void
freesx(Sx *sx)
{
int i;
-
+
if(sx == nil)
return;
switch(sx->type){
@@ -70,7 +70,7 @@ Brdsx1(Biobuf *b)
char *s;
vlong n;
Sx *x;
-
+
c = Bgetc(b);
if(c == ' ')
c = Bgetc(b);
@@ -144,7 +144,7 @@ Brdsx1(Biobuf *b)
s = emalloc(1);
s[0] = c;
nbr = 0;
- while((c = Bgetc(b)) >= 0 && c > ' ' && !strchr("(){}", c)){
+ while((c = Bgetc(b)) >= 0 && c > ' ' && !strchr("(){}", c)){
/* allow embedded brackets as in BODY[] */
if(c == '['){
if(s[0] == '[')
@@ -169,7 +169,7 @@ Brdsx1(Biobuf *b)
x->type = SxAtom;
x->data = s;
x->ndata = len;
- return x;
+ return x;
}
int
@@ -177,7 +177,7 @@ sxfmt(Fmt *fmt)
{
int i, paren;
Sx *sx;
-
+
sx = va_arg(fmt->args, Sx*);
if(sx == nil)
return 0;
@@ -211,7 +211,7 @@ sxfmt(Fmt *fmt)
int
oksx(Sx *sx)
{
- return sx->nsx >= 2
- && sx->sx[1]->type == SxAtom
+ return sx->nsx >= 2
+ && sx->sx[1]->type == SxAtom
&& cistrcmp(sx->sx[1]->data, "OK") == 0;
}