~ft/gemnine

afd1e85aa0dd7c71d7cd7f2cdaf18abd4e6513ae — Sigrid Haflínudóttir 2 years ago ae93b05
show previous url after each reponse
1 files changed, 7 insertions(+), 2 deletions(-)

M main.c
M main.c => main.c +7 -2
@@ 214,7 214,7 @@ void
main(int argc, char **argv)
{
	Response *r;
	char *s, *t, *u, *url;
	char *s, *t, *u, *url, *prevurl;
	int len, wait, pl, fd;
	Plumbmsg *m;
	Biobuf out;


@@ 235,6 235,7 @@ main(int argc, char **argv)
	quotefmtinstall();
	Binit(&out, 1, OWRITE);
	pl = -1;
	prevurl = nil;

nexturl:
	url = nil;


@@ 305,9 306,13 @@ nextreq:
		if(!wait)
			exits("failed");
	}
	if(prevurl != nil){
		Bprint(&out, "\nPrevious: %s\n", prevurl);
		free(prevurl);
	}

	Bflush(&out);
	free(url);
	prevurl = url;
	if(wait)
		goto nexturl;