X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fwaislen.c;h=1fac46f8eac64e91c42dd862a3c5f535d994cd50;hp=b674e2ab7f8efa9344717706ff4e43ad940af4d3;hb=dd6da3de6292dd8d087eac67c0c9a7eced8b88de;hpb=05c274ef315384faafcc5900c17468f0ea2474e6 diff --git a/src/waislen.c b/src/waislen.c index b674e2a..1fac46f 100644 --- a/src/waislen.c +++ b/src/waislen.c @@ -1,8 +1,6 @@ -/* - * Copyright (c) 1995-2004, Index Data. +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: waislen.c,v 1.2 2004-10-15 00:19:01 adam Exp $ */ /** * \file waislen.c @@ -11,23 +9,31 @@ #include #include -#include /* * 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) - return 0; + return 0; if (*buf != '0') - return 0; + return 0; /* 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) - return lval; + return lval; return 0; } +/* + * Local variables: + * c-basic-offset: 4 + * c-file-style: "Stroustrup" + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +