~julienxx/castor9

73e84e6709adc1774db6ca075dcdc625e7fa31fc — Julien Blanchard 3 years ago c9c2821
Add resettitle()
1 files changed, 11 insertions(+), 6 deletions(-)

M castor.c
M castor.c => castor.c +11 -6
@@ 79,6 79,12 @@ char *menu3[] = {
	0
};

void
resettitle(void)
{
	message("castor9");
}

Url *
current_url(void)
{


@@ 123,7 129,7 @@ show(Ctx *c)
	pldraw(textp, screen);
	plinitentry(entryp, PACKN|FILLX, 0, c->url->raw, entryhit);
	pldraw(entryp, screen);
	message("castor9");
	resettitle();
}

void


@@ 391,7 397,7 @@ gemini_get(Url *url)
			close(fd);

			page(url);
			message("castor9");
			resettitle();
		}else{
			while((line = Brdstr(&body, '\n', 0)) != nil){
				if(strbeg(line, "=>") == 0){


@@ 470,14 476,13 @@ gemini_put(Response *r)
{
	char buf[1024];
	char *url;

	resettitle();
	strncpy(buf, "", sizeof(buf)-1);
	if(eenter(r->meta, buf, sizeof(buf), mouse) <= 0){
		message("castor9");
	if(eenter(r->meta, buf, sizeof(buf), mouse) <= 0)
		return;
	}
	
	url = smprint("%s?%s", r->url->raw, buf);
	message("castor9");
	gemini_get(urlparse(nil, url));
}