diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-10-13 21:48:43 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-10-13 21:48:43 -0700 |
| commit | dc6ecc4e7fb185d8ded1e1ca46bed3d6283a13d7 (patch) | |
| tree | ed7da148254462a46a9eb1c99e54d238c07bd07c | |
| parent | 6a22cda2e997f5aaf25143cd1d75c4b6b1b3ae28 (diff) | |
Removed (broken) code to escape newlines in output. If you care about
files with newlines, just use '-0'. Otherwise, newlines will just be
printed like every other character.
| -rw-r--r-- | bb.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -1296,15 +1296,7 @@ int main(int argc, char *argv[]) if (bb->firstselected && print_selection) { for (entry_t *e = bb->firstselected; e; e = e->selected.next) { - const char *p = e->fullname; - while (*p) { - const char *p2 = strchr(p, '\n'); - if (!p2) p2 = p + strlen(p); - write(STDOUT_FILENO, p, (size_t)(p2 - p)); - if (*p2 == '\n' && sep == '\n') - write(STDOUT_FILENO, "\\", 1); - p = p2; - } + write(STDOUT_FILENO, e->fullname, strlen(e->fullname)); write(STDOUT_FILENO, &sep, 1); } fflush(stdout); |
