chiark / gitweb /
basic/terminal-util: fix output of files without a final newline
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Apr 2018 07:39:53 +0000 (09:39 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit1cfbe17982fe1df8f8754cb749151d91c238cf75
tree0a2cd0dd428ba138b173e186cc8d110ad20185e4
parentfae965b26bc77f90cb9b028519ac51337d91ebc1
basic/terminal-util: fix output of files without a final newline

If the main config file or one of the drop-ins did not have the final newline,
there would be no seperating empty line (or if this was the last file
displayed, our own output would end without the final newline, possibly running
into the subsequent prompt or such). copy_bytes() does not know anything about
lines, so let's just use a normal loop with read_line() and puts().
src/basic/terminal-util.c