shithub: riscv

Download patch

ref: 5961379aba45ea41a9234f13dcef1e2994970755
parent: 8035bb7dd1a83e3b98b3bb54defe0dbf35c861cf
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Wed Sep 26 15:21:04 EDT 2012

mothra: display url is page list if no title is available

--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -484,9 +484,11 @@
 		return 0;
 	i = wwwtop-index-1;
 	w = www(i);
-	if(w->title[0]!='\0')
+	if(w->title[0]!='\0'){
 		w->gottitle=1;
-	snprint(buf, sizeof(buf), "%2d %s", i+1, w->title);
+		snprint(buf, sizeof(buf), "%2d %s", i+1, w->title);
+	} else
+		snprint(buf, sizeof(buf), "%2d %s", i+1, urlstr(w->url));
 	return buf;
 }
 
--