X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fwaislen.c;h=8df2c020ef36d5e7ebc9a025eaa33e249abfb455;hb=3c287bc1d48ee6a1f300054c2cebd0ba312bd5b9;hp=71c81d7746e29f710d8c5987c5506ddcd72fb2ef;hpb=4c176312acdc3444c9afc820f76a393e64668e52;p=yaz-moved-to-github.git diff --git a/src/waislen.c b/src/waislen.c index 71c81d7..8df2c02 100644 --- a/src/waislen.c +++ b/src/waislen.c @@ -1,33 +1,42 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. - * - * $Id: waislen.c,v 1.3 2005-01-15 19:47:14 adam Exp $ */ /** * \file waislen.c * \brief Implements WAIS package handling */ +#if HAVE_CONFIG_H +#include +#endif #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 + */ +