projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add cast
[yaz-moved-to-github.git]
/
src
/
odr_mem.c
diff --git
a/src/odr_mem.c
b/src/odr_mem.c
index
028d06d
..
555c443
100644
(file)
--- a/
src/odr_mem.c
+++ b/
src/odr_mem.c
@@
-124,6
+124,22
@@
int odr_seek(ODR o, int whence, int offset)
o->pos = offset;
return 0;
}
o->pos = offset;
return 0;
}
+
+Odr_int odr_atoi(const char *s)
+{
+#if NMEM_64
+ char *endptr;
+#if WIN32
+ return _strtoui64(s, &endptr, 10);
+#else
+ return strtoll(s, &endptr, 10);
+#endif
+
+#else
+ return atoi(s);
+#endif
+}
+
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4