Some more fun with tabs

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1966 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-05-02 08:36:57 +00:00
parent 6b3f8929c7
commit 99f1efc843
37 changed files with 275 additions and 277 deletions

View File

@@ -194,7 +194,7 @@ CString CString::Escape_n(EEscape eFrom, EEscape eTo) const {
if ((*p == '&') && (strnchr((unsigned char*) p, ';', sizeof(pTmp) - 1, pTmp, &iCounted))) {
// please note that we do not have any Unicode or UTF-8 support here at all.
if ((iCounted >= 3) && (pTmp[1] == '#')) { // do XML and HTML a &#x3c
if ((iCounted >= 3) && (pTmp[1] == '#')) { // do XML and HTML a &#x3c
int base = 10;
if ((pTmp[2] & 0xDF) == 'X') {
@@ -221,7 +221,7 @@ CString CString::Escape_n(EEscape eFrom, EEscape eTo) const {
if (ch > 0) {
a += iCounted;
} else {
ch = *p; // Not a valid escape, just record the &
ch = *p; // Not a valid escape, just record the &
}
} else {
ch = *p;
@@ -884,10 +884,10 @@ CString CString::ToTimeStr(unsigned long s) {
const unsigned long y = d * 365;
CString sRet;
#define TIMESPAN(time, str) \
if (s >= time) { \
#define TIMESPAN(time, str) \
if (s >= time) { \
sRet += CString(s / time) + str " "; \
s = s % time; \
s = s % time; \
}
TIMESPAN(y, "y");
TIMESPAN(w, "w");