replace newline to space instead of removing them - tscrape - twitter scraper
 (HTM) git clone git://git.codemadness.org/tscrape
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit e386c4bbe4e59ce447c921b9063318e98318c0f1
 (DIR) parent c3e76b0f57c58b284cd13ce008c082525c8ee28a
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri,  5 Jun 2020 17:15:34 +0200
       
       replace newline to space instead of removing them
       
       Diffstat:
         M tscrape.c                           |       6 +++++-
       
       1 file changed, 5 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/tscrape.c b/tscrape.c
       @@ -174,8 +174,12 @@ printexpand(const char *s)
                struct url *u;
        
                for (; *s; s++) {
       -                if (iscntrl((unsigned char)*s))
       +                if (*s == '\n') {
       +                        putchar(' ');
                                continue;
       +                } else if (iscntrl((unsigned char)*s)) {
       +                        continue;
       +                }
                        for (u = urls; u; u = u->next) {
                                if (!strncmp(s, u->url, u->url_len)) {
                                        s += u->url_len;