sacc

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

commit 641ce728054743d3f0475ba6c35bafb6d2bc10ac
parent cea0177aa0fa82195efa6dd16c15dcc47af5bba5
Author: Quentin Rameau <quinq@fifth.space>
Date:   Mon,  3 Jul 2017 00:43:12 +0200

Keep text file displayed until user hits enter

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

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