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 2.2 by greg, Wed Jan 10 21:04:21 1996 UTC vs.
Revision 2.3 by greg, Wed Jan 17 10:53:38 1996 UTC

# 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))
44                  s++;
45          while (*s && !isspace(*s))
46                  s++;
47 +        return(s);
48 + }
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines