mirror of
https://github.com/darlinghq/darling-man.git
synced 2024-11-26 21:50:28 +00:00
Darling build of man-18.60.1
This commit is contained in:
parent
181a27deb1
commit
aed05506a2
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
*~
|
||||
*.o
|
||||
/man/src/man
|
||||
|
@ -16,23 +16,26 @@ add_compile_options(
|
||||
-fwrapv
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DSTDC_HEADERS
|
||||
add_compile_definitions(
|
||||
STDC_HEADERS
|
||||
TERMIOS_HEADER
|
||||
POSIX
|
||||
DO_COMPRESS
|
||||
)
|
||||
|
||||
set(man_sources
|
||||
src/man.c
|
||||
src/manfile.c
|
||||
src/manpath.c
|
||||
src/man-config.c
|
||||
src/man-getopt.c
|
||||
src/man-iconv.c
|
||||
src/to_cat.c
|
||||
src/different.c
|
||||
src/gripes.c
|
||||
src/glob.c
|
||||
src/util.c
|
||||
src/msg.c
|
||||
man/src/man.c
|
||||
man/src/manfile.c
|
||||
man/src/manpath.c
|
||||
man/src/man-config.c
|
||||
man/src/man-getopt.c
|
||||
man/src/man-iconv.c
|
||||
man/src/to_cat.c
|
||||
man/src/different.c
|
||||
man/src/gripes.c
|
||||
man/src/glob.c
|
||||
man/src/util.c
|
||||
man/src/msg.c
|
||||
)
|
||||
|
||||
add_darling_executable(man ${man_sources})
|
||||
@ -40,17 +43,11 @@ target_link_libraries(man system xcselect)
|
||||
|
||||
install(TARGETS man DESTINATION libexec/darling/usr/bin)
|
||||
|
||||
install(FILES src/apropos src/whatis
|
||||
install(FILES man/src/apropos man/src/whatis
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
DESTINATION libexec/darling/usr/bin)
|
||||
|
||||
# Now done by a C program in doc_cmds
|
||||
#install(FILES src/makewhatis
|
||||
# PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
# DESTINATION libexec/darling/usr/libexec)
|
||||
install(FILES man/src/man.conf DESTINATION libexec/darling/etc)
|
||||
|
||||
install(FILES src/man.conf DESTINATION libexec/darling/etc)
|
||||
|
||||
install(FILES man/en/apropos.1 man/en/man.1 man/en/whatis.1 DESTINATION libexec/darling/usr/share/man/man1)
|
||||
install(FILES man/en/man.conf.5 DESTINATION libexec/darling/usr/share/man/man5)
|
||||
#install(FILES man/en/makewhatis.8 DESTINATION libexec/darling/usr/share/man/man8)
|
||||
install(FILES man/man/en/apropos.1 man/man/en/man.1 man/man/en/whatis.1 DESTINATION libexec/darling/usr/share/man/man1)
|
||||
install(FILES man/man/en/man.conf.5 DESTINATION libexec/darling/usr/share/man/man5)
|
||||
|
75
man/Makefile
Normal file
75
man/Makefile
Normal file
@ -0,0 +1,75 @@
|
||||
# Makefile for man
|
||||
# [need allow_null_glob_expansion=true]
|
||||
# The parts behind
|
||||
|
||||
all: Makefile conf_script source manpages
|
||||
@echo; echo 'You can now do "make install"'
|
||||
|
||||
# On a machine with time before distribution time
|
||||
# it may be necessary to touch all distributed files
|
||||
|
||||
Makefile: Makefile.in configure
|
||||
@echo "Please run configure first"
|
||||
exit 1
|
||||
|
||||
conf_script: configure
|
||||
@echo "Please run configure first"
|
||||
exit 1
|
||||
|
||||
src/Makefile: conf_script src/Makefile.in
|
||||
cd src; ../conf_script Makefile
|
||||
|
||||
man2html/Makefile: conf_script man2html/Makefile.in
|
||||
cd man2html; ../conf_script Makefile
|
||||
|
||||
man/Makefile: conf_script man/Makefile.in
|
||||
cd man; ../conf_script Makefile
|
||||
|
||||
msgs/Makefile: conf_script msgs/Makefile.in
|
||||
cd msgs; ../conf_script Makefile
|
||||
|
||||
makefiles: src/Makefile man2html/Makefile man/Makefile msgs/Makefile
|
||||
|
||||
source: src/Makefile
|
||||
cd src; $(MAKE)
|
||||
|
||||
manhtml: man2html/Makefile source
|
||||
cd man2html; $(MAKE)
|
||||
|
||||
manpages: man/Makefile
|
||||
cd man; $(MAKE) subdirs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
install: src/Makefile man/Makefile
|
||||
cd src; $(MAKE) install
|
||||
cd man; $(MAKE) installsubdirs
|
||||
|
||||
@echo; echo 'Done.'
|
||||
@echo 'In case you want to browse man pages using a www browser,'
|
||||
@echo '"cd man2html", read README, and perhaps "make install-scripts".'
|
||||
# @echo; echo 'Done. In case you want to mount /usr read-only, please'
|
||||
# @echo 'install a symlink /usr/man/whatis -> /var/catman/whatis, or so.'
|
||||
|
||||
clean: src/Makefile man/Makefile msgs/Makefile man2html/Makefile
|
||||
cd src; $(MAKE) clean
|
||||
cd man2html; $(MAKE) clean
|
||||
cd man; $(MAKE) cleansubdirs
|
||||
cd msgs; $(MAKE) clean
|
||||
cd gencat; $(MAKE) clean
|
||||
rm -f core *~
|
||||
|
||||
spotless distclean reallyclean: clean
|
||||
cd src; $(MAKE) spotless
|
||||
cd man2html; $(MAKE) spotless
|
||||
cd man; $(MAKE) spotlesssubdirs
|
||||
cd msgs; $(MAKE) spotless
|
||||
cd gencat; $(MAKE) clean
|
||||
rm -f conf_script Makefile
|
||||
|
||||
DISTR = COPYING README README.HP README.RedHat README.GNU-WIN32 INSTALL \
|
||||
Makefile.in configure src man2html man msgs gencat catopen misc
|
87
man/conf_script
Executable file
87
man/conf_script
Executable file
@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
infiles=$@
|
||||
trap 'rm -f $infiles; exit 1' 1 3 15
|
||||
|
||||
# echo ""
|
||||
for infile in $infiles
|
||||
do
|
||||
case $infile in
|
||||
*.h)
|
||||
cb="/*"; cs=" *"; ce=" */";;
|
||||
*.1|*.5|*.8|*.man)
|
||||
cb=.\\\"; cs=.\\\"; ce=.\\\";;
|
||||
*)
|
||||
case "`sed -n -e 1p $infile.in`" in
|
||||
'#!'*) cb="`sed -n -e 1p $infile.in`";;
|
||||
*) cb="#";;
|
||||
esac
|
||||
cs="#"; ce="#";;
|
||||
esac
|
||||
echo "$cb" > $infile
|
||||
echo "$cs Generated automatically from $infile.in by the" >> $infile
|
||||
echo "$cs configure script." >> $infile
|
||||
echo "$ce" >> $infile
|
||||
echo "Creating $infile from $infile.in"
|
||||
sed -e '
|
||||
s,@version@,man-1.6g,
|
||||
s,@CC@,/Users/ariel/private-bin/clang,
|
||||
s,@EXEEXT@,,
|
||||
s,@BUILD_CC@,/Users/ariel/private-bin/clang,
|
||||
s,@INSTALL@,install,
|
||||
s,@DEFS@, -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS,
|
||||
s,@LIBS@,,
|
||||
s,@LIBOBJS@,,
|
||||
s,@troff@,/usr/bin/groff -Tps -mandoc -c,
|
||||
s,@nroff@,/usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c,
|
||||
s,@jnroff@,/usr/bin/groff -Tnippon -mandocj -c,
|
||||
s,@eqn@,/usr/bin/eqn -Tps,
|
||||
s,@neqn@,/usr/bin/eqn -Tascii,
|
||||
s,@jneqn@,/usr/bin/eqn -Tnippon,
|
||||
s,@tbl@,/usr/bin/tbl,
|
||||
s,@nocol@,# ,
|
||||
s,@pcol@,,
|
||||
s,@col@,/usr/bin/col,
|
||||
s,@vgrind@,,
|
||||
s,@refer@,/usr/bin/refer,
|
||||
s,@grap@,,
|
||||
s,@pic@,/usr/bin/pic,
|
||||
s,@fcat@,,
|
||||
s,@pcat@,,
|
||||
s,@zcat@,/usr/bin/zcat,
|
||||
s,@unxz@,/usr/local/bin/unxz -c,
|
||||
s,@gunzip@,/usr/bin/gunzip -c,
|
||||
s,@bzip2@,/usr/bin/bzip2 -c -d,
|
||||
s,@unlzma@,/usr/local/bin/unlzma -c -d,
|
||||
s,@unyabba@,,
|
||||
s,@compress@,/usr/local/bin/xz,
|
||||
s,@compress_ext@,.xz,
|
||||
s,@decompress@,/usr/local/bin/unxz -c,
|
||||
s,@pager@,/usr/bin/less -is,
|
||||
s,@browser@,/usr/bin/less -is,
|
||||
s,@htmlpager@,/bin/cat,
|
||||
s,@cmp@,/usr/bin/cmp -s,
|
||||
s,@cat@,/bin/cat,
|
||||
s,@awk@,/usr/bin/awk,
|
||||
s,@bindir@,/usr/bin,
|
||||
s,@sbindir@,/usr/sbin,
|
||||
s,@mandir@,/usr/share/man,
|
||||
s,@locale@,,
|
||||
s,@fhs@,,
|
||||
s,@fsstnd@,# ,
|
||||
s,@man1ext@,1,g
|
||||
s,@man5ext@,5,g
|
||||
s,@man8ext@,8,g
|
||||
s,@man_install_flags@,,
|
||||
s,@man_user@,,
|
||||
s,@languages@,en,
|
||||
s,@man@,/usr/bin/man,
|
||||
s,@apropos@,/usr/bin/apropos,
|
||||
s,@whatis@,/usr/bin/whatis,
|
||||
s,@man2dvi@,/usr/bin/man2dvi,
|
||||
s,@makewhatis@,/usr/sbin/makewhatis,
|
||||
s,@man_config_dir@,/private/etc,
|
||||
s,@man_config_file@,/private/etc/man.conf,
|
||||
s,@manpathoption@,--path,
|
||||
s/@sections@/1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o/
|
||||
' $infile.in >> $infile
|
||||
done
|
64
man/man/Makefile
Normal file
64
man/man/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
#
|
||||
# Generated automatically from Makefile.in by the
|
||||
# configure script.
|
||||
#
|
||||
# only executed from a subdir
|
||||
MAN1 = man whatis apropos
|
||||
MAN5 = man.conf
|
||||
ALL = man.1 whatis.1 apropos.1 man.conf.5
|
||||
MAYBE8 = makewhatis
|
||||
|
||||
.SUFFIXES: .man .1 .5 .8
|
||||
|
||||
.man.1:
|
||||
@cp $< $@.in; ../../conf_script $@; rm $@.in
|
||||
|
||||
.man.5:
|
||||
@cp $< $@.in; ../../conf_script $@; rm $@.in
|
||||
|
||||
.man.8:
|
||||
@cp $< $@.in; ../../conf_script $@; rm $@.in
|
||||
|
||||
INSTALL = install -c -m 644
|
||||
|
||||
# Where to put the manual pages.
|
||||
mandir = $(DESTDIR)$(PREFIX)/usr/share/man$(SLANG)
|
||||
|
||||
all: $(ALL)
|
||||
for i in $(MAYBE8); \
|
||||
do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
|
||||
|
||||
install: $(ALL)
|
||||
mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
|
||||
for i in $(MAN1); \
|
||||
do $(INSTALL) $$i.1 $(mandir)/man1/$$i.1; done
|
||||
for i in $(MAN5); \
|
||||
do $(INSTALL) $$i.5 $(mandir)/man5/$$i.5; done
|
||||
for i in $(MAN8); \
|
||||
do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.8; fi; done
|
||||
|
||||
clean:
|
||||
rm -f core *.in *.1 *.5 *.8 *~
|
||||
|
||||
spotless:
|
||||
|
||||
subdirs:
|
||||
@for i in en; do if test -d $$i; then echo; \
|
||||
echo "==== Making the `cat $$i.txt` man pages. ===="; \
|
||||
cd $$i; make -f ../Makefile; cd ..; \
|
||||
else echo "==== No $$i man pages found. ===="; fi; done
|
||||
|
||||
installsubdirs:
|
||||
@for i in en; do if test -d $$i; then echo; \
|
||||
echo "==== Installing the `cat $$i.txt` man pages. ===="; \
|
||||
cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
|
||||
export SLANG; make -f ../Makefile install; cd ..; \
|
||||
else echo "==== No $$i man pages found. ===="; fi; done
|
||||
|
||||
cleansubdirs:
|
||||
@for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
|
||||
rm -f core *~
|
||||
|
||||
spotlesssubdirs:
|
||||
for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
|
||||
rm -f Makefile
|
36
man/man/en/apropos.1
Normal file
36
man/man/en/apropos.1
Normal file
@ -0,0 +1,36 @@
|
||||
.\"
|
||||
.\" Generated automatically from apropos.1.in by the
|
||||
.\" configure script.
|
||||
.\"
|
||||
.\" Man page for apropos
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1991, John W. Eaton.
|
||||
.\"
|
||||
.\" You may distribute under the terms of the GNU General Public
|
||||
.\" License as specified in the README file that comes with the man 1.0
|
||||
.\" distribution.
|
||||
.\"
|
||||
.\" John W. Eaton
|
||||
.\" jwe@che.utexas.edu
|
||||
.\" Department of Chemical Engineering
|
||||
.\" The University of Texas at Austin
|
||||
.\" Austin, Texas 78712
|
||||
.\"
|
||||
.TH apropos 1 "September 19, 2005"
|
||||
.LO 1
|
||||
.SH NAME
|
||||
apropos \- search the whatis database for strings
|
||||
.SH SYNOPSIS
|
||||
.BI apropos
|
||||
keyword ...
|
||||
.SH DESCRIPTION
|
||||
apropos searches a set of database files containing short descriptions
|
||||
of system commands for keywords and displays the result on the
|
||||
standard output.
|
||||
.SH AUTHOR
|
||||
John W. Eaton was the original author of
|
||||
.BR "man" .
|
||||
Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
|
||||
Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
|
||||
.SH "SEE ALSO"
|
||||
whatis(1), man(1).
|
104
man/man/en/makewhatis.8
Normal file
104
man/man/en/makewhatis.8
Normal file
@ -0,0 +1,104 @@
|
||||
.\"
|
||||
.\" Generated automatically from makewhatis.8.in by the
|
||||
.\" configure script.
|
||||
.\"
|
||||
.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo@pluto.linux.it>
|
||||
.\"
|
||||
.\" This is free documentation; you can redistribute it and/or
|
||||
.\" modify it under the terms of the GNU General Public License as
|
||||
.\" published by the Free Software Foundation; either version 2 of
|
||||
.\" the License, or (at your option) any later version.
|
||||
.\"
|
||||
.\" The GNU General Public License's references to "object code"
|
||||
.\" and "executables" are to be interpreted as the output of any
|
||||
.\" document formatting or typesetting system, including
|
||||
.\" intermediate and printed output.
|
||||
.\"
|
||||
.\" This manual is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public
|
||||
.\" License along with this manual; if not, write to the Free
|
||||
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
||||
.\" USA.
|
||||
.\"
|
||||
.TH MAKEWHATIS 8 "September 19, 2005"
|
||||
.SH NAME
|
||||
makewhatis \- Create the whatis database
|
||||
.SH SYNOPSIS
|
||||
.BI "makewhatis [-u] [-v] [-w] [-s " sections " ] [-c [" catpath "]] [" manpath "]"
|
||||
.SH DESCRIPTION
|
||||
.B makewhatis
|
||||
reads all the manual pages contained in the given
|
||||
.IR sections " of " manpath
|
||||
or the preformatted pages contained in the given
|
||||
.IR sections " of " catpath .
|
||||
For each page, it writes a line in the whatis database; each line
|
||||
consists of the name of the page and a short description, separated
|
||||
by a dash. The description is extracted using the content of the
|
||||
NAME section of the manual page.
|
||||
.LP
|
||||
Since other languages use a different term for the NAME section,
|
||||
.B makewhatis
|
||||
recognizes the equivalent terms in Czech, Italian, Finnish, French,
|
||||
German and Spanish.
|
||||
.LP
|
||||
If no
|
||||
.I manpath
|
||||
argument is given,
|
||||
.I /usr/man
|
||||
is assumed by default.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -u
|
||||
Update database with new pages.
|
||||
.TP
|
||||
.B -v
|
||||
Verbose output
|
||||
.TP
|
||||
.B -w
|
||||
Use manpath obtained from `man --path`
|
||||
.TP
|
||||
.BI -s " sections"
|
||||
Looks in the
|
||||
.I sections
|
||||
of
|
||||
.IR manpath " or " catpath .
|
||||
If the option is absent, the MANSECT env var will be used. If it too
|
||||
is absent, the MANSECT setting in man.conf will be used.
|
||||
.TP
|
||||
.BI -c " catpath"
|
||||
The preformatted manual pages located in
|
||||
.I catpath
|
||||
are scanned. If the argument is not provided, it is assumed to be the
|
||||
first existing directory between
|
||||
.IR /usr/man/preformat " and " /usr/man .
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
To rebuild only
|
||||
.IR /usr/X11R6/man/whatis " and " /usr/local/man/whatis
|
||||
.IP
|
||||
makewhatis /usr/X11R6/man /usr/local/man
|
||||
.PP
|
||||
To rebuild all the databases, including those of the Finnish, French
|
||||
and Italian translations
|
||||
.IP
|
||||
LANGUAGE=fi:fr:it makewhatis -w
|
||||
.SH BUGS
|
||||
.B makewhatis
|
||||
may not handle too well manual pages written with non-standard troff
|
||||
macros, such as the Tcl/Tk pages.
|
||||
.PP
|
||||
.B makewhatis
|
||||
does not work on preformatted translations.
|
||||
.SH AUTHOR
|
||||
John W. Eaton was the original author of
|
||||
.BR "man" .
|
||||
Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
|
||||
Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
|
||||
.SH SEE ALSO
|
||||
.BR apropos (1),
|
||||
.BR man (1),
|
||||
.BR whatis (1)
|
528
man/man/en/man.1
Normal file
528
man/man/en/man.1
Normal file
@ -0,0 +1,528 @@
|
||||
.\"
|
||||
.\" Generated automatically from man.1.in by the
|
||||
.\" configure script.
|
||||
.\"
|
||||
.\" Man page for man (and the former manpath)
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1991, John W. Eaton.
|
||||
.\"
|
||||
.\" You may distribute under the terms of the GNU General Public
|
||||
.\" License as specified in the README file that comes with the man 1.0
|
||||
.\" distribution.
|
||||
.\"
|
||||
.\" John W. Eaton
|
||||
.\" jwe@che.utexas.edu
|
||||
.\" Department of Chemical Engineering
|
||||
.\" The University of Texas at Austin
|
||||
.\" Austin, Texas 78712
|
||||
.\"
|
||||
.\" Many changes - aeb
|
||||
.\" More changes - flc
|
||||
.\"
|
||||
.TH man 1 "September 19, 2005"
|
||||
.LO 1
|
||||
.SH NAME
|
||||
man \- format and display the on-line manual pages
|
||||
.SH SYNOPSIS
|
||||
.B man
|
||||
.RB [ \-acdfFhkKtwW ]
|
||||
.RB [ --path ]
|
||||
.RB [ \-m
|
||||
.IR system ]
|
||||
.RB [ \-p
|
||||
.IR string ]
|
||||
.RB [ \-C
|
||||
.IR config_file ]
|
||||
.RB [ \-M
|
||||
.IR pathlist ]
|
||||
.RB [ \-P
|
||||
.IR pager ]
|
||||
.RB [ \-B
|
||||
.IR browser ]
|
||||
.RB [ \-H
|
||||
.IR htmlpager ]
|
||||
.RB [ \-S
|
||||
.IR section_list ]
|
||||
.RI [ section ]
|
||||
.I "name ..."
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B man
|
||||
formats and displays the on-line manual pages. If you specify
|
||||
.IR section ,
|
||||
.B man
|
||||
only looks in that section of the manual.
|
||||
.I name
|
||||
is normally the name of the manual page, which is typically the name
|
||||
of a command, function, or file.
|
||||
However, if
|
||||
.I name
|
||||
contains a slash
|
||||
.RB ( / )
|
||||
then
|
||||
.B man
|
||||
interprets it as a file specification, so that you can do
|
||||
.B "man ./foo.5"
|
||||
or even
|
||||
.B "man /cd/foo/bar.1.gz\fR.\fP"
|
||||
.PP
|
||||
See below for a description of where
|
||||
.B man
|
||||
looks for the manual page files.
|
||||
|
||||
.SH MANUAL SECTIONS
|
||||
The standard sections of the manual include:
|
||||
.TP
|
||||
.B 1
|
||||
User Commands
|
||||
.TP
|
||||
.B 2
|
||||
System Calls
|
||||
.TP
|
||||
.B 3
|
||||
C Library Functions
|
||||
.TP
|
||||
.B 4
|
||||
Devices and Special Files
|
||||
.TP
|
||||
.B 5
|
||||
File Formats and Conventions
|
||||
.TP
|
||||
.B 6
|
||||
Games et. Al.
|
||||
.TP
|
||||
.B 7
|
||||
Miscellanea
|
||||
.TP
|
||||
.B 8
|
||||
System Administration tools and Deamons
|
||||
.TP
|
||||
Distributions customize the manual section to their specifics, which often include additional sections.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\^C " config_file"
|
||||
Specify the configuration file to use; the default is
|
||||
.BR /private/etc/man.conf .
|
||||
(See
|
||||
.BR man.conf (5).)
|
||||
.TP
|
||||
.B \-\^M " path"
|
||||
Specify the list of directories to search for man pages.
|
||||
Separate the directories with colons. An empty list is the same as
|
||||
not specifying
|
||||
.B \-M
|
||||
at all. See
|
||||
.BR "SEARCH PATH FOR MANUAL PAGES" .
|
||||
.TP
|
||||
.B \-\^P " pager"
|
||||
Specify which pager to use.
|
||||
This option overrides the
|
||||
.B MANPAGER
|
||||
environment variable, which in turn overrides the
|
||||
.B PAGER
|
||||
variable. By default,
|
||||
.B man
|
||||
uses
|
||||
.BR "/usr/bin/less -is" .
|
||||
.TP
|
||||
.B \-\^B
|
||||
Specify which browser to use on HTML files.
|
||||
This option overrides the
|
||||
.B BROWSER
|
||||
environment variable. By default,
|
||||
.B man
|
||||
uses
|
||||
.BR /usr/bin/less -is ,
|
||||
.TP
|
||||
.B \-\^H
|
||||
Specify a command that renders HTML files as text.
|
||||
This option overrides the
|
||||
.B HTMLPAGER
|
||||
environment variable. By default,
|
||||
.B man
|
||||
uses
|
||||
.BR /bin/cat ,
|
||||
.TP
|
||||
.B \-\^S " section_list"
|
||||
List is a colon separated list of manual sections to search.
|
||||
This option overrides the
|
||||
.B MANSECT
|
||||
environment variable.
|
||||
.TP
|
||||
.B \-\^a
|
||||
By default,
|
||||
.B man
|
||||
will exit after displaying the first manual page it
|
||||
finds. Using this option forces
|
||||
.B man
|
||||
to display all the manual pages that match
|
||||
.B name,
|
||||
not just the first.
|
||||
.TP
|
||||
.B \-\^c
|
||||
Reformat the source man page, even when an up-to-date cat page exists.
|
||||
This can be meaningful if the cat page was formatted for a screen
|
||||
with a different number of columns, or if the preformatted page
|
||||
is corrupted.
|
||||
.TP
|
||||
.B \-\^d
|
||||
Don't actually display the man pages, but do print gobs of debugging
|
||||
information.
|
||||
.TP
|
||||
.B \-\^D
|
||||
Both display and print debugging info.
|
||||
.TP
|
||||
.B \-\^f
|
||||
Equivalent to
|
||||
.BR whatis .
|
||||
.TP
|
||||
.BR \-\^F " or " \-\-preformat
|
||||
Format only - do not display.
|
||||
.TP
|
||||
.B \-\^h
|
||||
Print a help message and exit.
|
||||
.TP
|
||||
.B \-\^k
|
||||
Equivalent to
|
||||
.BR apropos .
|
||||
.TP
|
||||
.B \-\^K
|
||||
Search for the specified string in *all* man pages. Warning: this is
|
||||
probably very slow! It helps to specify a section.
|
||||
(Just to give a rough idea, on my machine this takes about a minute
|
||||
per 500 man pages.)
|
||||
.TP
|
||||
.B \-\^m " system"
|
||||
Specify an alternate set of man pages to search based on the system
|
||||
name given.
|
||||
.TP
|
||||
.B \-\^p " string"
|
||||
Specify the sequence of preprocessors to run before
|
||||
.B nroff
|
||||
or
|
||||
.BR troff .
|
||||
Not all installations will have a full set of preprocessors.
|
||||
Some of the preprocessors and the letters used to designate them are:
|
||||
eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
|
||||
This option overrides the
|
||||
.B MANROFFSEQ
|
||||
environment variable.
|
||||
.TP
|
||||
.B \-\^t
|
||||
Use
|
||||
.B /usr/bin/groff -Tps -mandoc -c
|
||||
to format the manual page, passing the output to
|
||||
.B stdout.
|
||||
The default output format of
|
||||
.B /usr/bin/groff -Tps -mandoc -c
|
||||
is Postscript, refer to the manual page of
|
||||
.B /usr/bin/groff -Tps -mandoc -c
|
||||
for ways to pick an alternate format.
|
||||
.PP
|
||||
Depending on the selected format and the availability of printing
|
||||
devices, the output
|
||||
may need to be passed through some filter or another before being
|
||||
printed.
|
||||
.TP
|
||||
.B \-\^w \fRor\fP \-\-path
|
||||
Don't actually display the man pages, but do print the location(s) of
|
||||
the files that would be formatted or displayed. If no argument is given:
|
||||
display (on stdout) the list of directories that is searched by
|
||||
.B man
|
||||
for man pages. If
|
||||
.B manpath
|
||||
is a link to man, then "manpath" is equivalent to "man --path".
|
||||
.TP
|
||||
.B \-\^W
|
||||
Like \-\^w, but print file names one per line, without additional information.
|
||||
This is useful in shell commands like
|
||||
.ft CW
|
||||
.B "man -aW man | xargs ls -l"
|
||||
.ft
|
||||
|
||||
.SH "CAT PAGES"
|
||||
Man will try to save the formatted man pages, in order to save
|
||||
formatting time the next time these pages are needed.
|
||||
Traditionally, formatted versions of pages in DIR/manX are
|
||||
saved in DIR/catX, but other mappings from man dir to cat dir
|
||||
can be specified in
|
||||
.BR /private/etc/man.conf .
|
||||
No cat pages are saved when the required cat directory does not exist.
|
||||
No cat pages are saved when they are formatted for a line length
|
||||
different from 80.
|
||||
No cat pages are saved when man.conf contains the line NOCACHE.
|
||||
.PP
|
||||
It is possible to make
|
||||
.B man
|
||||
suid to a user man. Then, if a cat directory
|
||||
has owner man and mode 0755 (only writable by man), and the cat files
|
||||
have owner man and mode 0644 or 0444 (only writable by man, or not
|
||||
writable at all), no ordinary user can change the cat pages or put
|
||||
other files in the cat directory. If
|
||||
.B man
|
||||
is not made suid, then a cat directory should have mode 0777
|
||||
if all users should be able to leave cat pages there.
|
||||
.PP
|
||||
The option
|
||||
.B \-c
|
||||
forces reformatting a page, even if a recent cat page exists.
|
||||
|
||||
.SH "HTML PAGES"
|
||||
Man will find HTML pages if they live in directories named as
|
||||
'html' followed by a section extension. The last file extension is
|
||||
expected to be ".html", thus a valid name for an HTML version of the
|
||||
.BR ls (1)
|
||||
man page would be
|
||||
.IR /usr/share/man/htmlman1/ls.1.html .
|
||||
|
||||
.SH "SEARCH PATH FOR MANUAL PAGES"
|
||||
.B man
|
||||
uses a sophisticated method of finding manual page files, based on the
|
||||
invocation options and environment variables, the
|
||||
.B /private/etc/man.conf
|
||||
configuration file, and some built in conventions and heuristics.
|
||||
.PP
|
||||
First of all, when the
|
||||
.I name
|
||||
argument to
|
||||
.B man
|
||||
contains a slash
|
||||
.RB ( / ),
|
||||
.B man
|
||||
assumes it is a file specification itself,
|
||||
and there is no searching involved.
|
||||
.PP
|
||||
But in the normal case where
|
||||
.I name
|
||||
doesn't contain a slash,
|
||||
.B man
|
||||
searches a variety of directories for a file that could be a manual page
|
||||
for the topic named.
|
||||
.PP
|
||||
If you specify the
|
||||
.BI "-M " pathlist
|
||||
option,
|
||||
.I pathlist
|
||||
is a colon-separated list of the directories that
|
||||
.B man
|
||||
searches.
|
||||
.PP
|
||||
If you don't specify
|
||||
.B -M
|
||||
but set the
|
||||
.B MANPATH
|
||||
environment variable, the value of that variable is the list of the
|
||||
directories that
|
||||
.B man
|
||||
searches.
|
||||
.PP
|
||||
If you don't specify an explicit path list with
|
||||
.B -M
|
||||
or
|
||||
.BR MANPATH ,
|
||||
.B man
|
||||
develops its own path list based on the contents of the configuration
|
||||
file
|
||||
.BR /private/etc/man.conf .
|
||||
The
|
||||
.B MANPATH
|
||||
statements in the configuration file identify particular directories to
|
||||
include in the search path.
|
||||
.PP
|
||||
Furthermore, the
|
||||
.B MANPATH_MAP
|
||||
statements add to the search path depending on your command search path
|
||||
(i.e. your
|
||||
.B PATH
|
||||
environment variable). For each directory that may be in the command
|
||||
search path, a
|
||||
.B MANPATH_MAP
|
||||
statement specifies a directory that should be added to the search
|
||||
path for manual page files.
|
||||
.B man
|
||||
looks at the
|
||||
.B PATH
|
||||
variable and adds the corresponding directories to the manual page
|
||||
file search path. Thus, with the proper use of
|
||||
.BR MANPATH_MAP ,
|
||||
when you issue the command
|
||||
.BR "man xyz" ,
|
||||
you get a manual page for the program that would run if you issued the
|
||||
command
|
||||
.BR xyz .
|
||||
.PP
|
||||
In addition, for each directory in the command search path (we'll call
|
||||
it a "command directory") for which you do
|
||||
.I not
|
||||
have a
|
||||
.B MANPATH_MAP
|
||||
statement,
|
||||
.B man
|
||||
automatically looks for a manual page directory "nearby"
|
||||
namely as a subdirectory in the command directory itself or
|
||||
in the parent directory of the command directory.
|
||||
.PP
|
||||
You can disable the automatic "nearby" searches by including a
|
||||
.B NOAUTOPATH
|
||||
statement in
|
||||
.BR /private/etc/man.conf .
|
||||
.PP
|
||||
In each directory in the search path as described above,
|
||||
.B man
|
||||
searches for a file named
|
||||
.IB topic . section\fR,
|
||||
with an optional suffix on the section number and
|
||||
possibly a compression suffix.
|
||||
If it doesn't find such a file, it then looks in any subdirectories
|
||||
named
|
||||
.BI man N
|
||||
or
|
||||
.BI cat N
|
||||
where
|
||||
.I N
|
||||
is the manual section number.
|
||||
If the file is in a
|
||||
.BI cat N
|
||||
subdirectory,
|
||||
.B man
|
||||
assumes it is a formatted manual page file (cat page). Otherwise,
|
||||
.B man
|
||||
assumes it is unformatted. In either case, if the filename has a
|
||||
known compression suffix (like
|
||||
.BR .gz ),
|
||||
.B man
|
||||
assumes it is gzipped.
|
||||
.PP
|
||||
If you want to see where (or if)
|
||||
.B man
|
||||
would find the manual page for a particular topic, use the
|
||||
.BR "--path " ( -w )
|
||||
option.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B MANPATH
|
||||
If
|
||||
.B MANPATH
|
||||
is set,
|
||||
.B man
|
||||
uses it as the path to search for manual page files. It overrides the
|
||||
configuration file and the automatic search path, but is overridden by
|
||||
the
|
||||
.B -M
|
||||
invocation option. See
|
||||
.BR "SEARCH PATH FOR MANUAL PAGES" .
|
||||
.TP
|
||||
.B MANPL
|
||||
If
|
||||
.B MANPL
|
||||
is set, its value is used as the display page length.
|
||||
Otherwise, the entire man page will occupy one (long) page.
|
||||
.TP
|
||||
.B MANROFFSEQ
|
||||
If
|
||||
.B MANROFFSEQ
|
||||
is set, its value is used to determine the set of preprocessors run
|
||||
before running
|
||||
.B nroff
|
||||
or
|
||||
.BR troff .
|
||||
By default, pages are passed through
|
||||
the tbl preprocessor before
|
||||
.BR nroff .
|
||||
.TP
|
||||
.B MANSECT
|
||||
If
|
||||
.B MANSECT
|
||||
is set, its value is used to determine which manual sections to search.
|
||||
.TP
|
||||
.B MANWIDTH
|
||||
If
|
||||
.B MANWIDTH
|
||||
is set, its value is used as the width manpages should be displayed.
|
||||
Otherwise the pages may be displayed over the whole width of your
|
||||
screen.
|
||||
.TP
|
||||
.B MANPAGER
|
||||
If
|
||||
.B MANPAGER
|
||||
is set, its value is used as the name of the program to use to display
|
||||
the man page. If not, then
|
||||
.B PAGER
|
||||
is used. If that has no value either,
|
||||
.B /usr/bin/less -is
|
||||
is used.
|
||||
.TP
|
||||
.B BROWSER
|
||||
The name of a browser to use for displaying HTML manual pages. If
|
||||
it is not set, /usr/bin/less -is is used.
|
||||
.TP
|
||||
.B HTMLPAGER
|
||||
The command to use for rendering HTML manual pages as text. If
|
||||
it is not set, /bin/cat is used.
|
||||
.TP
|
||||
.B LANG
|
||||
If
|
||||
.B LANG
|
||||
is set, its value defines the name of the subdirectory where man
|
||||
first looks for man pages. Thus, the command `LANG=dk man 1 foo'
|
||||
will cause man to look for the foo man page in .../dk/man1/foo.1,
|
||||
and if it cannot find such a file, then in .../man1/foo.1,
|
||||
where ... is a directory on the search path.
|
||||
.TP
|
||||
.B "NLSPATH, LC_MESSAGES, LANG"
|
||||
The environment variables
|
||||
.B NLSPATH
|
||||
and
|
||||
.B LC_MESSAGES
|
||||
(or
|
||||
.B LANG
|
||||
when the latter does not exist)
|
||||
play a role in locating the message catalog.
|
||||
(But the English messages are compiled in, and for English no catalog
|
||||
is required.)
|
||||
Note that programs like
|
||||
.BR col(1)
|
||||
called by man also use e.g. LC_CTYPE.
|
||||
.TP
|
||||
.B PATH
|
||||
.B PATH
|
||||
helps determine the search path for manual page files. See
|
||||
.BR "SEARCH PATH FOR MANUAL PAGES" .
|
||||
.TP
|
||||
.B SYSTEM
|
||||
.B SYSTEM
|
||||
is used to get the default alternate system name (for use
|
||||
with the
|
||||
.B \-m
|
||||
option).
|
||||
.SH BUGS
|
||||
The
|
||||
.B \-t
|
||||
option only works if a troff-like program is installed.
|
||||
.br
|
||||
If you see blinking \e255 or <AD> instead of hyphens,
|
||||
put `LESSCHARSET=latin1' in your environment.
|
||||
.SH TIPS
|
||||
If you add the line
|
||||
|
||||
(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
|
||||
|
||||
to your
|
||||
.IR .emacs
|
||||
file, then hitting F1 will give you the man page for the library call
|
||||
at the current cursor position.
|
||||
.LP
|
||||
To get a plain text version of a man page, without backspaces
|
||||
and underscores, try
|
||||
|
||||
# man foo | col -b > foo.mantxt
|
||||
.SH AUTHOR
|
||||
John W. Eaton was the original author of
|
||||
.BR "man" .
|
||||
Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with
|
||||
versions 1.3 thru 1.5p.
|
||||
Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
|
||||
.SH "SEE ALSO"
|
||||
apropos(1), whatis(1), less(1), groff(1), man.conf(5).
|
50
man/man/en/man.conf.5
Normal file
50
man/man/en/man.conf.5
Normal file
@ -0,0 +1,50 @@
|
||||
.\"
|
||||
.\" Generated automatically from man.conf.5.in by the
|
||||
.\" configure script.
|
||||
.\"
|
||||
.\" @(#)man.conf
|
||||
.TH MAN.CONF 5 "September 19, 2005"
|
||||
.SH NAME
|
||||
man.conf \- configuration data for man
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
This file is read by
|
||||
.BR man (1)
|
||||
and contains (a) information on how to construct the search path for man,
|
||||
(b) full path names for various programs like nroff, eqn, tbl etc. used by man,
|
||||
and (c) a list with uncompressors for files with a given extension.
|
||||
An alternative version of this file can be specified with
|
||||
.LP
|
||||
.RS
|
||||
man -C private_man.conf ...
|
||||
.RE
|
||||
.LP
|
||||
The command names may be provided with options.
|
||||
Useful options to nroff can be found in grotty(1).
|
||||
For example, instead of the default line
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
NROFF /usr/bin/groff -mandoc -Tlatin1
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
one may write
|
||||
.LP
|
||||
.RS
|
||||
.nf
|
||||
NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
in order to suppress underlining and overstriking.
|
||||
.SH FILES
|
||||
.I "/private/etc/man.conf"
|
||||
.SH AUTHOR
|
||||
John W. Eaton was the original author of
|
||||
.BR "man" .
|
||||
Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
|
||||
Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
|
||||
.SH "SEE ALSO"
|
||||
col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
|
||||
less(1), man (1) and compress(1), gzip(1).
|
38
man/man/en/whatis.1
Normal file
38
man/man/en/whatis.1
Normal file
@ -0,0 +1,38 @@
|
||||
.\"
|
||||
.\" Generated automatically from whatis.1.in by the
|
||||
.\" configure script.
|
||||
.\"
|
||||
.\" Man page for whatis
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1991, John W. Eaton.
|
||||
.\"
|
||||
.\" You may distribute under the terms of the GNU General Public
|
||||
.\" License as specified in the README file that comes with the man 1.0
|
||||
.\" distribution.
|
||||
.\"
|
||||
.\" John W. Eaton
|
||||
.\" jwe@che.utexas.edu
|
||||
.\" Department of Chemical Engineering
|
||||
.\" The University of Texas at Austin
|
||||
.\" Austin, Texas 78712
|
||||
.\"
|
||||
.TH whatis 1 "September 19, 2005"
|
||||
.LO 1
|
||||
.SH NAME
|
||||
whatis \- search the whatis database for complete words.
|
||||
.SH SYNOPSIS
|
||||
.BI whatis
|
||||
keyword ...
|
||||
.SH DESCRIPTION
|
||||
whatis searches a set of database files containing short descriptions
|
||||
of system commands for keywords and displays the result on the
|
||||
standard output. Only complete word matches are displayed.
|
||||
|
||||
The whatis database is created using the command /usr/libexec/makewhatis.
|
||||
.SH AUTHOR
|
||||
John W. Eaton was the original author of
|
||||
.BR "man" .
|
||||
Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
|
||||
Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
|
||||
.SH "SEE ALSO"
|
||||
apropos(1), man(1).
|
70
man/man2html/Makefile
Normal file
70
man/man2html/Makefile
Normal file
@ -0,0 +1,70 @@
|
||||
#
|
||||
# Generated automatically from Makefile.in by the
|
||||
# configure script.
|
||||
#
|
||||
CC = /Users/ariel/private-bin/clang
|
||||
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||
OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
|
||||
EXEEXT =
|
||||
bindir = $(DESTDIR)$(PREFIX)/usr/bin
|
||||
mandir = $(DESTDIR)$(PREFIX)/usr/share/man
|
||||
vardir = $(DESTDIR)$(PREFIX)/var
|
||||
httpdir = $(DESTDIR)$(PREFIX)/home/httpd
|
||||
cgiowner = nobody
|
||||
cgigroup = nobody
|
||||
|
||||
all: man2html$(EXEEXT) hman
|
||||
|
||||
man2html$(EXEEXT): $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o man2html$(EXEEXT) $(OBJECTS)
|
||||
|
||||
# man2html: ../src/version.h
|
||||
|
||||
# This installs the man2html utility
|
||||
install: man2html$(EXEEXT)
|
||||
mkdir -p $(bindir)
|
||||
install -m 755 man2html$(EXEEXT) $(bindir)
|
||||
mkdir -p $(mandir)/man1
|
||||
install -m 644 man2html.1 $(mandir)/man1/man2html.1
|
||||
|
||||
install-scripts: install-man-scripts install-glimpse-stuff install-hman
|
||||
|
||||
# These are the scripts that allow pointing a browser at
|
||||
# http://localhost/cgi-bin/man/man2html
|
||||
# to work.
|
||||
install-man-scripts:
|
||||
mkdir -p $(httpdir)/cgi-bin/man
|
||||
mkdir -p $(httpdir)/cgi-aux/man
|
||||
install -m 755 scripts/cgi-bin/man/* $(httpdir)/cgi-bin/man
|
||||
install -m 644 scripts/cgi-aux/man/* $(httpdir)/cgi-aux/man
|
||||
install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html
|
||||
# (aux was renamed to cgi-aux since aux causes problems under DOS)
|
||||
|
||||
# If you have installed glimpse, and have compressed man pages,
|
||||
# then perhaps you also want these filters.
|
||||
install-glimpse-stuff:
|
||||
install -m 644 glimpse_filters $(vardir)/man2html/.glimpse_filters
|
||||
|
||||
# In order not to have to type a long command like
|
||||
# netscape http://localhost/cgi-bin/man/man2html?section+topic
|
||||
# or
|
||||
# lynx lynxcgi:/home/httpd/cgi-bin/man/man2html?section+topic
|
||||
# it is convenient to have some shell script as a wrapper.
|
||||
# The script hman can be aliased to man. It uses an environment
|
||||
# variable MANHTMLPAGER to find out which browser you use, and
|
||||
# you can set MANHTMLHOST if the pages are not on localhost.
|
||||
hman: hman.sh
|
||||
rm -f hman
|
||||
sed -e 's,%version%,man-1.6g,' hman.sh > hman
|
||||
|
||||
install-hman: hman
|
||||
install -m 555 hman $(bindir)/hman
|
||||
install -m 644 hman.1 $(mandir)/man1/hman.1
|
||||
|
||||
clean:
|
||||
rm -f core hman man2html$(EXEEXT) $(OBJECTS) *~
|
||||
|
||||
spotless: clean
|
||||
rm -f Makefile
|
||||
|
||||
$(OBJECTS): defs.h
|
38
man/msgs/Makefile
Normal file
38
man/msgs/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Generated automatically from Makefile.in by the
|
||||
# configure script.
|
||||
#
|
||||
|
||||
all: ../src/makemsg gencat
|
||||
@for i in mess.??; do ../src/makemsg -c $$i $$i.catin; \
|
||||
cat $$i.codeset $$i.catin > $$i.catin2; \
|
||||
echo "==== Making $$i.cat ====" ;\
|
||||
LC_ALL=en_US.UTF-8 ./gencat $$i.cat $$i.catin2; done; \
|
||||
rm -f core *.catin *.catin2
|
||||
|
||||
install:
|
||||
sh ./inst.sh "en" "$(DESTDIR)"
|
||||
|
||||
clean:
|
||||
rm -f gencat gencat.out core *~ *.cat *.catin *.catin2
|
||||
|
||||
spotless:
|
||||
rm -f Makefile
|
||||
|
||||
# Various versions of libc use different format message catalog files
|
||||
# So we have to use the installed /usr/bin/gencat if possible.
|
||||
# On the other hand, /usr/bin/gencat doesnt work in glibc 2.0.7
|
||||
# The source in ../gencat is OK for libc4 and libc5, not for glibc.
|
||||
gencat:
|
||||
if [ -f /usr/bin/gencat ]; then \
|
||||
if gencat gencat.out gencat.in 2>/dev/null; then \
|
||||
ln -s /usr/bin/gencat gencat; \
|
||||
else \
|
||||
cp gencat207fix.sh gencat; \
|
||||
fi \
|
||||
else \
|
||||
ln -s ../gencat/gencat gencat; \
|
||||
cd ../gencat; \
|
||||
make; \
|
||||
fi
|
||||
|
121
man/src/Makefile
Normal file
121
man/src/Makefile
Normal file
@ -0,0 +1,121 @@
|
||||
#
|
||||
# Generated automatically from Makefile.in by the
|
||||
# configure script.
|
||||
#
|
||||
#
|
||||
# Master Makefile for man, apropos, whatis, and makewhatis
|
||||
#
|
||||
# Copyright (c) 1990, 1991, John W. Eaton.
|
||||
# Copyright (c) 1994-2001, Andries E. Brouwer
|
||||
#
|
||||
# You may distribute under the terms of the GNU General Public
|
||||
# License as specified in the README file that comes with the man 1.0
|
||||
# distribution.
|
||||
#
|
||||
# various changes - aeb, March 1994
|
||||
# use of catalogs - aeb, June 1994
|
||||
|
||||
CC = /Users/ariel/private-bin/clang
|
||||
BUILD_CC = /Users/ariel/private-bin/clang
|
||||
INSTALL = install
|
||||
EXEEXT =
|
||||
|
||||
pager = /usr/bin/less -is
|
||||
|
||||
DEFS = -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS
|
||||
CWARN = -Wall -Wstrict-prototypes -Wmissing-prototypes
|
||||
CWARNNP = -Wall
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CWARN) $(CFLAGS) -I. $(DEFS) $<
|
||||
|
||||
# LDFLAGS = -g
|
||||
LDFLAGS ?= -s
|
||||
|
||||
LIBOBJS =
|
||||
|
||||
all: man$(EXEEXT) man.conf apropos whatis
|
||||
|
||||
MANOBJS = man.o manfile.o manpath.o man-config.o man-getopt.o \
|
||||
man-iconv.o to_cat.o different.o gripes.o glob.o util.o msg.o
|
||||
|
||||
man$(EXEEXT): $(MANOBJS) $(LIBOBJS)
|
||||
$(CC) $(LDFLAGS) -o man$(EXEEXT) $(MANOBJS) $(LIBOBJS) $(LIBS)
|
||||
|
||||
# CC may be a cross compiler, but BUILD_CC must compile for
|
||||
# the present machine.
|
||||
makemsg:
|
||||
$(BUILD_CC) -o makemsg makemsg.c
|
||||
|
||||
msg.c gripedefs.h: ../msgs/mess.en makemsg
|
||||
./makemsg ../msgs/mess.en gripedefs.h msg.c
|
||||
|
||||
# glob.c does not have prototypes
|
||||
glob.o: glob.c ndir.h
|
||||
$(CC) -c $(CWARNNP) $(CFLAGS) $(DEFS) glob.c
|
||||
|
||||
man-config.o man-getopt.o man.o manpath.o to_cat.o: defs.h
|
||||
different.o man.o: different.h
|
||||
man.o manfile.o: glob.h
|
||||
different.o gripes.o man-config.o man-getopt.o man.o manfile.o manpath.o util.o: gripes.h gripedefs.h
|
||||
different.o man-config.o man-getopt.o man.o manpath.o: man-config.h
|
||||
gripes.o man-config.o man-getopt.o man.o manpath.o util.o: man.h
|
||||
man-getopt.o man.o manpath.o: man-getopt.h
|
||||
man.o manfile.o to_cat.o: manfile.h
|
||||
man.o man-iconv.o: man-iconv.h
|
||||
man.o manpath.o: manpath.h
|
||||
man-config.o: paths.h
|
||||
different.o man-config.o man-getopt.o man.o manpath.o util.o: util.h
|
||||
man-getopt.o: version.h
|
||||
msg.o: msg.c
|
||||
gripes.o: ../catopen/catopen.c
|
||||
|
||||
man.conf: man.conf.in ../conf_script
|
||||
../conf_script man.conf
|
||||
|
||||
paths.h: paths.h.in ../conf_script
|
||||
../conf_script paths.h
|
||||
|
||||
version.h: ../version Makefile
|
||||
vers=`sed -e s/man-// ../version`; \
|
||||
echo "static char version[] = \"$$vers\";" > version.h
|
||||
|
||||
apropos: apropos.sh Makefile
|
||||
rm -f apropos
|
||||
sed -e 's,%apropos_or_whatis%,apropos,' \
|
||||
-e 's,%version%,man-1.6g,' \
|
||||
-e 's,%manpathoption%,--path,' \
|
||||
apropos.sh > apropos
|
||||
chmod +x apropos
|
||||
|
||||
whatis: apropos.sh Makefile
|
||||
rm -f whatis
|
||||
sed -e 's,%apropos_or_whatis%,whatis,' \
|
||||
-e 's,%version%,man-1.6g,' \
|
||||
-e 's,%manpathoption%,--path,' \
|
||||
apropos.sh > whatis
|
||||
chmod +x whatis
|
||||
|
||||
makewhatis: makewhatis.sh Makefile
|
||||
rm -f makewhatis
|
||||
cp makewhatis.sh makewhatis.in
|
||||
../conf_script makewhatis
|
||||
chmod +x makewhatis
|
||||
|
||||
MANCONFIG=$(DESTDIR)$(PREFIX)/private/etc/man.conf
|
||||
|
||||
install: all apropos whatis
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/usr/bin
|
||||
$(INSTALL) -c man$(EXEEXT) $(DESTDIR)$(PREFIX)/usr/bin/man
|
||||
$(INSTALL) -c -m 755 apropos $(DESTDIR)$(PREFIX)/usr/bin/apropos
|
||||
$(INSTALL) -c -m 755 whatis $(DESTDIR)$(PREFIX)/usr/bin/whatis
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/private/etc
|
||||
if [ -f $(MANCONFIG) ]; then mv $(MANCONFIG) $(MANCONFIG).orig; fi
|
||||
$(INSTALL) -c -m 644 man.conf $(MANCONFIG)
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ core man$(EXEEXT) apropos whatis makewhatis makemsg
|
||||
|
||||
spotless: clean
|
||||
rm -f Makefile config.status paths.h version.h man.conf
|
||||
rm -f gripedefs.h msg.c mess.*.cat
|
96
man/src/apropos
Executable file
96
man/src/apropos
Executable file
@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# apropos -- search the whatis database for keywords.
|
||||
# whatis -- idem, but match only commands (as whole words).
|
||||
#
|
||||
# Copyright (c) 1990, 1991, John W. Eaton.
|
||||
# Copyright (c) 1994-1999, Andries E. Brouwer.
|
||||
#
|
||||
# You may distribute under the terms of the GNU General Public
|
||||
# License as specified in the README file that comes with the man
|
||||
# distribution.
|
||||
#
|
||||
# apropos/whatis-1.5m aeb 2003-08-01 (from man-1.6g)
|
||||
#
|
||||
# keep old PATH - 000323 - Bryan Henderson
|
||||
# also look in /var/cache/man - 030801 - aeb
|
||||
|
||||
program=`basename $0`
|
||||
|
||||
# When man pages in your favorite locale look to grep like binary files
|
||||
# (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
|
||||
aproposgrepopt1='i'
|
||||
aproposgrepopt2=''
|
||||
whatisgrepopt1='iw'
|
||||
whatisgrepopt2=''
|
||||
grepopt1=$aproposgrepopt1
|
||||
grepopt2=$aproposgrepopt2
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
echo "usage: $program keyword ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
manpath=`man --path | tr : '\040'`
|
||||
|
||||
if [ "$manpath" = "" ]
|
||||
then
|
||||
echo "$program: manpath is null"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
args=
|
||||
for arg in $*; do
|
||||
case $arg in
|
||||
--version|-V|-v)
|
||||
echo "$program from man-1.6g"
|
||||
exit 0
|
||||
;;
|
||||
--help|-h)
|
||||
echo "usage: $program keyword ..."
|
||||
exit 0
|
||||
;;
|
||||
-*)
|
||||
echo "$program: $arg: unknown option"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
args="$args $arg"
|
||||
esac
|
||||
done
|
||||
|
||||
while [ "$1" != "" ]
|
||||
do
|
||||
found=0
|
||||
for d in /var/cache/man $manpath /usr/lib
|
||||
do
|
||||
if [ -f $d/whatis ]
|
||||
then
|
||||
if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
|
||||
then
|
||||
found=1
|
||||
# Some people are satisfied with a single occurrence
|
||||
# But it is better to give all
|
||||
# break
|
||||
fi
|
||||
else
|
||||
if [ -d $d ] && /usr/libexec/makewhatis.local "-o /dev/fd/1" $d | grep -"$grepopt1" "$grepopt2""$1"
|
||||
then
|
||||
found=1
|
||||
# Some people are satisfied with a single occurrence
|
||||
# But it is better to give all
|
||||
# break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $found = 0 ]
|
||||
then
|
||||
echo "$1: nothing appropriate"
|
||||
fi
|
||||
|
||||
shift
|
||||
done | eval ${PAGER:-more -E}
|
||||
|
||||
exit
|
87
man/src/gripedefs.h
Normal file
87
man/src/gripedefs.h
Normal file
@ -0,0 +1,87 @@
|
||||
#define BAD_CONFIG_FILE 1
|
||||
#define CONFIG_OPEN_ERROR 2
|
||||
#define PARSE_ERROR_IN_CONFIG 3
|
||||
#define INCOMPAT 4
|
||||
#define NO_ALTERNATE 5
|
||||
#define NO_COMPRESS 6
|
||||
#define NO_NAME_FROM_SECTION 7
|
||||
#define NO_NAME_NO_SECTION 8
|
||||
#define NO_SUCH_ENTRY_IN_SECTION 9
|
||||
#define NO_SUCH_ENTRY 10
|
||||
#define PAGER_IS 11
|
||||
#define SYSTEM_FAILED 12
|
||||
#define VERSION 13
|
||||
#define OUT_OF_MEMORY 14
|
||||
#define ROFF_CMD_FROM_FILE_ERROR 15
|
||||
#define MANROFFSEQ_ERROR 16
|
||||
#define ROFF_CMD_FROM_COMMANDLINE_ERROR 17
|
||||
#define UNRECOGNIZED_LINE 18
|
||||
#define GETVAL_ERROR 19
|
||||
#define FOUND_MANDIR 20
|
||||
#define FOUND_MAP 21
|
||||
#define FOUND_CATDIR 22
|
||||
#define LINE_TOO_LONG 23
|
||||
#define SECTION 24
|
||||
#define UNLINKED 25
|
||||
#define GLOBBING 26
|
||||
#define EXPANSION_FAILED 27
|
||||
#define OPEN_ERROR 28
|
||||
#define READ_ERROR 29
|
||||
#define FOUND_EQN 30
|
||||
#define FOUND_GRAP 31
|
||||
#define FOUND_PIC 32
|
||||
#define FOUND_TBL 33
|
||||
#define FOUND_VGRIND 34
|
||||
#define FOUND_REFER 35
|
||||
#define ROFF_FROM_COMMAND_LINE 36
|
||||
#define ROFF_FROM_FILE 37
|
||||
#define ROFF_FROM_ENV 38
|
||||
#define USING_DEFAULT 39
|
||||
#define PLEASE_WAIT 40
|
||||
#define CHANGED_MODE 41
|
||||
#define CAT_OPEN_ERROR 42
|
||||
#define PROPOSED_CATFILE 43
|
||||
#define IS_NEWER_RESULT 44
|
||||
#define TRYING_SECTION 45
|
||||
#define SEARCHING 46
|
||||
#define ALREADY_IN_MANPATH 47
|
||||
#define CANNOT_STAT 48
|
||||
#define IS_NO_DIR 49
|
||||
#define ADDING_TO_MANPATH 50
|
||||
#define PATH_DIR 51
|
||||
#define IS_IN_CONFIG 52
|
||||
#define IS_NOT_IN_CONFIG 53
|
||||
#define MAN_NEARBY 54
|
||||
#define NO_MAN_NEARBY 55
|
||||
#define ADDING_MANDIRS 56
|
||||
#define CATNAME_IS 57
|
||||
#define NO_EXEC 58
|
||||
#define USAGE1 59
|
||||
#define USAGE2 60
|
||||
#define USAGE3 61
|
||||
#define USAGE4 62
|
||||
#define USAGE5 63
|
||||
#define USAGE6 64
|
||||
#define USAGE7 65
|
||||
#define USAGE8 66
|
||||
#define USER_CANNOT_OPEN_CAT 67
|
||||
#define USER_CAN_OPEN_CAT 68
|
||||
#define CANNOT_FORK 69
|
||||
#define WAIT_FAILED 70
|
||||
#define GOT_WRONG_PID 71
|
||||
#define CHILD_TERMINATED_ABNORMALLY 72
|
||||
#define IDENTICAL 73
|
||||
#define MAN_FOUND 74
|
||||
#define NO_TROFF 75
|
||||
#define NO_CAT_FOR_NONSTD_LL 76
|
||||
#define BROWSER_IS 77
|
||||
#define HTMLPAGER_IS 78
|
||||
#define FOUND_FILE 79
|
||||
#define CALLTRACE1 80
|
||||
#define CALLTRACE2 81
|
||||
#define NO_MATCH 82
|
||||
#define GLOB_FOR_FILE 83
|
||||
#define CALLTRACE3 84
|
||||
#define ABOUT_TO_GLOB 85
|
||||
|
||||
#define MAXMSG 85
|
BIN
man/src/makemsg
Executable file
BIN
man/src/makemsg
Executable file
Binary file not shown.
143
man/src/man.conf
Normal file
143
man/src/man.conf
Normal file
@ -0,0 +1,143 @@
|
||||
#
|
||||
# Generated automatically from man.conf.in by the
|
||||
# configure script.
|
||||
#
|
||||
# man.conf from man-1.6g
|
||||
#
|
||||
# For more information about this file, see the man pages man(1)
|
||||
# and man.conf(5).
|
||||
#
|
||||
# This file is read by man to configure the default manpath (also used
|
||||
# when MANPATH contains an empty substring), to find out where the cat
|
||||
# pages corresponding to given man pages should be stored,
|
||||
# and to map each PATH element to a manpath element.
|
||||
# It may also record the pathname of the man binary. [This is unused.]
|
||||
# The format is:
|
||||
#
|
||||
# MANBIN pathname
|
||||
# MANPATH manpath_element [corresponding_catdir]
|
||||
# MANPATH_MAP path_element manpath_element
|
||||
#
|
||||
# If no catdir is given, it is assumed to be equal to the mandir
|
||||
# (so that this dir has both man1 etc. and cat1 etc. subdirs).
|
||||
# This is the traditional Unix setup.
|
||||
# Certain versions of the FSSTND recommend putting formatted versions
|
||||
# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
|
||||
# The keyword FSSTND will cause this behaviour.
|
||||
# Certain versions of the FHS recommend putting formatted versions of
|
||||
# /usr/.../share/man/[locale/]manx/page.x into
|
||||
# /var/cache/man/.../[locale/]catx/page.x.
|
||||
# The keyword FHS will cause this behaviour (and overrides FSSTND).
|
||||
# Explicitly given catdirs override.
|
||||
#
|
||||
# FSSTND
|
||||
FHS
|
||||
#
|
||||
# This file is also read by man in order to find how to call nroff, less, etc.,
|
||||
# and to determine the correspondence between extensions and decompressors.
|
||||
#
|
||||
# MANBIN /usr/local/bin/man
|
||||
#
|
||||
# Every automatically generated MANPATH includes these fields
|
||||
#
|
||||
MANPATH /usr/share/man
|
||||
MANPATH /usr/local/share/man
|
||||
MANPATH /usr/X11/man
|
||||
MANPATH /Library/Apple/usr/share/man
|
||||
#
|
||||
# Uncomment if you want to include one of these by default
|
||||
#
|
||||
# MANPATH /opt/*/man
|
||||
# MANPATH /usr/lib/*/man
|
||||
# MANPATH /usr/share/*/man
|
||||
# MANPATH /usr/kerberos/man
|
||||
#
|
||||
# Set up PATH to MANPATH mapping
|
||||
#
|
||||
# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
|
||||
# and the docs are found in "/dir/man", then no mapping is required.
|
||||
#
|
||||
# The below mappings are superfluous when the right hand side is
|
||||
# in the mandatory manpath already, but will keep man from statting
|
||||
# lots of other nearby files and directories.
|
||||
#
|
||||
MANPATH_MAP /bin /usr/share/man
|
||||
MANPATH_MAP /sbin /usr/share/man
|
||||
MANPATH_MAP /usr/bin /usr/share/man
|
||||
MANPATH_MAP /usr/sbin /usr/share/man
|
||||
MANPATH_MAP /usr/local/bin /usr/local/share/man
|
||||
MANPATH_MAP /usr/local/sbin /usr/local/share/man
|
||||
MANPATH_MAP /usr/X11/bin /usr/X11/man
|
||||
MANPATH_MAP /usr/bin/X11 /usr/X11/man
|
||||
MANPATH_MAP /usr/bin/mh /usr/share/man
|
||||
#
|
||||
# NOAUTOPATH keeps man from automatically adding directories that look like
|
||||
# manual page directories to the path.
|
||||
#
|
||||
#NOAUTOPATH
|
||||
#
|
||||
# NOCACHE keeps man from creating cache pages ("cat pages")
|
||||
# (generally one enables/disable cat page creation by creating/deleting
|
||||
# the directory they would live in - man never does mkdir)
|
||||
#
|
||||
#NOCACHE
|
||||
#
|
||||
# Useful paths - note that COL should not be defined when
|
||||
# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
|
||||
# not only is it superfluous, but it actually damages the output.
|
||||
# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
|
||||
# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
|
||||
#
|
||||
# If you have a new troff (version 1.18.1?) and its colored output
|
||||
# causes problems, add the -c option to TROFF, NROFF, JNROFF.
|
||||
#
|
||||
TROFF /usr/bin/groff -Tps -mandoc -c
|
||||
NROFF /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c
|
||||
JNROFF /usr/bin/groff -Tnippon -mandocj -c
|
||||
EQN /usr/bin/eqn -Tps
|
||||
NEQN /usr/bin/eqn -Tascii
|
||||
JNEQN /usr/bin/eqn -Tnippon
|
||||
TBL /usr/bin/tbl
|
||||
# COL /usr/bin/col
|
||||
REFER /usr/bin/refer
|
||||
PIC /usr/bin/pic
|
||||
VGRIND
|
||||
GRAP
|
||||
PAGER /usr/bin/less -is
|
||||
BROWSER /usr/bin/less -is
|
||||
HTMLPAGER /bin/cat
|
||||
CAT /bin/cat
|
||||
#
|
||||
# The command "man -a xyzzy" will show all man pages for xyzzy.
|
||||
# When CMP is defined man will try to avoid showing the same
|
||||
# text twice. (But compressed pages compare unequal.)
|
||||
#
|
||||
CMP /usr/bin/cmp -s
|
||||
#
|
||||
# Compress cat pages
|
||||
#
|
||||
COMPRESS /usr/local/bin/xz
|
||||
COMPRESS_EXT .xz
|
||||
#
|
||||
# Default manual sections (and order) to search if -S is not specified
|
||||
# and the MANSECT environment variable is not set.
|
||||
#
|
||||
MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
|
||||
#
|
||||
# Default options to use when man is invoked without options
|
||||
# This is mainly for the benefit of those that think -a should be the default
|
||||
# Note that some systems have /usr/man/allman, causing pages to be shown twice.
|
||||
#
|
||||
#MANDEFOPTIONS -a
|
||||
#
|
||||
# Decompress with given decompressor when input file has given extension
|
||||
# The command given must act as a filter.
|
||||
#
|
||||
.gz /usr/bin/gunzip -c
|
||||
.bz2 /usr/bin/bzip2 -c -d
|
||||
.lzma /usr/local/bin/unlzma -c -d
|
||||
.z
|
||||
.Z /usr/bin/zcat
|
||||
.F
|
||||
.Y
|
||||
.xz /usr/local/bin/unxz -c
|
106
man/src/msg.c
Normal file
106
man/src/msg.c
Normal file
@ -0,0 +1,106 @@
|
||||
char *msg[] = {
|
||||
"",
|
||||
/* 1 */ "unable to make sense of the file %s\n",
|
||||
/* 2 */ "Warning: cannot open configuration file %s\n",
|
||||
/* 3 */ "Error parsing config file\n",
|
||||
/* 4 */ "incompatible options %s and %s\n",
|
||||
/* 5 */ "Sorry - no support for alternate systems compiled in\n",
|
||||
/* 6 */ "Man was compiled with automatic cat page compression,\n\
|
||||
but the configuration file does not define COMPRESS.\n",
|
||||
/* 7 */ "What manual page do you want from section %s?\n",
|
||||
/* 8 */ "What manual page do you want?\n",
|
||||
/* 9 */ "No entry for %s in section %s of the manual\n",
|
||||
/* 10 */ "No manual entry for %s\n",
|
||||
/* 11 */ "\nusing %s as pager\n",
|
||||
/* 12 */ "Error executing formatting or display command.\n\
|
||||
System command %s exited with status %d.\n",
|
||||
/* 13 */ "%s, version %s\n\n",
|
||||
/* 14 */ "Out of memory - can't malloc %d bytes\n",
|
||||
/* 15 */ "Error parsing *roff command from file %s\n",
|
||||
/* 16 */ "Error parsing MANROFFSEQ. Using system defaults.\n",
|
||||
/* 17 */ "Error parsing *roff command from command line.\n",
|
||||
/* 18 */ "Unrecognized line in config file (ignored)\n%s\n",
|
||||
/* 19 */ "man-config.c: internal error: string %s not found\n",
|
||||
/* 20 */ "found man directory %s\n",
|
||||
/* 21 */ "found manpath map %s --> %s\n",
|
||||
/* 22 */ "corresponding catdir is %s\n",
|
||||
/* 23 */ "Line too long in config file\n",
|
||||
/* 24 */ "\nsection: %s\n",
|
||||
/* 25 */ "unlinked %s\n",
|
||||
/* 26 */ "globbing %s\n",
|
||||
/* 27 */ "Attempt [%s] to expand man page failed\n",
|
||||
/* 28 */ "Cannot open man page %s\n",
|
||||
/* 29 */ "Error reading man page %s\n",
|
||||
/* 30 */ "found eqn(1) directive\n",
|
||||
/* 31 */ "found grap(1) directive\n",
|
||||
/* 32 */ "found pic(1) directive\n",
|
||||
/* 33 */ "found tbl(1) directive\n",
|
||||
/* 34 */ "found vgrind(1) directive\n",
|
||||
/* 35 */ "found refer(1) directive\n",
|
||||
/* 36 */ "parsing directive from command line\n",
|
||||
/* 37 */ "parsing directive from file %s\n",
|
||||
/* 38 */ "parsing directive from environment\n",
|
||||
/* 39 */ "using default preprocessor sequence\n",
|
||||
/* 40 */ "Formatting page, please wait...\n",
|
||||
/* 41 */ "changed mode of %s to %o\n",
|
||||
/* 42 */ "Couldn't open %s for writing.\n",
|
||||
/* 43 */ "will try to write %s if needed\n",
|
||||
/* 44 */ "status from is_newer() = %d\n",
|
||||
/* 45 */ "trying section %s\n",
|
||||
/* 46 */ "\nsearching in %s\n",
|
||||
/* 47 */ "but %s is already in the manpath\n",
|
||||
/* 48 */ "Warning: cannot stat file %s!\n",
|
||||
/* 49 */ "Warning: %s isn't a directory!\n",
|
||||
/* 50 */ "adding %s to manpath\n",
|
||||
/* 51 */ "\npath directory %s ",
|
||||
/* 52 */ "is in the config file\n",
|
||||
/* 53 */ "is not in the config file\n",
|
||||
/* 54 */ "but there is a man directory nearby\n",
|
||||
/* 55 */ "and we found no man directory nearby\n",
|
||||
/* 56 */ "\nadding mandatory man directories\n\n",
|
||||
/* 57 */ "cat_name in convert_to_cat () is: %s\n",
|
||||
/* 58 */ "\nnot executing command:\n %s\n",
|
||||
/* 59 */ "usage: %s [-adfhktwW] [section] [-M path] [-P pager] [-S list]\n\t",
|
||||
/* 60 */ "[-m system] ",
|
||||
/* 61 */ "[-p string] name ...\n\n",
|
||||
/* 62 */ " a : find all matching entries\n\
|
||||
c : do not use cat file\n\
|
||||
d : print gobs of debugging information\n\
|
||||
D : as for -d, but also display the pages\n\
|
||||
f : same as whatis(1)\n\
|
||||
h : print this help message\n\
|
||||
k : same as apropos(1)\n\
|
||||
K : search for a string in all pages\n",
|
||||
/* 63 */ " t : use troff to format pages for printing\n",
|
||||
/* 64 */ "\
|
||||
w : print location of man page(s) that would be displayed\n\
|
||||
(if no name given: print directories that would be searched)\n\
|
||||
W : as for -w, but display filenames only\n\n\
|
||||
C file : use `file' as configuration file\n\
|
||||
M path : set search path for manual pages to `path'\n\
|
||||
P pager : use program `pager' to display pages\n\
|
||||
S list : colon separated section list\n",
|
||||
/* 65 */ " m system : search for alternate system's man pages\n",
|
||||
/* 66 */ " p string : string tells which preprocessors to run\n\
|
||||
e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
|
||||
g - grap(1) r - refer(1) v - vgrind(1)\n",
|
||||
/* 67 */ "and the real user cannot open the cat file either\n",
|
||||
/* 68 */ "but the real user can open the cat file\n",
|
||||
/* 69 */ "failed to fork off the command _%s_\n",
|
||||
/* 70 */ "error while waiting for child _%s_\n",
|
||||
/* 71 */ "very strange ..., got wrong pid while waiting for my child\n",
|
||||
/* 72 */ "fatal error: the command _%s_ terminated abnormally\n",
|
||||
/* 73 */ "Man page %s is identical to %s\n",
|
||||
/* 74 */ "Found the man page(s):\n",
|
||||
/* 75 */ "error: no TROFF command specified in %s\n",
|
||||
/* 76 */ "no cat page stored because of nonstandard line length\n",
|
||||
/* 77 */ "\nusing %s as browser\n",
|
||||
/* 78 */ "\nusing %s to dump HTML pages as text\n",
|
||||
/* 79 */ "manfile_from_sec_and_dir() found %s\n",
|
||||
/* 80 */ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n",
|
||||
/* 81 */ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n",
|
||||
/* 82 */ "glob_for_file found no matches.\n",
|
||||
/* 83 */ "glob_for_file returns %s.\n",
|
||||
/* 84 */ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n",
|
||||
/* 85 */ "glob_for_file_ext_glob will expand %s\n",
|
||||
};
|
43
man/src/paths.h
Normal file
43
man/src/paths.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Generated automatically from paths.h.in by the
|
||||
* configure script.
|
||||
*/
|
||||
/* paths.h - included in man-config.c */
|
||||
/*
|
||||
* Define the absolute path to the configuration file and programs used.
|
||||
* (If no configuration file is found then the preset values are used.)
|
||||
*/
|
||||
#ifndef CONFIG_FILE
|
||||
#define CONFIG_FILE "/private/etc/man.conf"
|
||||
#endif
|
||||
|
||||
static struct paths {
|
||||
char *name;
|
||||
char *path; /* path plus command options - never NULL */
|
||||
} paths[] = {
|
||||
{ "MANBIN", "" }, /* value unused */
|
||||
{ "APROPOS", "/usr/bin/apropos" },
|
||||
{ "WHATIS", "/usr/bin/whatis" },
|
||||
{ "TROFF", "/usr/bin/groff -Tps -mandoc -c" },
|
||||
{ "NROFF", "/usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c" },
|
||||
{ "JNROFF", "/usr/bin/groff -Tnippon -mandocj -c" },
|
||||
{ "EQN", "/usr/bin/eqn -Tps" },
|
||||
{ "NEQN", "/usr/bin/eqn -Tascii" },
|
||||
{ "JNEQN", "/usr/bin/eqn -Tnippon" },
|
||||
{ "TBL", "/usr/bin/tbl" },
|
||||
{ "COL", "" },
|
||||
{ "REFER", "/usr/bin/refer" },
|
||||
{ "PIC", "/usr/bin/pic" },
|
||||
{ "VGRIND", "" },
|
||||
{ "GRAP", "" },
|
||||
{ "PAGER", "/usr/bin/less -is" },
|
||||
{ "BROWSER","/usr/bin/less -is" },
|
||||
{ "HTMLPAGER", "/bin/cat" },
|
||||
{ "CMP", "/usr/bin/cmp -s" },
|
||||
{ "CAT", "/bin/cat" },
|
||||
{ "COMPRESS", "/usr/local/bin/xz" },
|
||||
{ "COMPRESS_EXT", ".xz" }, /* not a path, just a string variable */
|
||||
{ "DECOMPRESS", "/usr/local/bin/unxz -c" },
|
||||
{ "MANSECT", "1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o"}, /* idem */
|
||||
{ "MANDEFOPTIONS", ""} /* idem */
|
||||
};
|
1
man/src/version.h
Normal file
1
man/src/version.h
Normal file
@ -0,0 +1 @@
|
||||
static char version[] = "1.6g";
|
96
man/src/whatis
Executable file
96
man/src/whatis
Executable file
@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# apropos -- search the whatis database for keywords.
|
||||
# whatis -- idem, but match only commands (as whole words).
|
||||
#
|
||||
# Copyright (c) 1990, 1991, John W. Eaton.
|
||||
# Copyright (c) 1994-1999, Andries E. Brouwer.
|
||||
#
|
||||
# You may distribute under the terms of the GNU General Public
|
||||
# License as specified in the README file that comes with the man
|
||||
# distribution.
|
||||
#
|
||||
# apropos/whatis-1.5m aeb 2003-08-01 (from man-1.6g)
|
||||
#
|
||||
# keep old PATH - 000323 - Bryan Henderson
|
||||
# also look in /var/cache/man - 030801 - aeb
|
||||
|
||||
program=`basename $0`
|
||||
|
||||
# When man pages in your favorite locale look to grep like binary files
|
||||
# (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
|
||||
aproposgrepopt1='i'
|
||||
aproposgrepopt2=''
|
||||
whatisgrepopt1='iw'
|
||||
whatisgrepopt2=''
|
||||
grepopt1=$whatisgrepopt1
|
||||
grepopt2=$whatisgrepopt2
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
echo "usage: $program keyword ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
manpath=`man --path | tr : '\040'`
|
||||
|
||||
if [ "$manpath" = "" ]
|
||||
then
|
||||
echo "$program: manpath is null"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
args=
|
||||
for arg in $*; do
|
||||
case $arg in
|
||||
--version|-V|-v)
|
||||
echo "$program from man-1.6g"
|
||||
exit 0
|
||||
;;
|
||||
--help|-h)
|
||||
echo "usage: $program keyword ..."
|
||||
exit 0
|
||||
;;
|
||||
-*)
|
||||
echo "$program: $arg: unknown option"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
args="$args $arg"
|
||||
esac
|
||||
done
|
||||
|
||||
while [ "$1" != "" ]
|
||||
do
|
||||
found=0
|
||||
for d in /var/cache/man $manpath /usr/lib
|
||||
do
|
||||
if [ -f $d/whatis ]
|
||||
then
|
||||
if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
|
||||
then
|
||||
found=1
|
||||
# Some people are satisfied with a single occurrence
|
||||
# But it is better to give all
|
||||
# break
|
||||
fi
|
||||
else
|
||||
if [ -d $d ] && /usr/libexec/makewhatis.local "-o /dev/fd/1" $d | grep -"$grepopt1" "$grepopt2""$1"
|
||||
then
|
||||
found=1
|
||||
# Some people are satisfied with a single occurrence
|
||||
# But it is better to give all
|
||||
# break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $found = 0 ]
|
||||
then
|
||||
echo "$1: nothing appropriate"
|
||||
fi
|
||||
|
||||
shift
|
||||
done | eval ${PAGER:-more -E}
|
||||
|
||||
exit
|
Loading…
Reference in New Issue
Block a user