X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2b25184e57a5593aa326450414e239fc306bf2d2..103abacb78b3ed17dce5d47dfa65e97bf4f5377d:/sbr/fmt_scan.c diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index b76033a3..1ea5e623 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -49,24 +49,14 @@ match (char *str, char *sub) char *s1, *s2; while ((c1 = *sub)) { - c1 = (isascii((unsigned char) c1) && isalpha((unsigned char) c1) && - isupper((unsigned char) c1)) ? tolower((unsigned char) c1) : c1; - while ((c2 = *str++) && c1 != ((isascii((unsigned char) c2) && - isalpha((unsigned char) c2) && - isupper((unsigned char) c2)) ? - tolower((unsigned char) c2) : c2)) + c1 = tolower((unsigned char)c1); + while ((c2 = *str++) && c1 != tolower((unsigned char)c2)) ; if (! c2) return 0; s1 = sub + 1; s2 = str; - while ((c1 = *s1++) && ((isascii((unsigned char) c1) && - isalpha((unsigned char) c1) && - isupper((unsigned char) c1)) ? - tolower(c1) : c1) == - ((isascii((unsigned char) (c2 =*s2++)) && - isalpha((unsigned char) c2) && - isupper((unsigned char) c2)) ? - tolower((unsigned char) c2) : c2)) + while ((c1 = *s1++) && + tolower((unsigned char)c1) == tolower((unsigned char)(c2 = *s2++))) ; if (! c1) return 1; @@ -374,7 +364,7 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat, { char *sp; char *savestr, *str; - char buffer[BUFSIZ], buffer2[BUFSIZ]; + char buffer[NMH_BUFSIZ], buffer2[NMH_BUFSIZ]; int i, c, rjust; int value; time_t t;