Avoid ctype.h .
[yaz-moved-to-github.git] / include / yaz / odr.h
index ac554fc..0dd0602 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data.
+ * Copyright (C) 1995-2011 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);
@@ -211,7 +211,7 @@ YAZ_EXPORT Odr_null *odr_nullval(void);
 
 #define ODR_MASK_SET(mask, num)\
     (((mask)->bits[(num) >> 3] |= 0X80 >> ((num) & 0X07)),\
-    (mask)->top < (num) >> 3 ? ((mask)->top = (num) >> 3) : 0)
+    (void) ((mask)->top < (num) >> 3 ? ((mask)->top = (num) >> 3) : 0))
 
 #define ODR_MASK_CLEAR(mask, num)\
     ((mask)->bits[(num) >> 3] &= ~(0X80 >> ((num) & 0X07)))
@@ -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);
@@ -342,6 +342,8 @@ 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>