Skip to content
Snippets Groups Projects
Commit 644e13db authored by David Hedbor's avatar David Hedbor
Browse files

Changed so that all files are saved in /man/man3/ (since at least

Linux man doesn't find the pages unless you specify section
otherwise). Also changed so that Image man pages are saved as
Image.<whatever>.<whattwo> instead of <whattwo>...

Rev: tutorial/manpages:1.19
parent 0b3a181e
No related branches found
No related tags found
No related merge requests found
// -*- Pike -*- // -*- Pike -*-
// $Id: manpages,v 1.18 1998/05/21 00:07:00 neotron Exp $ // $Id: manpages,v 1.19 1998/07/28 09:16:59 neotron Exp $
#include "types.h" #include "types.h"
...@@ -158,14 +158,15 @@ void make_page(string base, TAG tag, string ind, string fbase) ...@@ -158,14 +158,15 @@ void make_page(string base, TAG tag, string ind, string fbase)
string *outfiles,*names,*s_outfiles; string *outfiles,*names,*s_outfiles;
string obase=base; string obase=base;
string q; string q;
// werror(sprintf("%s %s %s %s \n", tag->params->name, fbase, globalbase, base));
outfiles=Array.map(names=tag->params->name/",", outfiles=Array.map(names=tag->params->name/",",
lambda(string s,string t,string u,string base) lambda(string s,string t,string u,string base)
{ {
s=replace(s,"->","."); s=replace(s,"->",".");
sscanf(s,t+".%s",s); // We want the man pages to be Image.image.foo for example... a man page for "create" is kinda uninteresting...
// sscanf(s,t+".%s",s);
return u+"/"+s+"."+base; return u+"/"+s+"."+base;
},fbase,globalbase+base,base); },fbase,globalbase,base);
sscanf(outfiles[0],"%*s/man%*s/%s",q); sscanf(outfiles[0],"%*s/man%*s/%s",q);
if (q) { if (q) {
...@@ -181,7 +182,7 @@ void make_page(string base, TAG tag, string ind, string fbase) ...@@ -181,7 +182,7 @@ void make_page(string base, TAG tag, string ind, string fbase)
{ {
base+=tag->params->mansuffix; base+=tag->params->mansuffix;
fbase=(tag->params->name/",")[0]; fbase=(tag->params->name/",")[0];
mkdirhier(globalbase+base); // mkdirhier(globalbase+base);
} }
// verbose = ((names*",") == "Thread.Mutex"); // verbose = ((names*",") == "Thread.Mutex");
...@@ -238,10 +239,12 @@ void make_pages(string base, SGML data, string ind, string fbase) ...@@ -238,10 +239,12 @@ void make_pages(string base, SGML data, string ind, string fbase)
void output(string base, WMML data) void output(string base, WMML data)
{ {
globalbase="man/man"; globalbase="man/man3";
mkdirhier("man/man3p"); // mkdirhier("man/man3p");
mkdirhier("man/man3");
windex=Stdio.File("man/windex", "wtc"); windex=Stdio.File("man/windex", "wtc");
whatis=Stdio.File("man/whatis", "wtc"); whatis=Stdio.File("man/whatis", "wtc");
// make_pages("3p", data->data, "", "");
make_pages("3p", data->data, "", ""); make_pages("3p", data->data, "", "");
werror("\n"); werror("\n");
// Used by Xman. // Used by Xman.
...@@ -257,3 +260,4 @@ void output(string base, WMML data) ...@@ -257,3 +260,4 @@ void output(string base, WMML data)
"3pii\t(3PII) Pike Image.image Class\n"); "3pii\t(3PII) Pike Image.image Class\n");
mandesc->close(); mandesc->close();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment