From: djk Date: Tue, 28 Mar 2000 22:37:54 +0000 (+0000) Subject: remove trailing spaces properly! X-Git-Tag: R_1_39a X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a54f3d379a42a7a233cb9d0da6a17bc7f637bbf;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);