X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fcodec%2Ftstcodec.c;h=449ce8aa45a1016a9af0db5f288bdbaf1562b4b1;hp=40cfcc434d125f8151559b2ad32e455f186f378f;hb=e2e073b5c947e996304ed7d577497af5e9a879ee;hpb=4478d785b7769691261005c98063b98a5a5971b3 diff --git a/test/codec/tstcodec.c b/test/codec/tstcodec.c index 40cfcc4..449ce8a 100644 --- a/test/codec/tstcodec.c +++ b/test/codec/tstcodec.c @@ -1,8 +1,5 @@ -/* $Id: tstcodec.c,v 1.10 2006-08-14 10:40:24 adam Exp $ - Copyright (C) 1995-2006 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -20,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include "../../index/index.h" @@ -64,7 +64,7 @@ int tst_encode(int num) char *dst = (char *) &key; const char *src0 = src; iscz1_decode(codec_handle, &dst, &src); - + if (key.len != 2) { printf ("%s: i=%d key.len=%d expected 2\n", prog, @@ -109,7 +109,7 @@ int tst_encode(int num) return 0; } -void tstcodec1() +void tstcodec1(void) { char buf[100]; char *dst = buf; @@ -137,7 +137,7 @@ void tstcodec1() dst = (char*) &key2; src = buf; - + iscz1_decode(codec_handle, &dst, &src); iscz1_stop(codec_handle); @@ -179,7 +179,7 @@ int tstcodec2(int num) const char *src = (const char *) &ar1; char *dst = dstbuf; iscz1_encode(encode_handle, &dst, &src); - + src = dstbuf; dst = (char *) &ar2; iscz1_decode(decode_handle, &dst, &src); @@ -223,10 +223,11 @@ int main(int argc, char **argv) ret = tst_encode(num); exit(ret); } - + /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab