Commit afae729c authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski
Browse files

xlst function so that win32 can use an older version of libxslt...

svn path=/icecast/trunk/icecast/; revision=9729
parent af9bc6bf
......@@ -33,6 +33,33 @@
#ifndef _WIN32
#include <sys/time.h>
#ifdef WIN32
#define snprintf _snprintf
int xsltSaveResultToString(xmlChar **doc_txt_ptr, int * doc_txt_len, xmlDocPtr result, xsltStylesheetPtr style) {
xmlOutputBufferPtr buf;
*doc_txt_ptr = NULL;
*doc_txt_len = 0;
if (result->children == NULL)
buf = xmlAllocOutputBuffer(NULL);
if (buf == NULL)
xsltSaveResultTo(buf, result, style);
if (buf->conv != NULL) {
*doc_txt_len = buf->conv->use;
*doc_txt_ptr = xmlStrndup(buf->conv->content, *doc_txt_len);
} else {
*doc_txt_len = buf->buffer->use;
*doc_txt_ptr = xmlStrndup(buf->buffer->content, *doc_txt_len);
return 0;
#include "thread/thread.h"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment