wxString wxExpr::Functor(void) const // Use only for a clause
{
if ((type != wxExprList) || !value.first)
- return wxString(_T(""));
+ return wxString(wxT(""));
if (value.first->type == wxExprWord)
return wxString(value.first->value.word);
else
- return wxString(_T(""));
+ return wxString(wxT(""));
}
bool wxExpr::IsFunctor(const wxString& f) const // Use only for a clause
// DeleteAttributeValue(attribute);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
wxExpr *pval = new wxExpr(val);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
// DeleteAttributeValue(attribute);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
wxExpr *pval = new wxExpr(val);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
wxExpr *pval = new wxExpr(wxExprString, val);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
wxExpr *pval = new wxExpr(wxExprWord, val);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
wxExpr *patt = new wxExpr(wxExprWord, attribute);
wxExpr *pval = new wxExpr(val);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr = new wxExpr(wxExprList);
// Now make an (=, Att, Value) triple
wxExpr *patt = new wxExpr(wxExprWord, attribute);
- wxExpr *pequals = new wxExpr(wxExprWord, _T("="));
+ wxExpr *pequals = new wxExpr(wxExprWord, wxT("="));
wxExpr *listExpr2 = new wxExpr(wxExprList);
{
wxExpr *expr = value.first;
- if ((expr->Type() == wxExprWord) && (wxStrcmp(expr->WordValue(), _T("=")) == 0))
+ if ((expr->Type() == wxExprWord) && (wxStrcmp(expr->WordValue(), wxT("=")) == 0))
{
wxExpr *arg1 = expr->next;
wxExpr *arg2 = arg1->next;
* wxExpr 'database' (list of expressions)
*/
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
-#endif
wxExprDatabase::wxExprDatabase(wxExprErrorHandler handler)
{
thewxExprDatabase = this;
const wxWX2MBbuf buf = buffer.mb_str();
- LexFromString(MBSTRINGCAST buf);
+ LexFromString(wxMBSTRINGCAST buf);
yyparse();
wxExprCleanUp();
return (noErrors == 0);
if (!stream)
return FALSE;
- return Write(stream);
+ bool success = Write(stream);
+ fclose(stream);
+ return success;
}
bool wxExprDatabase::Write(FILE *stream)
t = s;
for(i=1; i<len; i++) // 1 since we want to skip leading quote
{
- if (sbuf[i] == _T('\\') && sbuf[i+1] == _T('"'))
+ if (sbuf[i] == wxT('\\') && sbuf[i+1] == wxT('"'))
{
- *t++ = _T('"');
+ *t++ = wxT('"');
i ++;
}
- else if (sbuf[i] == _T('\\') && sbuf[i+1] == _T('\\'))
+ else if (sbuf[i] == wxT('\\') && sbuf[i+1] == wxT('\\'))
{
- *t++ = _T('\\');
+ *t++ = wxT('\\');
i ++;
}
else
*t++ = sbuf[i];
}
- *t = _T('\0');
+ *t = wxT('\0');
wxExpr *x = new wxExpr(wxExprString, s, FALSE);
return (char *)x;