aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/nfs/sx.c
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
commit02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch)
treef053238978479e408a2b83571443e132f30586ab /src/cmd/upas/nfs/sx.c
parentc0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff)
parent3d1382b98a502d0c34d5ba2c462396acc515016e (diff)
downloadplan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip
Merge remote-tracking branch 'upstream/master'
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;
}