1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-21 02:37:16 +01:00
This commit is contained in:
Vadim Kurland 2009-12-13 04:33:06 +00:00
parent bf4ecbf830
commit 62287a7c7c
2 changed files with 25 additions and 17 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 2116
#define BUILD_NUM 2117

View File

@ -165,33 +165,41 @@ string PolicyCompiler_ipt::PrintRule::_printRuleLabel(PolicyRule *rule)
"/FWBuilderResources/Target/options/suppress_comments");
string rl=rule->getLabel();
if (!compiler->inSingleRuleCompileMode() && rl != current_rule_label)
if (rl != current_rule_label)
{
if (!nocomm)
if (!compiler->inSingleRuleCompileMode())
{
res << "# " << endl;
res << "# Rule " << rl << endl;
if (!nocomm)
{
res << "# " << endl;
res << "# Rule " << rl << endl;
res << "# " << endl;
}
res << "echo " << _quote(string("Rule ")+rl) << endl;
res << "# " << endl;
}
res << "echo " << _quote(string("Rule ")+rl) << endl;
res << "# " << endl;
/* do not put comment in the script if it is intended for linksys */
if (!nocomm)
if (!nocomm || compiler->inSingleRuleCompileMode())
{
string comm=rule->getComment();
string::size_type c1,c2;
c1=0;
while ( (c2=comm.find('\n',c1))!=string::npos ) {
res << "# " << comm.substr(c1,c2-c1) << endl;
c1=c2+1;
string comm = rule->getComment();
if (!comm.empty())
{
string::size_type c1,c2;
c1=0;
while ( (c2=comm.find('\n',c1))!=string::npos )
{
res << "# " << comm.substr(c1,c2-c1) << endl;
c1=c2+1;
}
res << "# " << comm.substr(c1) << endl;
res << "# " << endl;
}
res << "# " << comm.substr(c1) << endl;
res << "# " << endl;
}
current_rule_label=rl;
}
current_rule_label=rl;
string err = rule->getStr(".error_msg");
if (!err.empty()) res << "# " << err << endl;