Lines Matching +full:- +full:c
1 /*-
2 * Copyright (c) 1990 The Regents of the University of California.
18 /* Split from vfscanf.c */
36 register int c, n, v; in __sccl() local
39 c = *fmt++; /* first char hat => negated scanset */ in __sccl()
40 if (c == '^') in __sccl()
43 c = *fmt++; /* get new first char */ in __sccl()
50 if (c == 0) in __sccl()
51 return fmt - 1; /* format ended before closing ] */ in __sccl()
57 * The first character may be ']' (or '-') without being special; the in __sccl()
58 * last character may be '-'. in __sccl()
61 v = 1 - v; in __sccl()
64 tab[c] = v; /* take character c */ in __sccl()
71 return fmt - 1; in __sccl()
73 case '-': in __sccl()
75 * A scanset of the form [01+-] is defined as `the digit 0, the in __sccl()
76 * digit 1, the character +, the character -', but the effect of a in __sccl()
77 * scanset such as [a-zA-Z0-9] is implementation defined. The V7 in __sccl()
78 * Unix scanf treats `a-z' as `the letters a through z', but treats in __sccl()
79 * `a-a' as `the letter a, the character -, and the letter a'. in __sccl()
81 * For compatibility, the `-' is not considerd to define a range if in __sccl()
84 * stored in the table (c). in __sccl()
87 if (n == ']' || n < c) in __sccl()
89 c = '-'; in __sccl()
95 tab[++c] = v; in __sccl()
97 while (c < n); in __sccl()
101 * as [a-c-e] as `the letters a through e'. This too in __sccl()
106 c = *fmt++; in __sccl()
107 if (c == 0) in __sccl()
108 return fmt - 1; in __sccl()
109 if (c == ']') in __sccl()
120 c = n; in __sccl()