diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2009-08-14 14:49:07 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2009-08-14 14:49:07 (GMT) |
commit | 8c6ca30831818a77a6947baad63ab99cb8cd8c31 (patch) | |
tree | fed426d0d7216311cbd009a1fcd2786176478b5e /src/config.l | |
parent | 142b4807d2ae7479691bd0800d28364b9857b82f (diff) | |
download | Doxygen-8c6ca30831818a77a6947baad63ab99cb8cd8c31.zip Doxygen-8c6ca30831818a77a6947baad63ab99cb8cd8c31.tar.gz Doxygen-8c6ca30831818a77a6947baad63ab99cb8cd8c31.tar.bz2 |
Release-1.5.9-20090814
Diffstat (limited to 'src/config.l')
-rw-r--r-- | src/config.l | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/config.l b/src/config.l index 2ee393e..e433669 100644 --- a/src/config.l +++ b/src/config.l @@ -77,20 +77,26 @@ static QCString configStringRecode( /* ----------------------------------------------------------------- */ - QCString ConfigOption::convertToComment(const QCString &s) { QCString result; if (s.isEmpty()) return result; else { - result+="# "; QCString tmp=s.stripWhiteSpace(); char *p=tmp.data(); char c; + result+="#"; + if (*p && *p!='\n') + result+=" "; while ((c=*p++)) { - if (c=='\n') result+="\n# "; + if (c=='\n') + { + result+="\n#"; + if (*p && *p!='\n') + result+=" "; + } else result+=c; } result+='\n'; @@ -100,12 +106,13 @@ QCString ConfigOption::convertToComment(const QCString &s) void ConfigOption::writeBoolValue(QTextStream &t,bool v) { + t << " "; if (v) t << "YES"; else t << "NO"; } void ConfigOption::writeIntValue(QTextStream &t,int i) { - t << i; + t << " " << i; } void ConfigOption::writeStringValue(QTextStream &t,QCString &s) @@ -117,6 +124,7 @@ void ConfigOption::writeStringValue(QTextStream &t,QCString &s) const char *p=se.data(); if (p) { + t << " "; while ((c=*p++)!=0 && !needsEscaping) needsEscaping = (c==' ' || c=='\n' || c=='\t' || c=='"' || c=='#'); if (needsEscaping) @@ -145,7 +153,8 @@ void ConfigOption::writeStringList(QTextStream &t,QStrList &l) while (p) { QCString s=p; - if (!first) t << " "; + if (!first) + t << " "; first=FALSE; writeStringValue(t,s); p = l.next(); |