sacc

sacc(omys), simple console gopher client (mirror)
git clone https://git.parazyd.org/sacc
Log | Files | Refs | LICENSE

commit ff115925b71781e2f000218d6d0e9d624c863cdb
parent 1ac106d2827cab446cf673c12c021ae7d2cee9fe
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri, 25 Aug 2017 14:07:43 +0200

Do not wait for user input on PAGER exit

This is handy if your pager automatically exits without prompting the
user, but this isn't the behaviour recommended by POSIX more, so the
user is responsible for it otherwise.

Diffstat:
Msacc.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sacc.c b/sacc.c @@ -172,7 +172,7 @@ static void displaytextitem(Item *item) { FILE *pagerin; - int pid, wpid, status; + int pid, wpid; uicleanup(); switch (pid = fork()) { @@ -183,11 +183,7 @@ displaytextitem(Item *item) parent = 0; pagerin = popen("$PAGER", "we"); fputs(item->raw, pagerin); - status = pclose(pagerin); - fputs("[Press Enter to continue]", stdout); - fflush(stdout); - getchar(); - exit(status); + exit(pclose(pagerin)); default: while ((wpid = wait(NULL)) >= 0 && wpid != pid) ;