Changes include...
- CString -
Addition of LCString typedef to list<CString>
Added four more args to CString::Token()...
bool bAllowEmpty = false <-- This default of false is NOT backward compatible but seems way more intuitive
const CString& sLeft = ""
const CString& sRight = ""
bool bTrimQuotes = true
Added CString::OptionSplit()
Added CString::QuoteSplit()
Added two new args to CString::Split()...
bool bTrimQuotes = true,
bool bTrimWhiteSpace = false
- CTemplate -
Added new class CTemplateTagHandler to provide capability to add custom tags and vars
Added var name pointer dereferencing in the form of <? VAR Name=*other_var ?> (use ** to start with a literal star)
Added a list of paths that can be used to look for a given filename in multiple locations
Added CTemplate::PrependPath()
Added CTemplate::AppendPath()
Added CTemplate::RemovePath()
Added CTemplate::ClearPath()
Added CTemplate::PrintString() for filling a CString& instead of a stream
Added <? LT ?> which outputs a literal "<?"
Added <? GT ?> which outputs a literal "?>"
Added <? SETBLOCK ?> and <? ENDSETBLOCK ?> for setting a variable's value to the contents between the tags
Added <? EXPAND ?> for expanding a filename to a path using the settable list of paths
Added <? BREAK ?> and <? CONTINUE ?> inner loop tags
Added <? EXIT ?> tag to stop processing
Added <? DEBUG ?> tag for printing to DEBUG()
Added REVERSE keyword to the <? LOOP ?> tag
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1537 726aef4b-f618-498e-8847-2d620e286838
Because the precision defaults to 2, e.g. the traffic stats are now way more
readable.
Thanks to KiNgMaR for the idea and the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1525 726aef4b-f618-498e-8847-2d620e286838
With the current implementation of CString::Base64Decode the following
code would fail (meaning b would be false):
CString t = "some very long string ...";
bool b = (t == t.Base64Encode_n(true).Base64Decode_n());
The same code without wrapping the base64 output would give b = true
as expected.
The new implementation removes all new lines before decoding so
decoding a wrapped base64 text gives the expected result.
Furthermore replaced malloc and free with new and delete and removed
the check for p in CString::Base64Encode since new will throw if it
failed.
The changes don't affect any existing code.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1410 726aef4b-f618-498e-8847-2d620e286838
This way the compiler puts those vars in .rodata instead of .data and everyone
happy. (Plus we have one symbol less exported)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1241 726aef4b-f618-498e-8847-2d620e286838
and updated all references to these files.
This became neccessary to solve problems on case-insensitive file-systems like Windows and MacOS X.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1202 726aef4b-f618-498e-8847-2d620e286838