32# ifdef HAVE_LIBXSLT_PATTERN_H
35# ifdef HAVE_LIBXSLT_TRANSFORM_H
56#include "wine/unicode.h"
105 wine_dbg_log(dbcl, &__wine_dbch_msxml, caller,
"error code %d",
err->code);
113static int wineXmlMatchCallback (
char const *
filename)
130static void *wineXmlOpenCallback (
char const *
filename)
155 ERR(
"Failed to read file\n");
159 TRACE(
"Read %d\n", dwBytesRead);
164static int wineXmlFileCloseCallback (
void *
context)
169void* libxslt_handle =
NULL;
171# define DECL_FUNCPTR(f) typeof(f) * p##f = NULL
188static void init_libxslt(
void)
197#define LOAD_FUNCPTR(f, needed) \
198 if ((p##f = wine_dlsym(libxslt_handle, #f, NULL, 0)) == NULL) \
199 if (needed) { WARN("Can't find symbol %s\n", #f); goto sym_not_found; }
219 pxsltSetLoaderFunc(xslt_doc_default_loader);
220 pxsltRegisterExtModuleFunction(
222 (
const xmlChar *)
"urn:schemas-microsoft-com:xslt",
223 pxsltFunctionNodeSet);
229 libxslt_handle =
NULL;
233static int to_utf8(
int cp,
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
238 if (!
in || !inlen)
return 0;
253static int from_utf8(
int cp,
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
258 if (!
in || !inlen)
return 0;
273static int win1250_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
275 return to_utf8(1250,
out, outlen,
in, inlen);
278static int utf8_to_win1250(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
280 return from_utf8(1250,
out, outlen,
in, inlen);
283static int win1251_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
285 return to_utf8(1251,
out, outlen,
in, inlen);
288static int utf8_to_win1251(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
290 return from_utf8(1251,
out, outlen,
in, inlen);
293static int win1252_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
295 return to_utf8(1252,
out, outlen,
in, inlen);
298static int utf8_to_win1252(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
300 return from_utf8(1252,
out, outlen,
in, inlen);
303static int win1253_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
305 return to_utf8(1253,
out, outlen,
in, inlen);
308static int utf8_to_win1253(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
310 return from_utf8(1253,
out, outlen,
in, inlen);
312static int win1254_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
314 return to_utf8(1254,
out, outlen,
in, inlen);
317static int utf8_to_win1254(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
319 return from_utf8(1254,
out, outlen,
in, inlen);
322static int win1255_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
324 return to_utf8(1255,
out, outlen,
in, inlen);
327static int utf8_to_win1255(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
329 return from_utf8(1255,
out, outlen,
in, inlen);
332static int win1256_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
334 return to_utf8(1256,
out, outlen,
in, inlen);
337static int utf8_to_win1256(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
339 return from_utf8(1256,
out, outlen,
in, inlen);
342static int win1257_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
344 return to_utf8(1257,
out, outlen,
in, inlen);
347static int utf8_to_win1257(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
349 return from_utf8(1257,
out, outlen,
in, inlen);
352static int win1258_to_utf8(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
354 return to_utf8(1258,
out, outlen,
in, inlen);
357static int utf8_to_win1258(
unsigned char *
out,
int *outlen,
const unsigned char *
in,
int *inlen)
359 return from_utf8(1258,
out, outlen,
in, inlen);
362static void init_char_encoders(
void)
371 {
"windows-1250", win1250_to_utf8, utf8_to_win1250 },
372 {
"windows-1251", win1251_to_utf8, utf8_to_win1251 },
373 {
"windows-1252", win1252_to_utf8, utf8_to_win1252 },
374 {
"windows-1253", win1253_to_utf8, utf8_to_win1253 },
375 {
"windows-1254", win1254_to_utf8, utf8_to_win1254 },
376 {
"windows-1255", win1255_to_utf8, utf8_to_win1255 },
377 {
"windows-1256", win1256_to_utf8, utf8_to_win1256 },
378 {
"windows-1257", win1257_to_utf8, utf8_to_win1257 },
379 {
"windows-1258", win1258_to_utf8, utf8_to_win1258 }
419 wineXmlReadCallback, wineXmlFileCloseCallback) == -1)
420 WARN(
"Failed to register callbacks\n");
422 init_char_encoders();
435 pxsltCleanupGlobals();
void xsltCleanupGlobals(void)
int xsltRegisterExtModuleFunction(const xmlChar *name, const xmlChar *URI, xmlXPathFunction function)
void release_typelib(void)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
HRESULT WINAPI DllRegisterServer(void)
HRESULT WINAPI DllUnregisterServer(void)
HRESULT WINAPI DllCanUnloadNow(void)
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
HINSTANCE MSXML_hInstance
void xsltSetLoaderFunc(xsltDocLoaderFunc f)
int(* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlNewCharEncodingHandler(const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output)
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlFindCharEncodingHandler(const char *name)
int(* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
static unsigned char buff[32768]
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
xsltStylesheetPtr xsltNextImport(xsltStylesheetPtr cur)
void * wine_dlopen(const char *filename, int flag, char *error, size_t errorsize)
int wine_dlclose(void *handle, char *error, size_t errorsize)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
XMLPUBFUN const char *XMLCALL xmlThrDefTreeIndentString(const char *v)
XMLPUBVAR const char * xmlTreeIndentString
XMLPUBFUN void XMLCALL xmlCleanupParser(void)
XMLPUBFUN void XMLCALL xmlInitParser(void)
const char int int wine_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func, const char *format,...) __WINE_PRINTF_ATTR(4
int xsltQuoteUserParams(xsltTransformContextPtr ctxt, const char **params)
void int int ULONGLONG int va_list * ap
XMLPUBFUN int XMLCALL xmlRegisterInputCallbacks(xmlInputMatchCallback matchFunc, xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc, xmlInputCloseCallback closeFunc)
XMLPUBFUN void XMLCALL xmlCleanupInputCallbacks(void)
XMLPUBFUN void XMLCALL xmlRegisterDefaultInputCallbacks(void)
void xsltFreeStylesheet(xsltStylesheetPtr style)
xsltStylesheetPtr xsltParseStylesheetDoc(xmlDocPtr doc)
int xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result, xsltStylesheetPtr style)