mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 04:45:47 -04:00
Initial community commit
This commit is contained in:
81
Src/xml/Encodings.cpp
Normal file
81
Src/xml/Encodings.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
#include "expat.h"
|
||||
#include <wchar.h>
|
||||
#include <windows.h>
|
||||
#include "../WAT/WAT.h"
|
||||
|
||||
struct WindowsEncodings
|
||||
{
|
||||
const wchar_t *name;
|
||||
UINT codePage;
|
||||
};
|
||||
|
||||
static const WindowsEncodings encodings[] =
|
||||
{
|
||||
{L"iso-8859-2", 28592},
|
||||
{L"iso-8859-3", 28593},
|
||||
{L"iso-8859-4", 28594},
|
||||
{L"iso-8859-5", 28595},
|
||||
{L"iso-8859-6", 28596},
|
||||
{L"iso-8859-7", 28597},
|
||||
{L"iso-8859-8", 28598},
|
||||
{L"iso-8859-9", 28599},
|
||||
{L"iso-8859-15", 28605},
|
||||
{L"windows-1251", 1251},
|
||||
{L"windows-1252", 1252},
|
||||
{L"windows-1253", 1253},
|
||||
{L"windows-1254", 1254},
|
||||
{L"windows-1255", 1255},
|
||||
{L"windows-1256", 1256},
|
||||
{L"windows-1257", 1257},
|
||||
{L"windows-1258", 1258},
|
||||
|
||||
};
|
||||
|
||||
void MakeMap(int *map, UINT codepage)
|
||||
{
|
||||
unsigned char i=0;
|
||||
unsigned char mb[2] = {0,0};
|
||||
wchar_t temp[2] = {0};
|
||||
do
|
||||
{
|
||||
mb[0]=i;
|
||||
// if (IsDBLeadByteEx(codepage, i)) map[i]=-2; else {
|
||||
int len = MultiByteToWideChar(codepage, 0, (char *)mb, 2, 0, 0);
|
||||
switch(len)
|
||||
{
|
||||
case 0:
|
||||
map[i]=-1;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
MultiByteToWideChar(codepage, 0, (char *)mb, 2, temp, 2);
|
||||
map[i]=temp[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
// }
|
||||
} while (i++ != 255);
|
||||
}
|
||||
|
||||
#define NUM_ENCODINGS (sizeof(encodings)/sizeof(WindowsEncodings))
|
||||
int XMLCALL UnknownEncoding(void *data, const wchar_t *name, XML_Encoding *info)
|
||||
{
|
||||
for (int i=0;i<NUM_ENCODINGS;i++)
|
||||
{
|
||||
if (!_wcsicmp(name, encodings[i].name))
|
||||
{
|
||||
MakeMap(info->map, encodings[i].codePage);
|
||||
info->data = 0;
|
||||
info->convert = 0;
|
||||
info->release = 0;
|
||||
return XML_STATUS_OK;
|
||||
}
|
||||
}
|
||||
return XML_STATUS_ERROR;
|
||||
}
|
||||
|
||||
int XMLCALL UnknownEncoding(void* data, const char* name, XML_Encoding* info)
|
||||
{
|
||||
auto wszName = wa::strings::wa_string(name).GetW().c_str();
|
||||
return UnknownEncoding(data, wszName, info);
|
||||
}
|
101
Src/xml/XMLDOM.cpp
Normal file
101
Src/xml/XMLDOM.cpp
Normal file
@ -0,0 +1,101 @@
|
||||
#include "XMLDOM.h"
|
||||
|
||||
XMLDOM::XMLDOM() : curtext(0), curtext_len(0), curNode(0)
|
||||
{
|
||||
xmlNode = new XMLNode;
|
||||
curNode = xmlNode;
|
||||
}
|
||||
|
||||
XMLDOM::~XMLDOM()
|
||||
{
|
||||
if (curtext)
|
||||
{
|
||||
free(curtext);
|
||||
curtext = 0;
|
||||
curtext_len = 0;
|
||||
}
|
||||
delete xmlNode;
|
||||
}
|
||||
|
||||
void XMLDOM::StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params)
|
||||
{
|
||||
XMLNode *newNode = new XMLNode;
|
||||
|
||||
int num = (int)params->getNbItems();
|
||||
for (int i = 0;i < num;i++)
|
||||
newNode->SetProperty(params->getItemName(i), params->getItemValue(i));
|
||||
|
||||
newNode->parent = curNode;
|
||||
curNode->SetContent_Own(curtext);
|
||||
curtext = 0;
|
||||
|
||||
curNode->AddNode(xmltag, newNode);
|
||||
curNode = newNode;
|
||||
}
|
||||
|
||||
void XMLDOM::EndTag(const wchar_t *xmlpath, const wchar_t *xmltag)
|
||||
{
|
||||
curNode->AppendContent(curtext);
|
||||
|
||||
if (curtext)
|
||||
{
|
||||
free(curtext);
|
||||
curtext = 0;
|
||||
curtext_len = 0;
|
||||
}
|
||||
|
||||
curNode = curNode->parent;
|
||||
}
|
||||
|
||||
void XMLDOM::TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str)
|
||||
{
|
||||
if (str && *str)
|
||||
{
|
||||
if (curtext)
|
||||
{
|
||||
size_t len = wcslen(str), new_len = len + curtext_len;
|
||||
wchar_t* newcurtext = (wchar_t *)realloc(curtext, (new_len+1)*sizeof(wchar_t));
|
||||
if (newcurtext)
|
||||
{
|
||||
curtext = newcurtext;
|
||||
wcsncpy(curtext+curtext_len, str, len);
|
||||
*(curtext+curtext_len+len) = 0;
|
||||
curtext_len = new_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
newcurtext = (wchar_t *)malloc((new_len+1)*sizeof(wchar_t));
|
||||
if (newcurtext)
|
||||
{
|
||||
memcpy(newcurtext, curtext, curtext_len*sizeof(wchar_t));
|
||||
free(curtext);
|
||||
curtext = newcurtext;
|
||||
|
||||
wcsncpy(curtext+curtext_len, str, len);
|
||||
*(curtext+curtext_len+len) = 0;
|
||||
curtext_len = new_len;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
curtext_len = wcslen(str);
|
||||
curtext = (wchar_t *)malloc((curtext_len+1)*sizeof(wchar_t));
|
||||
if (curtext)
|
||||
memcpy(curtext, str, (curtext_len+1)*sizeof(wchar_t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const XMLNode *XMLDOM::GetRoot() const
|
||||
{
|
||||
return xmlNode;
|
||||
}
|
||||
|
||||
#define CBCLASS XMLDOM
|
||||
START_DISPATCH;
|
||||
VCB(ONSTARTELEMENT, StartTag)
|
||||
VCB(ONENDELEMENT, EndTag)
|
||||
VCB(ONCHARDATA, TextHandler)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
27
Src/xml/XMLDOM.h
Normal file
27
Src/xml/XMLDOM.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "../xml/ifc_xmlreadercallback.h"
|
||||
#include "XMLNode.h"
|
||||
#include "../nu/Alias.h"
|
||||
|
||||
class XMLDOM : public ifc_xmlreadercallback
|
||||
{
|
||||
public:
|
||||
XMLDOM();
|
||||
~XMLDOM();
|
||||
|
||||
const XMLNode *GetRoot() const;
|
||||
|
||||
private:
|
||||
void StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params);
|
||||
void EndTag(const wchar_t *xmlpath, const wchar_t *xmltag);
|
||||
void TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str);
|
||||
|
||||
private:
|
||||
wchar_t *curtext;
|
||||
size_t curtext_len; // number of characters in curtext, not including null terminator
|
||||
XMLNode *xmlNode;
|
||||
XMLNode *curNode;
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
201
Src/xml/XMLNode.cpp
Normal file
201
Src/xml/XMLNode.cpp
Normal file
@ -0,0 +1,201 @@
|
||||
#include "XMLNode.h"
|
||||
|
||||
static int CompareStuff(const wchar_t *const &str1, const wchar_t *const &str2)
|
||||
{
|
||||
return CompareStringW(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), 0, str1, -1, str2, -1)-2;
|
||||
}
|
||||
|
||||
XMLNode::XMLNode() : content(0), content_len(0), parent(0)
|
||||
{
|
||||
}
|
||||
|
||||
XMLNode::~XMLNode()
|
||||
{
|
||||
for (PropMap::iterator mapItr=properties.begin();mapItr != properties.end();mapItr++)
|
||||
{
|
||||
free((wchar_t *)mapItr->first);
|
||||
free(mapItr->second);
|
||||
}
|
||||
|
||||
for (NodeMap::iterator mapItr=nodes.begin();mapItr != nodes.end();mapItr++)
|
||||
{
|
||||
NodeList * const nodeList = mapItr->second;
|
||||
if (nodeList)
|
||||
{
|
||||
for (NodeList::iterator itr=nodeList->begin(); itr!= nodeList->end(); itr++)
|
||||
{
|
||||
delete static_cast<XMLNode *>(*itr);
|
||||
}
|
||||
}
|
||||
free((wchar_t *)mapItr->first);
|
||||
}
|
||||
|
||||
if (content)
|
||||
{
|
||||
free(content);
|
||||
content = 0;
|
||||
content_len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const XMLNode *XMLNode::Get(const wchar_t *tagName) const
|
||||
{
|
||||
NodeMap::const_iterator itr = nodes.find(tagName);
|
||||
if (itr == nodes.end())
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
NodeList *list = itr->second;
|
||||
return list->at(0);
|
||||
}
|
||||
}
|
||||
|
||||
const XMLNode::NodeList *XMLNode::GetList(const wchar_t *tagName) const
|
||||
{
|
||||
NodeMap::const_iterator itr = nodes.find(tagName);
|
||||
if (itr == nodes.end())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
NodeList *list = itr->second;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
const bool XMLNode::Present(const wchar_t *tagName) const
|
||||
{
|
||||
return nodes.find(tagName) != nodes.end();
|
||||
}
|
||||
|
||||
// LEGACY implementaions!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
//void XMLNode::SetProperty(const wchar_t *prop, const wchar_t *value)
|
||||
//{
|
||||
// PropMap::MapPair &pair = properties.getItem(prop);
|
||||
// if (pair.first == prop) // replace with a copy if we made a new entry
|
||||
// pair.first = _wcsdup(prop);
|
||||
// free(pair.second);
|
||||
// pair.second = _wcsdup(value);
|
||||
//}
|
||||
void XMLNode::SetProperty(const wchar_t* prop, const wchar_t* value)
|
||||
{
|
||||
auto it = properties.find(prop);
|
||||
if (properties.end() == it)
|
||||
{
|
||||
properties.insert({ _wcsdup(prop), _wcsdup(value) });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nullptr != it->second)
|
||||
{
|
||||
free(it->second);
|
||||
}
|
||||
properties[prop] = _wcsdup(value);
|
||||
}
|
||||
}
|
||||
|
||||
void XMLNode::SetContent_Own(wchar_t *new_content)
|
||||
{
|
||||
if (content)
|
||||
{
|
||||
free(content);
|
||||
content = 0;
|
||||
content_len = 0;
|
||||
}
|
||||
|
||||
if (new_content && *new_content)
|
||||
{
|
||||
content = new_content;
|
||||
content_len = wcslen(content);
|
||||
}
|
||||
}
|
||||
|
||||
void XMLNode::AppendContent(wchar_t *append)
|
||||
{
|
||||
if (append && *append)
|
||||
{
|
||||
if (content)
|
||||
{
|
||||
size_t len = wcslen(append), new_len = len + content_len;
|
||||
wchar_t *new_content = (wchar_t *)realloc(content, (new_len+1)*sizeof(wchar_t));
|
||||
if (new_content)
|
||||
{
|
||||
content = new_content;
|
||||
wcsncpy(content+content_len, append, len);
|
||||
*(content+content_len+len) = 0;
|
||||
content_len = new_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_content = (wchar_t *)malloc((new_len+1)*sizeof(wchar_t));
|
||||
if (new_content)
|
||||
{
|
||||
memcpy(new_content, content, content_len*sizeof(wchar_t));
|
||||
free(content);
|
||||
content = new_content;
|
||||
|
||||
wcsncpy(content+content_len, append, len);
|
||||
*(content+content_len+len) = 0;
|
||||
content_len = new_len;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content_len = wcslen(append);
|
||||
content = (wchar_t *)malloc((content_len+1)*sizeof(wchar_t));
|
||||
if (content)
|
||||
memcpy(content, append, (content_len+1)*sizeof(wchar_t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LEGACY implementaions!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
//void XMLNode::AddNode(const wchar_t *name, XMLNode *new_node)
|
||||
//{
|
||||
// // first, add entry in nodes map
|
||||
// NodeMap::MapPair &pair = nodes.getItem(name);
|
||||
// if (pair.first == name) // replace with a copy if we made a new entry
|
||||
// pair.first = _wcsdup(name);
|
||||
//
|
||||
// // make the node list if we need it
|
||||
// if (!pair.second)
|
||||
// pair.second = new NodeList;
|
||||
//
|
||||
// pair.second->push_back(new_node);
|
||||
//}
|
||||
void XMLNode::AddNode(const wchar_t* name, XMLNode* new_node)
|
||||
{
|
||||
auto it = nodes.find(name);
|
||||
if (nodes.end() == it)
|
||||
{
|
||||
nodes.insert({ _wcsdup(name), new NodeList() });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nullptr == it->second)
|
||||
{
|
||||
nodes[name] = new NodeList();
|
||||
}
|
||||
}
|
||||
|
||||
nodes[name]->push_back(new_node);
|
||||
}
|
||||
|
||||
const wchar_t *XMLNode::GetContent() const
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
const wchar_t *XMLNode::GetProperty(const wchar_t *prop) const
|
||||
{
|
||||
for (PropMap::const_iterator mapItr = properties.begin(); mapItr != properties.end(); mapItr++)
|
||||
{
|
||||
if (CompareStuff(mapItr->first, prop) == 0)
|
||||
{
|
||||
return mapItr->second;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
45
Src/xml/XMLNode.h
Normal file
45
Src/xml/XMLNode.h
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include "../nu/Alias.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
class MapUnicodeComp
|
||||
{
|
||||
public:
|
||||
|
||||
// CSTR_LESS_THAN 1 // string 1 less than string 2
|
||||
// CSTR_EQUAL 2 // string 1 equal to string 2
|
||||
// CSTR_GREATER_THAN 3 // string 1 greater than string 2
|
||||
bool operator()(const wchar_t* str1, const wchar_t* str2) const
|
||||
{
|
||||
return (CompareStringW(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), 0, str1, -1, str2, -1)-2) == CSTR_LESS_THAN;
|
||||
}
|
||||
};
|
||||
|
||||
class XMLNode
|
||||
{
|
||||
public:
|
||||
typedef std::map<const wchar_t *, wchar_t*, MapUnicodeComp> PropMap;
|
||||
typedef std::vector<XMLNode*> NodeList;
|
||||
typedef std::map<const wchar_t *, NodeList*, MapUnicodeComp> NodeMap;
|
||||
|
||||
XMLNode();
|
||||
~XMLNode();
|
||||
const XMLNode *Get(const wchar_t *) const;
|
||||
const NodeList *GetList(const wchar_t *) const;
|
||||
const bool Present(const wchar_t *) const;
|
||||
void SetProperty(const wchar_t *prop, const wchar_t *value);
|
||||
const wchar_t *GetProperty(const wchar_t *prop) const;
|
||||
const wchar_t *GetContent() const;
|
||||
void SetContent_Own(wchar_t *new_content);
|
||||
void AppendContent(wchar_t *append);
|
||||
void AddNode(const wchar_t *name, XMLNode *new_node);
|
||||
XMLNode *parent;
|
||||
|
||||
private:
|
||||
PropMap properties;
|
||||
wchar_t *content;
|
||||
size_t content_len; // number of characters in curtext, not including null terminator
|
||||
NodeMap nodes;
|
||||
};
|
131
Src/xml/XMLParameters.cpp
Normal file
131
Src/xml/XMLParameters.cpp
Normal file
@ -0,0 +1,131 @@
|
||||
#include "XMLParameters.h"
|
||||
#include <wchar.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <Carbon/Carbon.h>
|
||||
int _wcsicmp(const wchar_t *str1, const wchar_t *str2)
|
||||
{
|
||||
CFStringRef cfstr1 = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8 *)str1, wcslen(str1)*sizeof(wchar_t), kCFStringEncodingUTF32, false);
|
||||
CFStringRef cfstr2 = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8 *)str2, wcslen(str2)*sizeof(wchar_t), kCFStringEncodingUTF32, false);
|
||||
int result = CFStringCompare(cfstr1, cfstr2, kCFCompareCaseInsensitive);
|
||||
CFRelease(cfstr1);
|
||||
CFRelease(cfstr2);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
XMLParameters::XMLParameters(const wchar_t **_parameters)
|
||||
: parameters(_parameters), numParameters(0), numParametersCalculated(false)
|
||||
{
|
||||
}
|
||||
|
||||
void XMLParameters::CountTo(int x)
|
||||
{
|
||||
if (numParametersCalculated || x < numParameters)
|
||||
return;
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (parameters[numParameters*2] == 0)
|
||||
{
|
||||
numParametersCalculated=true;
|
||||
return;
|
||||
}
|
||||
numParameters++;
|
||||
if (numParameters == x)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void XMLParameters::Count()
|
||||
{
|
||||
if (numParametersCalculated)
|
||||
return;
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (parameters[numParameters*2] == 0)
|
||||
{
|
||||
numParametersCalculated=true;
|
||||
return;
|
||||
}
|
||||
numParameters++;
|
||||
}
|
||||
}
|
||||
|
||||
const wchar_t *XMLParameters::GetItemName(int i)
|
||||
{
|
||||
CountTo(i);
|
||||
if (i < numParameters)
|
||||
return parameters[i*2];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
const wchar_t *XMLParameters::GetItemValueIndex(int i)
|
||||
{
|
||||
CountTo(i);
|
||||
if (i < numParameters)
|
||||
return parameters[i*2+1];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int XMLParameters::GetNumItems()
|
||||
{
|
||||
Count();
|
||||
return numParameters;
|
||||
}
|
||||
|
||||
const wchar_t *XMLParameters::GetItemValue(const wchar_t *name)
|
||||
{
|
||||
int i=0;
|
||||
while(1)
|
||||
{
|
||||
CountTo(i+1);
|
||||
if (i<numParameters)
|
||||
{
|
||||
if (!_wcsicmp(name, parameters[i*2]))
|
||||
return parameters[i*2+1];
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
i++;
|
||||
};
|
||||
}
|
||||
|
||||
int XMLParameters::GetItemValueInt(const wchar_t *name, int def)
|
||||
{
|
||||
const wchar_t *val = GetItemValue(name);
|
||||
if (val && *val)
|
||||
return wcstol(val, 0, 10);
|
||||
else
|
||||
return def;
|
||||
}
|
||||
|
||||
const wchar_t *XMLParameters::EnumItemValues(const wchar_t *name, int nb)
|
||||
{
|
||||
int i=0;
|
||||
while(1)
|
||||
{
|
||||
CountTo(i+1);
|
||||
if (i<numParameters)
|
||||
{
|
||||
if (!_wcsicmp(name, parameters[i*2]) && nb--)
|
||||
return parameters[i*2+1];
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
i++;
|
||||
};
|
||||
}
|
||||
|
||||
#define CBCLASS XMLParameters
|
||||
START_DISPATCH;
|
||||
CB(XMLREADERPARAMS_GETITEMNAME, GetItemName)
|
||||
CB(XMLREADERPARAMS_GETITEMVALUE, GetItemValueIndex)
|
||||
CB(XMLREADERPARAMS_GETITEMVALUE2, GetItemValue)
|
||||
CB(XMLREADERPARAMS_ENUMITEMVALUES, EnumItemValues)
|
||||
CB(XMLREADERPARAMS_GETNBITEMS, GetNumItems)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
30
Src/xml/XMLParameters.h
Normal file
30
Src/xml/XMLParameters.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef NULLSOFT_XML_XMLPARAMETERS_H
|
||||
#define NULLSOFT_XML_XMLPARAMETERS_H
|
||||
|
||||
#include "ifc_xmlreaderparams.h"
|
||||
|
||||
class XMLParameters : public ifc_xmlreaderparams
|
||||
{
|
||||
public:
|
||||
XMLParameters(const wchar_t **_parameters);
|
||||
|
||||
const wchar_t *GetItemName(int i);
|
||||
const wchar_t *GetItemValueIndex(int i);
|
||||
const wchar_t *GetItemValue(const wchar_t *name);
|
||||
int GetItemValueInt(const wchar_t *name, int def = 0);
|
||||
const wchar_t *EnumItemValues(const wchar_t *name, int nb);
|
||||
int GetNumItems();
|
||||
|
||||
private:
|
||||
const wchar_t **parameters;
|
||||
int numParameters;
|
||||
bool numParametersCalculated;
|
||||
|
||||
void CountTo(int x);
|
||||
void Count();
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
#endif
|
382
Src/xml/XMLReader.cpp
Normal file
382
Src/xml/XMLReader.cpp
Normal file
@ -0,0 +1,382 @@
|
||||
#include "XMLReader.h"
|
||||
#include "ifc_xmlreadercallback.h"
|
||||
#include "XMLParameters.h"
|
||||
#include <memory.h>
|
||||
#include "../nu/regexp.h"
|
||||
#include "../nu/strsafe.h"
|
||||
#include <wctype.h>
|
||||
#include <vector>
|
||||
#include <atlconv.h>
|
||||
|
||||
/* TODO:
|
||||
try to remove CharUpper (but towupper doesn't deal with non-english very well)
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
void CharUpper(wchar_t* src)
|
||||
{
|
||||
while (src && *src)
|
||||
{
|
||||
*src = (wint_t)towupper(*src);
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t* _wcsdup(const wchar_t* src)
|
||||
{
|
||||
if (!src)
|
||||
return 0;
|
||||
size_t len = wcslen(src) + 1;
|
||||
if (len) // check for integer wraparound
|
||||
{
|
||||
wchar_t* newstr = (wchar_t*)malloc(sizeof(wchar_t) * len);
|
||||
wcscpy(newstr, src);
|
||||
return newstr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
CallbackStruct::CallbackStruct(ifc_xmlreadercallback* _callback, const wchar_t* _match, bool doUpper)
|
||||
{
|
||||
match = _wcsdup(_match);
|
||||
if (doUpper)
|
||||
CharUpper(match);
|
||||
callback = _callback;
|
||||
}
|
||||
//------------------------------------------------------
|
||||
CallbackStruct::CallbackStruct()
|
||||
: callback(0), match(0)
|
||||
{
|
||||
}
|
||||
//-------------------------------
|
||||
CallbackStruct::~CallbackStruct()
|
||||
{
|
||||
if (match)
|
||||
{
|
||||
free(match);
|
||||
match = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* --- */
|
||||
|
||||
void XMLCALL DStartTag(void* data, const XML_Char* name, const XML_Char** atts) { ((XMLReader*)data)->StartTag(name, atts); }
|
||||
void XMLCALL DEndTag(void* data, const XML_Char* name) { ((XMLReader*)data)->EndTag(name); }
|
||||
void XMLCALL DTextHandler(void* data, const XML_Char* s, int len) { ((XMLReader*)data)->TextHandler(s, len); }
|
||||
|
||||
int XMLCALL UnknownEncoding(void* data, const XML_Char* name, XML_Encoding* info);
|
||||
|
||||
//--------------------
|
||||
XMLReader::XMLReader()
|
||||
: parser(0)
|
||||
{
|
||||
case_sensitive = false;
|
||||
}
|
||||
//---------------------
|
||||
XMLReader::~XMLReader()
|
||||
{
|
||||
for (size_t i = 0; i != callbacks.size(); i++)
|
||||
{
|
||||
delete callbacks[i];
|
||||
callbacks[i] = 0;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
void XMLReader::RegisterCallback(const wchar_t* matchstr, ifc_xmlreadercallback* callback)
|
||||
{
|
||||
callbacks.push_back(new CallbackStruct(callback, matchstr, !case_sensitive));
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void XMLReader::UnregisterCallback(ifc_xmlreadercallback* callback)
|
||||
{
|
||||
for (size_t i = 0; i != callbacks.size(); i++)
|
||||
{
|
||||
if (callbacks[i] && callbacks[i]->callback == callback)
|
||||
{
|
||||
delete callbacks[i];
|
||||
callbacks[i] = 0; // we set it to 0 so this can be called during a callback
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------
|
||||
int XMLReader::Open()
|
||||
{
|
||||
parser = XML_ParserCreate(0); // create the expat parser
|
||||
if (!parser)
|
||||
return OBJ_XML_FAILURE;
|
||||
|
||||
XML_SetUserData(parser, this); // give our object pointer as context
|
||||
XML_SetElementHandler(parser, DStartTag, DEndTag); // set the tag callbacks
|
||||
XML_SetCharacterDataHandler(parser, DTextHandler); // set the text callbacks
|
||||
XML_SetUnknownEncodingHandler(parser, UnknownEncoding, 0); // setup the character set encoding stuff
|
||||
|
||||
return OBJ_XML_SUCCESS;
|
||||
}
|
||||
//----------------------------
|
||||
int XMLReader::OpenNamespace()
|
||||
{
|
||||
parser = XML_ParserCreateNS(0, L'#'); // create the expat parser, using # to separate namespace URI from element name
|
||||
if (!parser)
|
||||
return OBJ_XML_FAILURE;
|
||||
|
||||
XML_SetUserData(parser, this); // give our object pointer as context
|
||||
XML_SetElementHandler(parser, DStartTag, DEndTag); // set the tag callbacks
|
||||
XML_SetCharacterDataHandler(parser, DTextHandler); // set the text callbacks
|
||||
XML_SetUnknownEncodingHandler(parser, UnknownEncoding, 0); // setup the character set encoding stuff
|
||||
|
||||
return OBJ_XML_SUCCESS;
|
||||
}
|
||||
//--------------------------------------------------
|
||||
void XMLReader::OldFeed(void* data, size_t dataSize)
|
||||
{
|
||||
Feed(data, dataSize);
|
||||
}
|
||||
//----------------------------------------------
|
||||
int XMLReader::Feed(void* data, size_t dataSize)
|
||||
{
|
||||
XML_Status error;
|
||||
if (data && dataSize)
|
||||
{
|
||||
while (dataSize >= 0x7FFFFFFFU) // handle really really big data sizes (hopefully this won't happen)
|
||||
{
|
||||
XML_Parse(parser, reinterpret_cast<const char*>(data), 0x7FFFFFFF, 0);
|
||||
dataSize -= 0x7FFFFFFFU;
|
||||
}
|
||||
error = XML_Parse(parser, reinterpret_cast<const char*>(data), static_cast<int>(dataSize), 0);
|
||||
}
|
||||
else
|
||||
error = XML_Parse(parser, 0, 0, 1); // passing this sequence tells expat that we're done
|
||||
|
||||
if (error == XML_STATUS_ERROR)
|
||||
{
|
||||
// TODO: set a flag to prevent further parsing until a Reset occurs
|
||||
XML_Error errorCode = XML_GetErrorCode(parser);
|
||||
int line = XML_GetCurrentLineNumber(parser);
|
||||
// TODO: int column = XML_GetCurrentColumnNumber(parser);
|
||||
wa::strings::wa_string szError(XML_ErrorString(errorCode));
|
||||
|
||||
for (CallbackStruct* l_callback : callbacks)
|
||||
{
|
||||
if (l_callback != NULL)
|
||||
l_callback->callback->xmlReaderOnError(line, errorCode, szError.GetW().c_str());
|
||||
}
|
||||
|
||||
return OBJ_XML_FAILURE;
|
||||
}
|
||||
|
||||
return OBJ_XML_SUCCESS;
|
||||
}
|
||||
//---------------------
|
||||
void XMLReader::Close()
|
||||
{
|
||||
if (parser)
|
||||
XML_ParserFree(parser);
|
||||
parser = 0;
|
||||
}
|
||||
//-----------------------------------
|
||||
const wchar_t* XMLReader::BuildPath()
|
||||
{
|
||||
return pathString.c_str();
|
||||
}
|
||||
//----------------------------------------------------
|
||||
const wchar_t* XMLReader::AddPath(const wchar_t* node)
|
||||
{
|
||||
currentNode.assign(node);
|
||||
|
||||
if (pathString.length())
|
||||
{
|
||||
pathString.append(L"\f");
|
||||
}
|
||||
|
||||
pathString.append(node);
|
||||
|
||||
if (!case_sensitive)
|
||||
{
|
||||
std::transform(
|
||||
pathString.begin(), pathString.end(),
|
||||
pathString.begin(),
|
||||
towupper);
|
||||
}
|
||||
|
||||
return pathString.c_str();
|
||||
}
|
||||
//-------------------------------------------------
|
||||
const wchar_t* XMLReader::AddPath(const char* node)
|
||||
{
|
||||
wa::strings::wa_string wszNode(node);
|
||||
return AddPath(wszNode.GetW().c_str());
|
||||
}
|
||||
//-------------------------------------------------------
|
||||
const wchar_t* XMLReader::RemovePath(const wchar_t* node)
|
||||
{
|
||||
size_t pathSize = pathString.length();
|
||||
size_t removeLength = wcslen(node);
|
||||
removeLength = pathSize > removeLength ? removeLength + 1 : removeLength;
|
||||
pathString = pathString.substr(0, pathSize - removeLength);
|
||||
|
||||
if (pathString.length())
|
||||
{
|
||||
const wchar_t* last_node = wcsrchr(pathString.c_str(), '\f');
|
||||
if (last_node)
|
||||
{
|
||||
currentNode.assign(last_node + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentNode.assign(pathString);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentNode = L"";
|
||||
}
|
||||
|
||||
return pathString.c_str();
|
||||
}
|
||||
//----------------------------------------------------
|
||||
const wchar_t* XMLReader::RemovePath(const char* node)
|
||||
{
|
||||
wa::strings::wa_string wszNode(node);
|
||||
return RemovePath(wszNode.GetW().c_str());
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
void XMLCALL XMLReader::StartTag(const wchar_t* name, const wchar_t** atts)
|
||||
{
|
||||
const wchar_t* xmlpath = AddPath(name);
|
||||
|
||||
XMLParameters xmlParameters(atts);
|
||||
for (size_t i = 0; i != callbacks.size(); i++)
|
||||
{
|
||||
if (callbacks[i] && Match(callbacks[i]->match, xmlpath))
|
||||
callbacks[i]->callback->xmlReaderOnStartElementCallback(xmlpath, name, static_cast<ifc_xmlreaderparams*>(&xmlParameters));
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
void XMLCALL XMLReader::StartTag(const char* name, const char** atts)
|
||||
{
|
||||
wa::strings::wa_string wszName(name);
|
||||
size_t nAttrCount = 0;
|
||||
const char** a = atts;
|
||||
|
||||
while (*a)
|
||||
{
|
||||
nAttrCount++;
|
||||
a++;
|
||||
}
|
||||
wchar_t** wszAtts = new wchar_t* [nAttrCount + 1];
|
||||
|
||||
if (nAttrCount)
|
||||
{
|
||||
size_t n = 0;
|
||||
while (*atts)
|
||||
{
|
||||
const char* pszAttr = *atts;
|
||||
size_t nAttrLen = strlen(pszAttr);
|
||||
wchar_t* wc = new wchar_t[nAttrLen + 1];
|
||||
mbstowcs_s(NULL, wc, nAttrLen + 1, pszAttr, nAttrLen);
|
||||
wszAtts[n++] = wc;
|
||||
atts++;
|
||||
}
|
||||
|
||||
}
|
||||
wszAtts[nAttrCount] = 0;
|
||||
|
||||
StartTag(wszName.GetW().c_str(), const_cast<const wchar_t**>(wszAtts));
|
||||
}
|
||||
//-------------------------------------------------
|
||||
void XMLCALL XMLReader::EndTag(const wchar_t* name)
|
||||
{
|
||||
endPathString = BuildPath();
|
||||
|
||||
RemovePath(name);
|
||||
|
||||
for (size_t i = 0; i != callbacks.size(); i++)
|
||||
{
|
||||
if (callbacks[i] && Match(callbacks[i]->match, endPathString.c_str()))
|
||||
callbacks[i]->callback->xmlReaderOnEndElementCallback(endPathString.c_str(), name);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------
|
||||
void XMLCALL XMLReader::EndTag(const char* name)
|
||||
{
|
||||
wa::strings::wa_string wszName(name);
|
||||
return EndTag(wszName.GetW().c_str());
|
||||
}
|
||||
//------------------------------------------------------------
|
||||
void XMLCALL XMLReader::TextHandler(const wchar_t* s, int len)
|
||||
{
|
||||
if (len)
|
||||
{
|
||||
textCache.assign(s, len);
|
||||
|
||||
const wchar_t* xmlpath = BuildPath();
|
||||
|
||||
for (size_t i = 0; i != callbacks.size(); i++)
|
||||
{
|
||||
if (callbacks[i] && Match(callbacks[i]->match, xmlpath))
|
||||
callbacks[i]->callback->xmlReaderOnCharacterDataCallback(xmlpath, currentNode.c_str(), textCache.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------
|
||||
void XMLCALL XMLReader::TextHandler(const char* s, int len)
|
||||
{
|
||||
wa::strings::wa_string wszText(s);
|
||||
return TextHandler(wszText.GetW().c_str(), len);
|
||||
}
|
||||
//---------------------------
|
||||
void XMLReader::PushContext()
|
||||
{
|
||||
context.push_back(parser);
|
||||
parser = XML_ExternalEntityParserCreate(parser, L"\0", NULL);
|
||||
}
|
||||
//--------------------------
|
||||
void XMLReader::PopContext()
|
||||
{
|
||||
if (parser)
|
||||
XML_ParserFree(parser);
|
||||
parser = context.back();
|
||||
context.pop_back();
|
||||
}
|
||||
//---------------------
|
||||
void XMLReader::Reset()
|
||||
{
|
||||
if (parser)
|
||||
{
|
||||
XML_ParserReset(parser, 0);
|
||||
XML_SetUserData(parser, this); // give our object pointer as context
|
||||
XML_SetElementHandler(parser, DStartTag, DEndTag); // set the tag callbacks
|
||||
XML_SetCharacterDataHandler(parser, DTextHandler); // set the text callbacks
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------
|
||||
void XMLReader::SetEncoding(const wchar_t* encoding)
|
||||
{
|
||||
wa::strings::wa_string szEncoding(encoding);
|
||||
XML_SetEncoding(parser, szEncoding.GetW().c_str());
|
||||
}
|
||||
//-------------------------------
|
||||
int XMLReader::SetCaseSensitive()
|
||||
{
|
||||
case_sensitive = true;
|
||||
return OBJ_XML_SUCCESS;
|
||||
}
|
||||
|
||||
#define CBCLASS XMLReader
|
||||
START_DISPATCH;
|
||||
VCB(OBJ_XML_REGISTERCALLBACK, RegisterCallback)
|
||||
VCB(OBJ_XML_UNREGISTERCALLBACK, UnregisterCallback)
|
||||
CB(OBJ_XML_OPEN, Open)
|
||||
CB(OBJ_XML_OPEN2, OpenNamespace)
|
||||
VCB(OBJ_XML_OLDFEED, OldFeed)
|
||||
CB(OBJ_XML_FEED, Feed)
|
||||
VCB(OBJ_XML_CLOSE, Close)
|
||||
VCB(OBJ_XML_INTERRUPT, PushContext)
|
||||
VCB(OBJ_XML_RESUME, PopContext)
|
||||
VCB(OBJ_XML_RESET, Reset)
|
||||
VCB(OBJ_XML_SETENCODING, SetEncoding)
|
||||
CB(OBJ_XML_SETCASESENSITIVE, SetCaseSensitive)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
66
Src/xml/XMLReader.h
Normal file
66
Src/xml/XMLReader.h
Normal file
@ -0,0 +1,66 @@
|
||||
#ifndef NULLSOFT_XML_XMLREADER_H
|
||||
#define NULLSOFT_XML_XMLREADER_H
|
||||
|
||||
#include "obj_xml.h"
|
||||
#include <vector>
|
||||
#include "expat.h"
|
||||
#include "../WAT/WAT.h"
|
||||
|
||||
struct CallbackStruct
|
||||
{
|
||||
CallbackStruct(ifc_xmlreadercallback* _callback, const wchar_t* _match, bool doUpper);
|
||||
CallbackStruct();
|
||||
~CallbackStruct();
|
||||
ifc_xmlreadercallback* callback;
|
||||
wchar_t* match;
|
||||
};
|
||||
|
||||
class XMLReader : public obj_xml
|
||||
{
|
||||
public:
|
||||
XMLReader();
|
||||
~XMLReader();
|
||||
void RegisterCallback(const wchar_t* matchstr, ifc_xmlreadercallback* callback);
|
||||
void UnregisterCallback(ifc_xmlreadercallback* callback);
|
||||
int Open();
|
||||
int OpenNamespace();
|
||||
void OldFeed(void* data, size_t dataSize);
|
||||
int Feed(void* data, size_t dataSize);
|
||||
void Close();
|
||||
void PushContext();
|
||||
void PopContext();
|
||||
void Reset();
|
||||
void SetEncoding(const wchar_t* encoding);
|
||||
int SetCaseSensitive();
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
|
||||
public:
|
||||
void XMLCALL StartTag(const wchar_t* name, const wchar_t** atts);
|
||||
void XMLCALL EndTag(const wchar_t* name);
|
||||
void XMLCALL TextHandler(const wchar_t* s, int len);
|
||||
|
||||
void XMLCALL StartTag(const char* name, const char** atts);
|
||||
void XMLCALL EndTag(const char* name);
|
||||
void XMLCALL TextHandler(const char* s, int len);
|
||||
|
||||
private:
|
||||
const wchar_t* BuildPath();
|
||||
const wchar_t* AddPath(const wchar_t* node);
|
||||
const wchar_t* AddPath(const char* node);
|
||||
const wchar_t* RemovePath(const wchar_t* node);
|
||||
const wchar_t* RemovePath(const char* node);
|
||||
std::wstring pathString;//, pathUpper;
|
||||
std::wstring endPathString;//, endPathUpper;
|
||||
std::wstring currentNode;
|
||||
|
||||
private:
|
||||
std::vector<CallbackStruct*> callbacks;
|
||||
std::vector<XML_Parser> context;
|
||||
XML_Parser parser;
|
||||
bool case_sensitive;
|
||||
std::wstring textCache;
|
||||
|
||||
};
|
||||
#endif
|
6
Src/xml/api__xml.h
Normal file
6
Src/xml/api__xml.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef NULLSOFT_XML_AP_IH
|
||||
#define NULLSOFT_XML_AP_IH
|
||||
|
||||
#include <api/service/api_service.h>
|
||||
|
||||
#endif // !NULLSOFT_XML_AP_IH
|
90
Src/xml/encodings_c.cpp
Normal file
90
Src/xml/encodings_c.cpp
Normal file
@ -0,0 +1,90 @@
|
||||
#include "expat/expat.h"
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <wchar.h>
|
||||
// TODO: make this work
|
||||
|
||||
struct AppleEncodings
|
||||
{
|
||||
const wchar_t *name;
|
||||
CFStringEncoding codePage;
|
||||
};
|
||||
|
||||
static const AppleEncodings encodings[] =
|
||||
{
|
||||
{L"iso-8859-2", kCFStringEncodingISOLatin2},
|
||||
{L"iso-8859-3", kCFStringEncodingISOLatin3},
|
||||
{L"iso-8859-4", kCFStringEncodingISOLatin4},
|
||||
{L"iso-8859-5", kCFStringEncodingISOLatinCyrillic},
|
||||
{L"iso-8859-6", kCFStringEncodingISOLatinArabic},
|
||||
{L"iso-8859-7", kCFStringEncodingISOLatinGreek},
|
||||
{L"iso-8859-8", kCFStringEncodingISOLatinHebrew},
|
||||
{L"iso-8859-9", kCFStringEncodingISOLatin5},
|
||||
{L"iso-8859-10", kCFStringEncodingISOLatin6},
|
||||
{L"iso-8859-11", kCFStringEncodingISOLatinThai},
|
||||
{L"iso-8859-13", kCFStringEncodingISOLatin7},
|
||||
{L"iso-8859-14", kCFStringEncodingISOLatin8},
|
||||
{L"iso-8859-15", kCFStringEncodingISOLatin9},
|
||||
{L"windows-1251", kCFStringEncodingWindowsCyrillic},
|
||||
{L"windows-1252", kCFStringEncodingWindowsLatin1},
|
||||
{L"windows-1253", kCFStringEncodingWindowsGreek},
|
||||
{L"windows-1254", kCFStringEncodingWindowsLatin5},
|
||||
{L"windows-1255", kCFStringEncodingWindowsHebrew},
|
||||
{L"windows-1256", kCFStringEncodingWindowsArabic},
|
||||
{L"windows-1257", kCFStringEncodingWindowsBalticRim},
|
||||
{L"windows-1258", kCFStringEncodingWindowsVietnamese},
|
||||
|
||||
};
|
||||
|
||||
static void MakeMap(int *map, CFStringEncoding encoding)
|
||||
{
|
||||
unsigned char i=0;
|
||||
unsigned char mb[2] = {0,0};
|
||||
do
|
||||
{
|
||||
mb[0]=i;
|
||||
// if (IsDBLeadByteEx(codepage, i)) map[i]=-2; else {
|
||||
CFStringRef cfstr = CFStringCreateWithBytes(kCFAllocatorDefault, (UInt8 *)mb, 1, encoding, false);
|
||||
if (!cfstr || CFStringGetBytes(cfstr, CFRangeMake(0,1), kCFStringEncodingUTF32, 0, false, (UInt8 *)(map+i), sizeof(*map), 0))
|
||||
{
|
||||
map[i]=-1;
|
||||
}
|
||||
// }
|
||||
} while (i++ != 255);
|
||||
}
|
||||
|
||||
static bool wcsmatch(const wchar_t *a, const wchar_t *b)
|
||||
{
|
||||
if (!a || !b)
|
||||
return false; // wtf
|
||||
|
||||
while (*a || *b)
|
||||
{
|
||||
if (!*a)
|
||||
return false;
|
||||
if (!*b)
|
||||
return false;
|
||||
|
||||
if (towlower(*a) != towlower(*b))
|
||||
return false;
|
||||
a++;
|
||||
b++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#define NUM_ENCODINGS (sizeof(encodings)/sizeof(AppleEncodings))
|
||||
int XMLCALL UnknownEncoding(void *data, const XML_Char *name, XML_Encoding *info)
|
||||
{
|
||||
for (int i=0;i<NUM_ENCODINGS;i++)
|
||||
{
|
||||
if (!wcsmatch(name, encodings[i].name))
|
||||
{
|
||||
MakeMap(info->map, encodings[i].codePage);
|
||||
info->data = 0;
|
||||
info->convert = 0;
|
||||
info->release = 0;
|
||||
return XML_STATUS_OK;
|
||||
}
|
||||
}
|
||||
return XML_STATUS_ERROR;
|
||||
}
|
68
Src/xml/factory_xml.cpp
Normal file
68
Src/xml/factory_xml.cpp
Normal file
@ -0,0 +1,68 @@
|
||||
#include "api__xml.h"
|
||||
#include "factory_xml.h"
|
||||
#include "XMLReader.h"
|
||||
|
||||
static const char serviceName[] = "XML Parser";
|
||||
|
||||
FOURCC XMLFactory::GetServiceType()
|
||||
{
|
||||
return WaSvc::OBJECT;
|
||||
}
|
||||
|
||||
const char *XMLFactory::GetServiceName()
|
||||
{
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
GUID XMLFactory::GetGUID()
|
||||
{
|
||||
return obj_xmlGUID;
|
||||
}
|
||||
|
||||
void *XMLFactory::GetInterface(int global_lock)
|
||||
{
|
||||
obj_xml *ifc=new XMLReader;
|
||||
// if (global_lock)
|
||||
// WASABI_API_SVC->service_lock(this, (void *)ifc);
|
||||
return ifc;
|
||||
}
|
||||
|
||||
int XMLFactory::SupportNonLockingInterface()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int XMLFactory::ReleaseInterface(void *ifc)
|
||||
{
|
||||
//WASABI_API_SVC->service_unlock(ifc);
|
||||
obj_xml *xml = static_cast<obj_xml *>(ifc);
|
||||
XMLReader *xmlreader = static_cast<XMLReader *>(xml);
|
||||
delete xmlreader;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *XMLFactory::GetTestString()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int XMLFactory::ServiceNotify(int msg, int param1, int param2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CBCLASS
|
||||
#undef CBCLASS
|
||||
#endif
|
||||
|
||||
#define CBCLASS XMLFactory
|
||||
START_DISPATCH;
|
||||
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
|
||||
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
|
||||
CB(WASERVICEFACTORY_GETGUID, GetGUID)
|
||||
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
|
||||
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
|
||||
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
|
||||
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
|
||||
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
|
||||
END_DISPATCH;
|
25
Src/xml/factory_xml.h
Normal file
25
Src/xml/factory_xml.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef NULLSOFT_FACTORY_XML_H
|
||||
#define NULLSOFT_FACTORY_XML_H
|
||||
|
||||
#include "api__xml.h"
|
||||
#include <api/service/waservicefactory.h>
|
||||
#include <api/service/services.h>
|
||||
|
||||
class XMLFactory : public waServiceFactory
|
||||
{
|
||||
public:
|
||||
FOURCC GetServiceType();
|
||||
const char *GetServiceName();
|
||||
GUID GetGUID();
|
||||
void *GetInterface(int global_lock);
|
||||
int SupportNonLockingInterface();
|
||||
int ReleaseInterface(void *ifc);
|
||||
const char *GetTestString();
|
||||
int ServiceNotify(int msg, int param1, int param2);
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
1
Src/xml/ifc_xmlreadercallback.cpp
Normal file
1
Src/xml/ifc_xmlreadercallback.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "ifc_xmlreadercallback.h"
|
48
Src/xml/ifc_xmlreadercallback.h
Normal file
48
Src/xml/ifc_xmlreadercallback.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef NULLSOFT_XML_IFC_XMLREADERCALLBACK_H
|
||||
#define NULLSOFT_XML_IFC_XMLREADERCALLBACK_H
|
||||
|
||||
#include <bfc/dispatch.h>
|
||||
#include "ifc_xmlreaderparams.h"
|
||||
|
||||
class NOVTABLE ifc_xmlreadercallback : public Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_xmlreadercallback() {}
|
||||
~ifc_xmlreadercallback() {}
|
||||
|
||||
public:
|
||||
void xmlReaderOnStartElementCallback( const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params );
|
||||
void xmlReaderOnEndElementCallback( const wchar_t *xmlpath, const wchar_t *xmltag );
|
||||
void xmlReaderOnCharacterDataCallback( const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str );
|
||||
void xmlReaderOnError( int linenum, int errcode, const wchar_t *errstr );
|
||||
|
||||
DISPATCH_CODES
|
||||
{
|
||||
ONSTARTELEMENT = 100,
|
||||
ONENDELEMENT = 200,
|
||||
ONCHARDATA = 300,
|
||||
ONERROR = 1200,
|
||||
};
|
||||
};
|
||||
|
||||
inline void ifc_xmlreadercallback::xmlReaderOnStartElementCallback( const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params )
|
||||
{
|
||||
_voidcall( ONSTARTELEMENT, xmlpath, xmltag, params );
|
||||
}
|
||||
|
||||
inline void ifc_xmlreadercallback::xmlReaderOnEndElementCallback( const wchar_t *xmlpath, const wchar_t *xmltag )
|
||||
{
|
||||
_voidcall( ONENDELEMENT, xmlpath, xmltag );
|
||||
}
|
||||
|
||||
inline void ifc_xmlreadercallback::xmlReaderOnCharacterDataCallback( const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str )
|
||||
{
|
||||
_voidcall( ONCHARDATA, xmlpath, xmltag, str );
|
||||
}
|
||||
|
||||
inline void ifc_xmlreadercallback::xmlReaderOnError( int linenum, int errcode, const wchar_t *errstr )
|
||||
{
|
||||
_voidcall( ONERROR, linenum, errcode, errstr );
|
||||
}
|
||||
|
||||
#endif
|
27
Src/xml/ifc_xmlreadercallbackT.h
Normal file
27
Src/xml/ifc_xmlreadercallbackT.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "ifc_xmlreadercallback.h"
|
||||
|
||||
template <class T>
|
||||
class ifc_xmlreadercallbackT : public ifc_xmlreadercallback
|
||||
{
|
||||
protected:
|
||||
ifc_xmlreadercallbackT() {}
|
||||
~ifc_xmlreadercallbackT() {}
|
||||
|
||||
public:
|
||||
virtual void xmlReaderOnStartElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params){}
|
||||
virtual void xmlReaderOnEndElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag){}
|
||||
virtual void xmlReaderOnCharacterDataCallback(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str){}
|
||||
virtual void xmlReaderOnError( int linenum, int errcode, const wchar_t *errstr) {}
|
||||
|
||||
#define CBCLASS T
|
||||
#define CBCLASST ifc_xmlreadercallbackT<T>
|
||||
START_DISPATCH_INLINE;
|
||||
VCBT(ONSTARTELEMENT, xmlReaderOnStartElementCallback);
|
||||
VCBT(ONENDELEMENT, xmlReaderOnEndElementCallback);
|
||||
VCBT(ONCHARDATA, xmlReaderOnCharacterDataCallback);
|
||||
VCBT(ONERROR, xmlReaderOnError);
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
#undef CBCLASST
|
||||
};
|
39
Src/xml/ifc_xmlreadercallbacki.h
Normal file
39
Src/xml/ifc_xmlreadercallbacki.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef __WASABI_API_XMLREADERCALLBACKI_H
|
||||
#define __WASABI_API_XMLREADERCALLBACKI_H
|
||||
|
||||
#include "ifc_xmlreadercallback.h"
|
||||
|
||||
class ifc_xmlreadercallbackI : public ifc_xmlreadercallback
|
||||
{
|
||||
protected:
|
||||
ifc_xmlreadercallbackI() {}
|
||||
~ifc_xmlreadercallbackI() {}
|
||||
|
||||
public:
|
||||
virtual void xmlReaderOnStartElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params){}
|
||||
virtual void xmlReaderOnEndElementCallback(const wchar_t *xmlpath, const wchar_t *xmltag){}
|
||||
virtual void xmlReaderOnCharacterDataCallback(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str){}
|
||||
virtual void xmlReaderOnError( int linenum, int errcode, const wchar_t *errstr) {}
|
||||
/*
|
||||
const wchar_t *xmlGetFileName();
|
||||
int xmlGetFileLine();
|
||||
void *xmlGetParserHandle();
|
||||
*/
|
||||
#undef CBCLASS
|
||||
#define CBCLASS ifc_xmlreadercallbackI
|
||||
START_DISPATCH_INLINE;
|
||||
VCB(ONSTARTELEMENT, xmlReaderOnStartElementCallback);
|
||||
VCB(ONENDELEMENT, xmlReaderOnEndElementCallback);
|
||||
VCB(ONCHARDATA, xmlReaderOnCharacterDataCallback);
|
||||
VCB(ONERROR, xmlReaderOnError);
|
||||
/*
|
||||
CB(GETFILENAME, xmlGetFileName);
|
||||
CB(GETFILELINE, xmlGetFileLine);
|
||||
CB(GETHANDLE, xmlGetParserHandle);
|
||||
*/
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
||||
};
|
||||
|
||||
|
||||
#endif
|
1
Src/xml/ifc_xmlreaderparams.cpp
Normal file
1
Src/xml/ifc_xmlreaderparams.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "ifc_xmlreaderparams.h"
|
65
Src/xml/ifc_xmlreaderparams.h
Normal file
65
Src/xml/ifc_xmlreaderparams.h
Normal file
@ -0,0 +1,65 @@
|
||||
#ifndef NULLSOFT_XML_IFC_XMLREADERPARAMS_H
|
||||
#define NULLSOFT_XML_IFC_XMLREADERPARAMS_H
|
||||
|
||||
#include <bfc/dispatch.h>
|
||||
#include <bfc/platform/types.h>
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class NOVTABLE ifc_xmlreaderparams : public Dispatchable
|
||||
{
|
||||
protected:
|
||||
ifc_xmlreaderparams() {}
|
||||
virtual ~ifc_xmlreaderparams() {}
|
||||
public:
|
||||
const wchar_t *getItemName(size_t i);
|
||||
const wchar_t *getItemValue(size_t i);
|
||||
const wchar_t *getItemValue(const wchar_t *name);
|
||||
const wchar_t *enumItemValues(const wchar_t *name, size_t nb);
|
||||
int getItemValueInt(const wchar_t *name, int def = 0);
|
||||
size_t getNbItems();
|
||||
|
||||
protected:
|
||||
DISPATCH_CODES
|
||||
{
|
||||
XMLREADERPARAMS_GETITEMNAME = 100,
|
||||
XMLREADERPARAMS_GETITEMVALUE = 200,
|
||||
XMLREADERPARAMS_GETITEMVALUE2 = 201,
|
||||
XMLREADERPARAMS_ENUMITEMVALUES = 202,
|
||||
XMLREADERPARAMS_GETITEMVALUEINT = 300,
|
||||
XMLREADERPARAMS_GETNBITEMS = 400,
|
||||
};
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
inline const wchar_t *ifc_xmlreaderparams::getItemName(size_t i)
|
||||
{
|
||||
return _call(XMLREADERPARAMS_GETITEMNAME, (const wchar_t *)0, i);
|
||||
}
|
||||
|
||||
inline const wchar_t *ifc_xmlreaderparams::getItemValue(size_t i)
|
||||
{
|
||||
return _call(XMLREADERPARAMS_GETITEMVALUE, (const wchar_t *)0, i);
|
||||
}
|
||||
|
||||
inline const wchar_t *ifc_xmlreaderparams::getItemValue(const wchar_t *name)
|
||||
{
|
||||
return _call(XMLREADERPARAMS_GETITEMVALUE2, (const wchar_t *)0, name);
|
||||
}
|
||||
|
||||
inline const wchar_t *ifc_xmlreaderparams::enumItemValues(const wchar_t *name, size_t nb)
|
||||
{
|
||||
return _call(XMLREADERPARAMS_ENUMITEMVALUES, (const wchar_t *)0, name, nb);
|
||||
}
|
||||
|
||||
inline int ifc_xmlreaderparams::getItemValueInt(const wchar_t *name, int def)
|
||||
{
|
||||
return _call(XMLREADERPARAMS_GETITEMVALUEINT, (int)0, name, def);
|
||||
}
|
||||
|
||||
inline size_t ifc_xmlreaderparams::getNbItems()
|
||||
{
|
||||
return _call(XMLREADERPARAMS_GETNBITEMS, (size_t)0);
|
||||
}
|
||||
|
||||
#endif
|
49
Src/xml/main.cpp
Normal file
49
Src/xml/main.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
#include "api__xml.h"
|
||||
#include "wa5_xml.h"
|
||||
#include "factory_xml.h"
|
||||
#include <bfc/platform/export.h>
|
||||
|
||||
#ifndef _DEBUG
|
||||
BOOL WINAPI _DllMainCRTStartup(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
DisableThreadLibraryCalls(hInst);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
WA5_XML wa5_xml;
|
||||
XMLFactory *xmlFactory=0;
|
||||
|
||||
api_service *WASABI_API_SVC = 0;
|
||||
|
||||
void WA5_XML::RegisterServices(api_service *service)
|
||||
{
|
||||
xmlFactory = new XMLFactory;
|
||||
WASABI_API_SVC = service;
|
||||
WASABI_API_SVC->service_register(xmlFactory);
|
||||
}
|
||||
|
||||
int WA5_XML::RegisterServicesSafeModeOk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WA5_XML::DeregisterServices(api_service *service)
|
||||
{
|
||||
service->service_deregister(xmlFactory);
|
||||
delete xmlFactory;
|
||||
xmlFactory=0;
|
||||
}
|
||||
|
||||
extern "C" DLLEXPORT ifc_wa5component *GetWinamp5SystemComponent()
|
||||
{
|
||||
return &wa5_xml;
|
||||
}
|
||||
|
||||
#define CBCLASS WA5_XML
|
||||
START_DISPATCH;
|
||||
VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices)
|
||||
CB(15, RegisterServicesSafeModeOk)
|
||||
VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices)
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
124
Src/xml/obj_xml.h
Normal file
124
Src/xml/obj_xml.h
Normal file
@ -0,0 +1,124 @@
|
||||
#ifndef NULLSOFT_XML_OBJ_XML_H
|
||||
#define NULLSOFT_XML_OBJ_XML_H
|
||||
|
||||
#include <bfc/dispatch.h>
|
||||
#include <bfc/platform/types.h>
|
||||
|
||||
class ifc_xmlreadercallback;
|
||||
|
||||
enum
|
||||
{
|
||||
OBJ_XML_SUCCESS=0,
|
||||
OBJ_XML_FAILURE=1,
|
||||
OBJ_XML_NOTIMPLEMENTED=2,
|
||||
|
||||
/* these two are for backwards compatability. we'll get rid of them eventually so don't use these values */
|
||||
API_XML_SUCCESS=0,
|
||||
API_XML_FAILURE=1,
|
||||
};
|
||||
class NOVTABLE obj_xml : public Dispatchable
|
||||
{
|
||||
public:
|
||||
void xmlreader_registerCallback(const wchar_t *matchstr, ifc_xmlreadercallback *callback);
|
||||
void xmlreader_unregisterCallback(ifc_xmlreadercallback *callback);
|
||||
int xmlreader_open();
|
||||
int xmlreader_open_namespace();
|
||||
void xmlreader_oldfeed(const void *data, size_t dataSize); // no error return value, for backwards compat
|
||||
int xmlreader_feed(const void *data, size_t dataSize); // call with 0, 0 to flush fed data. use at the end of a file
|
||||
void xmlreader_close();
|
||||
void xmlreader_interrupt(); // causes parsing of the already-fed data to stop, and picks up with any new data you feed
|
||||
void xmlreader_resume(); // call resume when you're ready to go back to the already-fed data
|
||||
void xmlreader_reset(); // call to allow an existing obj_xml object to parse a new file. keeps your existing callbacks
|
||||
void xmlreader_setEncoding(const wchar_t *encoding); // call to manually set encoding (maybe from HTTP headers)
|
||||
|
||||
/** by default, callback matches are not case sensitive.
|
||||
** also, the xmlpath value sent to callbacks is convertered to UPPERCASE
|
||||
** although this behaviour might not make sense, it is the default for compatability reasons.
|
||||
** call this function to make matches case sensitive and to make the object pass you the xmlpath "as-is"
|
||||
**/
|
||||
int xmlreader_setCaseSensitive(); // makes the callback matching case sensitive. call this before registering callbacks.
|
||||
DISPATCH_CODES
|
||||
{
|
||||
OBJ_XML_REGISTERCALLBACK = 0,
|
||||
OBJ_XML_UNREGISTERCALLBACK = 10,
|
||||
OBJ_XML_OPEN = 20,
|
||||
OBJ_XML_OPEN2 = 21,
|
||||
OBJ_XML_OLDFEED =30,
|
||||
OBJ_XML_FEED = 31,
|
||||
OBJ_XML_CLOSE = 40,
|
||||
// OBJ_XML_CLONE = 50,
|
||||
OBJ_XML_INTERRUPT = 60,
|
||||
OBJ_XML_RESUME = 70,
|
||||
OBJ_XML_RESET = 80,
|
||||
OBJ_XML_SETENCODING = 90,
|
||||
OBJ_XML_SETCASESENSITIVE=100,
|
||||
};
|
||||
};
|
||||
|
||||
inline void obj_xml::xmlreader_registerCallback(const wchar_t *matchstr, ifc_xmlreadercallback *callback)
|
||||
{
|
||||
_voidcall(OBJ_XML_REGISTERCALLBACK, matchstr, callback);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_unregisterCallback(ifc_xmlreadercallback *callback)
|
||||
{
|
||||
_voidcall(OBJ_XML_UNREGISTERCALLBACK, callback);
|
||||
}
|
||||
|
||||
inline int obj_xml::xmlreader_open()
|
||||
{
|
||||
return _call(OBJ_XML_OPEN, (int)OBJ_XML_FAILURE);
|
||||
}
|
||||
|
||||
inline int obj_xml::xmlreader_open_namespace()
|
||||
{
|
||||
return _call(OBJ_XML_OPEN2, (int)OBJ_XML_FAILURE);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_oldfeed(const void *data, size_t dataSize)
|
||||
{
|
||||
_voidcall(OBJ_XML_OLDFEED, data, dataSize);
|
||||
}
|
||||
|
||||
inline int obj_xml::xmlreader_feed(const void *data, size_t dataSize)
|
||||
{
|
||||
return _call(OBJ_XML_FEED, (int)OBJ_XML_FAILURE, data, dataSize);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_close()
|
||||
{
|
||||
_voidcall(OBJ_XML_CLOSE);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_interrupt()
|
||||
{
|
||||
_voidcall(OBJ_XML_INTERRUPT);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_resume()
|
||||
{
|
||||
_voidcall(OBJ_XML_RESUME);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_reset()
|
||||
{
|
||||
_voidcall(OBJ_XML_RESET);
|
||||
}
|
||||
|
||||
inline void obj_xml::xmlreader_setEncoding(const wchar_t *encoding)
|
||||
{
|
||||
_voidcall(OBJ_XML_SETENCODING, encoding);
|
||||
}
|
||||
|
||||
inline int obj_xml::xmlreader_setCaseSensitive()
|
||||
{
|
||||
return _call(OBJ_XML_SETCASESENSITIVE, (int)OBJ_XML_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
// {3DB2A390-BE91-41f3-BEC6-B736EC7792CA}
|
||||
static const GUID obj_xmlGUID =
|
||||
{ 0x3db2a390, 0xbe91, 0x41f3, { 0xbe, 0xc6, 0xb7, 0x36, 0xec, 0x77, 0x92, 0xca } };
|
||||
|
||||
extern obj_xml *xmlApi;
|
||||
|
||||
#endif
|
14
Src/xml/resource.h
Normal file
14
Src/xml/resource.h
Normal file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by xml.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
39
Src/xml/version.rc2
Normal file
39
Src/xml/version.rc2
Normal file
@ -0,0 +1,39 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#include "../Winamp/buildType.h"
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION WINAMP_PRODUCTVER
|
||||
PRODUCTVERSION WINAMP_PRODUCTVER
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Winamp SA"
|
||||
VALUE "FileDescription", "Winamp 5.x System Component"
|
||||
VALUE "FileVersion", STR_WINAMP_PRODUCTVER
|
||||
VALUE "InternalName", "xml.w5s"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2005-2023 Winamp SA"
|
||||
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
|
||||
VALUE "OriginalFilename", "xml.w5s"
|
||||
VALUE "ProductName", "Winamp XML Service"
|
||||
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
15
Src/xml/wa5_xml.h
Normal file
15
Src/xml/wa5_xml.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __WASABI_WA5_XML_H
|
||||
#define __WASABI_WA5_XML_H
|
||||
|
||||
#include "../Agave/Component/ifc_wa5component.h"
|
||||
|
||||
class WA5_XML : public ifc_wa5component
|
||||
{
|
||||
public:
|
||||
void RegisterServices(api_service *service);
|
||||
int RegisterServicesSafeModeOk();
|
||||
void DeregisterServices(api_service *service);
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
#endif
|
76
Src/xml/xml.rc
Normal file
76
Src/xml/xml.rc
Normal file
@ -0,0 +1,76 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.K.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""version.rc2""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.K.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "version.rc2"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
281
Src/xml/xml.vcxproj
Normal file
281
Src/xml/xml.vcxproj
Normal file
@ -0,0 +1,281 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4FA2D01A-8932-45BA-9C54-E8247DD2CCAB}</ProjectGuid>
|
||||
<RootNamespace>xml</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<TargetExt>.w5s</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>true</VcpkgEnabled>
|
||||
<VcpkgManifestInstall>true</VcpkgManifestInstall>
|
||||
<VcpkgAutoLink>true</VcpkgAutoLink>
|
||||
<VcpkgEnableManifest>false</VcpkgEnableManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgInstalledDir>
|
||||
</VcpkgInstalledDir>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgUseStatic>false</VcpkgUseStatic>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;XML_EXPORTS;XML_STATIC;XML_NS;XML_UNICODE_WCHAR_T;_WIN32_WINNT=0x0601;WINVER=0x0601;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x86_Debug\$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;XML_EXPORTS;XML_STATIC;XML_NS;XML_UNICODE_WCHAR_T;_WIN32_WINNT=0x0601;WINVER=0x0601;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x64_Debug\$(ProjectName).lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XML_EXPORTS;XML_NS;XML_STATIC;XML_UNICODE_WCHAR_T;_WIN32_WINNT=0x0601;WINVER=0x0601;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x86_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<ProfileGuidedDatabase>$(ProjectDir)x86_Release\$(TargetName).pgd</ProfileGuidedDatabase>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;XML_EXPORTS;XML_UNICODE_WCHAR_T;XML_NS;XML_STATIC;_WIN32_WINNT=0x0601;WINVER=0x0601;_WIN32_IE=0x0A00;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<ImportLibrary>$(ProjectDir)x64_Release\$(ProjectName).lib</ImportLibrary>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<ManifestFile>$(ProjectDir)x64_Release\$(TargetName)$(TargetExt).intermediate.manifest</ManifestFile>
|
||||
<ProfileGuidedDatabase>$(ProjectDir)x64_Release\$(TargetName).pgd</ProfileGuidedDatabase>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\ </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\System\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WAT\WAT.vcxproj">
|
||||
<Project>{c5714908-a71f-4644-bd95-aad8ee7914da}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\nu\regexp.h" />
|
||||
<ClInclude Include="api__xml.h" />
|
||||
<ClInclude Include="factory_xml.h" />
|
||||
<ClInclude Include="ifc_xmlreadercallback.h" />
|
||||
<ClInclude Include="ifc_xmlreaderparams.h" />
|
||||
<ClInclude Include="obj_xml.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="wa5_xml.h" />
|
||||
<ClInclude Include="XMLParameters.h" />
|
||||
<ClInclude Include="XMLReader.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\nu\regexp.cpp" />
|
||||
<ClCompile Include="Encodings.cpp" />
|
||||
<ClCompile Include="factory_xml.cpp" />
|
||||
<ClCompile Include="ifc_xmlreadercallback.cpp" />
|
||||
<ClCompile Include="ifc_xmlreaderparams.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="XMLParameters.cpp" />
|
||||
<ClCompile Include="XMLReader.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="xml.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
77
Src/xml/xml.vcxproj.filters
Normal file
77
Src/xml/xml.vcxproj.filters
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Encodings.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="factory_xml.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ifc_xmlreadercallback.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ifc_xmlreaderparams.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\nu\regexp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XMLParameters.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XMLReader.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="XMLReader.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="XMLParameters.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="wa5_xml.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\nu\regexp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="obj_xml.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ifc_xmlreaderparams.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ifc_xmlreadercallback.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="factory_xml.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api__xml.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{6b2cf528-788c-4cfc-9b8f-17f6a7c2b57f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{39bf1e59-ed6d-4054-b1bc-c9cc76e9a83c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Ressource Files">
|
||||
<UniqueIdentifier>{b4e62fe6-4604-4ebe-8485-6ffa445cf867}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="xml.rc">
|
||||
<Filter>Ressource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
301
Src/xml/xml.xcodeproj/project.pbxproj
Normal file
301
Src/xml/xml.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,301 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0C224BF60BEF0DAE00CD61A6 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C224BF50BEF0DAE00CD61A6 /* CoreFoundation.framework */; };
|
||||
0C22BBBF0BBB5A4A00FCAE78 /* api_xmlreadercallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BBBE0BBB5A4A00FCAE78 /* api_xmlreadercallback.cpp */; };
|
||||
0C22BBCF0BBB5A7100FCAE78 /* api_xmlreadercallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BBCE0BBB5A7100FCAE78 /* api_xmlreadercallback.h */; };
|
||||
0C22BBD40BBB5A7C00FCAE78 /* api_xmlreadercallbacki.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BBD00BBB5A7C00FCAE78 /* api_xmlreadercallbacki.h */; };
|
||||
0C22BBD50BBB5A7C00FCAE78 /* api_xmlreadercallbacki.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BBD10BBB5A7C00FCAE78 /* api_xmlreadercallbacki.cpp */; };
|
||||
0C22BBD60BBB5A7C00FCAE78 /* api_xmlreaderparams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BBD20BBB5A7C00FCAE78 /* api_xmlreaderparams.cpp */; };
|
||||
0C22BBD70BBB5A7C00FCAE78 /* api_xmlreaderparams.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BBD30BBB5A7C00FCAE78 /* api_xmlreaderparams.h */; };
|
||||
0C22BBDB0BBB5A9200FCAE78 /* factory_xml.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BBD90BBB5A9200FCAE78 /* factory_xml.h */; };
|
||||
0C22BBDC0BBB5A9200FCAE78 /* factory_xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BBDA0BBB5A9200FCAE78 /* factory_xml.cpp */; };
|
||||
0C22BBE20BBB5AAA00FCAE78 /* wa5_xml.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BBE10BBB5AAA00FCAE78 /* wa5_xml.h */; };
|
||||
0C22BBE40BBB5AAF00FCAE78 /* XMLParameters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BBE30BBB5AAF00FCAE78 /* XMLParameters.cpp */; };
|
||||
0C22BC1A0BBB5DB400FCAE78 /* XMLReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BC190BBB5DB400FCAE78 /* XMLReader.cpp */; };
|
||||
0C22BC8D0BBB60C200FCAE78 /* xmlrole.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BC8A0BBB60C200FCAE78 /* xmlrole.c */; };
|
||||
0C22BC8E0BBB60C200FCAE78 /* xmltok.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BC8B0BBB60C200FCAE78 /* xmltok.c */; };
|
||||
0C22BC8F0BBB60C200FCAE78 /* xmlparse.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BC8C0BBB60C200FCAE78 /* xmlparse.c */; };
|
||||
0C22BCAB0BBB615800FCAE78 /* PtrList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BCA90BBB615800FCAE78 /* PtrList.h */; };
|
||||
0C22BCAC0BBB615800FCAE78 /* PtrList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BCAA0BBB615800FCAE78 /* PtrList.cpp */; };
|
||||
0C22BCBF0BBB619400FCAE78 /* regexp.h in Headers */ = {isa = PBXBuildFile; fileRef = 0C22BCBD0BBB619400FCAE78 /* regexp.h */; };
|
||||
0C22BCC00BBB619400FCAE78 /* regexp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BCBE0BBB619400FCAE78 /* regexp.cpp */; };
|
||||
0C22BCE70BBB634A00FCAE78 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BCE60BBB634A00FCAE78 /* main.cpp */; };
|
||||
0C22BD010BBB63C100FCAE78 /* encodings_c.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C22BD000BBB63C100FCAE78 /* encodings_c.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0C224BF50BEF0DAE00CD61A6 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||
0C22BBBE0BBB5A4A00FCAE78 /* api_xmlreadercallback.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = api_xmlreadercallback.cpp; sourceTree = "<group>"; };
|
||||
0C22BBCE0BBB5A7100FCAE78 /* api_xmlreadercallback.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = api_xmlreadercallback.h; sourceTree = "<group>"; };
|
||||
0C22BBD00BBB5A7C00FCAE78 /* api_xmlreadercallbacki.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = api_xmlreadercallbacki.h; sourceTree = "<group>"; };
|
||||
0C22BBD10BBB5A7C00FCAE78 /* api_xmlreadercallbacki.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = api_xmlreadercallbacki.cpp; sourceTree = "<group>"; };
|
||||
0C22BBD20BBB5A7C00FCAE78 /* api_xmlreaderparams.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = api_xmlreaderparams.cpp; sourceTree = "<group>"; };
|
||||
0C22BBD30BBB5A7C00FCAE78 /* api_xmlreaderparams.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = api_xmlreaderparams.h; sourceTree = "<group>"; };
|
||||
0C22BBD90BBB5A9200FCAE78 /* factory_xml.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = factory_xml.h; sourceTree = "<group>"; };
|
||||
0C22BBDA0BBB5A9200FCAE78 /* factory_xml.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = factory_xml.cpp; sourceTree = "<group>"; };
|
||||
0C22BBE10BBB5AAA00FCAE78 /* wa5_xml.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wa5_xml.h; sourceTree = "<group>"; };
|
||||
0C22BBE30BBB5AAF00FCAE78 /* XMLParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLParameters.cpp; sourceTree = "<group>"; };
|
||||
0C22BC190BBB5DB400FCAE78 /* XMLReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLReader.cpp; sourceTree = "<group>"; };
|
||||
0C22BC8A0BBB60C200FCAE78 /* xmlrole.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmlrole.c; path = expat/xmlrole.c; sourceTree = "<group>"; };
|
||||
0C22BC8B0BBB60C200FCAE78 /* xmltok.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmltok.c; path = expat/xmltok.c; sourceTree = "<group>"; };
|
||||
0C22BC8C0BBB60C200FCAE78 /* xmlparse.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = xmlparse.c; path = expat/xmlparse.c; sourceTree = "<group>"; };
|
||||
0C22BCA90BBB615800FCAE78 /* PtrList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PtrList.h; path = ../nu/PtrList.h; sourceTree = SOURCE_ROOT; };
|
||||
0C22BCAA0BBB615800FCAE78 /* PtrList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PtrList.cpp; path = ../nu/PtrList.cpp; sourceTree = SOURCE_ROOT; };
|
||||
0C22BCBD0BBB619400FCAE78 /* regexp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = regexp.h; path = ../nu/regexp.h; sourceTree = SOURCE_ROOT; };
|
||||
0C22BCBE0BBB619400FCAE78 /* regexp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = regexp.cpp; path = ../nu/regexp.cpp; sourceTree = SOURCE_ROOT; };
|
||||
0C22BCE60BBB634A00FCAE78 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
|
||||
0C22BD000BBB63C100FCAE78 /* encodings_c.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = encodings_c.cpp; sourceTree = "<group>"; };
|
||||
D2AAC0630554660B00DB518D /* xml.w5s */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = xml.w5s; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D289988505E68E00004EDB86 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0C224BF60BEF0DAE00CD61A6 /* CoreFoundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
08FB7794FE84155DC02AAC07 /* xml */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */,
|
||||
);
|
||||
name = xml;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7795FE84155DC02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0C224BF50BEF0DAE00CD61A6 /* CoreFoundation.framework */,
|
||||
0C22BCA80BBB614800FCAE78 /* NU */,
|
||||
0C22BC890BBB60B200FCAE78 /* expat */,
|
||||
0C22BBBE0BBB5A4A00FCAE78 /* api_xmlreadercallback.cpp */,
|
||||
0C22BBCE0BBB5A7100FCAE78 /* api_xmlreadercallback.h */,
|
||||
0C22BBD00BBB5A7C00FCAE78 /* api_xmlreadercallbacki.h */,
|
||||
0C22BBD10BBB5A7C00FCAE78 /* api_xmlreadercallbacki.cpp */,
|
||||
0C22BBD20BBB5A7C00FCAE78 /* api_xmlreaderparams.cpp */,
|
||||
0C22BBD30BBB5A7C00FCAE78 /* api_xmlreaderparams.h */,
|
||||
0C22BBD90BBB5A9200FCAE78 /* factory_xml.h */,
|
||||
0C22BBDA0BBB5A9200FCAE78 /* factory_xml.cpp */,
|
||||
0C22BBE10BBB5AAA00FCAE78 /* wa5_xml.h */,
|
||||
0C22BBE30BBB5AAF00FCAE78 /* XMLParameters.cpp */,
|
||||
0C22BC190BBB5DB400FCAE78 /* XMLReader.cpp */,
|
||||
0C22BCE60BBB634A00FCAE78 /* main.cpp */,
|
||||
0C22BD000BBB63C100FCAE78 /* encodings_c.cpp */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0C22BC890BBB60B200FCAE78 /* expat */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0C22BC8A0BBB60C200FCAE78 /* xmlrole.c */,
|
||||
0C22BC8B0BBB60C200FCAE78 /* xmltok.c */,
|
||||
0C22BC8C0BBB60C200FCAE78 /* xmlparse.c */,
|
||||
);
|
||||
name = expat;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0C22BCA80BBB614800FCAE78 /* NU */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0C22BCBD0BBB619400FCAE78 /* regexp.h */,
|
||||
0C22BCBE0BBB619400FCAE78 /* regexp.cpp */,
|
||||
0C22BCA90BBB615800FCAE78 /* PtrList.h */,
|
||||
0C22BCAA0BBB615800FCAE78 /* PtrList.cpp */,
|
||||
);
|
||||
name = NU;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2AAC0630554660B00DB518D /* xml.w5s */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D2AAC0600554660B00DB518D /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0C22BBCF0BBB5A7100FCAE78 /* api_xmlreadercallback.h in Headers */,
|
||||
0C22BBD40BBB5A7C00FCAE78 /* api_xmlreadercallbacki.h in Headers */,
|
||||
0C22BBD70BBB5A7C00FCAE78 /* api_xmlreaderparams.h in Headers */,
|
||||
0C22BBDB0BBB5A9200FCAE78 /* factory_xml.h in Headers */,
|
||||
0C22BBE20BBB5AAA00FCAE78 /* wa5_xml.h in Headers */,
|
||||
0C22BCAB0BBB615800FCAE78 /* PtrList.h in Headers */,
|
||||
0C22BCBF0BBB619400FCAE78 /* regexp.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D2AAC0620554660B00DB518D /* xml */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "xml" */;
|
||||
buildPhases = (
|
||||
D2AAC0600554660B00DB518D /* Headers */,
|
||||
D2AAC0610554660B00DB518D /* Sources */,
|
||||
D289988505E68E00004EDB86 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = xml;
|
||||
productName = xml;
|
||||
productReference = D2AAC0630554660B00DB518D /* xml.w5s */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "xml" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* xml */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
D2AAC0620554660B00DB518D /* xml */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D2AAC0610554660B00DB518D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0C22BBBF0BBB5A4A00FCAE78 /* api_xmlreadercallback.cpp in Sources */,
|
||||
0C22BBD50BBB5A7C00FCAE78 /* api_xmlreadercallbacki.cpp in Sources */,
|
||||
0C22BBD60BBB5A7C00FCAE78 /* api_xmlreaderparams.cpp in Sources */,
|
||||
0C22BBDC0BBB5A9200FCAE78 /* factory_xml.cpp in Sources */,
|
||||
0C22BBE40BBB5AAF00FCAE78 /* XMLParameters.cpp in Sources */,
|
||||
0C22BC1A0BBB5DB400FCAE78 /* XMLReader.cpp in Sources */,
|
||||
0C22BC8D0BBB60C200FCAE78 /* xmlrole.c in Sources */,
|
||||
0C22BC8E0BBB60C200FCAE78 /* xmltok.c in Sources */,
|
||||
0C22BC8F0BBB60C200FCAE78 /* xmlparse.c in Sources */,
|
||||
0C22BCAC0BBB615800FCAE78 /* PtrList.cpp in Sources */,
|
||||
0C22BCC00BBB619400FCAE78 /* regexp.cpp in Sources */,
|
||||
0C22BCE70BBB634A00FCAE78 /* main.cpp in Sources */,
|
||||
0C22BD010BBB63C100FCAE78 /* encodings_c.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DEB914B08733D8E0010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
EXECUTABLE_EXTENSION = w5s;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = xml;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB914C08733D8E0010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
i386,
|
||||
ppc,
|
||||
ppc64,
|
||||
x86_64,
|
||||
);
|
||||
EXECUTABLE_EXTENSION = w5s;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
INSTALL_PATH = /usr/local/lib;
|
||||
PRODUCT_NAME = xml;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DEB914F08733D8E0010E9CD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
GCC_PREFIX_HEADER = expat/macconfig.h;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
XML_UNICODE_WCHAR_T,
|
||||
HAVE_MEMMOVE,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = ../Wasabi;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DEB915008733D8E0010E9CD /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
GCC_PREFIX_HEADER = expat/macconfig.h;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
XML_UNICODE_WCHAR_T,
|
||||
HAVE_MEMMOVE,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = ../Wasabi;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.5.sdk;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "xml" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB914B08733D8E0010E9CD /* Debug */,
|
||||
1DEB914C08733D8E0010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "xml" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DEB914F08733D8E0010E9CD /* Debug */,
|
||||
1DEB915008733D8E0010E9CD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
|
||||
}
|
Reference in New Issue
Block a user