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
Merge branch 'master' into yaz4
[yaz-moved-to-github.git]
/
src
/
waislen.c
diff --git
a/src/waislen.c
b/src/waislen.c
index
71c81d7
..
1fac46f
100644
(file)
--- a/
src/waislen.c
+++ b/
src/waislen.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 1995-2005, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2009 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: waislen.c,v 1.3 2005-01-15 19:47:14 adam Exp $
*/
/**
* \file waislen.c
*/
/**
* \file waislen.c
@@
-11,23
+9,31
@@
#include <stdio.h>
#include <yaz/comstack.h>
#include <stdio.h>
#include <yaz/comstack.h>
-#include <yaz/tcpip.h>
/*
* Return length of WAIS package or 0
*/
/*
* Return length of WAIS package or 0
*/
-int completeWAIS(const unsigned char *buf, int len)
+int completeWAIS(const char *buf, int len)
{
int i, lval = 0;
if (len < 25)
{
int i, lval = 0;
if (len < 25)
- return 0;
+ return 0;
if (*buf != '0')
if (*buf != '0')
- return 0;
+ return 0;
/* calculate length */
for (i = 0; i < 10; i++)
/* calculate length */
for (i = 0; i < 10; i++)
- lval = lval * 10 + (buf[i] - '0');
+ lval = lval * 10 + (buf[i] - '0');
lval += 25;
if (len >= lval)
lval += 25;
if (len >= lval)
- return lval;
+ return lval;
return 0;
}
return 0;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+