X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstsoap1.c;h=eb2ba11d7974f13fb85d1728724ef44343b031f6;hp=85a917783e2ad54feff9ee7de62a7ab7552028e7;hb=88d3bedf772316f87e1996f655ccf8d1e2589755;hpb=06ae818deffa84ec4bc1308051ef411845dd4ce5 diff --git a/test/tstsoap1.c b/test/tstsoap1.c index 85a9177..eb2ba11 100644 --- a/test/tstsoap1.c +++ b/test/tstsoap1.c @@ -1,29 +1,30 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. - * - * $Id: tstsoap1.c,v 1.5 2006-01-29 21:59:13 adam Exp $ */ #include -#if HAVE_XML2 +#if YAZ_HAVE_XML2 #include #endif #include -void tst() +void tst(void) { -#if HAVE_XML2 +#if YAZ_HAVE_XML2 xmlChar *buf_out; int len_out; - xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0"); - YAZ_CHECK(doc); + xmlDocPtr doc; + xmlNodePtr top; #if 0 - const char *val = "jordbær"; /* makes xmlDocDumpMemory hang .. */ + const char *val = "jordb" "\xe6" "r"; /* makes xmlDocDumpMemory hang .. */ #else const char *val = "jordbaer"; /* OK */ #endif - xmlNodePtr top = xmlNewNode(0, BAD_CAST "top"); + doc = xmlNewDoc(BAD_CAST "1.0"); + YAZ_CHECK(doc); + + top = xmlNewNode(0, BAD_CAST "top"); YAZ_CHECK(top); xmlNewTextChild(top, 0, BAD_CAST "sub", BAD_CAST val); @@ -35,14 +36,14 @@ void tst() #endif -/* HAVE_XML2 */ +/* YAZ_HAVE_XML2 */ #endif } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); -#if HAVE_XML2 +#if YAZ_HAVE_XML2 LIBXML_TEST_VERSION; #endif tst(); @@ -53,6 +54,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab