From: Adam Dickmeiss Date: Mon, 3 Jan 2005 19:27:53 +0000 (+0000) Subject: Cast to unsigned char for ctype is.. compare X-Git-Tag: snippet.version.1~193 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=03ada04bea71af9a1c6b6bb2cfed660e21775fdb Cast to unsigned char for ctype is.. compare --- diff --git a/index/zrpn.c b/index/zrpn.c index 09b4509..08a2187 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.164 2004-12-10 12:37:07 heikki Exp $ +/* $Id: zrpn.c,v 1.165 2005-01-03 19:31:57 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -413,7 +413,7 @@ static int term_103(ZebraMaps zebra_maps, int reg_type, const char **src, return 0; s0 = *src; if (errors && *s0 == '+' && s0[1] && s0[2] == '+' && s0[3] && - isdigit(s0[1])) + isdigit(((const unsigned char *)s0)[1])) { *errors = s0[1] - '0'; s0 += 3; diff --git a/recctrl/marcomp.c b/recctrl/marcomp.c index d529d98..23b4044 100644 --- a/recctrl/marcomp.c +++ b/recctrl/marcomp.c @@ -1,5 +1,5 @@ /* - $Id: marcomp.c,v 1.4 2004-12-13 20:51:32 adam Exp $ + $Id: marcomp.c,v 1.5 2005-01-03 19:27:53 adam Exp $ marcomp.c - compiler of MARC statements. */ @@ -88,7 +88,8 @@ mc_token mc_gettoken(mc_context *c) case '[': c->crrtok = LINTERVAL; break; case ']': c->crrtok = RINTERVAL; break; default: - if (isspace(*(c->data+c->offset)) || *(c->data+c->offset) == '\n') + if (isspace(*(unsigned char *) (c->data+c->offset)) + || *(c->data+c->offset) == '\n') { c->crrtok = NOP; } diff --git a/recctrl/marcread.c b/recctrl/marcread.c index 48d7437..68bc7b2 100644 --- a/recctrl/marcread.c +++ b/recctrl/marcread.c @@ -1,4 +1,4 @@ -/* $Id: marcread.c,v 1.28 2004-12-13 20:51:32 adam Exp $ +/* $Id: marcread.c,v 1.29 2005-01-03 19:27:53 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -652,7 +652,7 @@ static int is_empty(char *s) for (p = s; *p; p++) { - if (!isspace(*p)) + if (!isspace(*(unsigned char *)p)) return 0; } return 1;