#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <yaz/snprintf.h>
#include <yaz/oid_util.h>
Go to the source code of this file.
Functions | |
| void | oid_oidcpy (Odr_oid *t, const Odr_oid *s) |
| copies OID | |
| void | oid_oidcat (Odr_oid *t, const Odr_oid *s) |
| appends to 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) | |
| int | oid_dotstring_to_oid (const char *name, Odr_oid *oid) |
| converts dot string to OID | |
Definition in file oid_util.c.
| int oid_dotstring_to_oid | ( | const char * | name, | |
| Odr_oid * | oid | |||
| ) |
converts dot string to OID
| name | dot string OID, e.g. "1.2.840.10003.2.1" | |
| oid | resulting OID buffer which should be at least of size OID_SIZE |
| 0 | OK | |
| -1 | failure |
Definition at line 75 of file oid_util.c.
References OID_SIZE.
Referenced by odr_getoidbystr_nmem().
| char* oid_oid_to_dotstring | ( | const Odr_oid * | oid, | |
| char * | oidbuf | |||
| ) |
converts OID to string (dot notation)
| oid | OID | |
| oidbuf | resulting buffer which should be at least of size OID_STR_MAX |
Definition at line 59 of file oid_util.c.
References OID_SIZE, and yaz_snprintf().
Referenced by my_fetch(), oid_name_to_dotstring(), retrieve_fetch(), yaz_oid_to_string_buf(), yaz_retrieval_request(), and ztest_fetch().
compares OIDs
| o1 | first OID | |
| o2 | second OID |
| 0 | equal | |
| >0 | o1 greater than o2 | |
| <0 | o1 less than o2 |
Definition at line 34 of file oid_util.c.
Referenced by my_fetch(), yaz_del_charneg_record(), yaz_get_charneg_record(), yaz_oi_update(), yaz_oid_to_string(), yaz_retrieval_request(), z_ext_getentbyref(), z_ext_record_oid(), ztest_esrequest(), and ztest_fetch().
copies OID
| t | destination OID | |
| s | source OID |
Definition at line 22 of file oid_util.c.
Referenced by odr_getoidbystr_nmem(), odr_oiddup_nmem(), and yaz_oid_add().
| int oid_oidlen | ( | const Odr_oid * | o | ) |
returns length of OIDs
| o | OID |
Definition at line 49 of file oid_util.c.
Referenced by odr_getoidbystr_nmem(), odr_oiddup_nmem(), set_form(), yaz_oid_add(), and yaz_oid_is_iso2709().
1.5.6