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/smugfs/json.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/cmd/smugfs/json.c') diff --git a/src/cmd/smugfs/json.c b/src/cmd/smugfs/json.c index d6472b4d..c79c189c 100644 --- a/src/cmd/smugfs/json.c +++ b/src/cmd/smugfs/json.c @@ -22,7 +22,7 @@ static Json* newjval(int type) { Json *v; - + v = emalloc(sizeof *v); v->ref = 1; v->type = type; @@ -142,7 +142,7 @@ parsenumber(char **pp) double d; Json *v; - /* -?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))?([Ee][-+]?[0-9]+) */ + /* -?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))?([Ee][-+]?[0-9]+) */ p = wskip(*pp); q = p; if(*q == '-') @@ -171,7 +171,7 @@ parsenumber(char **pp) while('0' <= *q && *q <= '9') q++; } - + t = emalloc(q-p+1); memmove(t, p, q-p); t[q-p] = 0; @@ -185,7 +185,7 @@ parsenumber(char **pp) v = newjval(Jnumber); v->number = d; *pp = q; - return v; + return v; } static Json* @@ -335,7 +335,7 @@ Json* parsejson(char *text) { Json *v; - + v = parsevalue(&text); if(v && text && *wskip(text) != 0){ jclose(v); @@ -417,7 +417,7 @@ printjval(Json *v) { Fmt fmt; char buf[256]; - + fmtfdinit(&fmt, 1, buf, sizeof buf); _printjval(&fmt, v, 0); fmtprint(&fmt, "\n"); @@ -429,7 +429,7 @@ int jsonfmt(Fmt *fmt) { Json *v; - + v = va_arg(fmt->args, Json*); if(fmt->flags&FmtSharp) _printjval(fmt, v, 0); @@ -484,7 +484,7 @@ Json* jlookup(Json *v, char *name) { int i; - + if(v->type != Jobject) return nil; for(i=0; ilen; i++) @@ -498,7 +498,7 @@ jwalk(Json *v, char *path) { char elem[128], *p, *next; int n; - + for(p=path; *p && v; p=next){ next = strchr(p, '/'); if(next == nil) @@ -547,7 +547,7 @@ int jstrcmp(Json *jv, char *s) { char *t; - + t = jstring(jv); if(t == nil) return -2; -- cgit v1.2.3