Removed the non-LOCALE character code and the #ifdefs and simplified.
[mmh] / sbr / uprf.c
1 /*
2 ** uprf.c -- "unsigned" lexical prefix
3 **
4 ** This code is Copyright (c) 2002, by the authors of nmh.  See the
5 ** COPYRIGHT file in the root directory of the nmh distribution for
6 ** complete copyright information.
7 */
8
9 #include <h/mh.h>
10
11
12 int
13 uprf(char *c1, char *c2)
14 {
15         int c, mask;
16
17         if (!(c1 && c2))
18                 return 0;
19
20         while ((c = *c2++)) {
21                 if (tolower(c &= 0xff) != tolower(*c1 & 0xff))
22                         return 0;
23                 else
24                         c1++;
25         }
26         return 1;
27 }