X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclqfile.c;h=c49df6c832b2bb427bd333802f827823c85dbc4e;hp=3dd0b400abaca5694ea57694f9099075b2f57c69;hb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c diff --git a/src/cclqfile.c b/src/cclqfile.c index 3dd0b40..c49df6c 100644 --- a/src/cclqfile.c +++ b/src/cclqfile.c @@ -1,11 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ /** * \file cclqfile.c * \brief Implements parsing of CCL qualifier specs in files */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -79,14 +82,15 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, /* lead is first of a list of qualifier aliaeses */ /* qualifier alias: q1 q2 ... */ char *qlist[10]; - int i = 0; + size_t i = 0; qlist[i++] = lead_str; - while ((t=yaz_tok_move(tp)) == YAZ_TOK_STRING) + while (t == YAZ_TOK_STRING) { if (i < sizeof(qlist)/sizeof(*qlist)-1) qlist[i++] = xstrdup(yaz_tok_parse_string(tp)); + t = yaz_tok_move(tp); } qlist[i] = 0; yaz_tok_parse_destroy(tp); @@ -239,7 +243,7 @@ void ccl_qual_buf(CCL_bibset bibset, const char *buf) while (1) { const char *cp2 = cp1; - int len; + size_t len; while (*cp2 && !strchr("\r\n", *cp2)) cp2++; len = cp2 - cp1;