Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / sbr / RCS / uleq.c,v
1 head    1.7;
2 access;
3 symbols;
4 locks; strict;
5 comment @ * @;
6
7
8 1.7
9 date    92.12.15.00.20.22;      author jromine; state Exp;
10 branches;
11 next    1.6;
12
13 1.6
14 date    92.10.26.22.55.49;      author jromine; state Exp;
15 branches;
16 next    1.5;
17
18 1.5
19 date    90.04.05.15.32.33;      author sources; state Exp;
20 branches;
21 next    1.4;
22
23 1.4
24 date    90.04.05.14.50.10;      author sources; state Exp;
25 branches;
26 next    1.3;
27
28 1.3
29 date    90.04.02.15.07.17;      author sources; state Exp;
30 branches;
31 next    1.2;
32
33 1.2
34 date    90.04.02.14.40.32;      author sources; state Exp;
35 branches;
36 next    1.1;
37
38 1.1
39 date    90.04.02.14.40.13;      author sources; state Exp;
40 branches;
41 next    ;
42
43
44 desc
45 @@
46
47
48 1.7
49 log
50 @endif sugar
51 @
52 text
53 @/* uleq.c - "unsigned" lexical compare */
54 #ifndef lint
55 static char ident[] = "@@(#)$Id: uleq.c,v 1.6 1992/10/26 22:55:49 jromine Exp jromine $";
56 #endif  /* lint */
57
58 #define TO_LOWER 040
59 #define NO_MASK  000
60 #include <ctype.h>
61
62 uleq (c1, c2)
63 register char  *c1,
64                *c2;
65 {
66     register int    c,
67                     mask;
68
69     if (!c1)
70         c1 = "";
71     if (!c2)
72         c2 = "";
73
74     while (c = *c1++)
75     {
76 #ifdef LOCALE
77         c &= 0xff;
78         mask = *c2 & 0xff;
79         c = (isalpha(c) && isupper(c)) ? tolower(c) : c;
80         mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask;
81         if (c != mask)
82 #else
83         mask = (isalpha(c) && isalpha(*c2)) ?  TO_LOWER : NO_MASK;
84         if ((c | mask) != (*c2 | mask))
85 #endif
86             return 0;
87         else
88             c2++;
89     }
90     return (*c2 == 0);
91 }
92 @
93
94
95 1.6
96 log
97 @LOCALE
98 @
99 text
100 @d3 2
101 a4 2
102 static char ident[] = "@@(#)$Id: uleq.c,v 1.5 1990/04/05 15:32:33 sources Exp jromine $";
103 #endif  lint
104 @
105
106
107 1.5
108 log
109 @add ID
110 @
111 text
112 @d3 1
113 a3 1
114 static char ident[] = "@@(#)$Id:$";
115 d24 7
116 d33 1
117 @
118
119
120 1.4
121 log
122 @add ID
123 @
124 text
125 @d3 1
126 a3 1
127 static char ident[] = "$Id:";
128 @
129
130
131 1.3
132 log
133 @typo
134 @
135 text
136 @d2 3
137 @
138
139
140 1.2
141 log
142 @RAND fixes
143 @
144 text
145 @d3 1
146 a3 1
147 #define TO_UPPER 040
148 d11 2
149 a12 1
150     register int    c;
151 d21 1
152 a21 1
153         mask = (isalpha(c) && isalpha(*c2)) ?  TO_UPPER : NO_MASK;
154 @
155
156
157 1.1
158 log
159 @Initial revision
160 @
161 text
162 @d3 3
163 d19 3
164 a21 1
165         if ((c | 040) != (*c2 | 040))
166 d25 1
167 @