From: Peter Howkins Date: Mon, 2 Apr 2012 14:13:13 +0000 (+0100) Subject: On linux use \r instead of ^M as the character for a carridge return. X-Git-Tag: 2.2.0a~26^2~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f43a96122d1d105476bd744260b08b019882f5c;p=oweals%2Fcde.git On linux use \r instead of ^M as the character for a carridge return. --- diff --git a/cde/programs/dtmail/libDtMail/Common/IO.C b/cde/programs/dtmail/libDtMail/Common/IO.C index 2677dcf5..87f6446a 100644 --- a/cde/programs/dtmail/libDtMail/Common/IO.C +++ b/cde/programs/dtmail/libDtMail/Common/IO.C @@ -306,7 +306,11 @@ SafeWriteStrip(int fd, const void * buf, size_t bytes) writebuf = (char*) malloc(bytes < SWS_BUFFERSIZE ? bytes : SWS_BUFFERSIZE); for (i = 0, j = 0; i < bytes; i++, ptr++) { +#if defined(linux) + if (*ptr == '\r' && *(ptr+1) == '\n') +#else if (*ptr == ' ' && *(ptr+1) == '\n') +#endif continue; writebuf[j++] = *ptr; if (j == SWS_BUFFERSIZE || i == (bytes-1)) {