// In lyxf3 this will be just LaTeX
-void InsetCommand::Write(FILE * file)
+void InsetCommand::Write(ostream & os)
{
- fprintf(file, "LatexCommand %s\n", getCommand().c_str());
+ os << "LatexCommand " << getCommand() << "\n";
}
if (nestdepth == 0) {
state = WS;
} else {
- nestdepth--;
+ --nestdepth;
}
}
if ((state == Option && c == '[') ||
(state == Content && c == '{')) {
- nestdepth++;
+ ++nestdepth;
}
switch (state) {
case Command: tcommand += c; break;
}
-int InsetCommand::Latex(FILE * file, signed char /*fragile*/)
+int InsetCommand::Latex(ostream & os, signed char /*fragile*/)
{
- fprintf(file, "%s", getCommand().c_str());
+ os << getCommand();
return 0;
}