From ad5a438b86126aebff5303d8127e3845d1da49d1 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sat, 20 Feb 2016 17:45:48 +0100 Subject: [PATCH] remove legacy mode for filtertext was no longer in use --- source/src/protocol.cpp | 11 ----------- source/src/protos.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index 9f9ed849..ff5468ab 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -232,17 +232,6 @@ char *filtertext(char *dst, const char *src, int flags, int len) mapname = (flags & FTXT_MAPNAME) != 0, // only allows lowercase chars, digits, '_', '-' and '.'; probably should be used in combination with TOLOWER cropwhite = (flags & FTXT_CROPWHITE) != 0, // removes leading and trailing whitespace pass = false; -#if 1 // classic mode (will be removed, as soon as all sources are clear of it) - switch(flags) - { // whitespace: no whitespace at all (0), blanks only (1), blanks & newline (2) - case -1: nowhite = nocolor = fillblanks = true; break; - case 2: allownl = allowtab = true; - case 1: allowblanks = true; - case 0: nowhite = true; - nocolor = true; - break; - } -#endif if(leet || mapname) nocolor = true; #ifdef FILENAMESALLLOWERCASE if(filename) tolow = true; diff --git a/source/src/protos.h b/source/src/protos.h index 5839d849..2155cf44 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -1040,7 +1040,7 @@ extern void getstring(char *t, ucharbuf &p, int len = MAXTRANS); extern void putgzbuf(vector &d, vector &s); // zips a vector into a stream, stored in another vector extern ucharbuf *getgzbuf(ucharbuf &p); // fetch a gzipped buffer; needs to be freed properly later extern void freegzbuf(ucharbuf *p); // free a ucharbuf created by getgzbuf() -extern char *filtertext(char *dst, const char *src, int flags = 1, int len = sizeof(string)-1); +extern char *filtertext(char *dst, const char *src, int flags, int len = sizeof(string)-1); extern void filterrichtext(char *dst, const char *src, int len = sizeof(string)-1); extern void filterlang(char *d, const char *s); extern void trimtrailingwhitespace(char *s);