38 #define get_entries(db) (db->xmalloced==0 ? yaz_oid_standard_entries : db->entries)
43 for (; oid_db; oid_db = oid_db->
next)
83 for (; oid_db; oid_db = oid_db->
next)
122 &&
oid[2] == 840 &&
oid[3] == 10003 &&
oid[4] == 5
123 &&
oid[5] <= 29 &&
oid[5] != 16)
138 oid_db = oid_db->
next;
140 oid_db = oid_db->
next;
149 ent[0].
oid = alloc_oid;
176 oid_db = oid_db->
next;
194 for (; oid_db; oid_db = oid_db->
next)
int yaz_matchstr(const char *s1, const char *s2)
match strings - independent of case and '-'
Header for ODR (Open Data Representation)
Odr_oid * odr_oiddup_nmem(NMEM nmem, const Odr_oid *o)
Odr_oid * odr_getoidbystr_nmem(NMEM nmem, const char *str)
char * oid_name_to_dotstring(oid_class oclass, const char *name, char *oid_buf)
maps named from standard database to dot notation
int yaz_oid_is_iso2709(const Odr_oid *oid)
checks if OID refers to MARC transfer syntax
void yaz_oid_trav(yaz_oid_db_t oid_db, void(*func)(const Odr_oid *oid, oid_class oclass, const char *name, void *client_data), void *client_data)
traverses OIDs in a database
const char * yaz_oid_to_string_buf(const Odr_oid *oid, oid_class *oclass, char *buf)
maps any OID to string (named or dot-notation)
yaz_oid_db_t yaz_oid_std(void)
returns standard OID database
void yaz_oid_db_destroy(yaz_oid_db_t oid_db)
destroys OID database
Odr_oid * yaz_string_to_oid_nmem(yaz_oid_db_t oid_list, oid_class oclass, const char *name, NMEM nmem)
creates NMEM malloc'ed OID from string
const Odr_oid * yaz_string_to_oid(yaz_oid_db_t oid_db, oid_class oclass, const char *name)
maps named OID string to raw OID by database lookup
Odr_oid * yaz_string_to_oid_odr(yaz_oid_db_t oid_list, oid_class oclass, const char *name, ODR o)
creates ODR malloc'ed OID from string
const char * yaz_oid_to_string(yaz_oid_db_t oid_db, const Odr_oid *oid, oid_class *oclass)
maps raw OID to string
yaz_oid_db_t yaz_oid_db_new(void)
creates empty OID database
int yaz_oid_add(yaz_oid_db_t oid_db, oid_class oclass, const char *name, const Odr_oid *new_oid)
adds new OID entry to database
struct yaz_oid_db standard_db_l
struct yaz_oid_db * yaz_oid_db_t
OID database.
void oid_oidcpy(Odr_oid *t, const Odr_oid *s)
copies OID
int oid_oidcmp(const Odr_oid *o1, const Odr_oid *o2)
compares OIDs
int oid_oidlen(const Odr_oid *o)
returns length of OIDs
char * oid_oid_to_dotstring(const Odr_oid *oid, char *oidbuf)
converts OID to string (dot notation)
Header for OID basic functions.
struct yaz_oid_entry * entries
#define xstrdup(s)
utility macro which calls xstrdup_f
#define xfree(x)
utility macro which calls xfree_f
#define xmalloc(x)
utility macro which calls malloc_f
Header for common YAZ utilities.