X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=comstack%2Fwaislen.c;fp=comstack%2Fwaislen.c;h=0000000000000000000000000000000000000000;hp=0bf2ef6cae9224efa0bf806662da12ab441d3f9c;hb=c6e47cbbff56f39f6d81b079ebaeac41d793d4d9;hpb=c71d717ada2a9ef730d527f161eb5ba9aa641a9f diff --git a/comstack/waislen.c b/comstack/waislen.c deleted file mode 100644 index 0bf2ef6..0000000 --- a/comstack/waislen.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1995-1999, Index Data. - * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss - * - * $Log: waislen.c,v $ - * Revision 1.5 1999-11-30 13:47:11 adam - * Improved installation. Moved header files to include/yaz. - * - * Revision 1.4 1999/01/08 11:23:15 adam - * Added const modifier to some of the BER/ODR encoding routines. - * - * Revision 1.3 1996/02/29 14:23:13 adam - * Bug fix. - * - * Revision 1.2 1996/02/26 18:34:44 adam - * Bug fix. - * - * Revision 1.1 1996/02/20 13:02:58 quinn - * Wais length. - * - * - */ - -#include -#include -#include -/* - * Return length of WAIS package or 0 - */ -int completeWAIS(const unsigned char *buf, int len) -{ - int i, lval = 0; - - if (len < 25) - return 0; - if (*buf != '0') - return 0; - /* calculate length */ - for (i = 0; i < 10; i++) - lval = lval * 10 + (buf[i] - '0'); - lval += 25; - if (len >= lval) - return lval; - return 0; -}