Fix compiling under windows

This commit is contained in:
Nimetu 2015-04-20 01:04:52 +03:00
parent f8813e4d2e
commit 8d86495364
6 changed files with 13 additions and 13 deletions

View file

@ -249,10 +249,10 @@ namespace NLGUI
virtual void addText (const char * buf, int len);
// A link has been parsed
virtual void addLink (uint element_number, const BOOL *present, const char **value);
virtual void addLink (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
// A new begin HTML element has been parsed (<IMG> for exemple)
virtual void beginElement (uint element_number, const BOOL *present, const char **value);
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
// A new end HTML element has been parsed (</IMG> for exemple)
virtual void endElement (uint element_number);

View file

@ -32,8 +32,6 @@
#ifndef CL_LIB_WWW_TYPES_H
#define CL_LIB_WWW_TYPES_H
typedef char BOOL;
//
// LibWWW elements
// - order must be kept for backward compatibility, new tags can be added to the end

View file

@ -674,7 +674,7 @@ namespace NLGUI
// ***************************************************************************
void CGroupHTML::addLink (uint element_number, const BOOL *present, const char **value)
void CGroupHTML::addLink (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value)
{
if (_Browsing)
{
@ -982,7 +982,7 @@ namespace NLGUI
// ***************************************************************************
void CGroupHTML::beginElement (uint element_number, const BOOL *present, const char **value)
void CGroupHTML::beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value)
{
if (_Browsing)
{
@ -4604,7 +4604,7 @@ namespace NLGUI
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TTABLE);
uint element_number = (uint)ls.toNumber(1);
std::vector<BOOL> present;
std::vector<bool> present;
std::vector<const char *> value;
present.resize(30, false);
value.resize(30);
@ -4638,9 +4638,9 @@ namespace NLGUI
value.insert(value.begin() + (uint)it.nextKey().toNumber(), buffer);
}
beginElement(element_number, &present[0], &value[0]);
beginElement(element_number, present, value);
if (element_number == HTML_A)
addLink(element_number, &present[0], &value[0]);
addLink(element_number, present, value);
return 0;
}

View file

@ -39,9 +39,11 @@ namespace NLGUI
{
CXMLAutoPtr ptr;
// load attributes into libwww structs
BOOL present[MAX_ATTRIBUTES] = {0};
const char *value[MAX_ATTRIBUTES] = {NULL};
std::vector<bool> present;
std::vector<const char *>value;
std::string strvalues[MAX_ATTRIBUTES];
present.resize(30, false);
value.resize(30);
uint nbAttributes = std::min(MAX_ATTRIBUTES, HTML_DTD->tags[element_number].number_of_attributes);
for(uint i=0; i<nbAttributes; i++)

View file

@ -215,7 +215,7 @@ void CGroupQuickHelp::setGroupTextSize (CInterfaceGroup *group, bool selected)
extern CActionsContext ActionsContext;
void CGroupQuickHelp::beginElement (uint element_number, const BOOL *present, const char **value)
void CGroupQuickHelp::beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *>&value)
{
CGroupHTML::beginElement (element_number, present, value);

View file

@ -48,7 +48,7 @@ private:
virtual void updateCoords();
// From CGroupHTML
virtual void beginElement (uint element_number, const BOOL *present, const char **value);
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *>&value);
virtual void endBuild ();
virtual void browse (const char *url);
virtual std::string home();