more filtertext whitespace options

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2904 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-10 23:14:49 +00:00
parent 4dc6fcff3e
commit 86e14cc9fe
7 changed files with 15 additions and 24 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ void getstring(char *text, ucharbuf &p, int len)
}
void filtertext(char *dst, const char *src, bool whitespace, int len)
void filtertext(char *dst, const char *src, int whitespace, int len)
{
for(int c = *src; c; c = *++src)
{
@@ -85,7 +85,7 @@ void filtertext(char *dst, const char *src, bool whitespace, int len)
{
case '\f': ++src; continue;
}
if(isspace(c) ? whitespace && c == ' ' : isprint(c))
if(isspace(c) ? whitespace && (whitespace>1 || c == ' ') : isprint(c))
{
*dst++ = c;
if(!--len) break;