8c92023bb3d4194e09700f28b124ebc222296713
[dragonfly.git] / gnu / usr.bin / man / TODO
1 $DragonFly: src/gnu/usr.bin/man/TODO,v 1.2 2008/05/17 09:16:13 swildner Exp $
2
3 Things that would be nice but aren't really necessary:
4
5 0.  Update the documentation.
6
7 XX  Come up with an easier way to install this thing.  There are now
8     lots of options and dependent flags to set.  Should I worry too
9     much about this?
10
11 XX  Properly handle commands like `man 3f intro' when the name of the
12     file we want is something like .../man3/intro.3f.  The way this is
13     done right now seems sort of kludgey but it mostly works.  See
14     man.c for details.
15
16 2.  Malloc everything instead of having fixed limits... Or at least
17     check the limits everywhere.  If you're paranoid about this, make
18     the limits big (famous last words: really, there aren't that many
19     things that could go wrong :-).
20
21 3.  Try to do a little better job of memory management.  There are a
22     lot of little temporary strings that are malloc'd and never freed.
23     This is probably ok for a standalone program but not so good if
24     you wanted to call man() from another program.
25
26 XX  Come up with a clear view of the cat directory file permissions
27     problem.  What's a good solution, other than having man run setuid
28     to some special user?  (Make directories writable by all, cat
29     files 666.)
30
31 XX  Allow a compile time option that makes man run setuid to some
32     other user that owns all the cat pages, so that they don't have to
33     be world writable.
34
35 XX  Allow man to deal with compressed (.Z) frozen (.F) and yabba (.Y)
36     cat files.  Frozen files are compressed files using freeze/melt,
37     some combination of LZW and tree coding.  Sources for it came out
38     on comp.sources.misc or alt.sources or ... a few months ago.
39     Yabba files are compressed using yabba/unyabba, a data compression
40     scheme posted to alt.sources by Dan Bernstein.
41
42 XX  Choose a more reasonable default for the search order.  Perhaps
43     this: 1, n, l, 6, 8, 2, 3, 4, 5, 7, p, o
44
45 XX  Fix glob.c so it doesn't need alloca, and/or fix it so that it can
46     work on a Sun:
47
48         #ifdef __GNUC__
49         #define alloca __builtin_alloca
50         #else /* !__GNUC__ */
51         #ifdef sparc
52         #include <alloca.h>
53         #endif /* sparc */
54         #endif /* __GNUC__ */
55
56 XX  Add some way to automatically to run preprocessors.  The Sun man
57     program has a convention that the first line of the man page can
58     indicate which preprocessors should be run.  Here's an excerpt from
59     its man page:
60
61     Preprocessing Manual Pages
62       If the first line is a string of the form:
63
64           '\"  X
65
66       where  X is separated from the the `"' by a single SPACE and
67       consists of any combination of characters in  the  following
68       list,  man  pipes  its input to troff(1) or nroff(1) through
69       the corresponding preprocessors.
70
71           e    eqn(1), or neqn for nroff
72           r    refer(1)
73           t    tbl(1), and col(1V) for nroff
74           v    vgrind(1)
75
76       If eqn or neqn is invoked, it will  automatically  read  the
77       file /usr/pub/eqnchar (see eqnchar(7)).
78
79 XX  Have manpath stat() the directories in MANPATH to avoid including
80     directories that don't exist.  Some versions of man and whatis
81     complain when the directories (like /usr/new/man) don't exist.
82
83 XX  Pipe the output of apropos and whatis through a pager.
84
85 XX  I've been using your man(1) package for a while now and I ran into
86     a problem with the X man pages that use tbl commands.  Is it
87     possible to configure your man(1) package to use a general command
88     string.  For example, a user could set an environment variable:
89
90     setenv ROFFLINE 'pic $* | tbl | nroff -man'
91
92 13. Fix makewhatis so that it can handle stuff like this (from the
93     Motif 1.1 man pages):
94
95       .TH XmRowColumn 3X "" "" "" ""
96       .SH NAME
97       .mc |
98       \fBXmRowColumn \(em the RowColumn widget class.\fP
99       .mc
100       .iX "XmRowColumn"
101       .iX "widget class" "RowColumn"
102       .sp 1
103       .SH SYNOPSIS
104
105 14. Consider changing the format of the awk command's printf to use
106     "%s" instead of the standard 20.20s to accomodate the extra long
107     file names used by Motif.  Maybe there's a better way to handle
108     this?
109
110 XX. Add ability to run man on a local file
111
112 16. Handle per-tree tmac macros
113     
114 XX  Allow user-definable section search order via -S or $MANSECT.
115     Thus programmers can get stty(3) before stty(1).
116
117 XX  Show all the places you would find a man page (-w option) and in
118     what order.
119
120 19. Support for multi-char sections like man1m/*.1m or manavs/*.avs
121     (can I have a section that doesn't start with a numeral?)
122
123 20. Implement man -K for regexp apropos
124
125 21. An option to grep through all the man pages in $MANPATH