From e1081bf0c907c4ae3def95bc80c07136c5c4e5d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sat, 13 Dec 1997 22:14:43 +0100
Subject: [PATCH] Now sets title in windex.

Rev: tutorial/manpages:1.5
---
 tutorial/manpages | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tutorial/manpages b/tutorial/manpages
index f7e36050ec..c0011406b4 100644
--- a/tutorial/manpages
+++ b/tutorial/manpages
@@ -103,7 +103,13 @@ void make_page(string base, TAG tag, string ind, string fbase)
 			     return u+"/"+s+"."+base;
 			  },fbase,globalbase+base,base);
 
-   sscanf(outfiles[0],"%*s/man%*s/%s.%*s",q);
+   sscanf(outfiles[0],"%*s/man%*s/%s",q);
+   if (q) {
+     array(string) a = q/".";
+     if (sizeof(a) > 1) {
+       q = a[..sizeof(a)-2]*".";
+     }
+   }
    
    werror("files: "+outfiles*", "+"\n");
 
@@ -138,7 +144,8 @@ void make_page(string base, TAG tag, string ind, string fbase)
 
    foreach (({q})+names,string s)
       windex->write(sprintf("%-15s %-15s - %s\n",
-			    s,q+" ("+obase+")",names*", "));
+			    s,q+" ("+obase+")",
+			    tag->params->title || (names*", ")));
 }
 
 void make_pages(string base, SGML data, string ind, string fbase)
-- 
GitLab