20 #define GRS_MAX_FIELDS 50
34 while (fgets(buf = line, 512, f))
38 if (!*buf || *buf ==
'#')
44 if (sscanf(buf,
"(%d,%[^)])", &
type, value) != 2)
49 if (!
type && *value ==
'0')
51 if (!(buf = strchr(buf,
')')))
70 if ((ivalue = atoi(value)))
93 buf[strlen(buf)-1] =
'\0';
102 FILE *f = fopen(
"dummy-grs",
"r");
109 while (fgets(line, 512, f))
110 if (*line ==
'#' && sscanf(line,
"#%d", &n) == 1 && n == num)
void yaz_log(int level, const char *fmt,...)
Writes log message.
#define YLOG_WARN
log level: warning
char * odr_strdup(ODR o, const char *str)
Odr_int * odr_intdup(ODR o, Odr_int v)
void * odr_malloc(ODR o, size_t size)
Header for Z39.50 Protocol.
static Z_GenericRecord * read_grs1(FILE *f, ODR o)
Z_GenericRecord * dummy_grs_record(int num, ODR o)
union Z_ElementData::@101 u
Z_InternationalString * string
Z_GenericRecord * subtree
Z_TaggedElement ** elements
union Z_StringOrNumeric::@72 u
Z_InternationalString * string
Z_Variant * appliedVariant
Z_ElementMetaData * metaData
Z_StringOrNumeric * tagValue
#define Z_StringOrNumeric_numeric
#define Z_StringOrNumeric_string
#define Z_ElementData_subtree
#define Z_ElementData_string
Internal header for yaz-ztest.