From 200216313c59328fbcd1c8f6af6f4ff5dcf3ca68 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 1 Jul 2012 20:02:22 +0200 Subject: [PATCH] mothra: make sequence of links separated by space --- sys/src/cmd/mothra/rdhtml.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/src/cmd/mothra/rdhtml.c b/sys/src/cmd/mothra/rdhtml.c index 8e29b46c8..717f4430e 100644 --- a/sys/src/cmd/mothra/rdhtml.c +++ b/sys/src/cmd/mothra/rdhtml.c @@ -626,12 +626,11 @@ void plrdplain(char *name, int fd, Www *dst){ finish(dst); } void plrdhtml(char *name, int fd, Www *dst){ + int t, tagerr; Stack *sp; char buf[20]; char *str; Hglob g; - int t; - int tagerr; g.state=g.stack; g.state->tag=Tag_html; @@ -738,12 +737,11 @@ void plrdhtml(char *name, int fd, Www *dst){ nstrcpy(g.dst->url->fullname, str, sizeof(g.dst->url->fullname)); break; case Tag_a: + if(str=pl_getattr(g.attr, "name")) + nstrcpy(g.state->name, str, sizeof(g.state->name)); + pl_htmloutput(&g, 0, "", 0); if(str=pl_getattr(g.attr, "href")) nstrcpy(g.state->link, str, sizeof(g.state->link)); - if(str=pl_getattr(g.attr, "name")){ - nstrcpy(g.state->name, str, sizeof(g.state->name)); - pl_htmloutput(&g, 0, "", 0); - } break; case Tag_meta: if((str=pl_getattr(g.attr, "http-equiv"))==0)