mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
properly enquote spam text
This commit is contained in:
parent
c50cb2aa00
commit
23d9bf4583
@ -763,10 +763,31 @@ hash_function_signature(FunctionRemap *remap) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void InterfaceMaker::
|
void InterfaceMaker::
|
||||||
write_spam_message(ostream &out, FunctionRemap *remap) const {
|
write_spam_message(ostream &out, FunctionRemap *remap) const {
|
||||||
|
ostringstream strm;
|
||||||
|
remap->write_orig_prototype(strm, 0);
|
||||||
|
string prototype = strm.str();
|
||||||
|
|
||||||
out <<
|
out <<
|
||||||
" if (interrogatedb_cat.is_spam()) {\n"
|
" if (interrogatedb_cat.is_spam()) {\n"
|
||||||
" interrogatedb_cat.spam() << \"";
|
" interrogatedb_cat.spam() << \"";
|
||||||
remap->write_orig_prototype(out, 0);
|
|
||||||
|
for (string::const_iterator si = prototype.begin();
|
||||||
|
si != prototype.end();
|
||||||
|
++si) {
|
||||||
|
switch (*si) {
|
||||||
|
case '"':
|
||||||
|
out << "\\\"";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '\\':
|
||||||
|
out << "\\\\";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
out << *si;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
out << "\\n\";\n"
|
out << "\\n\";\n"
|
||||||
" }\n";
|
" }\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user