optimize for C source code
[idzebra-moved-to-github.git] / recctrl / marcomp.c
index 0edbdf3..23b4044 100644 (file)
@@ -1,11 +1,12 @@
 /*
-    $Id: marcomp.c,v 1.1 2003-02-28 12:33:39 oleg Exp $
+    $Id: marcomp.c,v 1.5 2005-01-03 19:27:53 adam Exp $
 
     marcomp.c - compiler of MARC statements.
 */
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <ctype.h>
 
 #include <yaz/yaz-util.h>
@@ -87,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;
            }