X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fnormalize7bit.c;fp=src%2Fnormalize7bit.c;h=e4efb47cef4ae77196352938d7163808a96bd84d;hb=dbfdc896b3613efda66ca9ddcbf9863ee2e8817e;hp=f400d937c46d15dcc4c85d17479310f6557ff2a6;hpb=5a8e7cac48386b731dc24e38619197075db96cbf;p=pazpar2-moved-to-github.git diff --git a/src/normalize7bit.c b/src/normalize7bit.c index f400d93..e4efb47 100644 --- a/src/normalize7bit.c +++ b/src/normalize7bit.c @@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA /** \brief removes leading whitespace.. Removes suffix cahrs in rm_chars */ char * normalize7bit_generic(char * str, const char * rm_chars) { - char *p, *pe; + unsigned char *p, *pe; for (p = str; *p && isspace(*p); p++) ; for (pe = p + strlen(p) - 1; @@ -48,7 +48,7 @@ char * normalize7bit_generic(char * str, const char * rm_chars) char * normalize7bit_mergekey(char *buf, int skiparticle) { - char *p = buf, *pout = buf; + unsigned char *p = buf, *pout = buf; if (skiparticle) { @@ -99,10 +99,10 @@ int extract7bit_dates(const char *buf, int *first, int *last, int longdate) const char *e; int len; - while (*buf && !isdigit(*buf)) + while (*buf && !isdigit(*(unsigned char *)buf)) buf++; len = 0; - for (e = buf; *e && isdigit(*e); e++) + for (e = buf; *e && isdigit(*(unsigned char *)e); e++) len++; if ((len == 4 && !longdate) || (longdate && len >= 4 && len <= 8)) {