ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/words.c
(Generate patch)

Comparing ray/src/common/words.c (file contents):
Revision 1.3 by greg, Thu Jul 25 14:36:49 1991 UTC vs.
Revision 2.3 by greg, Wed Jan 17 10:53:38 1996 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1996 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 37 | Line 37 | register char  *s;
37  
38  
39   char *
40 < sskip(s)                        /* skip word in string */
40 > sskip(s)                        /* skip word in string, leaving on space */
41   register char  *s;
42   {
43          while (isspace(*s))
# Line 49 | Line 49 | register char  *s;
49  
50  
51   char *
52 + sskip2(s, n)                    /* skip word(s) in string, leaving on word */
53 + register char  *s;
54 + register int    n;
55 + {
56 +        while (isspace(*s))
57 +                s++;
58 +        while (n-- > 0) {
59 +                while (*s && !isspace(*s))
60 +                        s++;
61 +                while (isspace(*s))
62 +                        s++;
63 +        }
64 +        return(s);
65 + }
66 +
67 +
68 + char *
69   iskip(s)                        /* skip integer in string */
70   register char  *s;
71   {
# Line 69 | Line 86 | char *
86   fskip(s)                        /* skip float in string */
87   register char  *s;
88   {
89 <        register char  *cp = s;
89 >        register char  *cp;
90  
91 <        while (isspace(*cp))
92 <                cp++;
93 <        if (*cp == '-' || *cp == '+')
94 <                cp++;
95 <        s = cp;
91 >        while (isspace(*s))
92 >                s++;
93 >        if (*s == '-' || *s == '+')
94 >                s++;
95 >        cp = s;
96          while (isdigit(*cp))
97                  cp++;
98          if (*cp == '.') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines