YAZ
5.34.0
|
Implements OID base utilities. More...
#include <stdlib.h>
#include <string.h>
#include <yaz/yaz-iconv.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 More... | |
void | oid_oidcat (Odr_oid *t, const Odr_oid *s) |
appends to OID More... | |
int | oid_oidcmp (const Odr_oid *o1, const Odr_oid *o2) |
compares OIDs More... | |
int | oid_oidlen (const Odr_oid *o) |
returns length of OIDs More... | |
char * | oid_oid_to_dotstring (const Odr_oid *oid, char *oidbuf) |
converts OID to string (dot notation) More... | |
int | oid_dotstring_to_oid (const char *name, Odr_oid *oid) |
converts dot string to OID More... | |
Implements OID base utilities.
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 name, OID_SIZE, and yaz_isdigit.
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 cql_lookup_reverse(), my_fetch(), retrieve_fetch(), return_record_wrbuf(), 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_nmem(), 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().