* Europagate, 1995
*
* $Log: ccltoken.c,v $
- * Revision 1.7 1995/04/19 12:11:24 adam
+ * Revision 1.8 1995/05/11 14:03:57 adam
+ * Changes in the reading of qualifier(s). New function: ccl_qual_fitem.
+ * New variable ccl_case_sensitive, which controls whether reserved
+ * words and field names are case sensitive or not.
+ *
+ * Revision 1.7 1995/04/19 12:11:24 adam
* Minor change.
*
* Revision 1.6 1995/04/17 09:31:48 adam
const char *ccl_token_or = "or";
const char *ccl_token_not = "not andnot";
const char *ccl_token_set = "set";
+int ccl_case_sensitive = 1;
/*
* token_cmp: Compare token with keyword(s)
return 0;
while ((cp2 = strchr (cp1, ' ')))
{
- if (token->len == cp2-cp1 &&
- !memcmp (cp1, token->name, token->len))
- return 1;
+ if (token->len == cp2-cp1)
+ if (ccl_case_sensitive)
+ {
+ if (!memcmp (cp1, token->name, token->len))
+ return 1;
+ }
+ else
+ {
+ if (!ccl_memicmp (cp1, token->name, token->len))
+ return 1;
+ }
cp1 = cp2+1;
}
- return token->len == strlen(cp1)
- && !memcmp (cp1, token->name, token->len);
+ if (ccl_case_sensitive)
+ return token->len == strlen(cp1)
+ && !memcmp (cp1, token->name, token->len);
+ return token->len == strlen(cp1) &&
+ !ccl_memicmp (cp1, token->name, token->len);
}
/*