wxString phrase;
//ASCII code 34 "
int ch=0;
+ int ch1=0;
+
ReadChar(ch);
+ // !! Changed by MS, 15th/11/04. Can now read strings such as
+ // """Catapult"" - blah blah", ...
+
while (ch!=34)
ReadChar(ch);
- ReadChar(ch);
- while (ch!=34)
+ // found first '"'
+ while (true)
{
- phrase+=(char)ch;
- ReadChar(ch);
+ ReadChar(ch);
+ if (ch == 34)
+ {
+ // another quote?
+ ReadChar(ch1);
+ if (ch1 != 34)
+ {
+ // real end of string..
+ break;
+ }
+
+ // add a single quote - fall through
+ }
+ phrase+=(char)ch;
}
+
return phrase;
}
void rc2xml::WriteLabel(wxString label)
{
label.Replace(_T("&"),_T("$"));
+ // changes by MS, handle '<' '>' characters within a label.
+ label.Replace(_T("<"),_T("<"));
+ label.Replace(_T(">"),_T(">"));
m_xmlfile.Write(_T("\t\t\t<label>")+label+_T("</label>\n"));
}
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
WS_TABSTOP,103,110,40,14
*/
-void rc2xml::ParseRichEdit(wxString label, wxString varname)
+void rc2xml::ParseRichEdit(wxString WXUNUSED(label), wxString varname)
{
wxString token;
//while (ReadOrs(token));
void rc2xml::ParseBitmap(wxString varname)
{
- wxString token,*bitmapfile;
+ wxString token;
+ wxString *bitmapfile;
token=PeekToken();
//Microsoft notation?
little.SaveFile(m_targetpath+name,wxBITMAP_TYPE_BMP);
}
-void rc2xml::ParseStringTable(wxString varname)
+void rc2xml::ParseStringTable(wxString WXUNUSED(varname))
{
wxString token;
token=GetToken();
wxString *msg;
while ((token!=_T("END"))&(token!=_T("}")))
- {
+ {
msg=new wxString;
*msg=GetStringQuote();
m_stringtable->Append(token,msg);
token=GetToken();
- }
-
+ }
}
bool rc2xml::LookUpString(wxString strid,wxString & st)
//IDR_MAINFRAME ICON DISCARDABLE "res\\mfcexample.ico"
void rc2xml::ParseIcon(wxString varname)
{
- wxString token,*iconfile;
+ wxString token;
+ wxString *iconfile;
iconfile=new wxString;
token=PeekToken();