X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcclqfile.c;h=3d64a729c8eb36f3d34d54c514d1e1280a14b8f3;hb=c9b2e9553e1e59d74556a83f38d39e16a389a286;hp=d2ca1c9d13f5db4a76151b87a32857120b3ad1b6;hpb=c508282c3e52e145f998d0bb85c0ea6b36fe956c;p=yaz-moved-to-github.git diff --git a/src/cclqfile.c b/src/cclqfile.c index d2ca1c9..3d64a72 100644 --- a/src/cclqfile.c +++ b/src/cclqfile.c @@ -1,8 +1,8 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ -/** +/** * \file cclqfile.c * \brief Implements parsing of CCL qualifier specs in files */ @@ -40,7 +40,7 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, yaz_tok_cfg_destroy(yt); *addinfo = 0; - + t = yaz_tok_move(tp); while (t == YAZ_TOK_STRING) { @@ -109,7 +109,7 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, goto out; } value_str = yaz_tok_parse_string(tp); - + if (sscanf(type_str, "%d", &type) == 1) ; else if (strlen(type_str) != 1) @@ -132,7 +132,7 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, value = CCL_BIB1_REL_ORDER; else if (!ccl_stricmp (value_str, "r")) value = CCL_BIB1_REL_PORDER; - break; + break; case 'p': case 'P': type = CCL_BIB1_POS; @@ -146,7 +146,9 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, value = CCL_BIB1_STR_AND_LIST; if (!ccl_stricmp (value_str, "ol")) value = CCL_BIB1_STR_OR_LIST; - break; + if (!ccl_stricmp (value_str, "ag")) + value = CCL_BIB1_STR_AUTO_GROUP; + break; case 't': case 'T': type = CCL_BIB1_TRU; @@ -162,7 +164,7 @@ int ccl_qual_field2(CCL_bibset bibset, const char *cp, const char *qual_name, value = CCL_BIB1_TRU_CAN_REGEX; else if (!ccl_stricmp (value_str, "z")) value = CCL_BIB1_TRU_CAN_Z3958; - break; + break; case 'c': case 'C': type = CCL_BIB1_COM; @@ -270,7 +272,7 @@ void ccl_qual_line(CCL_bibset bibset, char *line) int no_scan = 0; char qual_name[128]; char *cp1, *cp = line; - + if (*cp == '#') return; /* ignore lines starting with # */ if (sscanf (cp, "%100s%n", qual_name, &no_scan) < 1) @@ -290,8 +292,8 @@ void ccl_qual_line(CCL_bibset bibset, char *line) * Each line format is: * = = .... * Where is name of qualifier; - * = is a attribute definition pair where is one of: - * u(use), r(relation), p(position), t(truncation), c(completeness) + * = is a attribute definition pair where is one of: + * u(use), r(relation), p(position), t(truncation), c(completeness) * or plain integer. * is an integer or special pseudo-value. */