/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
wrbuf_puts(type_str, yaz_tok_parse_string(tp));
t = yaz_tok_move(tp);
}
- elem->attributeType = nmem_longintdup(ct->nmem, 0);
+ elem->attributeType = nmem_intdup(ct->nmem, 0);
if (sscanf(wrbuf_cstr(type_str), ODR_INT_PRINTF, elem->attributeType)
!= 1)
{
{
elem->which = Z_AttributeValue_numeric;
elem->value.numeric =
- nmem_longintdup(ct->nmem, atoi(value_str));
+ nmem_intdup(ct->nmem, atoi(value_str));
}
else
{
}
if (i == e->attr_list.num_attributes)
- return e->pattern;
+ return e->pattern + clen;
}
}
return 0;
int i;
while (*cp1 && *cp1 != ' ')
cp1++;
- if (cp1 - cp0 >= sizeof(buf))
+ if (cp1 - cp0 >= (ptrdiff_t) sizeof(buf))
break;
memcpy(buf, cp0, cp1 - cp0);
buf[cp1-cp0] = 0;