From: djk Date: Tue, 28 Mar 2000 22:37:54 +0000 (+0000) Subject: remove trailing spaces properly! X-Git-Tag: R_1_39a^0 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=3fb9221e5513561407446b1e4f41f588d806a7fa;p=spider.git remove trailing spaces properly! --- diff --git a/src/client.c b/src/client.c index 5258e39d..fb7e5c13 100644 --- a/src/client.c +++ b/src/client.c @@ -212,6 +212,10 @@ void send_text(fcb_t *f, char *s, int l) f->obuf = mp = cmsg_new(paclen+1, f->sort, f); } + /* ignore trailing spaces */ + while (l > 0 &&isspace(s[l-1])) + --l; + for (p = s; p < s+l; ) { if (mp->inp >= mp->data + paclen) { flush_text(f);