X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fodr.h;h=c0dc7554f233b0f7f65e7f0920d482a10fa242df;hp=d687d14081b66d153d9e9cc188d1a663fd7d9985;hb=6b76baf0fb5d0d437caedd8076f77f372d775758;hpb=ae1c6f1a0a5fb745b1a5fa315869161d7480c6f7 diff --git a/include/yaz/odr.h b/include/yaz/odr.h index d687d14..c0dc755 100644 --- a/include/yaz/odr.h +++ b/include/yaz/odr.h @@ -44,6 +44,11 @@ YAZ_BEGIN_CDECL +#define ODR_INT_PRINTF "%lld" + +typedef long long int odr_int_t; +typedef int odr_bool_t; + #ifndef bool_t #define bool_t int #endif @@ -184,7 +189,8 @@ YAZ_EXPORT void *odr_malloc(ODR o, int size); YAZ_EXPORT char *odr_strdup(ODR o, const char *str); YAZ_EXPORT char *odr_strdupn(ODR o, const char *str, size_t n); YAZ_EXPORT char *odr_strdup_null(ODR o, const char *str); -YAZ_EXPORT int *odr_intdup(ODR o, int v); +YAZ_EXPORT odr_int_t *odr_intdup(ODR o, odr_int_t v); +YAZ_EXPORT odr_bool_t *odr_booldup(ODR o, odr_bool_t v); YAZ_EXPORT Odr_oct *odr_create_Odr_oct(ODR o, const unsigned char *buf, int sz); YAZ_EXPORT NMEM odr_extract_mem(ODR o); @@ -229,15 +235,15 @@ YAZ_EXPORT int ber_enctag(ODR o, int zclass, int tag, int constructed); YAZ_EXPORT int ber_dectag(const unsigned char *buf, int *zclass, int *tag, int *constructed, int max); YAZ_EXPORT int odr_bool(ODR o, int **p, int opt, const char *name); -YAZ_EXPORT int odr_integer(ODR o, int **p, int opt, const char *name); -YAZ_EXPORT int odr_enum(ODR o, int **p, int opt, const char *name); +YAZ_EXPORT int odr_integer(ODR o, odr_int_t **p, int opt, const char *name); +YAZ_EXPORT int odr_enum(ODR o, odr_int_t **p, int opt, const char *name); YAZ_EXPORT int odr_implicit_settag(ODR o, int zclass, int tag); YAZ_EXPORT int ber_enclen(ODR o, int len, int lenlen, int exact); YAZ_EXPORT int ber_declen(const unsigned char *buf, int *len, int max); YAZ_EXPORT void odr_prname(ODR o, const char *name); YAZ_EXPORT int ber_null(ODR o); YAZ_EXPORT int odr_null(ODR o, Odr_null **p, int opt, const char *name); -YAZ_EXPORT int ber_integer(ODR o, int *val); +YAZ_EXPORT int ber_integer(ODR o, odr_int_t *val); YAZ_EXPORT int odr_constructed_begin(ODR o, void *p, int zclass, int tag, const char *name); YAZ_EXPORT int odr_constructed_end(ODR o); @@ -298,7 +304,7 @@ YAZ_EXPORT char *odr_prepend(ODR o, const char *prefix, const char *old); typedef struct Odr_external { Odr_oid *direct_reference; /* OPTIONAL */ - int *indirect_reference; /* OPTIONAL */ + odr_int_t *indirect_reference; /* OPTIONAL */ char *descriptor; /* OPTIONAL */ int which; #define ODR_EXTERNAL_single 0