X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fpicksbr.c;h=71ae644feb76e86ce3de36196e627316ec9fea8f;hp=36ca6956c9e844621bf0e4b3d7b94b64f8c78d4e;hb=6c42153ad9362cc676ea66563bf400d7511b3b68;hpb=794dab6aa5027ffaf024506140c258f6a0a9322d diff --git a/uip/picksbr.c b/uip/picksbr.c index 36ca695..71ae644 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -3,12 +3,27 @@ * picksbr.c -- routines to help pick along... * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include -#include +#include #include +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef TM_IN_SYS_TIME +# include +# else +# include +# endif +#endif + static struct swit parswit[] = { #define PRAND 0 { "and", 0 }, @@ -679,7 +694,7 @@ plist if (*p2 == CCHR) { c = p2[1]; do { - if (*p1 == c || cc[*p1] == c) + if (*p1 == c || cc[(unsigned char)*p1] == c) if (advance (p1, p2)) return 1; } while (*p1++); @@ -704,7 +719,7 @@ advance (char *alp, char *aep) for (;;) switch (*ep++) { case CCHR: - if (*ep++ == *lp++ || ep[-1] == cc[lp[-1]]) + if (*ep++ == *lp++ || ep[-1] == cc[(unsigned char)lp[-1]]) continue; return 0; @@ -743,7 +758,7 @@ advance (char *alp, char *aep) case CCHR | STAR: curlp = lp; - while (*lp++ == *ep || cc[lp[-1]] == *ep) + while (*lp++ == *ep || cc[(unsigned char)lp[-1]] == *ep) continue; ep++; goto star;