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
Modified yaz_sru_decode to only perform SRU POST URL decoding if
[yaz-moved-to-github.git]
/
src
/
atoin.c
diff --git
a/src/atoin.c
b/src/atoin.c
index
cb3a899
..
0239f82
100644
(file)
--- a/
src/atoin.c
+++ b/
src/atoin.c
@@
-1,8
+1,13
@@
/*
/*
- * Copyright (c) 1997-2004, Index Data
+ * Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: atoin.c,v 1.2 2004-08-13 11:35:37 adam Exp $
+ * $Id: atoin.c,v 1.7 2005-06-25 15:46:03 adam Exp $
+ */
+
+/**
+ * \file atoin.c
+ * \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-11,8
+16,11
@@
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-#include <yaz/yaz-util.h>
+#include <yaz/marcdisp.h>
+/**
+ * atoi_n: like atoi but reads at most len characters.
+ */
int atoi_n (const char *buf, int len)
{
int val = 0;
int atoi_n (const char *buf, int len)
{
int val = 0;
@@
-21,8
+29,16
@@
int atoi_n (const char *buf, int len)
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
- buf++;
+ buf++;
}
return val;
}
}
return val;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+