Add odr_strtol (strtol for Odr_int).
[yaz-moved-to-github.git] / include / yaz / odr.h
index b6abe59..eb12dd4 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data.
+ * Copyright (C) 1995-2010 Index Data.
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -184,7 +184,7 @@ YAZ_EXPORT void odr_reset(ODR o);
 YAZ_EXPORT void odr_destroy(ODR o);
 YAZ_EXPORT void odr_setbuf(ODR o, char *buf, int len, int can_grow);
 YAZ_EXPORT char *odr_getbuf(ODR o, int *len, int *size);
-YAZ_EXPORT void *odr_malloc(ODR o, int size);
+YAZ_EXPORT void *odr_malloc(ODR o, size_t 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);
@@ -289,7 +289,7 @@ YAZ_EXPORT int odr_seek(ODR o, int whence, int offset);
 YAZ_EXPORT int odr_dumpBER(FILE *f, const char *buf, int len);
 YAZ_EXPORT void odr_choice_bias(ODR o, int what);
 YAZ_EXPORT void odr_choice_enable_bias(ODR o, int mode);
-YAZ_EXPORT int odr_total(ODR o);
+YAZ_EXPORT size_t odr_total(ODR o);
 YAZ_EXPORT char *odr_errmsg(int n);
 YAZ_EXPORT Odr_oid *odr_getoidbystr(ODR o, const char *str);
 YAZ_EXPORT Odr_oid *odr_getoidbystr_nmem(NMEM o, const char *str);
@@ -340,6 +340,10 @@ YAZ_EXPORT void odr_printf(ODR o, const char *fmt, ...);
 
 YAZ_EXPORT const char **odr_get_element_path(ODR o);
 
+YAZ_EXPORT Odr_int odr_atoi(const char *s);
+
+YAZ_EXPORT Odr_int odr_strtol(const char *nptr, char **endptr, int base);
+
 YAZ_END_CDECL
 
 #include <yaz/xmalloc.h>