testModule.c revision 38ae7e4efe803ea78b6499cd05a394db32623e41
/*
* testModule.c : a small tester program for xmlModule
*
* See Copyright for the status of this software.
*
* joelwreed@comcast.net
*/
#include "libxml.h"
#ifdef LIBXML_MODULES_ENABLED
#include <libxml/xmlversion.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <libxml/xmlmemory.h>
#include <libxml/debugXML.h>
#include <libxml/xmlmodule.h>
#ifdef _WIN32
#define MODULE_PATH "."
#include <stdlib.h> /* for _MAX_PATH */
#ifndef __MINGW32__
#endif
#else
#define MODULE_PATH ".libs"
#endif
typedef int (*hello_world_t)(void);
/* build the module filename, and confirm the module exists */
(const xmlChar*)MODULE_PATH,
(const xmlChar*)LIBXML_MODULE_EXTENSION);
if (module)
{
return(1);
}
if (hello_world == NULL) {
return(1);
}
(*hello_world)();
}
return(0);
}
#else
#include <stdio.h>
return(0);
}
#endif /* LIBXML_SCHEMAS_ENABLED */