X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/6b46907fc661bff40f4e36b563413ea83dec49c6..075c33847c8337e801279efdc328b7959215477f:/usr/src/usr.bin/tip/value.c diff --git a/usr/src/usr.bin/tip/value.c b/usr/src/usr.bin/tip/value.c index 8fea2f70a3..fd307784ad 100644 --- a/usr/src/usr.bin/tip/value.c +++ b/usr/src/usr.bin/tip/value.c @@ -1,9 +1,11 @@ -/* value.c 4.4 83/06/15 */ +#ifndef lint +static char sccsid[] = "@(#)value.c 4.5 (Berkeley) %G%"; +#endif + #include "tip.h" #define MIDDLE 35 -static char *sccsid = "@(#)value.c 4.4 %G%"; static value_t *vlookup(); static int col = 0; @@ -299,15 +301,15 @@ vstring(s,v) register value_t *p; char *expand(); - if (p = vlookup(s)) { - if (p->v_type&NUMBER) - vassign(p, atoi(v)); - else { - if (strcmp(s, "record") == 0) - v = expand(v); - vassign(p, v); - } - return(0); - } else - return(1); + p = vlookup(s); + if (p == 0) + return (1); + if (p->v_type&NUMBER) + vassign(p, atoi(v)); + else { + if (strcmp(s, "record") == 0) + v = expand(v); + vassign(p, v); + } + return (0); }