diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-15 03:23:42 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-10-15 03:23:42 +0200 |
commit | 2205830e6787376e7e7b8e96e3fc3554ee57b360 (patch) | |
tree | fcb6e5767389dd23f222a25b100c0ba14e173671 | |
parent | 58cd8d022f045bcf19d40253c20fc4439f60d5d8 (diff) | |
download | blogc-2205830e6787376e7e7b8e96e3fc3554ee57b360.tar.gz blogc-2205830e6787376e7e7b8e96e3fc3554ee57b360.tar.bz2 blogc-2205830e6787376e7e7b8e96e3fc3554ee57b360.zip |
blogc: do not strip spaces, they are valid in file names
-rw-r--r-- | src/blogc/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/blogc/main.c b/src/blogc/main.c index 35bcd88..50123e1 100644 --- a/src/blogc/main.c +++ b/src/blogc/main.c @@ -110,12 +110,11 @@ blogc_read_stdin_to_list(bc_slist_t *l) { char buffer[4096]; while (NULL != fgets(buffer, 4096, stdin)) { - char *tmp = bc_str_strip(buffer); - if (tmp[0] == '\0') + if (buffer[0] == '\0') continue; - if (tmp[0] == '#') + if (buffer[0] == '#') continue; - l = bc_slist_append(l, bc_strdup(tmp)); + l = bc_slist_append(l, bc_strdup(buffer)); } return l; } |