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);
case wxExprString:
{
fprintf( stream, "\"" );
- int i;
+ size_t i;
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string);
- int len = strlen(val);
+ size_t len = strlen(val);
for (i = 0; i < len; i++)
{
char ch = val[i];
if (ch == '"' || ch == '\\')
- fprintf( stream, "\\" );
- char tmp[2];
- tmp[0] = ch;
- tmp[1] = 0;
+ fprintf( stream, "\\" );
+ char tmp[2];
+ tmp[0] = ch;
+ tmp[1] = 0;
fprintf( stream, tmp );
}
fprintf( stream, "\"" );
{
bool quote_it = FALSE;
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
- int len = strlen(val);
- if ((len == 0) || (len > 0 && (val[0] > 64 && val[0] < 91)))
+ size_t len = strlen(val);
+ if ((len == 0) || (len > 0 && (val[(size_t) 0] > 64 && val[(size_t) 0] < 91)))
quote_it = TRUE;
else
{
- int i;
+ size_t i;
for (i = 0; i < len; i++)
if ((!isalpha(val[i])) && (!isdigit(val[i])) &&
(val[i] != '_'))
if (quote_it)
fprintf( stream ,"'" );
- fprintf( stream, (const char*) val );
+ fprintf( stream, val );
if (quote_it)
fprintf( stream, "'" );
{
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;
expr->WriteExpr(stream);
expr = expr->next;
if (expr)
- fprintf( stream, ", " );
+ fprintf( stream, ", " );
}
fprintf( stream, "]" );
}
* wxExpr 'database' (list of expressions)
*/
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
-#endif
wxExprDatabase::wxExprDatabase(wxExprErrorHandler handler)
{
{
noErrors = 0;
- FILE *f = fopen(filename.fn_str(), "r");
+ FILE *f = wxFopen(filename, _T("r"));
if (f)
{
thewxExprDatabase = this;
bool wxExprDatabase::Write(const wxString& fileName)
{
- FILE *stream = fopen( fileName.fn_str(), "w+" );
+ FILE *stream = wxFopen( fileName, _T("w+"));
if (!stream)
return FALSE;
char *wxmake_string(char *str)
{
wxChar *s, *t;
- int len, i;
+ size_t len, i;
const wxMB2WXbuf sbuf = wxConvLibc.cMB2WX(str);
// str++; /* skip leading quote */
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;