Parsegen now has better handling of blank comments.

This commit is contained in:
n-a-c-h
2006-03-03 01:29:11 +00:00
parent 7f20c344fc
commit cce9b65d90

View File

@@ -841,9 +841,16 @@ void output_write_var(ostream& c_stream)
for (variable::config_data_array::iterator i = variable::config_data.begin(); i != variable::config_data.end(); i++) for (variable::config_data_array::iterator i = variable::config_data.begin(); i != variable::config_data.end(); i++)
{ {
if (i->format == variable::none) if (i->format == variable::none)
{
if (i->comment != "")
{ {
c_stream << " fprintf(fp, \";%s\\n\", " << encode_string(i->comment) << ");\n"; c_stream << " fprintf(fp, \";%s\\n\", " << encode_string(i->comment) << ");\n";
} }
else
{
c_stream << " fprintf(fp, \"\\n\");\n";
}
}
else if (i->format == variable::mult) else if (i->format == variable::mult)
{ {
c_stream << " write_" << variable::info[i->type].CTypeUnderscore c_stream << " write_" << variable::info[i->type].CTypeUnderscore