[Reproducible-commits] [man2html] 01/02: Imported Upstream version 1.6g
Maria Valentina Marin Rodrigues
akira-guest at moszumanska.debian.org
Sat Aug 15 12:47:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
akira-guest pushed a commit to branch master
in repository man2html.
commit cec946c3598949ac64d5ef0dc8d2c8d2d4f50e9e
Author: akira <marivalenm at gmail.com>
Date: Sat Aug 15 14:32:24 2015 +0200
Imported Upstream version 1.6g
---
COPYING | 339 +++
DOAP.rdf.xml | 85 +
HISTORY | 128 +
INSTALL | 70 +
LSM | 26 +
Makefile.in | 76 +
README | 41 +
README.GNU-WIN32 | 32 +
README.HP | 83 +
README.IRIX | 28 +
SPDX.rdf.xml | 35 +
TODO | 28 +
catopen/README | 29 +
catopen/catopen.c | 209 ++
configure | 1379 ++++++++++
gencat/Makefile | 18 +
gencat/gencat.c | 265 ++
gencat/gencat.h | 107 +
gencat/genlib.c | 892 +++++++
gencat/msgcat.h | 178 ++
man/Makefile.in | 61 +
man/bg.txt | 1 +
man/bg/README | 7 +
man/bg/apropos.man | 37 +
man/bg/makewhatis.man | 104 +
man/bg/man.conf.man | 59 +
man/bg/man.man | 472 ++++
man/bg/whatis.man | 39 +
man/cs.txt | 1 +
man/cs/apropos.man | 29 +
man/cs/man.conf.man | 43 +
man/cs/man.man | 239 ++
man/cs/whatis.man | 32 +
man/da.txt | 1 +
man/da/apropos.man | 30 +
man/da/man.conf.man | 45 +
man/da/man.man | 253 ++
man/da/whatis.man | 32 +
man/de.txt | 1 +
man/de/README | 6 +
man/de/apropos.man | 29 +
man/de/man.conf.man | 43 +
man/de/man.man | 225 ++
man/de/whatis.man | 31 +
man/el.txt | 1 +
man/el/apropos.man | 29 +
man/el/hman.man | 71 +
man/el/makewhatis.man | 109 +
man/el/man.conf.man | 45 +
man/el/man.man | 491 ++++
man/el/man2html.man | 157 ++
man/el/whatis.man | 31 +
man/en.txt | 1 +
man/en/apropos.man | 32 +
man/en/makewhatis.man | 100 +
man/en/man.conf.man | 46 +
man/en/man.man | 524 ++++
man/en/whatis.man | 34 +
man/es.txt | 1 +
man/es/README | 9 +
man/es/apropos.man | 41 +
man/es/makewhatis.man | 108 +
man/es/man.conf.man | 55 +
man/es/man.man | 240 ++
man/es/whatis.man | 43 +
man/fi.txt | 1 +
man/fi/apropos.man | 26 +
man/fi/man.conf.man | 39 +
man/fi/man.man | 286 +++
man/fi/whatis.man | 28 +
man/fr.txt | 1 +
man/fr/apropos.man | 47 +
man/fr/makewhatis.man | 123 +
man/fr/man.conf.man | 77 +
man/fr/man.man | 496 ++++
man/fr/whatis.man | 49 +
man/hr.txt | 1 +
man/hr/apropos.man | 31 +
man/hr/man.conf.man | 56 +
man/hr/man.man | 280 ++
man/hr/whatis.man | 35 +
man/it.txt | 1 +
man/it/apropos.man | 37 +
man/it/makewhatis.man | 103 +
man/it/man.conf.man | 55 +
man/it/man.man | 504 ++++
man/it/whatis.man | 39 +
man/ja.txt | 1 +
man/ja/apropos.man | 34 +
man/ja/man.conf.man | 47 +
man/ja/man.man | 262 ++
man/ja/whatis.man | 34 +
man/ko.txt | 1 +
man/ko/apropos.man | 25 +
man/ko/man.conf.man | 42 +
man/ko/man.man | 264 ++
man/ko/whatis.man | 29 +
man/nl.txt | 1 +
man/nl/apropos.man | 28 +
man/nl/man.conf.man | 42 +
man/nl/man.man | 259 ++
man/nl/whatis.man | 32 +
man/pl.txt | 1 +
man/pl/apropos.man | 35 +
man/pl/man.conf.man | 49 +
man/pl/man.man | 427 ++++
man/pl/whatis.man | 37 +
man/pt.txt | 1 +
man/pt/README | 6 +
man/pt/apropos.man | 28 +
man/pt/man.conf.man | 39 +
man/pt/man.man | 156 ++
man/pt/whatis.man | 30 +
man/ro.txt | 1 +
man/ro/apropos.man | 32 +
man/ro/makewhatis.man | 96 +
man/ro/man.conf.man | 42 +
man/ro/man.man | 434 ++++
man/ro/man2html.man | 144 ++
man/ro/whatis.man | 34 +
man/sl.txt | 1 +
man/sl/apropos.man | 29 +
man/sl/man.conf.man | 42 +
man/sl/man.man | 263 ++
man/sl/whatis.man | 31 +
man2html/Makefile.in | 66 +
man2html/README | 91 +
man2html/TODO | 43 +
man2html/abbrev.c | 62 +
man2html/cgibase.c | 143 ++
man2html/defs.h | 41 +
man2html/glimpse_filters | 3 +
man2html/hman.1 | 69 +
man2html/hman.sh | 96 +
man2html/locales/en/hman.1 | 69 +
man2html/locales/en/man2html.1 | 151 ++
man2html/locales/fr/man2html.1 | 165 ++
man2html/locales/it/hman.1 | 71 +
man2html/locales/it/man2html.1 | 153 ++
man2html/man2html.1 | 151 ++
man2html/man2html.c | 3241 ++++++++++++++++++++++++
man2html/scripts/cgi-aux/man/man.aux | 75 +
man2html/scripts/cgi-aux/man/mansearch.aux | 49 +
man2html/scripts/cgi-aux/man/mansearchhelp.aux | 295 +++
man2html/scripts/cgi-bin/man/man2html | 109 +
man2html/scripts/cgi-bin/man/mansearch | 192 ++
man2html/scripts/cgi-bin/man/mansearchhelp | 32 +
man2html/scripts/cgi-bin/man/mansec | 183 ++
man2html/scripts/cgi-bin/man/manwhatis | 208 ++
man2html/strdefs.c | 176 ++
misc/README | 4 +
misc/locales/it/manlint.1 | 66 +
misc/man-preformat.c | 332 +++
misc/manlint | 225 ++
misc/manlint.1 | 63 +
msgs/Makefile.in | 34 +
msgs/README | 25 +
msgs/gencat.in | 3 +
msgs/gencat207fix.sh | 2 +
msgs/inst.sh | 38 +
msgs/mess.bg | 191 ++
msgs/mess.bg.codeset | 1 +
msgs/mess.cs | 170 ++
msgs/mess.cs.codeset | 1 +
msgs/mess.da | 170 ++
msgs/mess.da.codeset | 1 +
msgs/mess.de | 186 ++
msgs/mess.de.codeset | 1 +
msgs/mess.el | 171 ++
msgs/mess.el.codeset | 1 +
msgs/mess.en | 188 ++
msgs/mess.en.codeset | 1 +
msgs/mess.es | 170 ++
msgs/mess.es.codeset | 1 +
msgs/mess.fi | 170 ++
msgs/mess.fi.codeset | 1 +
msgs/mess.fr | 190 ++
msgs/mess.fr.codeset | 1 +
msgs/mess.hr | 170 ++
msgs/mess.hr.codeset | 1 +
msgs/mess.it | 190 ++
msgs/mess.it.codeset | 1 +
msgs/mess.ja | 171 ++
msgs/mess.ja.codeset | 1 +
msgs/mess.ko | 171 ++
msgs/mess.ko.codeset | 1 +
msgs/mess.nl | 189 ++
msgs/mess.nl.codeset | 1 +
msgs/mess.pl | 188 ++
msgs/mess.pl.codeset | 1 +
msgs/mess.pt | 165 ++
msgs/mess.pt.codeset | 1 +
msgs/mess.ro | 170 ++
msgs/mess.ro.codeset | 1 +
msgs/mess.ru | 170 ++
msgs/mess.ru.codeset | 1 +
msgs/mess.sl | 171 ++
msgs/mess.sl.codeset | 1 +
msgs/mess.zh_TW.UTF-8 | 170 ++
src/Makefile.in | 120 +
src/apropos.sh | 88 +
src/defs.h | 26 +
src/different.c | 72 +
src/different.h | 3 +
src/glob.c | 682 +++++
src/glob.h | 1 +
src/gripes.c | 139 +
src/gripes.h | 5 +
src/join.c | 28 +
src/makemsg.c | 175 ++
src/makewhatis.sh | 456 ++++
src/man-config.c | 297 +++
src/man-config.h | 6 +
src/man-getopt.c | 322 +++
src/man-getopt.h | 6 +
src/man-iconv.c | 163 ++
src/man-iconv.h | 1 +
src/man.c | 1366 ++++++++++
src/man.conf.in | 140 +
src/man.h | 22 +
src/man2dvi | 36 +
src/manfile.c | 337 +++
src/manfile.h | 36 +
src/manpath.c | 412 +++
src/manpath.h | 5 +
src/mwi | 19 +
src/ndir.h | 51 +
src/paths.h.in | 39 +
src/to_cat.c | 171 ++
src/to_cat.h | 3 +
src/util.c | 305 +++
src/util.h | 13 +
version | 1 +
233 files changed, 29232 insertions(+)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..a43ea21
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; 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.
+
+ This program 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 program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/DOAP.rdf.xml b/DOAP.rdf.xml
new file mode 100644
index 0000000..34e15e9
--- /dev/null
+++ b/DOAP.rdf.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Project xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <name>man</name>
+ <created>2010-09-01</created>
+ <programming-language>C, Shell</programming-language>
+ <os>All Linux distributions, commercial *NIX derivatives (including OS-X), *BSD, Windows with Cygwin, Plan 9</os>
+ <shortdesc xml:lang="en">The man suite: man, man2html, hman, whatis, apropos, man2dvi</shortdesc>
+ <description xml:lang="en">
+ man is a man pager. It has support for compressed
+ pages (both man pages and cat pages), and for locale
+ ($LANG) and for message catalogs ($LC_MESSAGES). It
+ will format files given explicitly (man ./foo.man.gz).
+ It conforms to FSSTND or FHS, and handles stray cats.
+ * man2html is a utility that converts man pages to html
+ * hman is a man browser that uses your favorite browser.
+ For use with lynx, no http daemon is required.
+ Keywords: man manpath apropos whatis makewhatis
+ man.conf man2html man2dvi hman manual pager browser
+ keyword search.</description>
+ <download-page rdf:resource="http://primates.ximian.com/~flucifredi/man/" />
+ <homepage rdf:resource="http://primates.ximian.com/~flucifredi/man/" />
+ <license rdf:resource="http://usefulinc.com/doap/licenses/gpl" />
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Federico Lucifredi</foaf:name>
+ <foaf:mbox rdf:resource="mailto:flucifredi at acm.org" />
+ </foaf:Person>
+ </maintainer>
+ <release>
+ <Version>
+ <name>Latest Stable Release: 1.6g</name>
+ <created>2010-12-31</created>
+ <revision>1.6g</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6f</name>
+ <created>2007-12-31</created>
+ <revision>1.6f</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6e</name>
+ <created>2006-11-20</created>
+ <revision>1.6e</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6d</name>
+ <created>2006-6-16</created>
+ <revision>1.6d</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6c</name>
+ <created>2006-1-23</created>
+ <revision>1.6c</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6b</name>
+ <created>2005-9-19</created>
+ <revision>1.6b</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6a</name>
+ <created>2005-8-21</created>
+ <revision>1.6a</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>1.6</name>
+ <created>2006-6-20</created>
+ <revision>1.6</revision>
+ </Version>
+ </release>
+</Project>
diff --git a/HISTORY b/HISTORY
new file mode 100644
index 0000000..a07edda
--- /dev/null
+++ b/HISTORY
@@ -0,0 +1,128 @@
+man-1.6g - 'Murcielago'
+
+- Fixed "man cut cut" throwing an error (Fedora #542852) (Ivana Varekova, flc).
+- Corrections to the man.man German locale translation (Stefan Bacher).
+- flawed treatment of Awk in configure script (Elias Pipping).
+- announcement mailing list set up (man-announce at googlegroups.com) (flc).
+- Minor fix to LZMA support (Per Øyvind Karlsen - Mandriva team).
+- Added XZ compression support (Per Øyvind Karlsen).
+- Improvements to extension handling (R. Urban, V. Zell - CYGWIN project).
+- Releases now gpg signed. Validation instructions on primary distribution
+ site (flc).
+- DOAP.rdf enabled on primary distribution site (flc).
+- EXPERIMENTAL: SPDX.rdf enabled on primary distro site (flc).
+- Changes to LSM file (flc).
+
+man-1.6f - 'Flying Fox'
+
+- Fixed incorrect shell-unsafe verification alphabet missing ampersand simbol.
+ This was being caught by another part of the code but yet still a bug (flc).
+- Unified Posix locale to the C one (J. Pello, flc).
+- Additional checks for defined but empty PAGER environment variable (flc).
+- Don't update whatis files on read-only partitions (Mike Frysinger).
+- Added bzip support to man2dvi (Charles Clément).
+- Added bzip support to man2html (Fabiano Castro Pereira).
+- EXPERIMENTAL: added LZMA suport to man (Per Øyvind Karlsen - Mandriva team).
+- EXPERIMENTAL: added LZMA suport to makewhatis (Per Øyvind Karlsen, flc).
+- README updates: cygwin (Volker Zell).
+- Added "MANUAL SECTIONS" header to man.man (flc).
+- Fixes to avoid shebang mangling in generated scripts (Mike Frysinger).
+- makewhatis fix allowing spaces in pathnames for CYGWIN project (Volker Zell).
+- Minor corrections to the German message catalog (Volker Zell).
+- Updated Dutch Message catalog (Benno Schulenberg).
+- Minor doc changes (flc).
+
+man-1.6e - 'Dracula'
+
+- Sections used by makewhatis set via environment variable MANSECT, falling
+ back to man.conf's MANSECT setting as man does (Mike Frysinger).
+- Removed use of implicit prototypes - besides being sloppy, it leads to issues
+ on 64 bit platforms (Mike frysinger, flc).
+- Building will now honor pre-existing LDFLAGS if set (Mike Frysinger).
+- Updated Italian man pages (Giulio Daprelá).
+- Updated Spanish man pages (B. Albiñana, flc).
+- Corrected a minor bug in makewhatis' tempdir generation (flc).
+- EXPERIMENTAL: support for Plan 9 rc shell lists (Michael Haardt).
+- Overdue LSM v4 format compliance (flc).
+- Minor corrections and cleanup (flc).
+
+man-1.6d
+
+- Fixed freeing of unallocated memory in '-K' under unsafe flag (flc).
+- Corrected a bug introduced in 1.6c makewhatis - thanks to the packagers
+ that promptly pointed it out (flc).
+- corrected off-by-one in LANG splitting code (no security aspect) (flc).
+- added support for DESTDIR in man2html's Makefile (Claudio Fontana).
+- Fixed -D option (flc).
+- Header fix for variable header location of TIOCGWINSZ (Eugene Kotlyarov).
+- Corrected erroneous encoding of FR locale man pages translation (flc).
+- EXEEXT and DESTDIR fixes for gencat (Volker Zell).
+- Minor correction of CYGWIN support (Volker Zell).
+- Updated Polish message catalog and select man pages (M. Garski).
+- Minor corrections to man pages, and the German message catalog
+ (flc, Volker Zell, others).
+- Constricted locale settings for gencat (Fedora Project).
+- Corrections to makewhatis exit codes and signal handling (flc).
+- Fixes in man2html parsing (Fedora Project).
+- Minor additional corrections (flc).
+
+man-1.6c
+
+- Corrected missing format string, but no privilege escalation was involved
+ (flc, Ville-Skyttä).
+- pscan format string audit run - nothing further found (flc).
+- Updated Bulgarian locale man pages translation and message catalog
+ (Alexander Shopov).
+- makewhatis and other minor changes to support BG locale
+ (Alexander Shopov, flc).
+- Updated Italian locale message catalog translation (flc).
+- Updated French man pages, with new man2html page (Alain Portal).
+
+man-1.6b
+
+- Additional changes for parallel Make (Octavio Ruiz).
+- New French locale man pages translation (Alain Portal).
+- New French locale message catalog translation (Alain Portal).
+- Minor changes in manual pages (Giorgos Keramidas, flc).
+- Minor corrections in the docs (flc).
+
+man-1.6a
+
+- Fixes to support parallel Make (Mike Frysinger).
+- Fixes in mess.en message catalog (Martin von Gagern).
+- Corrections and updates to the manual (flc).
+
+man-1.6
+
+- New Maintainer Federico Lucifredi (flucifredi at acm.org).
+- Ability to hand HTML man pages off to a browser added (Eric S. Raymond).
+
+man-1.5p
+
+- Chinese messages (CHAO, Wei-Lun) - unused
+- Russian messages
+- Set DEFAULT_NLSPATH to "/usr/share/locale/%L/%N"
+- Prefer LC_MESSAGES over LANG
+- Don't (potentially) use a pager with apropos and whatis
+- Superfluous security fix
+- Filter .iX macros out when constructing whatis database
+- Allow globbed MANPATH items like /opt/*/man
+- Return a correct status
+- Continue search when an appropriate page was found to be inaccessible
+
+man-1.5o2:
+
+- Fixed man -k segfault
+- Allow man -k "text with spaces"
+
+man-1.5o1:
+
+- Fixed man2html array overflow
+
+man-1.5o:
+
+- Polish messages, non-dummy codesets (Jakub Bogusz <qboosh at pld-linux.org>)
+- CYGWIN fix for perl manpages (with :: in filename)
+- Fix for certain awk versions in mansec (NISHIMURA Daisuke)
+- When asked for a nonexisting page in section 1p, do not also try section 1
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..230177e
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,70 @@
+INSTALLATION
+
+NOTE! The default configuration file has moved from
+/usr/lib/man.config or /etc/man.conf to /usr/share/misc/man.conf.
+Remove the former two.
+The country code dk has been replaced by the language code da.
+If you had Danish man pages installed, these should probably be moved.
+
+The quick installation goes in three steps:
+ 1. configure -default
+ 2. make
+ 3. make install
+
+This should suffice for most people. The defaults are:
+ Only English man pages, no message catalogs, man not suid,
+ handle compressed man pages, compress cat pages, create cat pages
+ whenever the appropriate directory exists,
+ follow FHS by putting cat pages under /var/cache/man provided that
+ that directory exists.
+
+In order to select man pages in other languages, replace Step 1 by
+ 1. configure +lang de,en,nl
+or perhaps (especially when making a general distribution) by
+ 1. configure +lang all
+This yields all the defaults, except for the language setting.
+
+People who want something other than the default also use three steps:
+1. configure -ask
+2. make
+3. make install
+but have to answer a lot of questions during configure.
+
+In somewhat greater detail:
+
+1. Run configure. This will grope around your system a bit and then
+ ask you a number of questions. It will create a Makefile from the
+ file Makefile.in. You may have to do some fine tuning to get things
+ to work exactly right on your system. If you do, I'd like to know
+ what changes you had to make to get things working.
+
+ Man uses groff (nroff, troff) to format man pages. If you don't
+ have *roff, then you can only use preformatted man pages.
+
+ You can make man suid to some uid, say man, where man is the owner
+ of the directories (like /usr/man/cat*) for formatted man pages.
+ That way man can write formatted pages there, even when the directory
+ does not have universal write permission. However, it is fairly easy
+ to spoof man, so really this setup is not very different from the one
+ where /usr/man/cat* has universal write permission.
+ Never make man suid bin or daemon or root!
+
+ Of course it is not necessary at all to cache formatted man pages.
+ Formatting usually takes less than a second, and by not having
+ preformatted pages one avoids problems with window width, integrity, etc.
+
+2. Look at the man.conf file. This determines the programs and extensions
+ used in compressing and uncompressing cat pages. It also determines
+ the system-wide mappings from bin directories to man page directories.
+ It was constructed by configure; you might want to make some changes.
+
+3. Do a `make all', try it out, and then if you're happy with that, do
+ a `make install'. You don't need to be root to use this set of
+ programs.
+ [Note: if you want to try man with the new, not yet installed, man.conf
+ file, use "man -C ./man.conf ...".]
+
+4. Install the whatis database(s) by running makewhatis. If you want
+ to keep things absolutely current, you'll need to run this whenever
+ you add new man pages. You might want to add an entry in your
+ crontab.
diff --git a/LSM b/LSM
new file mode 100644
index 0000000..2baa123
--- /dev/null
+++ b/LSM
@@ -0,0 +1,26 @@
+Begin4
+Title: man
+Version: 1.6g
+Entered-date: 2010-12-31
+Description: * man is a man pager. It has support for compressed
+ pages (both man pages and cat pages), and for locale
+ ($LANG) and for message catalogs ($LC_MESSAGES). It
+ will format files given explicitly (man ./foo.man.gz).
+ It conforms to FSSTND or FHS, and handles stray cats.
+ * man2html is a utility that converts man pages to html
+ * hman is a man browser that uses your favorite browser.
+ For use with lynx, no http daemon is required.
+ Keywords: man manpath apropos whatis makewhatis
+ man.conf man2html man2dvi hman manual pager browser
+ keyword search
+Keywords: man, man2html, hman, whatis, apropos, man2dvi
+Author: John Eaton, Richard Verhoeven, Michael Hamilton,
+ Andries Brouwer, Federico lucifredi (flucifredi at acm.org)
+Maintained-by: Federico Lucifredi (flucifredi at acm.org)
+Primary-site: http://primates.ximian.com/~flucifredi/man/
+ 251k man-1.6g.tar.gz
+ 1378 man-1.6g.lsm
+Alternate-site: http://www.people.fas.harvard.edu/~lucifred/man/
+Alternate-site: ftp://metalab.unc.edu/pub/Linux/apps/doctools/man/
+Copying-policy: Copyright by authors. Distributable under GPL.
+End
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..fedb23c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,76 @@
+# Makefile for man
+# [need allow_null_glob_expansion=true]
+# The parts behind % are removed when no message catalogs should be installed
+
+all: Makefile conf_script source manhtml manpages %messages
+ @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
+
+%messages: gencat/gencat msgs/Makefile source
+% cd msgs; $(MAKE)
+
+%gencat/gencat:
+% cd gencat; $(MAKE)
+
+install: src/Makefile man/Makefile man2html/Makefile %msgs/Makefile
+ cd src; $(MAKE) install
+ cd man2html; $(MAKE) install
+ cd man; $(MAKE) installsubdirs
+% cd msgs; $(MAKE) install
+ @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
diff --git a/README b/README
new file mode 100644
index 0000000..1ff31dd
--- /dev/null
+++ b/README
@@ -0,0 +1,41 @@
+man was written by John Eaton (jwe at bevo.che.wisc.edu).
+He does not maintain man anymore - please do not bother
+him with remarks about the current version, which is
+rather different from the original one.
+
+man-1.2 was released by Zeyd M. Ben-Halim (zmbenhal at netcom.com).
+
+man-1.3, man-1.4* and man-1.5* were released by Andries Brouwer (aeb at cwi.nl).
+
+In man-1.5 Richard Verhoeven's man2html was added, together with
+some scripts by Michael Hamilton.
+
+man-1.6 and versions following were released by Federico Lucifredi (flucifredi at acm.org).
+
+In man-1.6 Eric S. Raymond's browser-handoff functionality was added, with
+future minor versions planned to cleanup internationalization and cross
+platform support (Cygwin, solaris, and perhaps Win32). A bugfixing campaign
+is currently underway.
+
+The current maintainer is Federico Lucifredi (flucifredi at acm.org).
+
+The current version can usually be found at
+http://primates.ximian.com/~flucifredi/man/
+a backup distribution site is located at
+http://people.fas.harvard.edu/~lucifred/man/
+releases are also posted to the Metalab site regularly.
+
+Feedback from distribution packagers is very appreciated. Patches welcome!
+
+Man versions are codenamed for bats, starting with 1.6e.
+
+Development releases have an 'RC-' suffix followed by the release
+candidate number. Versions released under the 'RC' label are not
+to be included in stable distributions (and indeed no one has been
+to date - do not be the first to goof up!).
+
+There is a very different man program, also derived from
+John Eaton's original version (by Graeme W. Wilford)
+distributed under the name man_db, with version numbers
+like man_db-2.3.10. Do not confuse the two, they are
+mutually incompatible, although they perform nearly the same job.
diff --git a/README.GNU-WIN32 b/README.GNU-WIN32
new file mode 100644
index 0000000..c1a5c97
--- /dev/null
+++ b/README.GNU-WIN32
@@ -0,0 +1,32 @@
+Volker Zell writes:
+
+To run a precompiled version of man with Cygwin 1.5.24 and above you will need
+the following utilities
+
+ o man, bash, cygwin, bzip2, coreutils, gawk, groff, gzip and less
+
+Click on the "Install Cygwin now" link on the http://cygwin.com/ web page.
+This downloads setup.exe to your system. Save it and run setup, answer
+the questions and pick up the above mentioned packages from the different
+categories.
+
+
+Building from source
+====================
+
+Adjust the paths in configure and man2html/Makefile.in to suit your
+installation.
+
+man-1.6e builds with:
+
+ CC="gcc -O2 -DNONLS -DLC_MESSAGES=6" ./configure +fhs +lang all
+
+then issue:
+
+ make
+
+then:
+
+ make install
+
+Edit the installed man.conf to suit your site.
diff --git a/README.HP b/README.HP
new file mode 100644
index 0000000..f228155
--- /dev/null
+++ b/README.HP
@@ -0,0 +1,83 @@
+People tell me that HP uses compressed man pages named like
+ /usr/man/man1.Z/ls.1
+that is, the directory instead of the file has an extension.
+I have no access to HP machines, and do not know the details
+of this situation (what happens to cat files? to .so files?),
+but perhaps this man is usable in such a situation if one puts
+ MAN_HP_DIREXT=.Z
+in the environment. Untested.
+
+Tell me if this works, and if not what is wrong.
+I may yet gain access to an HP-UX box and verify this myself.
+flc - flucifredi at acm.org
+
+P.S.
+
+A report mentions cat1.Z cat1m.Z cat2.Z ... cat8.Z
+man1 man1.Z man1m man1m.Z ... man8 man8.Z man9.Z
+subdirectories of /usr/share/man,
+where the cat dirs are owned by bin:bin with mode 0777
+and the man dirs are owned by bin:bin with mode 0555.
+
+Scott Marovich adds:
+
+As far as your GNU software is concerned, the first very important point is:
+The paths used for compressed manual pages represent only the tip of a very
+deep iceberg: Historically, HP-UX derives from A.T.&T. UNIX System V (and
+System III before that) with some selected BSD features added later, and it
+doesn't even purport to be GNU-compatible. For many years HP sold a binary
+HP-UX port of the A.T.&T. Documenter's Work Bench as an optional product, and
+HP-UX's versions of "man(1)" and "nroff(1)" (etc.) strive to be DWB-compatible.
+Similarly, the manual pages use only plain, old, simple A.T.&T. "man(7)" macros,
+HP-UX's standard data-compression utility command is "compress(1)"/"zcat(1)"
+instead "gzip(1)", and HP-UX follows System V conventions about where to cache
+formatted pages: they go into directories such as "/usr[/share]/man/cat*"
+instead of "/var/cache/man" like under Linux. System V "man(1)" can optionally
+accept compressed input and/or produce compressed output, and it has a built-in
+algorithm for deciding which directories to use. Assuming, for example, that
+manual page "foo.1" is requested, the algorithm works like this:
+
+(Output-directory search:)
+If a "/usr[/share]/man/cat1.Z" directory exists, look for a cached (formatted,
+compressed) "foo.1" file in it; otherwise, if a "/usr[/share]/man/cat1"
+directory exists, look for a cached (formatted, uncompressed) "foo.1" file in
+it; otherwise, no formatted-and-cached form of the page exists. After an input
+page is formatted, it will be compressed and cached if the "cat1.Z" directory
+exists, or cached without compression if only the "cat1" directory exists, or
+discarded if neither exist.
+
+(Input-directory search:)
+If "/usr[/share]/man/man1.Z/foo.1" exists, then decompress and format this file;
+otherwise, if "/usr[/share]/man/foo.1" exists, then format this uncompressed
+file; otherwise, assume that the manual page is missing.
+
+Notice that:
+
+1. Priority is automatically given to fetching and storing manual pages in
+ compressed form if the necessary directories exist.
+
+2. Unlike GNU-compatible path naming schemes, the "regular" files containing
+ [un]formatted manual-page text do *not* have ".Z" (let alone ".gz") suffixes;
+only their containing directories do.
+
+As far as these file's protection modes are concerned, that's partly up to a
+local HP-UX system administrator. If one prefers not to have "man(1)" be a
+set-UID/GID binary, then the usual custom is:
+
+ man?[.Z] directories : mode 555
+ man?[.Z]/<name>.* files: mode 444
+ cat?[.Z] directories : mode 777
+ cat?[.Z]/<name>.* files: mode 666
+
+i.e., any user can delete any other user's cached, formatted pages. If one
+prefers to run "man(1)" as a set-UID/GID program for a little more control,
+then an alternative scheme is, say:
+
+ cat?[.Z] directories : mode 755/575
+ cat?[.Z]/<name>.* files: mode 644/464
+
+You also expressed some curiousity about the treatment of ".so" directives in
+compressed manual pages. The answer is simple: there aren't any. ".so" is
+rarely used in general, so the HP department responsible for producing HP-UX's
+manual pages decided to "soelim(1)" the small number of exceptions (before
+compressing the result) in order to avoid dealing with this problem.
diff --git a/README.IRIX b/README.IRIX
new file mode 100644
index 0000000..928d9bf
--- /dev/null
+++ b/README.IRIX
@@ -0,0 +1,28 @@
+The NLSPATH / locale stuff doesnt work under IRIX.
+(Patches are welcome.)
+
+---------------------------------------------------------------
+
+It is reported that IRIX uses /usr/share/man/[apu]_man/man[1-8]
+corresponding to admin, programmer and user pages.
+
+One finds files like /usr/share/catman/u_man/cat1/ls.z
+
+Maybe
+
+ MAN_IRIX_CATNAMES=1
+
+in the environment and
+
+ MANPATH /usr/share/man/a_man /usr/share/catman/a_man
+ MANPATH /usr/share/man/p_man /usr/share/catman/p_man
+ MANPATH /usr/share/man/u_man /usr/share/catman/u_man
+
+in the man.conf file
+will suffice to make this man work in an IRIX environment.
+Reports on success/failure are welcome.
+
+---------------------------------------------------------------
+
+
+flucifredi at acm.org
diff --git a/SPDX.rdf.xml b/SPDX.rdf.xml
new file mode 100644
index 0000000..9c1df8e
--- /dev/null
+++ b/SPDX.rdf.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+ xmlns="http://spx.org/rdf/ns/sdpx#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <SPDXDoc rdf:about="http://spdx.org">
+ <SPDXVersion>SPDX-1.0</SPDXVersion>
+ <UniqueID>c97012607ed9d75a6eee7e66d257a99a8ed86918</UniqueID>
+ <CreatedBy>Man Maintainer (Federico Lucifredi)</CreatedBy>
+ <Created>2010-09-15T18:31:00Z</Created>
+ <hasPackageOverview>
+ <PackageOverview>
+ <DeclaredName>Man 1.6g</DeclaredName>
+ <FileName>man-1.6g.tar.gz</FileName>
+ <URL rdf:resource="http://primates.ximian.com/~flucifredi/man/man-1.6g.tar.gz" />
+ <DeclaredLicense rdf:resource="http://spdx.org/rdf/licenses/GPL-2.0" />
+ <DeclaredCopyright>Man Maintainers (Federico Lucifredi, Andries Brouwer, Zeyd M. Ben-Halim, and John Eaton) and Contributors (Richard Verhoeven, Eric S. Raymond, Michael Hamilton, and others)</DeclaredCopyright>
+ <CopyrightDate>2010</CopyrightDate>
+ <ShortDesc>The man suite: man, man2html, hman, whatis, apropos, man2dvi.</ShortDesc>
+ <Description>man is a man pager. It has support for compressed
+ pages (both man pages and cat pages), and for locale
+ ($LANG) and for message catalogs ($LC_MESSAGES). It
+ will format files given explicitly (man ./foo.man.gz).
+ It conforms to FSSTND or FHS, and handles stray cats.
+ * man2html is a utility that converts man pages to html
+ * hman is a man browser that uses your favorite browser.
+ For use with lynx, no http daemon is required.
+ Keywords: man manpath apropos whatis makewhatis
+ man.conf man2html man2dvi hman manual pager browser
+ keyword search.</Description>
+ </PackageOverview>
+ </hasPackageOverview>
+ </SPDXDoc>
+</rdf:RDF>
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..1ccce13
--- /dev/null
+++ b/TODO
@@ -0,0 +1,28 @@
+Resuming regular releases after Grad School hiatus.
+
+Improvements and reviews of internationalization/localization.
+
+----> The localization and platform support are being addressed in the
+upcoming minor releases. Comments and patches welcome.
+
+----> UTF-8 support is in the works as well. Comments and patches welcome.
+
+hman does not use LANG; review coherence of ENV use.
+
+Review support under HP-UX, Irix, Solaris, AIX, OS-X and other *NIXes.
+
+Add support for missing macros in man2html.
+
+Are there security problems in the present setup?
+
+-----------------------------------------------------------
+MANPL gives page length - undocumented; may disappear again
+
+[But brobison at ecst.csuchico.edu likes it and says:
+it allows one to do something like:
+
+export LINES
+export MANPAGER='less -i'
+export MANPL='$(perl -e "print ($LINES - 1) / 6, \"i\";")'
+]
+
diff --git a/catopen/README b/catopen/README
new file mode 100644
index 0000000..dbe8a45
--- /dev/null
+++ b/catopen/README
@@ -0,0 +1,29 @@
+In the good old days, with libc 4.*.*,
+if NLSPATH was set to "/usr/lib/locale/%N/%L"
+and LANG to "fr", then catopen("man",0) would open /usr/lib/locale/man/fr.
+
+These days, with libc 5.0.9, catopen will fail because it does a call
+to setlocale, and if no locale has been setup, the C locale is assumed,
+independent of the LANG setting.
+
+In order to preserve the possibility to say "LANG=de man fstab"
+for systems where no locale has been set up, I enclose here
+the original version of catopen.
+
+Concerning correctness: as far as I know POSIX does not specify
+catopen(), and X/Open specifies catopen() without mentioning any
+relation to locale - indeed, catopen() predates locale.
+So, I think catopen() in libc 5.0.9 is broken.
+
+---
+
+Time goes on, and I just looked at glibc-2.0.5.
+Its catgets() contains (at least) two bugs, and will dump core.
+One is fixed in RedHat's glibc-2.0.5c-10; I have submitted a fix
+for the other. With a fixed catgets() things will work correctly.
+However, glibc does a secure_getenv("NLSPATH"), which means that
+the setting of NLSPATH is not taken into account for programs
+that are sgid or suid. Thus, if you make man suid or sgid, and
+want to use message catalogues, you have to install them in the
+default place - on my system that is /usr/share/locale/%L/man
+where %L is $LANG.
diff --git a/catopen/catopen.c b/catopen/catopen.c
new file mode 100644
index 0000000..2f756bc
--- /dev/null
+++ b/catopen/catopen.c
@@ -0,0 +1,209 @@
+/* catopen.c - aeb, 960107 */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <nl_types.h>
+
+extern char *index (const char *, int); /* not always in <string.h> */
+extern char *my_malloc(int); /* in util.c */
+
+#ifndef DEFAULT_NLSPATH
+# if __GLIBC__ >= 2
+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
+# else
+# define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
+# endif
+#endif
+
+static nl_catd my_catopenpath(char *name, char *path);
+
+static /* this source included in gripes.c */
+nl_catd
+my_catopen(char *name, int oflag) {
+ nl_catd fd;
+
+ fd = catopen(name, oflag);
+
+ if (fd == (nl_catd) -1 && oflag) {
+ oflag = 0;
+ fd = catopen(name, oflag);
+ }
+
+ if (fd == (nl_catd) -1) {
+ char *nlspath;
+
+ /* The libc catopen fails - let us see if we can do better */
+ /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
+
+ /*
+ * "In catopen(), the oflag argument is reserved for future use
+ * and should be set to 0."
+ */
+
+ if (oflag)
+ return fd; /* only treat the known case */
+
+ /*
+ * "If `name' contains a `/', then `name' specifies a pathname"
+ */
+ if (index(name, '/')) {
+#ifdef __GLIBC__
+ /* glibc uses a pointer type for nl_catd, not a fd */
+ return fd;
+#else
+ /* this works under libc5 */
+ return open(name, O_RDONLY);
+#endif
+ }
+
+ /*
+ * "If NLSPATH does not exist in the environment, or if a
+ * message catalog cannot be opened in any of the paths specified
+ * by NLSPATH, then an implementation defined default path is used"
+ */
+
+ nlspath = getenv("NLSPATH");
+ if (nlspath)
+ fd = my_catopenpath(name, nlspath);
+ if (fd == (nl_catd) -1)
+ fd = my_catopenpath(name, DEFAULT_NLSPATH);
+ }
+ return fd;
+}
+
+/*
+ * XPG 1987, Vol. 3, Section 4.4 specifies the environment
+ * variable NLSPATH (example:
+ * NLSPATH=/nlslib/%L/%N.cat:/nlslib/%N/%L
+ * where %L stands for the value of the environment variable LANG,
+ * and %N stands for the `name' argument of catopen().
+ * The environ(5) page specifies more precisely that
+ * LANG is of the form
+ * LANG=language[_territory[.codeset]]
+ * and adds %l, %t, %c for the three parts of LANG, without the
+ * _ or . and are NULL when these parts are missing.
+ * It also specifies %% for a single % sign.
+ * A leading colon, or a pair of adjacent colons, in NLSPATH
+ * specifies the current directory. (Meant is that "" stands for "%N".)
+ *
+ */
+static nl_catd
+my_catopenpath(char *name, char *nlspath) {
+ int fd;
+ nl_catd cfd = (nl_catd) -1;
+ char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
+ int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
+
+ namesz = strlen(name);
+
+ lang = getenv("LANG");
+ if (!lang)
+ lang = "";
+ langsz = strlen(lang);
+
+ lang_l = lang;
+ s = index(lang_l, '_');
+ if (!s) {
+ lang_t = lang_c = "";
+ lang_l_sz = langsz;
+ lang_t_sz = lang_c_sz = 0;
+ } else {
+ lang_l_sz = s - lang_l;
+ lang_t = s+1;
+ s = index(lang_t, '.');
+ if (!s) {
+ lang_c = "";
+ lang_t_sz = langsz - lang_l_sz - 1;
+ lang_c_sz = 0;
+ } else {
+ lang_t_sz = s - lang_t;
+ lang_c = s+1;
+ lang_c_sz = langsz - lang_l_sz - lang_t_sz - 2;
+ }
+ }
+
+ /* figure out how much room we have to malloc() */
+ sz = 0;
+ s = nlspath;
+ while(*s) {
+ if(*s == '%') {
+ s++;
+ switch(*s) {
+ case '%':
+ sz++; break;
+ case 'N':
+ sz += namesz; break;
+ case 'L':
+ sz += langsz; break;
+ case 'l':
+ sz += lang_l_sz; break;
+ case 't':
+ sz += lang_t_sz; break;
+ case 'c':
+ sz += lang_c_sz; break;
+ default: /* unknown escape - ignore */
+ break;
+ }
+ } else if (*s == ':' && (s == nlspath || s[-1] == ':')) {
+ sz += (namesz + 1);
+ } else
+ sz++;
+ s++;
+ }
+
+ /* expand the %L and %N escapes */
+ path0 = my_malloc(sz + 1);
+ path = path0;
+ s = nlspath;
+ while(*s) {
+ if(*s == '%') {
+ s++;
+ switch(*s) {
+ case '%':
+ *path++ = '%'; break;
+ case 'N':
+ strncpy(path, name, namesz); path += namesz; break;
+ case 'L':
+ strncpy(path, lang, langsz); path += langsz; break;
+ case 'l':
+ strncpy(path, lang_l, lang_l_sz); path += lang_l_sz; break;
+ case 't':
+ strncpy(path, lang_t, lang_t_sz); path += lang_t_sz; break;
+ case 'c':
+ strncpy(path, lang_c, lang_c_sz); path += lang_c_sz; break;
+ default: /* unknown escape - ignore */
+ break;
+ }
+ } else if (*s == ':' && (s == nlspath || s[-1] == ':')) {
+ strncpy(path, name, namesz); path += namesz;
+ *path++ = ':';
+ } else
+ *path++ = *s;
+ s++;
+ }
+ *path = 0;
+
+ path = path0;
+ while(path) {
+ file = path;
+ s = index(path, ':');
+ if (s) {
+ *s = 0;
+ path = s+1;
+ } else
+ path = 0;
+ fd = open(file, O_RDONLY);
+ if (fd != -1) {
+ /* we found the right catalog - but we don't know the
+ type of nl_catd, so close it again and ask libc */
+ close(fd);
+ cfd = catopen(file, 0);
+ break;
+ }
+ }
+
+ free(path0);
+ return cfd;
+}
diff --git a/configure b/configure
new file mode 100755
index 0000000..4928ae0
--- /dev/null
+++ b/configure
@@ -0,0 +1,1379 @@
+#!/bin/sh
+#
+# Guess values for system-dependant variables and create `Makefile'.
+# Can be distributed according to GPL.
+#
+# Usage:
+# configure -ask (ask all questions)
+#
+# As soon as some other option is specified, configure
+# will not ask questions. Other options:
+#
+# configure -d[efault] (language=en, +fhs)
+# configure -confdir DIR (directory to hold man.conf)
+# configure +suid/sgid (make man suid or sgid)
+# configure +lang cs,da,de,el,en,es,fi,fr,hr,it,ko,nl,pl,pt,ro,sl
+# (language(s) as given)
+# ("all" will specify all available languages)
+# ("none" will disable NLS support)
+# configure +fhs (follow FHS: use /var/cache/man)
+# configure +fsstnd (follow FSSTND: use /var/catman)
+#
+LANGUAGES="bg,cs,da,de,el,en,es,fi,fr,hr,it,ja,ko,nl,pl,pt,ro,ru,sl"
+LANGOPT="+lang {$LANGUAGES|all|none}"
+#
+# Some people prefer "-irs", but probably only when they have a broken setup.
+# (Indeed, -r may cause the terminal to get into funny states.
+# Very inconvenient. For viewing pages in strange locales, set LC_*.)
+#
+DEFAULTLESSOPT="-is"
+#
+# Note that not creating any cat directories (/var/cache/man or so)
+# and not making man suid or sgid is recommended.
+# This avoids security problems, the fact that different users have
+# different window sizes and different character sets, etc.
+# Formatting is fast enough today.
+
+trap 'rm -f conftest conftest.c; exit 1' 1 3 15
+
+set +u # Make sure unset variables are ok.
+
+if [ $# = 0 ]; then
+ echo "Usage: configure -ask"
+ echo " or: configure [-d|-default] [-confdir DIR] [+suid] [+sgid] \\"
+ echo " [+fhs|+fsstnd|+traditional] [+lang none|all|LANGUAGES]"
+ echo " where LANGUAGES is a substring of $LANGUAGES".
+ echo
+ echo 'The default "configure -d" is equivalent to "configure +fhs +lang en".'
+ echo 'The option +suid will make man suid to a user "man". Create this first.'
+ echo 'The option +sgid will make man sgid to a group "man". Create this first.'
+ echo 'The options +fhs, +fsstnd, +traditional will make man use'
+ echo ' /var/cache/man, /var/catman and /usr/man/cat?, respectively.'
+ echo 'It is recommended not to use suid/sgid and not to keep cat pages.'
+ echo 'The -confdir option specifies where man.conf lives (default /usr/share/misc).'
+ echo
+ exit 1
+fi
+
+default=true
+usenls=true
+
+for arg in $*; do
+ if [ x$setlang = xtrue ]
+ then
+ case $arg in
+ none)
+ usenls=false
+ ;;
+ all)
+ languages="??"
+ ;;
+ *)
+ languages=`echo $arg | sed -e 's/,/ /g'`
+ esac
+ setlang=false
+ elif [ x$setconfdir = xtrue ]
+ then
+ confdir=$arg
+ confexplicit=1
+ setconfdir=false
+ else
+ # help people used to GNU-style --options
+ # e.g. --enable-suid, --disable-suid, --prefix
+ case $arg in
+ --enable-*)
+ arg=`echo $arg | sed -e 's/--enable-/+/'`
+ ;;
+ --disable-*)
+ arg=`echo $arg | sed -e 's/--disable-/-/'`
+ ;;
+ --*)
+ arg=`echo $arg | sed -e 's/--/-/'`
+ esac
+ case $arg in
+ -default | -d)
+ usefhs=true
+ ;;
+ -ask | -a)
+ default=
+ ;;
+ -prefix=*)
+ prefix=`echo $arg | sed -e 's/-prefix=//'`
+ ;;
+ -bindir=*)
+ bindir=`echo $arg | sed -e 's/-bindir=//'`
+ ;;
+ -confdir=*)
+ confdir=`echo $arg | sed -e 's/-confdir=//'`
+ confexplicit=1
+ ;;
+ -confdir)
+ setconfdir=true;
+ ;;
+ -confprefix=*)
+ confprefix=`echo $arg | sed -e 's/-confprefix=//'`
+ ;;
+ -mandir=*)
+ mandir=`echo $arg | sed -e 's/-mandir=//'`
+ manexplicit=1
+ ;;
+ -sbindir=*)
+ sbindir=`echo $arg | sed -e 's/-sbindir=//'`
+ ;;
+ +lang)
+ setlang=true
+ ;;
+ +suid)
+ suid=true
+ ;;
+ -suid)
+ suid=false
+ ;;
+ +sgid)
+ sgid=true
+ ;;
+ -sgid)
+ sgid=false
+ ;;
+ +traditional)
+ usefsstnd=false
+ usefhs=false
+ ;;
+ +fsstnd)
+ usefsstnd=true
+ ;;
+ -fsstnd)
+ usefsstnd=false
+ ;;
+ +fhs)
+ usefhs=true
+ ;;
+ -fhs)
+ usefhs=false
+ ;;
+ -compatibility_mode_for_colored_groff)
+ set_compatibility_mode_for_colored_groff=true;
+ ;;
+ *)
+ echo "Usage: configure -ask"
+ echo " or: configure [-d|-default] [-confdir DIR] [+suid] [+sgid] \\"
+ echo " [+fhs|+fsstnd|+traditional] [+lang all|LANGUAGES]"
+ echo " where LANGUAGES is a substring of $LANGUAGES".
+ echo
+ echo 'The default "configure -d" is equivalent to "configure +fhs +lang en".'
+ echo 'The option +suid will make man suid to a user "man". Create this first.'
+ echo 'The option +sgid will make man sgid to a group "man". Create this first.'
+ echo 'The options +fhs, +fsstnd, +traditional will make man use'
+ echo ' /var/cache/man, /var/catman and /usr/man/cat?, respectively.'
+ echo 'The -confdir option specifies where man.conf lives (default /usr/share/misc).'
+ exit 1
+ ;;
+ esac
+ fi
+done
+
+# Default installation paths
+#
+# prefix="/usr/local" or "/usr"
+# confprefix="/usr/local" or "/usr" or "/etc"
+#
+# The configuration file has various names and pathnames in the
+# various distributions, such as /usr/share/misc/man.conf,
+# /usr/lib/man.conf, /etc/man.config.
+# The FHS wants it in /usr/share/misc
+# All documentation assumes "man.conf" - in case you invent some other name
+# (why?), also man pages and other docs need to be patched.
+if [ -z "${prefix}" ]; then prefix="/usr"; fi
+if [ -z "${confprefix}" ]; then confprefix=${prefix}; fi
+if [ -z "${bindir}" ]; then bindir="${prefix}/bin"; fi
+if [ -z "${sbindir}" ]; then sbindir="${prefix}/sbin"; fi
+if [ -z "${mandir}" ]; then mandir="${prefix}/man"; fi
+
+if [ -z "$manexplicit" -a x"$usefhs" = xtrue ]; then
+ mandir="${prefix}/share/man"
+fi
+if [ -z "$confexplicit" ]; then
+ confdir="${confprefix}/lib"
+ if [ x"$usefhs" = xtrue ]; then
+ confdir="${confprefix}/share/misc"
+ fi
+fi
+conffilename="man.conf"
+
+if test "$RANDOM" = "$RANDOM"; then
+ # Plain old Bourne shell.
+ echo checking for gcc
+ test -z "$CC" -a -n "`gcc 2>&1`" && CC="gcc -O"
+else
+ # ksh, bash or zsh. ksh and zsh write "command not found" to stderr.
+ echo checking for gcc
+ test -z "$CC" && type gcc && CC="gcc -O"
+fi
+
+CC=${CC-cc}
+BUILD_CC=${BUILD_CC-${CC}}
+INSTALL=${INSTALL-install}
+INCLUDEDIR=${INCLUDEDIR-/usr/include}
+
+rm -f conftest conftest.c
+compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
+
+# Check for various header files.
+
+echo checking for ANSI C header files
+echo "#include <stdlib.h>
+#include <string.h>
+main() { exit(0); strerror(0); }" > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then
+ DEFS="$DEFS -DSTDC_HEADERS"
+fi
+echo checking for Windows EXEEXT
+EXEEXT=
+test -f ./conftest.exe && EXEEXT=.exe
+
+rm -f conftest conftest.c
+
+echo checking for sys/termios.h
+echo "#include <sys/termios.h>
+main() { exit(0); }" > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then
+ DEFS="$DEFS -DTERMIOS_HEADER"
+fi
+rm -f conftest conftest.c
+
+echo checking for POSIX.1 header files
+echo "#include <unistd.h>
+main() {
+#ifdef _POSIX_VERSION
+exit(0);
+#else
+exit(1);
+#endif
+}" > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then
+ DEFS="$DEFS -DPOSIX"
+fi
+rm -f conftest conftest.c
+
+echo checking for BSD string and memory functions
+echo "#include <strings.h>
+main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then :
+ else DEFS="$DEFS -DUSG"
+fi
+rm -f conftest conftest.c
+
+echo checking whether sys/types.h defines uid_t
+echo '#include <sys/types.h>
+main() { uid_t x; exit(0); }' > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then :
+else
+ uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
+ DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
+fi
+rm -f conftest conftest.c
+
+echo checking for Xenix
+if test -f /xenix; then
+ LIBS="$LIBS -lx"
+ case "$DEFS" in
+ *SYSNDIR*) ;;
+ *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
+ esac
+fi
+
+echo checking how to get alloca
+echo '
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else
+#ifdef sparc
+#include <alloca.h>
+#else
+#ifdef _AIX
+ #pragma alloca
+#else
+char *alloca ();
+#endif
+#endif
+#endif
+main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then :
+elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
+elif test -f /usr/lib/libPW.a; then LIBS="$LIBS -lPW"
+else DEFS="$DEFS -DALLOCA_MISSING"
+fi
+rm -f conftest conftest.c
+
+if [ $usenls = true ]; then
+ echo checking for nls
+ echo '#include <nl_types.h>
+ main() {nl_catd catfd; exit(0); }' > conftest.c
+ eval $compile
+ if test -s conftest && ./conftest 2>/dev/null; then :
+ else
+ usenls=false
+ fi
+ rm -f conftest conftest.c
+fi
+
+if [ $usenls = false ]; then
+ DEFS="$DEFS -DNONLS"
+fi
+
+echo checking for getopt.h
+echo '#define _GNU_SOURCE
+#include <getopt.h>
+#include <stdio.h>
+struct option long_opts[] = { { "", no_argument, NULL, 0 } };
+main() { exit(0); }' > conftest.c
+eval $compile
+if test -s conftest && ./conftest 2>/dev/null; then
+ manpathoption="--path"
+else
+ manpathoption="-w"
+ DEFS="$DEFS -DNOGETOPT"
+fi
+rm -f conftest conftest.c
+
+# first determine how to suppress newline on echo command (stolen from
+# Perl's Configure) ...
+
+echo "Checking echo to see how to suppress newlines..."
+(echo "hi there\c" ; echo " ") >conftest
+if grep c conftest >/dev/null 2>&1 ; then
+ echo "...using -n."
+ n='-n'
+ c=''
+else
+ cat <<'EOM'
+...using \c
+EOM
+ n=''
+ c='\c'
+fi
+rm -f conftest
+
+# Ask the installer where various things are located.
+# (A separate variable is needed since various shells do
+# word-splitting at different moments, which means that
+# for i in /bin:/usr/bin:$PATH
+# does not work everywhere.)
+# Some people might prefer having $PATH first in PREPATH
+PREPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH
+IFS0="$IFS"
+IFS=":$IFS"
+for i in $PREPATH
+do
+ case $i in
+ /*)
+ DEFPATH="$DEFPATH $i"
+ ;;
+ esac
+done
+IFS="$IFS0"
+
+if [ x$default = x ]; then
+ echo ""
+ echo $n "Do you have the nroff source for man pages? [yes] $c"
+ ans=
+ while [ x$ans = x ]
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "yes"
+ then
+ ans=true
+ elif test "$yesno" = "no"
+ then
+ ans=false
+ else
+ echo "You must enter yes or no"
+ fi
+ done
+else
+ echo ""
+ echo "Assuming you want to be able to handle the nroff source for man pages."
+ ans=true
+fi
+
+if test "$ans" = "false"
+then
+ for i in more less cmp cat awk gawk mawk
+ do
+ eval F$i="missing"
+ for j in $DEFPATH
+ do
+ if test -f $j/$i
+ then
+ eval F$i=$j/$i
+ break
+ fi
+ done
+ done
+ troff=""
+ nroff=""
+ jnroff=""
+ eqn=""
+ neqn=""
+ jneqn=""
+ tbl=""
+ col=""
+ vgrind=""
+ refer=""
+ grap=""
+ pic=""
+ if test $Fless = "missing"
+ then
+ pager="$Fmore"
+ else
+ pager="$Fless $DEFAULTLESSOPT"
+ fi
+ if test $Fawk = "missing"
+ then
+ Fawk="$Fgawk"
+ fi
+ if test $Fawk = "missing"
+ then
+ Fawk="$Fmawk"
+ fi
+ cmp="$Fcmp -s"
+ cat="$Fcat"
+ awk="$Fawk"
+
+ FILTERS="pager cmp cat awk"
+else
+ for i in nroff groff geqn gtbl col vgrind grefer grap gpic more less lynx cmp cat awk gawk mawk
+ do
+ eval F$i="missing"
+ for j in $DEFPATH
+ do
+ if test -f $j/$i
+ then
+ eval F$i=$j/$i
+ break
+ fi
+ done
+ done
+ for i in eqn tbl refer pic
+ do
+ if test `eval echo \\$Fg$i` = "missing"
+ then
+ for j in $DEFPATH
+ do
+ if test -f $j/$i
+ then
+ eval Fg$i=$j/$i
+ break
+ fi
+ done
+ fi
+ done
+# -Tlatin1 is bad when utf8 is used, but needed for groff, not for nroff
+# Hmm - also needed for nroff, to prevent double conversion on uxterm
+ if test $Fgroff = "missing"
+ then
+ if test $Fnroff = "missing"
+ then
+ nroff="nroff -Tlatin1 -mandoc"
+ else
+ nroff="$Fnroff -Tlatin1 -mandoc"
+ fi
+ troff="troff -mandoc"
+ echo "Warning: could not find groff"
+ else
+ if test $Fnroff = "missing"
+ then
+ nroff="$Fgroff -Tlatin1 -mandoc"
+ else
+ nroff="$Fnroff -Tlatin1 -mandoc"
+ fi
+ troff="$Fgroff -Tps -mandoc"
+ jnroff="$Fgroff -Tnippon -mandocj"
+ fi
+ eqn="$Fgeqn -Tps"
+ neqn="$Fgeqn -Tlatin1"
+ jneqn="$Fgeqn -Tnippon"
+ tbl="$Fgtbl"
+ col="$Fcol"
+ vgrind="$Fvgrind"
+ refer="$Fgrefer"
+ grap="$Fgrap"
+ pic="$Fgpic"
+ if test $Fless = "missing"
+ then
+ pager="$Fmore"
+ else
+ pager="$Fless $DEFAULTLESSOPT"
+ fi
+ if test $Flynx = "missing"
+ then
+ browser=$pager
+ htmlpager=$Fcat
+ else
+ browser="$Flynx"
+ htmlpager="$Flynx -dump"
+ fi
+ if test $Fawk = "missing"
+ then
+ Fawk="$Fgawk"
+ fi
+ if test $Fawk = "missing"
+ then
+ Fawk="$Fmawk"
+ fi
+ cmp="$Fcmp -s"
+ cat="$Fcat"
+ awk="$Fawk"
+
+ FILTERS="troff nroff jnroff eqn neqn jneqn tbl col vgrind refer grap pic pager browser htmlpager cmp cat awk"
+fi
+
+# Note: older nroff gives an error message for -c
+# Do this only when you have troff 1.18.1 or so.
+if [ "x$set_compatibility_mode_for_colored_groff" = "xtrue" ]; then
+ troff="$troff -c"
+ nroff="$nroff -c"
+ jnroff="$jnroff -c"
+fi
+
+if [ x$default = x ]; then
+ echo ""
+ echo "If you don't have one of the following programs, enter \`missing'."
+ echo "It's best to enter absolute pathnames so that man won't have to"
+ echo "depend on the user's path to work properly. Default values are"
+ echo "given in square brackets. The answers given are only checked to"
+ echo "see if the programs exist, not to see see if the given flags are"
+ echo "correct."
+
+ for filter in $FILTERS
+ do
+ found=false
+ while test "$found" = "false"
+ do
+ echo ""
+ echo $n "$filter command to use [`eval echo \\$$filter`] $c"
+ read tmp
+ if test -n "$tmp"
+ then
+ if test "$tmp" = "missing"
+ then
+ if test "$filter" = "pager"
+ then
+ found=false
+ echo "You must have a pager!"
+ else
+ found=true
+ eval $filter=""
+ fi
+ elif test -f `echo $tmp | $awk '{print $1}'`
+ then
+ found=true
+ eval $filter=\""$tmp"\"
+ else
+ found=false
+ echo ""
+ echo "`echo $tmp | $awk '{print $1}'` doesn't seem to exist! Try again or enter \`missing'"
+ fi
+ elif test `eval echo \\$$filter | $awk '{print $1}'` = "missing"
+ then
+ found=true
+ eval $filter=""
+ elif test -f `eval echo \\$$filter | $awk '{print $1}'`
+ then
+ found=true
+ else
+ found=false
+ echo ""
+ echo "`eval echo \\$$filter | $awk '{print $1}'` doesn't seem to exist! Try again or enter \`missing'"
+ fi
+ done
+ done
+else
+ echo ""
+ echo "Assuming the following ways to invoke the various commands and filters":
+ for filter in $FILTERS
+ do
+ echo "$filter command: `eval echo \\$$filter`"
+ if test `eval echo \\$$filter | $awk '{print $1}'` = "missing"
+ then
+ eval $filter=""
+ fi
+ done
+fi
+
+case $nroff in
+ *roff*)
+ echo ""
+ echo "It seems that no col is needed, since you use groff."
+ pcol=
+ nocol="# " ;;
+ *)
+ pcol=$col
+ nocol= ;;
+esac
+
+fhs="# "
+fsstnd="# "
+FHSDIR=/var/cache/man
+FSSTNDDIR=/var/catman
+if [ x$usefhs = x -a x$usefsstnd = x ]; then
+ if [ x$default = x ]; then
+ echo ""
+ echo $n "Do you want to put the cat pages under $FHSDIR ? [no] $c"
+ ans=
+ while [ x$ans = x ]
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "no"
+ then
+ ans=false
+ elif test "$yesno" = "yes"
+ then
+ ans=true
+ else
+ echo "You must enter yes or no"
+ fi
+ done
+ if [ $ans = true ]; then
+ fhs=
+ else
+ echo $n "Do you want to put the cat pages under $FSSTNDDIR ? [no] $c"
+ ans=
+ while [ x$ans = x ]
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "no"
+ then
+ ans=false
+ elif test "$yesno" = "yes"
+ then
+ ans=true
+ else
+ echo "You must enter yes or no"
+ fi
+ done
+ if [ $ans = true ]; then
+ fsstnd=
+ fi
+ fi
+ else
+ echo ""
+ if [ -d $FHSDIR ]; then
+ echo "Using $FHSDIR for cat pages, following FHS."
+ fhs=
+ elif [ -d $FSSTNDDIR ]; then
+ echo "Using $FSSTNDDIR for cat pages, following FSSTND."
+ fsstnd=
+ else
+ echo "Using /usr/man/cat* (if that exists) for cat pages."
+ fi
+ fi
+else
+ if [ x$usefsstnd = xtrue ]; then
+ fsstnd=
+ elif [ x$usefhs = xtrue ]; then
+ fhs=
+ fi
+fi
+
+# How should man be installed?
+
+if [ x$default = x ]; then
+ for d in bindir sbindir mandir confdir
+ do
+ case $d in
+ bindir)
+ echo ""
+ echo $n "Where should executables be installed? [${bindir}] $c" ;;
+ sbindir)
+ echo ""
+ echo $n "Where should makewhatis be installed? [${sbindir}] $c" ;;
+ confdir)
+ echo ""
+ echo $n "Where should $conffilename be installed? [${confdir}] $c" ;;
+ mandir)
+ echo ""
+ echo $n "Where should man pages be installed? [${mandir}] $c" ;;
+ esac
+ dd=`eval echo \\$$d`
+ dir=$prefix/$dd
+ ok=false
+ while test "$ok" = "false"
+ do
+ read tmpdir
+ if test "$tmpdir" = "" && test "$dir" != ""
+ then
+ if test -d $dir
+ then
+ ok=true
+ eval $d=$dir
+ else
+ echo ""
+ echo "$dir doesn't seem to exist! Try again!"
+ fi
+ elif test -d "$tmpdir"
+ then
+ ok=true
+ eval $d=$tmpdir
+ newprefix=`echo $tmpdir | sed -e "s:/$dd::"`
+ if test "$tmpdir" = "$newprefix/$dd"
+ then
+ prefix=$newprefix
+ fi
+ else
+ ok=false
+ echo ""
+ echo "$tmpdir doesn't seem to exist! Try again!"
+ fi
+ done
+ done
+
+ tmpext=1
+ echo ""
+ echo $n "What extension should installed man(1) pages have? [${tmpext}] $c"
+ read man1ext
+ if test "$man1ext" = ""; then man1ext=$tmpext; fi
+
+ tmpext=5
+ echo ""
+ echo $n "What extension should installed man(5) pages have? [${tmpext}] $c"
+ read man5ext
+ if test "$man5ext" = ""; then man5ext=$tmpext; fi
+
+ tmpext=8
+ echo ""
+ echo $n "What extension should installed man(8) pages have? [${tmpext}] $c"
+ read man8ext
+ if test "$man8ext" = ""; then man8ext=$tmpext; fi
+else
+ echo ""
+ echo "Assuming that binaries go to $bindir, the configuration file"
+ echo "goes to $confdir, makewhatis to $sbindir, and the man pages"
+ echo "to $mandir/man*."
+ man1ext=1
+ man5ext=5
+ man8ext=8
+fi
+
+if [ x$default = x ]; then
+ echo ""
+ echo $n "Do you want to install non-english man pages? [no] $c"
+ ok=false
+ while test "$ok" = "false"
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "no"
+ then
+ ok=true
+ ans=false
+ elif test "$yesno" = "yes"
+ then
+ ok=true
+ ans=true
+ else
+ ok=false
+ echo "You must enter yes or no"
+ fi
+ done
+else
+ if [ "x$languages" = x ]; then
+ echo ""
+ echo "Assuming that you do not want to install non-english man pages."
+ fi
+ ans=false
+fi
+
+if test "$ans" = "true"
+then
+ cd man
+ languages=""
+ for i in ??; do
+ langname=`cat $i.txt`
+ echo $n "Install $langname pages? [no] $c"
+ ok=false
+ while test "$ok" = "false"
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "no"
+ then
+ ok=true
+ ans=false
+ elif test "$yesno" = "yes"
+ then
+ ok=true
+ ans=true
+ else
+ ok=false
+ echo "You must enter yes or no"
+ fi
+ done
+ if test "$ans" = "true"
+ then
+ languages="$languages $i"
+ fi
+ done
+ cd ..
+ if [ "x$languages" = x ]; then echo "Not installing any man pages, then."; fi
+else
+ if [ "x$languages" = x ]
+ then
+ languages="en"
+ fi
+fi
+
+if [ "x$languages" != x -a "x$languages" != xen ]
+then
+ DEF_NLSPATH="/usr/share/locale/%L/%N:/usr/lib/locale/%N/%L"
+ deflocalepath=`echo $NLSPATH:$DEF_NLSPATH | sed 's/:/ /g'`
+ for i in $deflocalepath; do
+ if [ x$deflocale = x ]; then
+ tstdir=`echo $i | sed -e 's/%N//; s/%L//'`
+ if [ -d "$tstdir" ]; then
+ deflocale=$i
+# else
+# tstdir=`echo $i | sed -e 's/%N/*/; s/%L/*/'`
+# if [ -d "$tstdir" ]; then
+# deflocale=$i
+# fi
+ fi
+ fi
+ done
+ if [ x$deflocale = x ]; then
+ deflocale="/usr/lib/locale/%N/%L"
+ fi
+ if [ x$default = x ]; then
+ echo ""
+ echo $n "Do you want to install non-english message catalogs for man? [yes] $c"
+ ok=false
+ while test "$ok" = "false"
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "yes"
+ then
+ ok=true
+ ans=true
+ elif test "$yesno" = "no"
+ then
+ ok=true
+ ans=false
+ else
+ ok=false
+ echo "You must enter yes or no"
+ fi
+ done
+ if [ $ans = true ]; then
+ echo $n "Where? [$deflocale] $c"
+ read locale
+ if [ x$locale = x ]; then
+ locale=$deflocale
+ fi
+ else
+ locale=
+ fi
+ else
+ locale=$deflocale
+ fi
+ echo
+ echo "Using localedir $locale"
+fi
+
+if [ x$suid = x -a x$sgid = x ]; then
+ if [ x$default = x ]; then
+ echo ""
+ echo "Do you want to install man setuid or setgid to some user"
+ echo $n "who owns all the formatted man pages? [no] $c"
+ ok=false
+ while test "$ok" = "false"
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "no"
+ then
+ ok=true
+ ans=false
+ elif test "$yesno" = "yes"
+ then
+ ok=true
+ ans=true
+ else
+ ok=false
+ echo "You must enter yes or no"
+ fi
+ done
+ else
+ echo "Assuming that you do not want man to be suid or sgid."
+ echo "(But you can always do _chown man man; chmod 04555 man_ later.)"
+ ans=false
+ fi
+else
+ ans=true
+fi
+
+if test "$ans" = "true"
+then
+ # prefer uid/gid man above root, but prefer not to give man the
+ # ability to write into its own binary; never install man suid root
+
+ if [ x$sgid = x ]; then
+ man_user=man
+ man_mode=4555
+ if grep -q '^man:' /etc/group >/dev/null 2>/dev/null;
+ then
+ man_group=man
+ else
+ man_group=root
+ fi
+ if grep -q '^man:' /etc/passwd >/dev/null 2>/dev/null;
+ then
+ :
+ else
+ echo "Warning: you still have to create a user \"man\""
+ fi
+ else
+ man_user=root
+ man_group=man
+ man_mode=2555
+ if grep -q '^man:' /etc/group >/dev/null 2>/dev/null;
+ then
+ :
+ else
+ echo "Warning: you still have to create a group \"man\""
+ fi
+ fi
+ if [ x$default = x ]; then
+ echo ""
+ echo $n "What owner should man have? [${man_user}] $c"
+ read user
+ if test "$user" != ""; then man_user=$user; fi
+ echo ""
+ echo $n "What group should man have? [${man_group}] $c"
+ read group
+ if test "$group" != ""; then man_group=$group; fi
+ echo ""
+ echo $n "What mode should the installed man have? [${man_mode}] $c"
+ read mode
+ if test "$mode" != ""; then man_mode=$mode; fi
+ fi
+ man_install_flags="-m $man_mode -o $man_user -g $man_group"
+fi
+
+# What sections do we anticipate?
+
+tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
+
+if [ x$default = x ]; then
+ echo ""
+ echo "Enter the man page sections your system uses, separated by"
+ echo "spaces, and in the order they should be searched."
+ echo $n "[${tmpsections}] $c"
+ read sects
+ if test "$sects" != ""; then tmpsections="$sects"; fi
+else
+ echo
+ echo "Setting the default section search order to $tmpsections."
+fi
+
+for sect in $tmpsections
+do
+ if [ x$sections = x ]; then
+ sections=$sect
+ else
+ sections=$sections:$sect
+ fi
+done
+
+if test "$nroff" != ""
+then
+ if [ x$default = x ]; then
+ echo ""
+ echo $n "Compress formatted pages? [yes] $c"
+ ok=false
+ while test "$ok" = "false"
+ do
+ read yesno
+ if test "$yesno" = "" || test "$yesno" = "yes"
+ then
+ ok=true
+ ans=true
+ elif test "$yesno" = "no"
+ then
+ ok=true
+ ans=false
+ else
+ ok=false
+ echo "You must enter yes or no"
+ fi
+ done
+ else
+ echo ""
+ echo "Assuming that formatted pages should be compressed."
+ ans=true
+ fi
+
+ if test "$ans" = "true"
+ then
+ DO_COMPRESSION=true
+ compress=
+ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
+ do
+ eval F$i=missing
+ for j in $DEFPATH
+ do
+ if test -f $j/$i
+ then
+ eval F$i=$j/$i
+ if [ x$compress = x ]; then compress=$j/$i; fi
+ break
+ fi
+ done
+ done
+
+ if [ x$default = x ]; then
+ echo ""
+ echo "What program should be used to compress the formatted pages?"
+ echo $n "Note that it must work as a filter! [${compress}] $c"
+ found=false
+ while test "$found" = "false"
+ do
+ read tmp
+ if test -n "$tmp"
+ then
+ if test -f `echo $tmp | $awk '{print $1}'`
+ then
+ found=true
+ compress=$tmp
+ else
+ found=false
+ echo ""
+ echo "`echo $tmp | $awk '{print $1}'` doesn't seem to exist! Try again!"
+ fi
+ elif test -f `echo "$compress" | $awk '{print $1}'`
+ then
+ found=true
+ else
+ found=false
+ echo ""
+ echo "`echo "$compress" | $awk '{print $1}'` doesn't seem to exist! Try again!"
+ fi
+ done
+ else
+ if [ x$compress = x ]
+ then
+ DO_COMPRESSION=false
+ echo "Could not find any compression programs."
+ else
+ echo "Using $compress for compression."
+ fi
+ fi
+
+ case $compress in
+ *xz*) ext=".xz" ;;
+ *lzma*) ext=".lzma" ;;
+ *bzip2*) ext=".bz2" ;;
+ *gzip*) ext=".gz" ;;
+ *bzip*) ext=".bz" ;;
+ *tzip*) ext=".tz" ;;
+ *pack*) ext=".z" ;;
+ *compress*) ext=".Z" ;;
+ *freeze*) ext=".F" ;;
+ *yabba*) ext=".Y" ;;
+ *) ext="" ;;
+ esac
+ if [ x$default = x ]; then
+ echo ""
+ echo "What extension should be added to"
+ if test "$ext" = ""
+ then
+ echo "compressed files?"
+ else
+ echo $n "compressed files? [${ext}] $c"
+ fi
+ ok=false
+ while test "$ok" = "false"
+ do
+ read tmp_ext
+ if test "$tmp_ext" = "" && test "$ext" != ""
+ then
+ ok=true
+ compress_ext=$ext
+ elif test "$tmp_ext" != ""
+ then
+ ok=true
+ compress_ext=$tmp_ext
+ fi
+ done
+ else
+ compress_ext=$ext
+ fi
+ else
+ DO_COMPRESSION=false
+ fi
+fi
+
+# unconditionally handle uncompression
+UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
+for i in $UNCOMPRESSORS
+do
+ eval F$i=missing
+ for j in $DEFPATH
+ do
+ if test -f $j/$i
+ then
+ eval F$i=$j/$i
+ break
+ fi
+ done
+done
+unxz=missing
+if [ $Funxz != missing ]; then
+ unxz="$Funxz -c"
+fi
+gunzip=missing
+if [ $Fgunzip != missing ]; then
+ gunzip="$Fgunzip -c"
+fi
+bzip2=missing
+if [ $Fbzip2 != missing ]; then
+ bzip2="$Fbzip2 -c -d"
+fi
+unlzma=missing
+if [ $Funlzma != missing ]; then
+ unlzma="$Funlzma -c -d"
+fi
+pcat="$Fpcat"
+zcat="$Fzcat"
+fcat="$Ffcat"
+unyabba="$Funyabba"
+
+if [ x$default = x ]; then
+ echo ""
+ echo "Now let us look at programs for uncompressing compressed man pages."
+ echo ""
+ echo "If you don't have one of the following programs, enter \`missing'."
+ echo "It's best to enter absolute pathnames so that man won't have to"
+ echo "depend on the user's path to work properly. Default values are"
+ echo "given in square brackets. The answers given are only checked to"
+ echo "see if the programs exist, not to see see if the given flags are"
+ echo "correct."
+ for filter in $UNCOMPRESSORS
+ do
+ found=false
+ while test "$found" = "false"
+ do
+ echo ""
+ case $filter in
+ unxz)
+ echo "Command to use for .xz files (standard xz)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ gunzip)
+ echo "Command to use for .gz files (standard gzip)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ bzip2)
+ echo "Command to use for .bz2 files (standard bzip2)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ unlzma)
+ echo "Command to use for .lzma files (standard lzma)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ pcat)
+ echo "Command to use for .z files (pack/unpack)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ zcat)
+ echo "Command to use for .Z files (standard compress)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ fcat)
+ echo "Command to use for .F files (freeze/melt from net posting)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ unyabba)
+ echo "Command to use for .Y files (yabba/unyabba from net posting)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+ esac
+ read tmp
+ if test -n "$tmp"
+ then
+ if test "$tmp" = "missing"
+ then
+ found=true
+ eval $filter=""
+ elif test -f `echo $tmp | $awk '{print $1}'`
+ then
+ found=true
+ eval $filter=\""$tmp"\"
+ else
+ found=false
+ echo ""
+ echo "`echo $tmp | $awk '{print $1}'` doesn't seem to exist! Try again or enter \`missing'"
+ fi
+ elif test `eval echo \\$$filter | $awk '{print $1}'` = "missing"
+ then
+ found=true
+ eval $filter=""
+ elif test -f `eval echo \\$$filter | $awk '{print $1}'`
+ then
+ found=true
+ else
+ found=false
+ echo ""
+ echo "`eval echo \\$$filter | $awk '{print $1}'` doesn't seem to exist! Try again or enter \`missing'"
+ fi
+ done
+ done
+else
+ echo ""
+ echo "Assuming the following ways to invoke the various decompressors:"
+ for filter in $UNCOMPRESSORS
+ do
+ echo "$filter command: `eval echo \\$$filter`"
+ if test `eval echo \\$$filter | $awk '{print $1}'` = "missing"
+ then
+ eval $filter=""
+ fi
+ done
+fi
+
+# set $decompress to the program that decompresses things
+# with the $compress_ext extension.
+case $compress_ext in
+ .xz) decompress=$unxz ;;
+ .gz) decompress=$gunzip ;;
+ .bz2) decompress=$bzip2 ;;
+ .lzma) decompress=$unlzma ;;
+ .z) decompress=$pcat ;;
+ .Z) decompress=$zcat ;;
+ .F) decompress=$fcat ;;
+ .Y) decompress=$unyabba ;;
+ *) decompress= ;;
+esac
+
+if test "$DO_COMPRESSION" = "true"
+then
+ DEFS="$DEFS -DDO_COMPRESS"
+fi
+
+man=$bindir/man$EXEEXT
+apropos=$bindir/apropos
+whatis=$bindir/whatis
+man2dvi=$bindir/man2dvi
+makewhatis=$sbindir/makewhatis
+man_config_dir=$confdir
+man_config_file=$confdir/$conffilename
+
+if [ x$locale = x ]; then
+ sed -e 's/%.*//' < Makefile.in > Makefile
+else
+ sed -e 's/%//' < Makefile.in > Makefile
+fi
+
+# some definitions to avoid extensive quoting in the script below
+allargs='$@'
+infiles='$infiles'
+infile='$infile'
+shebang='`sed -n -e 1p $infile.in`'
+cb='$cb'
+cs='$cs'
+ce='$ce'
+mancomment='.\\\"'
+
+# Note: the script below only works when none of the variables
+# contains a comma.
+version=`cat version`
+
+cat > conf_script << EOS
+#!/bin/sh
+infiles=$allargs
+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=$mancomment; cs=$mancomment; ce=$mancomment;;
+ *)
+ case "$shebang" in
+ '#!'*) cb="$shebang";;
+ *) 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, at version@,$version,
+s, at CC@,$CC,
+s, at EXEEXT@,$EXEEXT,
+s, at BUILD_CC@,$BUILD_CC,
+s, at INSTALL@,$INSTALL,
+s, at DEFS@,$DEFS,
+s, at LIBS@,$LIBS,
+s, at LIBOBJS@,$LIBOBJS,
+s, at troff@,$troff,
+s, at nroff@,$nroff,
+s, at jnroff@,$jnroff,
+s, at eqn@,$eqn,
+s, at neqn@,$neqn,
+s, at jneqn@,$jneqn,
+s, at tbl@,$tbl,
+s, at nocol@,$nocol,
+s, at pcol@,$pcol,
+s, at col@,$col,
+s, at vgrind@,$vgrind,
+s, at refer@,$refer,
+s, at grap@,$grap,
+s, at pic@,$pic,
+s, at fcat@,$fcat,
+s, at pcat@,$pcat,
+s, at zcat@,$zcat,
+s, at unxz@,$unxz,
+s, at gunzip@,$gunzip,
+s, at bzip2@,$bzip2,
+s, at unlzma@,$unlzma,
+s, at unyabba@,$unyabba,
+s, at compress@,$compress,
+s, at compress_ext@,$compress_ext,
+s, at decompress@,$decompress,
+s, at pager@,$pager,
+s, at browser@,$browser,
+s, at htmlpager@,$htmlpager,
+s, at cmp@,$cmp,
+s, at cat@,$cat,
+s, at awk@,$awk,
+s, at bindir@,$bindir,
+s, at sbindir@,$sbindir,
+s, at mandir@,$mandir,
+s, at locale@,$locale,
+s, at fhs@,$fhs,
+s, at fsstnd@,$fsstnd,
+s, at man1ext@,$man1ext,g
+s, at man5ext@,$man5ext,g
+s, at man8ext@,$man8ext,g
+s, at man_install_flags@,$man_install_flags,
+s, at man_user@,$man_user,
+s, at languages@,$languages,
+s, at man@,$man,
+s, at apropos@,$apropos,
+s, at whatis@,$whatis,
+s, at man2dvi@,$man2dvi,
+s, at makewhatis@,$makewhatis,
+s, at man_config_dir@,$man_config_dir,
+s, at man_config_file@,$man_config_file,
+s, at manpathoption@,$manpathoption,
+s/@sections@/$sections/
+' $infile.in >> $infile
+done
+EOS
+
+chmod +x conf_script
+
+echo ""
+echo 'Created Makefile and conf_script. Now do "make" and "make install".'
+echo ""
diff --git a/gencat/Makefile b/gencat/Makefile
new file mode 100644
index 0000000..8800958
--- /dev/null
+++ b/gencat/Makefile
@@ -0,0 +1,18 @@
+# extremely primitive makefile
+# just for people that don't have gencat but need it to make man
+
+# note: you only need gencat if you want non-English messages
+
+gencat: gencat.o genlib.o
+ $(CC) $(LDFLAGS) -o gencat gencat.o genlib.o
+
+gencat.o genlib.o: gencat.h
+
+genlib.o: msgcat.h
+
+install: gencat
+ cp gencat$(EXEEXT) $(DESTDIR)$(PREFIX)/usr/bin
+
+clean:
+ rm -f *~ *.o gencat
+
diff --git a/gencat/gencat.c b/gencat/gencat.c
new file mode 100644
index 0000000..d1a7c31
--- /dev/null
+++ b/gencat/gencat.c
@@ -0,0 +1,265 @@
+
+/***********************************************************
+Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that Alfalfa's name not be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.
+
+ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ALPHALPHA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+If you make any modifications, bugfixes or other changes to this software
+we'd appreciate it if you could send a copy to us so we can keep things
+up-to-date. Many thanks.
+ Kee Hinckley
+ Alfalfa Software, Inc.
+ 267 Allston St., #3
+ Cambridge, MA 02139 USA
+ nazgul at alfalfa.com
+
+******************************************************************/
+
+/* Edit History
+
+01/18/91 3 hamilton #if not reparsed
+01/12/91 2 schulert conditionally use prototypes
+12/23/90 2 hamilton Fix fd == NULL to fd < 0
+11/03/90 1 hamilton Alphalpha->Alfalfa & OmegaMail->Poste
+08/13/90 1 schulert move from ua to omu
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef SYSV
+#include <sys/fcntl.h>
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+#ifdef __linux__
+#include <string.h>
+#include <unistd.h>
+#endif
+#include <sys/file.h>
+#include <sys/stat.h>
+#include "gencat.h"
+
+#ifndef L_SET
+#define L_SET SEEK_SET
+#endif
+
+#ifndef L_INCR
+#define L_INCR SEEK_CUR
+#endif
+
+/*
+ * The spec says the syntax is "gencat catfile msgfile...".
+ * We extend it to:
+ * gencat [-new] [-or] [-lang C|C++|ANSIC] catfile msgfile
+ * [-h <header-file>]...
+ * Flags are order dependant, we'll take whatever lang was most recently chosen
+ * and use it to generate the next header file. The header files are generated
+ * at the point in the command line they are listed. Thus the sequence:
+ * gencat -lang C foo.cat foo.mcs -h foo.h -lang C++ bar.mcs -h bar.H
+ * will put constants from foo.mcs into foo.h and constants from bar.mcs into
+ * bar.h. Constants are not saved in the catalog file, so nothing will come
+ * from that, even if things have been defined before. The constants in foo.h
+ * will be in C syntax, in bar.H in C++ syntax.
+ */
+
+static void writeIfChanged(
+#if defined(__STDC__) || defined(__cplusplus)
+ char *fname, int lang, int orConsts
+#endif
+);
+
+void usage() {
+ fprintf(stderr, "Use: gencat [-new] [-or] [-lang C|C++|ANSIC] catfile msgfile [-h <header-file>]...\n");
+}
+
+int main(
+#if defined(__STDC__) || defined(__cplusplus)
+ int argc, char *argv[])
+#else
+ argc, argv)
+int argc;
+char *argv[];
+#endif
+{
+ int ofd, ifd, i;
+ FILE *fptr;
+ char *catfile = NULL;
+ char *input = NULL;
+ int lang = MCLangC;
+ int new = False;
+ int orConsts = False;
+
+ for (i = 1; i < argc; ++i) {
+ if (argv[i][0] == '-') {
+ if (strcmp(argv[i], "-lang") == 0) {
+ ++i;
+ if (strcmp(argv[i], "C") == 0) lang = MCLangC;
+ else if (strcmp(argv[i], "C++") == 0) lang = MCLangCPlusPlus;
+ else if (strcmp(argv[i], "ANSIC") == 0) lang = MCLangANSIC;
+ else {
+ fprintf(stderr, "gencat: Unrecognized language: %s\n", argv[i]);
+ exit(1);
+ }
+ } else if (strncmp(argv[i], "-h", 2) == 0) {
+ if (!input) {
+ fprintf(stderr, "gencat: Can't write to a header before reading something.\n");
+ exit(1);
+ }
+ ++i;
+ writeIfChanged(argv[i], lang, orConsts);
+ } else if (strncmp(argv[i], "-new", 4) == 0) {
+ if (catfile) {
+ fprintf(stderr, "gencat: You must specify -new before the catalog file name\n");
+ exit(1);
+ }
+ new = True;
+ } else if (strncmp(argv[i], "-or", 3) == 0) {
+ orConsts = ~orConsts;
+ } else {
+ usage();
+ exit(1);
+ }
+ } else {
+ if (!catfile) {
+ catfile = argv[i];
+ if (new) {
+ if ((ofd = open(catfile, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) {
+ fprintf(stderr, "gencat: Unable to create a new %s.\n", catfile);
+ exit(1);
+ }
+ } else if ((ofd = open(catfile, O_RDONLY)) < 0) {
+ if ((ofd = open(catfile, O_WRONLY|O_CREAT, 0666)) < 0) {
+ fprintf(stderr, "gencat: Unable to create %s.\n", catfile);
+ exit(1);
+ }
+ } else {
+ MCReadCat(ofd);
+ close(ofd);
+ if ((ofd = open(catfile, O_WRONLY|O_TRUNC)) < 0) {
+ fprintf(stderr, "gencat: Unable to truncate %s.\n", catfile);
+ exit(1);
+ }
+ }
+ } else {
+ input = argv[i];
+ if ((ifd = open(input, O_RDONLY)) < 0) {
+ fprintf(stderr, "gencat: Unable to read %s\n", input);
+ exit(1);
+ }
+ MCParse(ifd);
+ close(ifd);
+ }
+ }
+ }
+ if (catfile) {
+ MCWriteCat(ofd);
+ exit(0);
+ } else {
+ usage();
+ exit(1);
+ }
+ return 0; /* just for gcc */
+}
+
+static void writeIfChanged(
+#if defined(__STDC__) || defined(__cplusplus)
+ char *fname, int lang, int orConsts)
+#else
+ fname, lang, orConsts)
+char *fname;
+int lang;
+int orConsts;
+#endif
+{
+ char tmpname[32];
+ char buf[BUFSIZ], tbuf[BUFSIZ], *cptr, *tptr;
+ int fd, tfd;
+ int diff = False;
+ int c, len, tlen;
+ struct stat sbuf;
+
+ /* If it doesn't exist, just create it */
+ if (stat(fname, &sbuf)) {
+ if ((fd = open(fname, O_WRONLY|O_CREAT, 0666)) < 0) {
+ fprintf(stderr, "gencat: Unable to create header file %s.\n", fname);
+ exit(1);
+ }
+ MCWriteConst(fd, lang, orConsts);
+ close(fd);
+ return;
+ }
+
+ /* If it does exist, create a temp file for now */
+ sprintf(tmpname, "/tmp/gencat.%d", (int) getpid());
+ if ((tfd = open(tmpname, O_RDWR|O_CREAT, 0666)) < 0) {
+ fprintf(stderr, "gencat: Unable to open temporary file: %s\n", tmpname);
+ exit(1);
+ }
+ unlink(tmpname);
+
+ /* Write to the temp file and rewind */
+ MCWriteConst(tfd, lang, orConsts);
+
+ /* Open the real header file */
+ if ((fd = open(fname, O_RDONLY)) < 0) {
+ fprintf(stderr, "gencat: Unable to read header file: %s\n", fname);
+ exit(1);
+ }
+
+ /* Backup to the start of the temp file */
+ if (lseek(tfd, 0L, L_SET) < 0) {
+ fprintf(stderr, "gencat: Unable to seek in tempfile: %s\n", tmpname);
+ exit(1);
+ }
+
+ /* Now compare them */
+ while ((tlen = read(tfd, tbuf, BUFSIZ)) > 0) {
+ if ((len = read(fd, buf, BUFSIZ)) != tlen) {
+ diff = True;
+ goto done;
+ }
+ for (cptr = buf, tptr = tbuf; cptr < buf+len; ++cptr, ++tptr) {
+ if (*tptr != *cptr) {
+ diff = True;
+ goto done;
+ }
+ }
+ }
+done:
+ if (diff) {
+ if (lseek(tfd, 0L, L_SET) < 0) {
+ fprintf(stderr, "gencat: Unable to seek in tempfile: %s\n", tmpname);
+ exit(1);
+ }
+ close(fd);
+ if ((fd = open(fname, O_WRONLY|O_TRUNC)) < 0) {
+ fprintf(stderr, "gencat: Unable to truncate header file: %s\n", fname);
+ exit(1);
+ }
+ while ((len = read(tfd, buf, BUFSIZ)) > 0) {
+ if (write(fd, buf, len) != len) {
+ fprintf(stderr, "gencat: Error writing to header file: %s\n", fname);
+ }
+ }
+ }
+ close(fd);
+ close(tfd);
+}
diff --git a/gencat/gencat.h b/gencat/gencat.h
new file mode 100644
index 0000000..fcf20b7
--- /dev/null
+++ b/gencat/gencat.h
@@ -0,0 +1,107 @@
+
+/***********************************************************
+Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that Alfalfa's name not be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.
+
+ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ALPHALPHA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+If you make any modifications, bugfixes or other changes to this software
+we'd appreciate it if you could send a copy to us so we can keep things
+up-to-date. Many thanks.
+ Kee Hinckley
+ Alfalfa Software, Inc.
+ 267 Allston St., #3
+ Cambridge, MA 02139 USA
+ nazgul at alfalfa.com
+
+******************************************************************/
+
+/* Edit History
+
+02/25/91 2 nazgul Added MCGetByteOrder
+01/18/91 2 hamilton #if not reparsed
+01/12/91 2 schulert conditionally use prototypes
+11/03/90 1 hamilton Alphalpha->Alfalfa & OmegaMail->Poste
+08/13/90 1 schulert move from ua to omu
+*/
+
+#ifndef gencat_h
+#define gencat_h
+
+/*
+ * $set n comment
+ * My extension: If the comment begins with # treat the next string
+ * as a constant identifier.
+ * $delset n comment
+ * n goes from 1 to NL_SETMAX
+ * Deletes a set from the MC
+ * $ comment
+ * My extension: If comment begins with # treat the next string as
+ * a constant identifier for the next message.
+ * m message-text
+ * m goes from 1 to NL_MSGMAX
+ * If message-text is empty, and a space or tab is present, put
+ * empty string in catalog.
+ * If message-text is empty, delete the message.
+ * Length of text is 0 to NL_TEXTMAX
+ * My extension: If '#' is used instead of a number, the number
+ * is generated automatically. A # followed by anything is an empty message.
+ * $quote c
+ * Optional quote character which can suround message-text to
+ * show where spaces are.
+ *
+ * Escape Characters
+ * \n (newline), \t (horiz tab), \v (vert tab), \b (backspace),
+ * \r (carriage return), \f (formfeed), \\ (backslash), \ddd (bitpattern
+ * in octal).
+ * Also, \ at end of line is a continuation.
+ *
+ */
+
+#define MCLangC 0
+#define MCLangCPlusPlus 1
+#define MCLangANSIC 2
+
+#define MAXTOKEN 1024
+
+#if !defined(ANSI_C) && (defined(__STDC__) || defined(_AIX))
+# define ANSI_C 1
+#endif
+
+#if ANSI_C || defined(__cplusplus)
+# define P_(x) x
+#else
+# define P_(x) /**/
+#endif
+
+extern void MCAddSet P_((int setId, char *c));
+extern void MCDelSet P_((int setId));
+extern void MCAddMsg P_((int msgId, char *msg, char *c));
+extern void MCDelMsg P_((int msgId));
+extern void MCParse P_((int fd));
+extern void MCReadCat P_((int fd));
+extern void MCWriteConst P_((int fd, int type, int orConsts));
+extern void MCWriteCat P_((int fd));
+extern long MCGetByteOrder P_((void));
+
+#ifndef True
+# define True ~0
+# define False 0
+#endif
+
+#endif
diff --git a/gencat/genlib.c b/gencat/genlib.c
new file mode 100644
index 0000000..737a9cb
--- /dev/null
+++ b/gencat/genlib.c
@@ -0,0 +1,892 @@
+/* -*-c++-*- */
+
+
+/***********************************************************
+Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that Alfalfa's name not be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.
+
+ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ALPHALPHA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+If you make any modifications, bugfixes or other changes to this software
+we'd appreciate it if you could send a copy to us so we can keep things
+up-to-date. Many thanks.
+ Kee Hinckley
+ Alfalfa Software, Inc.
+ 267 Allston St., #3
+ Cambridge, MA 02139 USA
+ nazgul at alfalfa.com
+
+******************************************************************/
+
+/* Edit History
+
+12/03/82 nazgul Patch from <Jan.Djarv at sa.erisoft.se>. This may fix
+ the problem with updating sets.
+10/18/92 3 schulert actually put in the changes described in last edit.
+10/18/92 7 nazgul Changes from gbooman at feds1.Prime.COM (Gordon Booman)
+ 1) Support backslash quoted quotes in message file text.
+ 2) Correctly indicate error location in messages that have tabs.
+ 3) Fixed a misspelling.
+04/15/91 6 nazgul Check for byte order first
+02/25/91 5 nazgul Added flag for MS byteorder
+01/14/91 4 nazgul Off by one on number specified entries
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef SYSV
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#if !defined(__linux__) && !defined(__CYGWIN__)
+#include <memory.h>
+static int bcopy(src, dst, length)
+char *src, *dst;
+int length;
+{
+ memcpy(dst, src, length);
+}
+static int bzero(b, length)
+char *b;
+int length;
+{
+ memset(b, '\0', length);
+}
+#else
+#include <string.h>
+#endif
+
+#include <sys/file.h>
+#include <ctype.h>
+#include "msgcat.h"
+#include "gencat.h"
+
+#ifndef L_SET
+#define L_SET SEEK_SET
+#endif
+
+#ifndef L_INCR
+#define L_INCR SEEK_CUR
+#endif
+
+static char *curline = NULL;
+static long lineno = 0;
+
+static void warning(cptr, msg)
+char *cptr;
+char *msg;
+{
+ fprintf(stderr, "gencat: %s on line %d\n", msg, lineno);
+ fprintf(stderr, "%s\n", curline);
+ if (cptr) {
+ char *tptr;
+ for (tptr = curline; tptr < cptr; ++tptr)
+ putc(*tptr == '\t' ? '\t' : ' ', stderr);
+ fprintf(stderr, "^\n");
+ }
+}
+
+static void error(cptr, msg)
+char *cptr;
+char *msg;
+{
+ warning(cptr, msg);
+ exit(1);
+}
+
+static void corrupt() {
+ error(NULL, "corrupt message catalog");
+}
+static void nomem() {
+ error(NULL, "out of memory");
+}
+
+static char *my_getline(fd)
+int fd;
+{
+ static long len = 0, curlen = BUFSIZ;
+ static char buf[BUFSIZ], *bptr = buf, *bend = buf;
+ char *cptr, *cend;
+ long buflen;
+
+ if (!curline) {
+ curline = (char *) malloc(curlen);
+ if (!curline) nomem();
+ }
+ ++lineno;
+
+ cptr = curline;
+ cend = curline + curlen;
+ while (True) {
+ for (; bptr < bend && cptr < cend; ++cptr, ++bptr) {
+ if (*bptr == '\n') {
+ *cptr = '\0';
+ ++bptr;
+ return(curline);
+ } else *cptr = *bptr;
+ }
+ if (bptr == bend) {
+ buflen = read(fd, buf, BUFSIZ);
+ if (buflen <= 0) {
+ if (cptr > curline) {
+ *cptr = '\0';
+ return(curline);
+ }
+ return(NULL);
+ }
+ bend = buf + buflen;
+ bptr = buf;
+ }
+ if (cptr == cend) {
+ cptr = curline = (char *) realloc(curline, curlen *= 2);
+ cend = curline + curlen;
+ }
+ }
+}
+
+
+static char *token(cptr)
+char *cptr;
+{
+ static char tok[MAXTOKEN+1];
+ char *tptr = tok;
+
+ while (*cptr && isspace(*cptr)) ++cptr;
+ while (*cptr && !isspace(*cptr)) *tptr++ = *cptr++;
+ *tptr = '\0';
+ return(tok);
+}
+static char *wskip(cptr)
+char *cptr;
+{
+ if (!*cptr || !isspace(*cptr)) {
+ warning(cptr, "expected a space");
+ return(cptr);
+ }
+ while (*cptr && isspace(*cptr)) ++cptr;
+ return(cptr);
+}
+static char *cskip(cptr)
+char *cptr;
+{
+ if (!*cptr || isspace(*cptr)) {
+ warning(cptr, "wasn't expecting a space");
+ return(cptr);
+ }
+ while (*cptr && !isspace(*cptr)) ++cptr;
+ return(cptr);
+}
+
+static char *getmsg(fd, cptr, quote)
+int fd;
+char *cptr;
+char quote;
+{
+ static char *msg = NULL;
+ static long msglen = 0;
+ long clen, i;
+ char *tptr;
+
+ int needq;
+
+ if (quote && *cptr == quote) {
+ needq = True;
+ ++cptr;
+ } else needq = False;
+
+ clen = strlen(cptr) + 1;
+ if (clen > msglen) {
+ if (msglen) msg = (char *) realloc(msg, clen);
+ else msg = (char *) malloc(clen);
+ msglen = clen;
+ }
+ tptr = msg;
+
+ while (*cptr) {
+ if (quote && *cptr == quote) {
+ char *tmp;
+ tmp = cptr+1;
+ if (*tmp && (!isspace(*tmp) || *wskip(tmp))) {
+ warning(cptr, "quote character before end of line, ignoring");
+ *tptr++ = *cptr++;
+ } else {
+ *cptr = '\0';
+ }
+ } else if (*cptr == '\\') {
+ ++cptr;
+ switch (*cptr) {
+ case '\0':
+ cptr = my_getline(fd);
+ if (!cptr) error(NULL, "premature end of file");
+ msglen += strlen(cptr);
+ i = tptr - msg;
+ msg = (char *) realloc(msg, msglen);
+ tptr = msg + i;
+ break;
+ case 'n':
+ *tptr++ = '\n';
+ ++cptr;
+ break;
+ case 't':
+ *tptr++ = '\t';
+ ++cptr;
+ break;
+ case 'v':
+ *tptr++ = '\v';
+ ++cptr;
+ break;
+ case 'b':
+ *tptr++ = '\b';
+ ++cptr;
+ break;
+ case 'r':
+ *tptr++ = '\r';
+ ++cptr;
+ break;
+ case 'f':
+ *tptr++ = '\f';
+ ++cptr;
+ break;
+ case '\\':
+ *tptr++ = '\\';
+ ++cptr;
+ break;
+ default:
+ if (isdigit(*cptr)) {
+ *tptr = 0;
+ for (i = 0; i < 3; ++i) {
+ if (!isdigit(*cptr)) break;
+ if (*cptr > '7') warning(cptr, "octal number greater than 7?!");
+ *tptr *= 8;
+ *tptr += (*cptr - '0');
+ ++cptr;
+ }
+ } else if (*cptr == quote) {
+ *tptr++ = *cptr++;
+ } else {
+ warning(cptr, "unrecognized escape sequence");
+ }
+ }
+ } else {
+ *tptr++ = *cptr++;
+ }
+ }
+ *tptr = '\0';
+ return(msg);
+}
+
+
+
+static char *dupstr(ostr)
+char *ostr;
+{
+ char *nstr;
+
+ nstr = (char *) malloc(strlen(ostr) + 1);
+ if (!nstr) error(NULL, "unable to allocate storage");
+ strcpy(nstr, ostr);
+ return(nstr);
+}
+
+
+/*
+ * The Global Stuff
+ */
+
+
+typedef struct _msgT {
+ long msgId;
+ char *str;
+ char *hconst;
+ long offset;
+ struct _msgT *prev, *next;
+} msgT;
+typedef struct _setT {
+ long setId;
+ char *hconst;
+ msgT *first, *last;
+ struct _setT *prev, *next;
+} setT;
+typedef struct {
+ setT *first, *last;
+} catT;
+
+static setT *curSet;
+static catT *cat;
+
+/*
+ * Find the current byte order. There are of course some others, but this will do
+ * for now. Note that all we care about is "long".
+ */
+long MCGetByteOrder() {
+ long l = 0x00010203;
+ char *cptr = (char *) &l;
+
+ if (cptr[0] == 0 && cptr[1] == 1 && cptr[2] == 2 && cptr[3] == 3)
+ return MC68KByteOrder;
+ else return MCn86ByteOrder;
+}
+
+
+void MCParse(
+#if PROTO
+ int fd)
+#else
+ fd)
+int fd;
+#endif
+{
+ char *cptr, *str;
+ int setid, msgid = 0;
+ char hconst[MAXTOKEN+1];
+ char quote = 0;
+ int i;
+
+ if (!cat) {
+ cat = (catT *) malloc(sizeof(catT));
+ if (!cat) nomem();
+ bzero(cat, sizeof(catT));
+ }
+
+ hconst[0] = '\0';
+
+ while (cptr = my_getline(fd)) {
+ if (*cptr == '$') {
+ ++cptr;
+ if (strncmp(cptr, "set", 3) == 0) {
+ cptr += 3;
+ cptr = wskip(cptr);
+ setid = atoi(cptr);
+ cptr = cskip(cptr);
+ if (*cptr) cptr = wskip(cptr);
+ if (*cptr == '#') {
+ ++cptr;
+ MCAddSet(setid, token(cptr));
+ } else MCAddSet(setid, NULL);
+ msgid = 0;
+ } else if (strncmp(cptr, "delset", 6) == 0) {
+ cptr += 6;
+ cptr = wskip(cptr);
+ setid = atoi(cptr);
+ MCDelSet(setid);
+ } else if (strncmp(cptr, "quote", 5) == 0) {
+ cptr += 5;
+ if (!*cptr) quote = 0;
+ else {
+ cptr = wskip(cptr);
+ if (!*cptr) quote = 0;
+ else quote = *cptr;
+ }
+ } else if (isspace(*cptr)) {
+ cptr = wskip(cptr);
+ if (*cptr == '#') {
+ ++cptr;
+ strcpy(hconst, token(cptr));
+ }
+ } else {
+ if (*cptr) {
+ cptr = wskip(cptr);
+ if (*cptr) warning(cptr, "unrecognized line");
+ }
+ }
+ } else {
+ if (isdigit(*cptr) || *cptr == '#') {
+ if (*cptr == '#') {
+ ++msgid;
+ ++cptr;
+ if (!*cptr) {
+ MCAddMsg(msgid, "", hconst);
+ hconst[0] = '\0';
+ continue;
+ }
+ if (!isspace(*cptr)) warning(cptr, "expected a space");
+ ++cptr;
+ if (!*cptr) {
+ MCAddMsg(msgid, "", hconst);
+ hconst[0] = '\0';
+ continue;
+ }
+ } else {
+ msgid = atoi(cptr);
+ cptr = cskip(cptr);
+ cptr = wskip(cptr);
+ /* if (*cptr) ++cptr; */
+ }
+ if (!*cptr) MCDelMsg(msgid);
+ else {
+ str = getmsg(fd, cptr, quote);
+ MCAddMsg(msgid, str, hconst);
+ hconst[0] = '\0';
+ }
+ }
+ }
+ }
+}
+
+void MCReadCat(
+#if PROTO
+ int fd)
+#else
+ fd)
+int fd;
+#endif
+{
+ MCHeaderT mcHead;
+ MCMsgT mcMsg;
+ MCSetT mcSet;
+ msgT *msg;
+ setT *set;
+ int i;
+ char *data;
+
+ cat = (catT *) malloc(sizeof(catT));
+ if (!cat) nomem();
+ bzero(cat, sizeof(catT));
+
+ if (read(fd, &mcHead, sizeof(mcHead)) != sizeof(mcHead)) corrupt();
+ if (strncmp(mcHead.magic, MCMagic, MCMagicLen) != 0) corrupt();
+ if ((mcHead.flags & MCGetByteOrder()) == 0) error(NULL, "wrong byte order");
+ if (mcHead.majorVer != MCMajorVer) error(NULL, "unrecognized catalog version");
+
+ if (lseek(fd, mcHead.firstSet, L_SET) == -1) corrupt();
+
+ while (True) {
+ if (read(fd, &mcSet, sizeof(mcSet)) != sizeof(mcSet)) corrupt();
+ if (mcSet.invalid) continue;
+
+ set = (setT *) malloc(sizeof(setT));
+ if (!set) nomem();
+ bzero(set, sizeof(*set));
+ if (cat->first) {
+ cat->last->next = set;
+ set->prev = cat->last;
+ cat->last = set;
+ } else cat->first = cat->last = set;
+
+ set->setId = mcSet.setId;
+
+ /* Get the data */
+ if (mcSet.dataLen) {
+ data = (char *) malloc(mcSet.dataLen);
+ if (!data) nomem();
+ if (lseek(fd, mcSet.data.off, L_SET) == -1) corrupt();
+ if (read(fd, data, mcSet.dataLen) != mcSet.dataLen) corrupt();
+ if (lseek(fd, mcSet.u.firstMsg, L_SET) == -1) corrupt();
+
+ for (i = 0; i < mcSet.numMsgs; ++i) {
+ if (read(fd, &mcMsg, sizeof(mcMsg)) != sizeof(mcMsg)) corrupt();
+ if (mcMsg.invalid) {
+ --i;
+ continue;
+ }
+
+ msg = (msgT *) malloc(sizeof(msgT));
+ if (!msg) nomem();
+ bzero(msg, sizeof(*msg));
+ if (set->first) {
+ set->last->next = msg;
+ msg->prev = set->last;
+ set->last = msg;
+ } else set->first = set->last = msg;
+
+ msg->msgId = mcMsg.msgId;
+ msg->str = dupstr((char *) (data + mcMsg.msg.off));
+ }
+ free(data);
+ }
+ if (!mcSet.nextSet) break;
+ if (lseek(fd, mcSet.nextSet, L_SET) == -1) corrupt();
+ }
+}
+
+
+static void printS(fd, str)
+int fd;
+char *str;
+{
+ write(fd, str, strlen(str));
+}
+static void printL(fd, l)
+int fd;
+long l;
+{
+ char buf[32];
+ sprintf(buf, "%ld", l);
+ write(fd, buf, strlen(buf));
+}
+static void printLX(fd, l)
+int fd;
+long l;
+{
+ char buf[32];
+ sprintf(buf, "%lx", l);
+ write(fd, buf, strlen(buf));
+}
+
+static void genconst(fd, type, setConst, msgConst, val)
+int fd;
+int type;
+char *setConst;
+char *msgConst;
+long val;
+{
+ switch (type) {
+ case MCLangC:
+ if (!msgConst) {
+ printS(fd, "\n#define ");
+ printS(fd, setConst);
+ printS(fd, "Set");
+ } else {
+ printS(fd, "#define ");
+ printS(fd, setConst);
+ printS(fd, msgConst);
+ }
+ printS(fd, "\t0x");
+ printLX(fd, val);
+ printS(fd, "\n");
+ break;
+ case MCLangCPlusPlus:
+ case MCLangANSIC:
+ if (!msgConst) {
+ printS(fd, "\nconst long ");
+ printS(fd, setConst);
+ printS(fd, "Set");
+ } else {
+ printS(fd, "const long ");
+ printS(fd, setConst);
+ printS(fd, msgConst);
+ }
+ printS(fd, "\t= ");
+ printL(fd, val);
+ printS(fd, ";\n");
+ break;
+ default:
+ error(NULL, "not a recognized (programming) language type");
+ }
+}
+
+void MCWriteConst(
+#if PROTO
+ int fd, int type, int orConsts)
+#else
+ fd, type, orConsts)
+int fd;
+int type;
+int orConsts;
+#endif
+{
+ msgT *msg;
+ setT *set;
+ long id;
+
+ if (orConsts && (type == MCLangC || type == MCLangCPlusPlus || type == MCLangANSIC)) {
+ printS(fd, "/* Use these Macros to compose and decompose setId's and msgId's */\n");
+ printS(fd, "#ifndef MCMakeId\n");
+ printS(fd, "# define MCuint unsigned int\n");
+ printS(fd, "# define MCushort unsigned short\n");
+ printS(fd, "# define MCulong unsigned long\n");
+ printS(fd, "# define MCMakeId(s,m)\t(MCulong)(((MCushort)s<<(sizeof(short)*8))\\\n");
+ printS(fd, " \t |(MCushort)m)\n");
+ printS(fd, "# define MCSetId(id)\t(MCuint) ((MCuint)id >> (MCuint)(sizeof(short) * 8))\n");
+ printS(fd, "# define MCMsgId(id)\t(MCuint) (((MCuint)id << (MCuint)(sizeof(short) * 8))\\\n");
+ printS(fd, " \t >> (MCuint)(sizeof(short) * 8))\n");
+ printS(fd, "#endif\n");
+ }
+
+ for (set = cat->first; set; set = set->next) {
+ if (set->hconst) genconst(fd, type, set->hconst, NULL, set->setId);
+
+ for (msg = set->first; msg; msg = msg->next) {
+ if (msg->hconst) {
+ if (orConsts) id = MCMakeId(set->setId, msg->msgId);
+ else id = msg->msgId;
+ genconst(fd, type, set->hconst, msg->hconst, id);
+ free(msg->hconst);
+ msg->hconst = NULL;
+ }
+ }
+ if (set->hconst) {
+ free(set->hconst);
+ set->hconst = NULL;
+ }
+ }
+}
+
+void MCWriteCat(
+#if PROTO
+ int fd)
+#else
+ fd)
+int fd;
+#endif
+{
+ MCHeaderT mcHead;
+ int cnt;
+ setT *set;
+ msgT *msg;
+ MCSetT mcSet;
+ MCMsgT mcMsg;
+ off_t pos;
+
+ bcopy(MCMagic, mcHead.magic, MCMagicLen);
+ mcHead.majorVer = MCMajorVer;
+ mcHead.minorVer = MCMinorVer;
+ mcHead.flags = MCGetByteOrder();
+ mcHead.firstSet = 0; /* We'll be back to set this in a minute */
+
+ for (cnt = 0, set = cat->first; set; set = set->next) ++cnt;
+ mcHead.numSets = cnt;
+
+ lseek(fd, 0L, L_SET);
+ write(fd, &mcHead, sizeof(mcHead));
+ mcHead.firstSet = lseek(fd, 0, L_INCR);
+ lseek(fd, 0L, L_SET);
+ write(fd, &mcHead, sizeof(mcHead));
+
+ for (set = cat->first; set; set = set->next) {
+ bzero(&mcSet, sizeof(mcSet));
+
+ mcSet.setId = set->setId;
+ mcSet.invalid = False;
+
+ /* The rest we'll have to come back and change in a moment */
+ pos = lseek(fd, 0, L_INCR);
+ write(fd, &mcSet, sizeof(mcSet));
+
+ /* Now write all the string data */
+ mcSet.data.off = lseek(fd, 0, L_INCR);
+ cnt = 0;
+ for (msg = set->first; msg; msg = msg->next) {
+ msg->offset = lseek(fd, 0, L_INCR) - mcSet.data.off;
+ mcSet.dataLen += write(fd, msg->str, strlen(msg->str) + 1);
+ ++cnt;
+ }
+ mcSet.u.firstMsg = lseek(fd, 0, L_INCR);
+ mcSet.numMsgs = cnt;
+
+ /* Now write the message headers */
+ for (msg = set->first; msg; msg = msg->next) {
+ mcMsg.msgId = msg->msgId;
+ mcMsg.msg.off = msg->offset;
+ mcMsg.invalid = False;
+ write(fd, &mcMsg, sizeof(mcMsg));
+ }
+
+ /* Go back and fix things up */
+
+ if (set == cat->last) {
+ mcSet.nextSet = 0;
+ lseek(fd, pos, L_SET);
+ write(fd, &mcSet, sizeof(mcSet));
+ } else {
+ mcSet.nextSet = lseek(fd, 0, L_INCR);
+ lseek(fd, pos, L_SET);
+ write(fd, &mcSet, sizeof(mcSet));
+ lseek(fd, mcSet.nextSet, L_SET);
+ }
+ }
+}
+
+
+void MCAddSet(
+#if PROTO
+ int setId, char *hconst)
+#else
+ setId, hconst)
+int setId;
+char *hconst;
+#endif
+{
+ setT *set;
+
+ if (setId <= 0) {
+ error(NULL, "setId's must be greater than zero");
+ return;
+ }
+
+ if (hconst && !*hconst) hconst = NULL;
+ for (set = cat->first; set; set = set->next) {
+ if (set->setId == setId) {
+ if (set->hconst && hconst) free(set->hconst);
+ set->hconst = NULL;
+ break;
+ } else if (set->setId > setId) {
+ setT *newSet;
+
+ newSet = (setT *) malloc(sizeof(setT));
+ if (!newSet) nomem();
+ bzero(newSet, sizeof(setT));
+ newSet->prev = set->prev;
+ newSet->next = set;
+ if (set->prev) set->prev->next = newSet;
+ else cat->first = newSet;
+ set->prev = newSet;
+ set = newSet;
+ break;
+ }
+ }
+ if (!set) {
+ set = (setT *) malloc(sizeof(setT));
+ if (!set) nomem();
+ bzero(set, sizeof(setT));
+
+ if (cat->first) {
+ set->prev = cat->last;
+ set->next = NULL;
+ cat->last->next = set;
+ cat->last = set;
+ } else {
+ set->prev = set->next = NULL;
+ cat->first = cat->last = set;
+ }
+ }
+ set->setId = setId;
+ if (hconst) set->hconst = dupstr(hconst);
+ curSet = set;
+}
+
+void MCAddMsg(
+#if PROTO
+ int msgId, char *str, char *hconst)
+#else
+ msgId, str, hconst)
+int msgId;
+char *str;
+char *hconst;
+#endif
+{
+ msgT *msg;
+
+ if (!curSet) error(NULL, "can't specify a message when no set exists");
+
+ if (msgId <= 0) {
+ error(NULL, "msgId's must be greater than zero");
+ return;
+ }
+
+ if (hconst && !*hconst) hconst = NULL;
+ for (msg = curSet->first; msg; msg = msg->next) {
+ if (msg->msgId == msgId) {
+ if (msg->hconst && hconst) free(msg->hconst);
+ if (msg->str) free(msg->str);
+ msg->hconst = msg->str = NULL;
+ break;
+ } else if (msg->msgId > msgId) {
+ msgT *newMsg;
+
+ newMsg = (msgT *) malloc(sizeof(msgT));
+ if (!newMsg) nomem();
+ bzero(newMsg, sizeof(msgT));
+ newMsg->prev = msg->prev;
+ newMsg->next = msg;
+ if (msg->prev) msg->prev->next = newMsg;
+ else curSet->first = newMsg;
+ msg->prev = newMsg;
+ msg = newMsg;
+ break;
+ }
+ }
+ if (!msg) {
+ msg = (msgT *) malloc(sizeof(msgT));
+ if (!msg) nomem();
+ bzero(msg, sizeof(msgT));
+
+ if (curSet->first) {
+ msg->prev = curSet->last;
+ msg->next = NULL;
+ curSet->last->next = msg;
+ curSet->last = msg;
+ } else {
+ msg->prev = msg->next = NULL;
+ curSet->first = curSet->last = msg;
+ }
+ }
+ msg->msgId = msgId;
+ if (hconst) msg->hconst = dupstr(hconst);
+ msg->str = dupstr(str);
+}
+
+void MCDelSet(
+#if PROTO
+ int setId)
+#else
+ setId)
+int setId;
+#endif
+{
+ setT *set;
+ msgT *msg;
+
+ for (set = cat->first; set; set = set->next) {
+ if (set->setId == setId) {
+ for (msg = set->first; msg; msg = msg->next) {
+ if (msg->hconst) free(msg->hconst);
+ if (msg->str) free(msg->str);
+ free(msg);
+ }
+ if (set->hconst) free(set->hconst);
+
+ if (set->prev) set->prev->next = set->next;
+ else cat->first = set->next;
+
+ if (set->next) set->next->prev = set->prev;
+ else cat->last = set->prev;
+
+ free(set);
+ return;
+ } else if (set->setId > setId) break;
+ }
+ warning(NULL, "specified set doesn't exist");
+}
+
+void MCDelMsg(
+#if PROTO
+ int msgId)
+#else
+ msgId)
+int msgId;
+#endif
+{
+ msgT *msg;
+
+ if (!curSet) error(NULL, "you can't delete a message before defining the set");
+
+ for (msg = curSet->first; msg; msg = msg->next) {
+ if (msg->msgId == msgId) {
+ if (msg->hconst) free(msg->hconst);
+ if (msg->str) free(msg->str);
+
+ if (msg->prev) msg->prev->next = msg->next;
+ else curSet->first = msg->next;
+
+ if (msg->next) msg->next->prev = msg->prev;
+ else curSet->last = msg->prev;
+
+ free(msg);
+ return;
+ } else if (msg->msgId > msgId) break;
+ }
+ warning(NULL, "specified msg doesn't exist");
+}
+
+
+
+
+
+
diff --git a/gencat/msgcat.h b/gencat/msgcat.h
new file mode 100644
index 0000000..6c3a9d5
--- /dev/null
+++ b/gencat/msgcat.h
@@ -0,0 +1,178 @@
+/* -*-c++-*- */
+
+#ifndef __msgcath
+
+
+/***********************************************************
+Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that Alfalfa's name not be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.
+
+ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ALPHALPHA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+If you make any modifications, bugfixes or other changes to this software
+we'd appreciate it if you could send a copy to us so we can keep things
+up-to-date. Many thanks.
+ Kee Hinckley
+ Alfalfa Software, Inc.
+ 267 Allston St., #3
+ Cambridge, MA 02139 USA
+ nazgul at alfalfa.com
+
+******************************************************************/
+
+
+#include <sys/types.h>
+
+/*
+ * On disk data structures
+ */
+
+/* Edit History
+
+02/25/91 2 nazgul Byte order flags, upped the version number
+11/03/90 1 hamilton Alphalpha->Alfalfa & OmegaMail->Poste
+08/13/90 1 schulert move from ua to omu
+*/
+
+/* For or'd constants */
+#define MCMakeId(s,m) (unsigned long) ( ((unsigned short)s << (sizeof(short)*8)) \
+ | (unsigned short)m )
+#define MCSetId(id) (unsigned int) ( id >> (sizeof(short) * 8) )
+#define MCMsgId(id) (unsigned int) ( (id << (sizeof(short) * 8)) \
+ >> (sizeof(short) * 8) )
+#undef S
+#undef UI
+#undef UL
+
+#define MCMagicLen 8
+#define MCMagic "*nazgul*"
+#define MCLastMsg 0
+#define MCLastSet 0
+
+#define MCMajorVer 1
+#define MCMinorVer 0
+
+/*
+ * Critical note here. Sets and Messages *MUST* be stored in ascending
+ * order. There are stored that way (by specification) in the original
+ * data file, however in the process of merging in new stuff you might
+ * mix that up. Don't! The catget stuff does a binary search and will
+ * totally lose it if these aren't in order (not contiguous mind you, just
+ * in order. If this turns out to be a major problem this could be enhanced
+ * by adding a 'sorted' flag to the db, and sorting msgs and sets at load
+ * time if things aren't sorted, but I'd like not to have to do that.
+ */
+
+/*
+ * I have tried here to define data structures which can be used
+ * while the catalog is on disk, and at runtime.
+ * This is rather dangerous of course, but I think it can be done without
+ * overly increasing the memory usage, and it makes loading and storing
+ * somewhat simpler and less prone to accidents. I have also tried to
+ * define on disk data structures which can be updated in place, so that
+ * with a very large catalog (e.g. all system errors) you don't have to
+ * load everything in memory in order to add or update one set. With
+ * this in mind there are "invalid" flags which allow items to be
+ * invalidated and thus not loaded at runtime. Note however that although
+ * I pay attention to these when I load the DB, I do not currently use
+ * them in gencat (it just reads everything into memory), so there is
+ * no guarantee that this will all work.
+ */
+
+/* These should be publicly available */
+
+#define MCLoadBySet 0 /* Load entire sets as they are used */
+#define MCLoadAll 1 /* Load entire DB on catopen */
+
+extern char *MCAppPath; /* Additional search path for strings (appended) */
+
+/*
+ * MCOffsetT - Union to handle both disk and runtime pointers
+ */
+typedef union {
+ off_t off;
+ char *str;
+ void *ptr;
+ struct _MCMsgT *msg;
+ struct _MCSetT *set;
+} MCOffsetT;
+
+/*
+ * MCMsgT - Message structure (disk and runtime)
+ */
+typedef struct _MCMsgT {
+ long msgId; /* Id of this message */
+ MCOffsetT msg; /* Relative offset on disk or pointer in memory */
+ long invalid; /* Valid on disk, loaded in memory */
+} MCMsgT;
+
+/*
+ * MCSetT - Set structure (disk and runtime)
+ */
+typedef struct _MCSetT {
+ long setId; /* Id of this set */
+ off_t nextSet; /* Offset of next set on disk */
+ union {
+ off_t firstMsg; /* Offset to first Msg (while on disk) */
+ MCMsgT *msgs; /* Pointer to array of msgs (in mem, loaded) */
+ } u;
+ MCOffsetT data; /* Offset to data, or pointer to data */
+ long dataLen; /* Length of data area on disk */
+ long numMsgs; /* Number of messages */
+ long invalid; /* Valid on disk, loaded in memory */
+} MCSetT;
+
+/*
+ * MCCatT - Runtime catalog pointer
+ */
+typedef struct {
+ long loadType; /* How to load the messages (see MSLoadType) */
+#ifdef HAVE_MMAP
+ union {
+#endif
+ int fd; /* File descriptor of catalog (if load-on-demand) */
+#ifdef HAVE_MMAP
+ caddr_t addr; /* Mmaped() address */
+ } u;
+ off_t size; /* File size */
+#endif
+ long numSets; /* Number of sets */
+ MCSetT *sets; /* Pointer to the sets */
+ off_t firstSet; /* Offset of first set on disk */
+} MCCatT;
+
+/*
+ * MCHeaderT - Disk file header
+ */
+typedef struct {
+ char magic[MCMagicLen]; /* Magic cookie "*nazgul*" */
+ long majorVer; /* ++ on incompatible changes */
+ long minorVer; /* ++ on compatible changes */
+ long flags; /* Informational flags */
+ long numSets; /* Number of valid Sets */
+ off_t firstSet; /* Offset of first set on disk */
+} MCHeaderT;
+
+/* Some flags */
+#define MC68KByteOrder 0x01
+#define MCn86ByteOrder 0x02
+
+
+
+
+#endif
diff --git a/man/Makefile.in b/man/Makefile.in
new file mode 100644
index 0000000..4fac193
--- /dev/null
+++ b/man/Makefile.in
@@ -0,0 +1,61 @@
+# only executed from a subdir
+MAN1 = man whatis apropos
+MAN5 = man.conf
+MAN8 = makewhatis
+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)@mandir@$(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. at man1ext@; done
+ for i in $(MAN5); \
+ do $(INSTALL) $$i.5 $(mandir)/man5/$$i. at man5ext@; done
+ for i in $(MAN8); \
+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i. at man8ext@; fi; done
+
+clean:
+ rm -f core *.in *. at man1ext@ *. at man5ext@ *. at man8ext@ *~
+
+spotless:
+
+subdirs:
+ @for i in @languages@; 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 @languages@; 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
diff --git a/man/bg.txt b/man/bg.txt
new file mode 100644
index 0000000..047a2a6
--- /dev/null
+++ b/man/bg.txt
@@ -0,0 +1 @@
+bulgarian
diff --git a/man/bg/README b/man/bg/README
new file mode 100644
index 0000000..3173a29
--- /dev/null
+++ b/man/bg/README
@@ -0,0 +1,7 @@
+These pages are a one-time contribution by Dimitar Zhekov.
+E-mail: <jimmy at is-vn.bg>
+They were updated by Alexander Shopov.
+E-mail: <ash at contact.bg>
+You can reach the Bulgarain translation team at:
+http://fsa-bg.org/project/gtp
+
diff --git a/man/bg/apropos.man b/man/bg/apropos.man
new file mode 100644
index 0000000..0e4f937
--- /dev/null
+++ b/man/bg/apropos.man
@@ -0,0 +1,37 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Translated by Dimitar Zhekov <jimmy at is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash at contact.bg>, 2005.
+.TH apropos 1 "15 ������ 1991"
+.LO 1
+.SH ���
+apropos \- ������� �� ��� � ������ �� ����� �� whatis
+.SH ���������
+.BI apropos
+�������_���� ...
+.SH ��������
+apropos ����� ������� ���� ��� ��������� �� ������ �� �����,
+��������� ������ �������� �� ���������� �������, � ������� ���������
+�� ����������� �����.
+.SH "�����/���������"
+�������������� ����� ��
+.BR man
+� John W. Eaton. Federico Lucifredi <flucifredi at acm.org>
+����������� ������ ����������� �� ������.
+.SH ������
+������� �����, ���������� ����� <ash at contact.bg>
+.SH "����� ����"
+.BR whatis(1),
+.BR man(1).
diff --git a/man/bg/makewhatis.man b/man/bg/makewhatis.man
new file mode 100644
index 0000000..772e281
--- /dev/null
+++ b/man/bg/makewhatis.man
@@ -0,0 +1,104 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at 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.
+.\"
+.\" Translated by Alexander Shopov <ash at contact.bg>, 2005.
+.TH MAKEWHATIS 8 "21 ������ 2005"
+.SH ���
+makewhatis \- ������� ���� �� ����� �� whatis
+.SH ���������
+.BI "makewhatis [-u] [-v] [-w] [-s " ������� " ] [-c [" ���_���_������_�������� "]] [" ���_���_�������� "]"
+.SH ��������
+.B makewhatis
+������
+.IR "������ ��������" " � " "���� �� �������������" ���
+.IR "������ ������ ��������" " � " "���� �� �������� ��������",
+����� ������� � ��������
+.I �������.
+� ������ �� ����� �� whatis �� ������� �� ���� ��� �� �����
+��������. ��� �� ������ �� ����� �� ���������� � ������
+�������� ��������� � ����. ���������� �� ����� ��
+������������ �� ������ ��� �� ����������.
+.LP
+������ � ���������� ����� ����� �� ������� ��� � ���������,
+.B makewhatis
+���������� ���������� ������� � �����, ����������, ������, �������, ������ �
+��������.
+.LP
+��� �� � �������
+.IR "��� �� ���������� �� �������������",
+�� ������������ �� ������
+.I /usr/man
+.
+.SH �����
+.TP
+.B -u
+���������� �� ������ �� ����� � ������ ��������.
+.TP
+.B -v
+�������� �����.
+.TP
+.B -w
+���������� �� ���� ������� �� ��������� `man --path`
+.TP
+.BI -s " �������"
+���������� �� ����������
+.I �������
+�� ���� ��
+.IR "����������� �� ���������� " ��� " �������� �������� �� �������������" .
+��� �� � �������� ��������, �� ��������
+.I \'1 2 3 4 5 6 7 8 9 n l\'
+.TP
+.BI -c " ���_��_��������_��������"
+�������� �� �������� �������� �
+.I ��������� ���
+ . ��� �� � ������� ��������, �� ������ ������� ������������
+���������� �������
+.IR /usr/man/preformat " � " /usr/man .
+.SH �������
+.PP
+�� �� �� ������� ����
+.IR /usr/X11R6/man/whatis " � " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+�� �� �� ������� ������ ���� �� �����,
+����������� ��������� �� ���������, ����� � ���������:
+.IP
+LANGUAGE=bg:ru:en makewhatis -w
+.SH ������
+.B makewhatis
+���� �� �� �� ������ ����� ��� ��������, ����� ���������
+������������ ������� �� troff, ����. ������������� �� Tcl/Tk.
+.PP
+.B makewhatis
+�� ������ � ������������� ����������� �������.
+.SH "�����/���������"
+�������������� ����� ��
+.BR man
+� John W. Eaton. Federico Lucifredi <flucifredi at acm.org>
+����������� ������ ����������� �� ������.
+.SH ������
+���������� ����� <ash at contact.bg>
+.SH "����� ����"
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
diff --git a/man/bg/man.conf.man b/man/bg/man.conf.man
new file mode 100644
index 0000000..6574e69
--- /dev/null
+++ b/man/bg/man.conf.man
@@ -0,0 +1,59 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "21 ������ 2005"
+.SH ���
+man.conf \- ��������������� ����� �� man
+.SH ��������
+.LP
+���� ���� �� ���� ��
+.BR man (1)
+� �������: (�) ���������� ��� �� �� ������� ����� �� �������
+�� �������� �� �������������; (�) ������� ����� �� ��������
+�������� ���� nroff, eqn, tbl � �.�., ���������� �� man; (�)
+������ �� �������������� �������� �� ������� � ����������
+����������. �������� �� ����������� ��������������� ����
+���� �� ���� ������ �:
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+������� �� ��������� ����� �� �������� � ��������� �����.
+grotty(1) ������� ����� ���������� ����� �� nroff.
+��������, ������ ������������� �� ���:
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+������ �� ����������:
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+�� �� ��������� �������������� � �������������.
+.SH �������
+.I "@man_config_file@"
+.SH "�����/���������"
+�������������� ����� ��
+.BR man
+� John W. Eaton. Federico Lucifredi <flucifredi at acm.org>
+����������� ������ ����������� �� ������.
+.SH ������
+������� �����, ���������� ����� <ash at contact.bg>
+.SH "����� ����"
+.BR col (1),
+.BR (g)eqn (1),
+.BR (g)pic (1),
+.BR groff (1),
+.BR grotty (1),
+.BR (g)refer (1),
+.BR (g)tbl (1),
+.BR less (1),
+.BR man (1),
+.BR compress (1),
+.BR gzip (1).
diff --git a/man/bg/man.man b/man/bg/man.man
new file mode 100644
index 0000000..e4013fa
--- /dev/null
+++ b/man/bg/man.man
@@ -0,0 +1,472 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" More changes - flc
+.\"
+.\" Translated by Dimitar Zhekov <jimmy at is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash at contact.bg>, 2005.
+.TH man 1 "21 ������ 2005"
+.LO 1
+.SH ���
+man \- ����������� � ��������� �� �������� �� ������������ �����������
+.SH ���������
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --path ]
+.RB [ \-m
+.IR ������� ]
+.RB [ \-p
+.IR ��� ]
+.RB [ \-C
+.IR ���������������_���� ]
+.RB [ \-M
+.IR ��� ]
+.RB [ \-P
+.IR �������� ]
+.RB [ \-B
+.IR ������� ]
+.RB [ \-H
+.IR ��������_��_HTML ]
+.RB [ \-S
+.IR ������_��_������� ]
+.RI [ ������� ]
+.I "��� ..."
+
+.SH ��������
+.B man
+��������� � ������� �������� �� ������������ �����������.
+��� � ������
+.IR ������ ,
+.B man
+����� ���� � ���� ������ �� �������������.
+.I ���
+���������� � ��� �� �������� �� �������������, �.�. ��
+������� ��� �� �������, ������� ��� ����. ��� �����
+.I ���
+������� ��������� �����
+.RB ( / ),
+.B man
+, �� ��������� ���� ��� �� ����, ���� �� ������ �� ���������
+.B "man ./foo.5"
+��� ����
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+��-������ � ������� ����
+.B man
+����� ���������� �� �������������.
+
+.SH �����
+.TP
+.B \-\^C " ���������������_����"
+������ ��� ��������������� ���� �� �� ��������. ���������� ��
+.BR @man_config_file@ .
+(�����
+.BR man.conf (5)).
+.TP
+.B \-\^M " ������_�_������"
+������ �� ����������, ��������� � ���������, � ����� �� ��
+������ �������� �� �������������.
+������ ������ � ������ ���� �� �� �� �����
+.BR \-M .
+�����
+.BR "��� �� ������� �� �������� �� �������������" .
+.TP
+.B \-\^P " ��������"
+��������, ����� �� �� ������ �� ��������� �� ����������.
+���� ����� � � ��-����� ��������� �� ������������ �� �������
+.BR MANPAGER ,
+����� ��� � � ��-����� ��������� �� ������������
+.BR PAGER .
+�� ������������
+.B man
+��������
+.BR "@pager@" .
+.TP
+.B \-\^B
+������, ��� �������� �� ����������� �� �� �������� �� ������� � HTML.
+���� ����� � � ��-����� ��������� �� ������������ �� �������
+.BR BROWSER .
+�� ������������
+.B man
+��������
+.BR @browser@ ,
+.TP
+.B \-\^H
+������ ���������� �� �������� ������������ �� ������� � HTML.
+���� ����� � � ��-����� ��������� �� ������������ �� �������
+.BR HTMLPAGER .
+�� ������������
+.B man
+��������
+.BR @htmlpager@ ,
+.TP
+.B \-\^S " ������_��_�������"
+������ �� �������, ��������� � ���������, � ����� �� �� ������
+�������� �� �������������. ���� ����� � � ��-����� ���������
+�� ������������ �� �������
+.BR MANSECT .
+.TP
+.B \-\^a
+��������� �� ������ �������� ��������.
+�� ������������
+.B man
+��������� ��������� ��� ���������� �� ������� ��������.
+���� ���� �����
+.B man
+��������� ������ ��������.
+.TP
+.B \-\^c
+����������� ������ �� ������������ ��������, ���� ��� ����
+���������� ��������, ������ ��������.
+���� ��� ������, ��� ������������� ������������� �������� �
+��������� ��� ����������� �� ����� � �������� ������ �� ������.
+.TP
+.B \-\^d
+�� �� �������� ��������, � ������������ ���������� �� ������������ ��
+.BR man .
+.TP
+.B \-\^D
+��������� � �� ����������, � �� ������������ ����������.
+.TP
+.B \-\^f
+���������� ��
+.BR whatis .
+.TP
+.BR \-\^F " ��� " \-\-preformat
+���� �����������, ��� ���������.
+.TP
+.B \-\^h
+��������� �� ���������� ������� ��������� � �����.
+.TP
+.B \-\^k
+���������� ��
+.BR apropos .
+.TP
+.B \-\^K
+������� �� ������ ��� ��� *������* ��������. ��������������:
+���� ���\-�������� �� � ����� �����, ���� �� � ����� � �� ��
+����� ������. (�� �� ���������� ��������� \- �� ����� ������
+��������� � 500 �������� ������ ����� ������).
+.TP
+.B \-\^m " �������"
+������� � �������� �������� �� ��������, ���������� �� ��������� �������.
+.TP
+.B \-\^p " ���"
+������ �� ������� �� ������������� ���������, ����� �� �� ��������� �����
+.B nroff
+���
+.BR troff .
+�� ������ ������� ���������� � ����� ����� �� �������� ��
+������������� ���������. ����� �� ��������� �� �������������
+��������� � �������, ����� �� ������� ��:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+���� ����� � � ��-����� ��������� �� ������������ �� �������
+.BR MANROFFSEQ .
+.TP
+.B \-\^t
+���������� ��
+.B @troff@
+�� ����������� �� ���������� � ��������� �� ��������� �� ����������� ����� \-
+.B stdout.
+�������� � �� �� ������ ������������ �� ������������ ������
+����� ���������� �� �� ��������.
+.TP
+.B \-\^w \fR���\fP \-\-path
+�� �� �������� ����������, � ����������������� �� ���������,
+����� ���� ���� ����������� ��� ��������.
+��� �� � ������ ��������, ��������� (�� ����������� �����) ��
+������������, � �����
+.B man
+����� �������� �� �������������.
+��� ���������
+.B manpath
+���� ��� man, �� "manpath" � ���������� �� "man --path".
+.TP
+.B \-\^W
+���� \-\^w, �� ������� �� ��������� �� �������� �� ���� ��
+��� � ��� ������������ ����������. �������� �� �� ������� �
+�������� ������������� ����
+.ft CW
+.BR "man -aW man | xargs ls -l" .
+.ft
+
+.SH "������ ��������"
+�� �� ������ ������� �� ������������� �� ����������, man ��
+������ �� ������� ������������� �������� � ������������ ��
+�� �������� ������. �� �������� �������� ������ ("cat") ��
+���������� �� ����������/manX �� ���������� � ����������/catX, �� �
+.BR @man_config_file@
+���� �� �� ����� ����� ������������. �������� �������� �� ��
+����������, ��� ������������ �� ���� ���������� ������,
+������������� ������ ��������� ������ �� ������ �������� ��
+80 ������� ��� man.conf ������� ����������� NOCACHE.
+.PP
+�������� � ������� �� ���������� ��� ���������� ��
+.B man
+�� �� �������� (suid) �� ����������� man. ������, ��� ������������
+�� �������� �������� � ����������� �� ����������� man � ���
+����� �� ������ 0755 (�������� �� ����� ���� �� man),
+� ��� �������� ������� �� ���� ����������� �� ����������� man
+� ���� ����� �� ������ 0644 ��� 0444 (�������� �� ����� ����
+�� man ��� ��������� �� �����), ����� ��������� ���������� ��
+���� �� ������� ������ �������� ��� �� �������� ����� �������
+� ������������ � �������� �������.
+��� ������� ��� ���������� ��
+.B man
+�� �� ��������� (suid) �� ����������� man � ������ �����������
+������ �� ����� �� �������� cat ��������, �� ������������ ��
+�������� ������� ������ �� �� � ����� �� ������ 0777.
+.PP
+�������
+.B \-c
+������������ ��������� ������ ������������ ��������, ���� ���
+���������� ��������, ������ ��������.
+
+.SH "�������� � HTML"
+Man ������� �������� � HTML, ��� �� �� ����������� � ����������
+� ��� html ���� ���������� �� ������.
+���������� ���������� �� ��������� ��� �������� ������ �� �
+".html". � ����� ���� \- ���������� ��� �� ���������� ��
+������������� �� ���������
+.BR ls (1)
+��� ������ HTML �
+.IR /usr/share/man/htmlman1/ls.1.html .
+
+.SH "��� �� ������� �� �������� �� �������������"
+.B man
+�������� ������ ��������� �� ������� �� �������� ��
+�������������, ������� �� ���������� �����, ������������ ��
+�������, ���������������� ����
+.B @man_config_file@
+� ����� �������� ���������.
+.PP
+�����, ��� ����������
+.I ���
+������� ��
+.B man
+������� ��������� �����
+.RB ( / ),
+.B man
+�� ��������� ���� ��� �� ���� � �� �������� ������� �������.
+.PP
+� ��������� ������ �����, ������
+.I ���
+�� ������� ��������� �����,
+.B man
+��������� ������� ���������� �� ����, ����� �� ����� �� �
+�������� �� ������������� �� ���������
+.IR ��� .
+.PP
+��� �������� �������
+.BI "-M " ���,
+��
+.I ���
+� �������� �� ����������, �����
+.B man
+���������.
+.PP
+��� �� ��������
+.BR -M ,
+�� ������ �������� �� ������������ �� �������
+.BR MANPATH ,
+���� �������� � �������� �� ���������� ��������� � ���������, �����
+.B man
+���������.
+.PP
+��� �� ������� ���� ������ � ������ �� ������� ����
+.B -M
+���
+.BR MANPATH ,
+.B man
+������� ���� �������� ������ �� ���������� �� �������, �������
+�� ������������ �� ���������������� ����
+.BR @man_config_file@ .
+�����������
+.B MANPATH
+� ���������������� ���� ������� ��������� ����������, �����
+�� �� ������� � ���� �� �������.
+.PP
+����� ���� �����������
+.B MANPATH_MAP
+������� ���������� ��� ���� �� ������� �� �������� � ����������
+�� ������� � ������ �� ������� �� �������, �.�. �� ������������ �� �������
+.BR PATH .
+�� ����� ����������, ����� � � ������� �� ������� �� �������, �����������
+.B MANPATH_MAP
+������ ����������, ����� �� ���� �������� ��� ���� ��
+������� �� ��������.
+.B man
+����� ���������� �� ������������
+.B PATH
+� ������ ����������� ���������� ��� ���� �� ������� �� ��������.
+�� ���� �����, ��� �������� ���������� ��
+.BR MANPATH_MAP ,
+������ ��������� ���������
+.BR "man xyz" ,
+�� �������� ���������� �� ������������� �� ����������, �����
+�� ���� ����������, ��� �� ������� ���������
+.BR xyz .
+.PP
+� ����������, �� ����� ���������� �� ������� � ������ ��
+������� �� ������� ("�������� ����������"), �� �����
+.I ������
+���������
+.B MANPATH_MAP ,
+.B man
+����������� ����� ���������� �� �������� ��������, ��\-����� �������������
+�� ���������� ���������� ��� �� ������� ���������� ����������.
+.PP
+��������� �� ���������� �������� ���� �� �� ������� � �����������
+.B NOAUTOPATH
+�
+.BR @man_config_file@ .
+.PP
+��� ����� �� ������������, ������� ��\-����,
+.B man
+����� ���� �������
+.IB ��� . ������\fR,
+� �������������� ���������� \- ������ �� ������� � ����������
+� ���������� �� ���������. ��� �� ������ ����� ����,
+.B man
+����� ��� ������ �������������, ��� ��� ������, � �����
+.BI man N
+���
+.BI cat N\fR,
+������
+.I N
+� ������� �� ������� �� �������������.
+��� ������ � � �������������
+.BI cat N,
+.B man
+������, �� ���� � ���� � ������, ����������� ��������. � �������� ������
+.B man
+������, �� ������ � ������������. � � ����� ������, ��� �����
+�� ����� �������� � �������� ��
+.B man
+���������� �� ���������, ��������
+.BR .gz ,
+.B man
+������, �� ������ � �����������.
+.PP
+��� ������ �� ������ ���� (��� ����)
+.B man
+�� ������� ������ �������� �� �������������, ����������� �������
+.BR "--path " ( -w ).
+
+.SH �����
+.TP
+.B MANPATH
+��� �� ������� �� �������� �� �������������. ���� ���������� � �
+��\-����� ��������� �� ���������������� ���� � ������������ ���
+�� �������, �� � ��\-����� �� �������
+.BR -M .
+�����
+.BR "��� �� ������� �� �������� �� �������������" .
+.TP
+.B MANPL
+������� �� ����������. ��� �� � ��������, ������ �������� ��
+������������� ����� ���� ���������� (�����) ����������� ��������.
+.TP
+.B MANROFFSEQ
+����� �� ������� �� ������������� ���������, ����� �� �� ��������� �����
+.B nroff
+���
+.BR troff .
+�� ������������, �����
+.B nroff
+���������� �� ���������� � tbl.
+.TP
+.B MANSECT
+����� �� ������� �� �������������, � ����� �� �� �����.
+.TP
+.B MANWIDTH
+������ �� ����������. ��� �� � �������� �� �������� ���������� �� ������.
+.TP
+.B MANPAGER
+��� �� ��������, � ����� ���������� �� ��
+��������. ��� �� � ��������, �� ������
+.BR PAGER .
+��� � �� ���� ��������, ������ ��
+.BR @pager@ .
+.TP
+.B BROWSER
+����� �� ���������� �� ����������� �� �������� �� ������������� ��� ������ HTML.
+��� �� � ��������, �� �������� @browser at .
+.TP
+.B HTMLPAGER
+��������� �� �������� ������������ �� ���������� �� ������������� � HTML.
+��� �� � �������� �� �������� @htmlpager at .
+.TP
+.B LANG
+�������������, � ����� man ���-������ ����� ���������� �� �������������.
+���� ��������� �LANG=bg man 1 foo� �� ������ man �� ����� ���������� �� foo
+����� � .../bg/man1/foo.1, � ��� �� � ������ ���, � .../man1/foo.1 (... �
+���������� �� ������� � ������ �� �������).
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+������������ �� �������
+.B NLSPATH
+�
+.B LC_MESSAGES
+(���
+.BR LANG ,
+��� LC_MESSAGES ���� ��������) ������ ����� ���������� �� �������� ���
+��������� �� man (����������� ��������� �� ����������� � ����� man � ��
+�������� �������).
+���������: ��������, ������ �������� �� man, ��������
+.BR col(1) ,
+���� ��������� LC_CTYPE.
+.TP
+.B PATH
+������ �� �� ������� �������� � ������ �� ������� �� �������� �� �������������. �����
+.BR "��� �� ������� �� �������� �� �������������" .
+.TP
+.B SYSTEM
+������������ �� ��� �� �������� ������� �� �������
+.BR \-m .
+.SH ������
+�������
+.B \-t
+������, ���� ��� � ����������� ���������� troff ��� �������.
+.br
+��� ������� ������� (������) \e255 ��� <AD> ������ ������,
+������� � ������������ LESSCHARSET=latin1.
+.SH ������� ������
+��� �������� ����
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+��� ����� ����
+.IR .emacs
+, ����������� �� F1 �� �� ���� �������� � ����� �� �������������
+�������, �� ����� � ������������ �������.
+.LP
+�� �� �������� ����� �������� ������ �� �������� �� �������������,
+��� ������� ��������� ����� � �������������, �����������:
+
+ # man foo | col -b > foo.mantxt
+
+.SH "�����/���������"
+�������������� ����� ��
+.BR man
+� John W. Eaton. Federico Lucifredi <flucifredi at acm.org> ����������� ������ ����������� �� ������.
+.SH ������
+������� �����, ���������� ����� <ash at contact.bg>
+.SH "����� ����"
+.BR apropos (1),
+.BR whatis(1),
+.BR less(1),
+.BR groff(1),
+.BR man.conf(5).
diff --git a/man/bg/whatis.man b/man/bg/whatis.man
new file mode 100644
index 0000000..def4539
--- /dev/null
+++ b/man/bg/whatis.man
@@ -0,0 +1,39 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Translated by Dimitar Zhekov <jimmy at is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash at contact.bg>, 2005.
+.TH whatis 1 "5 ������ 1991"
+.LO 1
+.SH ���
+whatis \- ������� �� ���� ���� � ������ �� ����� �� whatis
+.SH ���������
+.BI whatis
+�������_���� ...
+.SH �������E
+whatis ����� ������� ���� ��� ��������� �� ������ �� �����,
+��������� ������ �������� �� ���������� �������, � �������
+��������� �� ����������� �����.
+�������� �� ���� ���������� ���� ����.
+
+������ �� ����� �� whatis �� ������� � ��������� @makewhatis at .
+.SH "�����/���������"
+�������������� ����� ��
+.BR man
+� John W. Eaton. Federico Lucifredi <flucifredi at acm.org> ����������� ������ ����������� �� ������.
+.SH ������
+������� �����, ���������� ����� <ash at contact.bg>
+.SH "����� ����"
+.BR apropos (1),
+.BR man (1).
diff --git a/man/cs.txt b/man/cs.txt
new file mode 100644
index 0000000..d94d829
--- /dev/null
+++ b/man/cs.txt
@@ -0,0 +1 @@
+czech
diff --git a/man/cs/apropos.man b/man/cs/apropos.man
new file mode 100644
index 0000000..186702a
--- /dev/null
+++ b/man/cs/apropos.man
@@ -0,0 +1,29 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Autorem �esk�ho p�ekladu je Pavel JAN�K ml.
+.\" Pavel.JANIK at inet.cz
+.\"
+.TH apropos 1 "7. ledna, 1997"
+.LO 1
+.SH JM�NO
+apropos \- hledej �et�zec v datab�zi whatis
+.SH SYNTAXE
+.BI apropos
+slovo ...
+.SH POPIS
+apropos prohled�v� datab�zi obsahuj�c� kr�tk� popis syst�mov�ch p��kaz� na
+v�skyt `slova' a v�sledek zobraz� na standardn� v�stup.
+.SH "VIZ Tɮ"
+whatis(1), man(1).
diff --git a/man/cs/man.conf.man b/man/cs/man.conf.man
new file mode 100644
index 0000000..2267052
--- /dev/null
+++ b/man/cs/man.conf.man
@@ -0,0 +1,43 @@
+.\" @(#)man.conf
+.\" Autorem �esk�ho p�ekladu je Pavel JAN�K ml.
+.\" Pavel.JANIK at inet.cz
+.\"
+.TH MAN.CONF 5 "7. ledna, 1997"
+.SH JM�NO
+man.conf \- konfigura�n� soubor pro man
+.SH POPIS
+.LP
+Tento soubor je �ten programem
+.BR man (1)
+a obsahuje (a) informace o tom, kde hledat manu�lov� str�nky,
+(b) pln� jm�na dal��ch preprocesor� jako nroff, eqn, tbl atd. pou��van�ch
+programem man a (c) seznam komprimovac�ch program� a jimi specifikovan�ch
+p��pon. U�ivatelsk� verze tohoto souboru m��e b�t specifikov�na takto:
+.LP
+.RS
+man -C soukrom�_man.conf ...
+.RE
+.LP
+Jm�na p��kaz� mohou b�t uvedena na p��kazov� ��dce.
+U�ite�n� volby pro nroff mohou b�t nalezeny v grotty(1).
+Nap�. m�sto standardn� ��dky
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+m��ete napsat
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+co� zp�sob�, �e znaky nebudou podtr�en� a p�e�krtnut�.
+.SH "VIZ Tɮ"
+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).
+
diff --git a/man/cs/man.man b/man/cs/man.man
new file mode 100644
index 0000000..085136c
--- /dev/null
+++ b/man/cs/man.man
@@ -0,0 +1,239 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" Autorem �esk�ho p�ekladu je Pavel JAN�K ml.
+.\" Pavel.JANIK at inet.cz
+.\"
+.TH man 1 "7. ledna, 1997"
+.LO 1
+.SH JM�NO
+man \- zform�tuje a zobraz� on-line manu�lov� str�nky
+.br
+manpath \- zobraz� manu�lov� cesty u�ivatele
+.SH SYNTAXE
+man [\-acdfhkKtwW] [\-m syst�m] [\-p �et�zec] [\-C konfigura�n� soubor] [\-M cesta]
+[\-P str�nkova�] [\-S seznam_sekc�] [sekce] jm�no ...
+.SH POPIS
+.B man
+zform�tuje a zobraz� on-line manu�lov� str�nky. Tato verze um� pracovat s
+prom�nn�mi prost�ed�
+.B MANPATH
+a
+.BR (MAN)PAGER ,
+proto m��ete m�t i vlastn�
+manu�lov� str�nky a vlastn� program ur�en� ke str�nkov�n� zform�tovan�ch
+manu�lov�ch str�nek.
+Je-li specifikov�na
+.I sekce
+.B man
+hled� danou str�nku pouze v t�to sekci.
+Samoz�ejm� m��ete tak� specifikovat po�ad� sekc�, kter� budou prohled�v�ny a
+tak� m��ete p��mo na p��kazov� ��dce nebo prom�nn�mi prost�ed� ur�it, kter�
+preprocesory budou p�i form�tov�n� str�nek pou�ity.
+Obsahuje-li
+.I jm�no
+znak /, je prvn� vyzkou�eno jako jm�no souboru, proto m��ete ud�lat n�co
+jako
+.B "man ./n�co.5"
+nebo
+.B "man /c�d��ko/n�co/n�co_jin�ho.1.gz\fR.\fP"
+.SH VOLBY
+.TP
+.B \-\^C " konfigura�n�_soubor"
+Specifikujete jin� konfigura�n� soubor. Standardn� je
+ at man_config_file@. (Viz t� man.conf(5).)
+.TP
+.B \-\^M " cesta"
+Specifikuje seznam manu�lov� cest (zde jsou hled�ny manu�lov� str�nky).
+Nen�-li tato volba specifikov�na, je pou�ita prom�nn� prost�ed�
+.B MANPATH
+. Jestli�e ani ona neexistuje, jsou manu�lov� cesty p�evzaty ze souboru
+ at man_config_file@.
+.TP
+.B \-\^P " str�nkova�"
+Specifikuje str�nkova�, kter�m budou str�nky prohl�eny.
+Tato volba m� p�ednost p�ed
+.B MANPAGER
+, kter� m� p�ednost p�ed
+.B PAGER .
+Standardn� str�nkova� je
+.BR @pager@ .
+.TP
+.B \-\^S " seznam_sekc�"
+Seznam_sekc� je ��rkami odd�len� seznam sekc� manu�lov�ch str�nek.
+Tato volba m� p�ednost p�ed prom�nnou prost�ed�
+.B MANSECT .
+.TP
+.B \-\^a
+Standardn� nastaven� ukon�� man pot�, co zobraz� prvn� nalezenou manu�lovou
+str�nku. Tato volba umo�n� zobrazit v�echny nalezen� str�nky, kter� vyhovuj�
+zadan�m krit�ri�m.
+.TP
+.B \-\^c
+Zform�tuj zdroj manu�lov� str�nky i kdy� existuje ji� zform�tovan� verze.
+Tato volba je v�znamn�. je-li zform�tovan� str�nka prohl�ena na obrazovce s
+jin�m po�tem sloupc�.
+.TP
+.B \-\^d
+Nezobrazuj zform�tovanou str�nku, pouze vytiskni lad�c� informace.
+.TP
+.B \-\^D
+Zobraz lad�c� informace i zform�tovanou str�nku.
+.TP
+.B \-\^f
+Tot� co
+.B whatis.
+.TP
+.B \-\^h
+Vytiskni kr�tkou pomoc a skon�i.
+.TP
+.B \-\^k
+Tot� co
+.B apropos.
+.TP
+.B \-\^K
+Hledej specifikovan� �et�ze ve *v�ech* manu�lov�ch str�nk�ch. Varov�n�: tato
+funkce je pravd�podobn� velmi pomal�! Specifikujete-li sekci, bude to
+rychlej��. (Jen pro zaj�mavost, na m�m po��ta�i to trv� p�ibli�n� minutu na
+500 str�nek).
+.TP
+.B \-\^m " syst�m"
+Specifikuje jinou sadu manu�lov�ch str�nek z�vislou na zadan�m syst�mu.
+.TP
+.B \-\^p " �et�zec"
+Specifikuje po�ad� preprocesor� p�ed nroff nebo troff. Ne v�echny instalace
+maj� plnou sadu preprocesor�. N�kter� preprocesory a p�smena pou��van� pro
+jejich spou�t�n�:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Tato volba m� p�ednost p�ed prom�nnou prost�ed�
+.B MANROFFSEQ .
+.TP
+.B \-\^t
+Pou�ij
+.B @troff@
+k form�tov�n� str�nky a v�stup zobraz na
+.B stdout.
+V�stup z
+.B @troff@
+je t�eba p�ed tiskem poslat p�es n�jak� filtry.
+.TP
+.B \-\^w \fRnebo\fP \-\-path
+Nezobrazuj manu�lov� str�nky, pouze vytiskni cestu(y) soubor�, kter� bys
+zobrazil. Nen�-li zad�n ��dn� argument: zobraz (na standardn� v�stup) seznam
+adres���, kter� jsou programem
+.B man
+hled�ny. Je-li
+.B manpath
+link na man, potom je manpath toto�n� s "man --path".
+.TP
+.B \-\^W
+Podobn� jako \-\^w, ale tiskne jm�na soubor� po jednom na ��dek bez dal��ch
+informac�. To je u�ite�n� pro p��kazy shellu jako nap�.
+.ft CW
+man -aW man | xargs ls -l
+.ft
+
+.SH "ZFORM�TOVAN� STR�NKY"
+Man se sna�� ukl�dat ji� zform�tovan� manu�lov� str�nky, aby u�et�il p�i
+jejich p��t�m zobrazen� �as. Tradi�n� se zform�tovan� str�nky z
+DIR/manX ukl�daj� do DIR/catX, ale jin� mapov�n� z manu�lov�ho adres��e na
+adres�� zform�tovan�ch str�nek je mo�n� specifikovat v souboru
+ at man_config_file@. Neexistuje-li adres�� zform�tovan�ch str�nek, nejsou
+ukl�d�ny ��dn� zform�tovan� str�nky.
+Je mo�n� nechat man suid pro u�ivatele man. Potom, je-li majitel adres��e
+zform�tovan�ch str�nek man a m�d je 0755 (zapisovat m��e pouze vlastn�k), a
+zform�tovan� str�nky maj� m�d 0644 nebo 0444 (zapisovat m��e bu� jenom
+majitel nebo v�bec nikdo), nem��e norm�ln� u�ivatel zm�nit zform�tovan�
+str�nky nebo um�stit do adres��e zform�tovan�ch str�nek jin� soubory.
+Nen�-li man suid, potom by m�l m�t adres�� zform�tovan�ch str�nek m�d 0777
+aby zde mohli v�ichni u�ivatel� zanechat ji� zform�tovan� str�nky.
+
+Volba -c zp�sob� reform�tov�n� str�nky i kdy� ji� existuje zform�tovan�
+str�nka.
+
+.SH PROST�ED�
+.TP
+.B MANPATH
+Je-li nastavena prom�nn�
+.B MANPATH
+, jej� hodnota je vyu��v�na ke hled�n� zform�tovan�ch str�nek.
+.TP
+.B MANROFFSEQ
+Je-li nastavena prom�nn� prost�ed�
+.B MANROFFSEQ
+je jej� hdnota vyu�ita pro ur�en� po�ad� spou�t�n� preprocesor� p�ed
+nroff nebo troff. Standardn� jsou str�nky form�tov�ny prvn� tabulkov�m
+procesorem a teprve pot� nroffem.
+.TP
+.B MANSECT
+Je-li nastvane prom�nn� prost�ed�
+.B MANSECT
+je jej� hodnota vyu�ita k ur�en� sekc�, kter� budou prohled�v�ny.
+.TP
+.B MANWIDTH
+Je-li nastavena prom�nn� prost�ed�
+.B MANWIDTH
+, tak jej� hodnota ur�uje po�et sloupc�, na kter� bude str�nka zform�tov�na.
+Jinak bude str�nka zform�tov�na na ���ku obrazovky.
+.TP
+.B MANPAGER
+Je-li nastavena prom�nn� prost�ed�
+.B MANPAGER
+jej� obsah ur�uje str�nkova�, kter� bude pou�it p�i zobrazen� zform�tovan�
+str�nky. Nen�-li nastavena, je pou�ita prom�nn�
+.B PAGER .
+nen�-li ani tato prom�nn� nastavena, pou�ije se
+.B @pager@ .
+.TP
+.B LANG
+Je-li nastavena prom�nn� prost�ed�
+.B LANG
+jej� hodnota definuje podadres��, ve kter�m budou hled�ny str�nky.
+Potom p��kaz `LANG=cz man 1 manu�lov�_str�nka'
+zobraz� str�nku .../cz/man1/manu�lov�_str�nka.1, nebo
+.../man1/manu�lov�_str�nka.1, kde ... je adres�� v manu�lov� cest�.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Prom�nn� prost�ed�
+.B NLSPATH
+a
+.B LC_MESSAGES
+(nebo
+.B LANG
+jestli�e p�edchoz� neexistuj�)
+hraj� roli p�i hled�n� katalogu zpr�v.
+(Anglick� zpr�vy jsou zkompilov�ny a nen� pro n� t�eba katalogu.)
+Dejte pozor na to, �e programy jako col (1) volan� programem man pou��vaj�
+nap�. LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+je pou��v�na p�i sestaven� starndardn� manu�lov� cesty.
+.TP
+.B SYSTEM
+.B SYSTEM
+je pou��v�na ke zji�t�n� standardn�ho jm�na syst�mu (pro pou�it� s volbou
+.B \-m
+).
+.SH "VIZ Tɮ"
+apropos(1), whatis(1), less(1), groff(1).
+.SH CHYBY
+Volba
+.B \-t
+je funk�n� pouze, je-li instalov�n program podobn� programu troff.
+.br
+Uvid�te-li blikaj�c� \e255 nebo <AD> m�sto odd�lov�tek,
+um�st�te `LESSCHARSET=latin1' do Va�eho prost�ed�.
diff --git a/man/cs/whatis.man b/man/cs/whatis.man
new file mode 100644
index 0000000..8b3dfc2
--- /dev/null
+++ b/man/cs/whatis.man
@@ -0,0 +1,32 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Autorem �esk�ho p�ekladu je Pavel JAN�K ml.
+.\" Pavel.JANIK at inet.cz
+.\"
+.TH whatis 1 "7. ledna 1997"
+.LO 1
+.SH JM�NO
+whatis \- hledej cel� slova v datab�zi whatis
+.SH SYNTAXE
+.BI whatis
+slovo ...
+.SH POPIS
+whatis prohled�v� datab�zi obsahuj�c� kr�tk� popis syst�mov�ch p��kaz� na
+v�skyt `slova' a v�sledek zobraz� na standardn� v�stup. Jsou v�ak zobrazena
+pouze slova, kter� kompletn� vyhov�la.
+
+Datab�ze whatis je vytvo�ena spu�t�n�m programu @makewhatis at .
+.SH "VIZ Tɮ"
+apropos(1), man(1).
diff --git a/man/da.txt b/man/da.txt
new file mode 100644
index 0000000..fa723bb
--- /dev/null
+++ b/man/da.txt
@@ -0,0 +1 @@
+danish
diff --git a/man/da/apropos.man b/man/da/apropos.man
new file mode 100644
index 0000000..560b6bd
--- /dev/null
+++ b/man/da/apropos.man
@@ -0,0 +1,30 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" edited and translated to danish by Bo Vagner Hoejer 1996
+.\" email bo at petshop.ping.dk - bo at image.dk
+.\"
+.TH apropos 1 "15. Januar 1991" "da" "Linux brugerkommandoer"
+.LO 1
+.SH NAVN
+apropos \- gennems�g 'whatis' databasen for tekststrenge
+.SH SYNTAKS
+.BI apropos
+n�gleord ...
+.SH BESKRIVELSE
+apropos gennems�ger et set af databasefiler, som indeholder korte beskrivelser
+af systemets kommandoer, efter n�gleordet og udskriver resultatet paa standard
+udskriftsenheden.
+.SH "SE OGS�"
+whatis(1), man(1).
diff --git a/man/da/man.conf.man b/man/da/man.conf.man
new file mode 100644
index 0000000..26f4fc8
--- /dev/null
+++ b/man/da/man.conf.man
@@ -0,0 +1,45 @@
+.\" @(#)man.conf
+.\"
+.\" edited and translated to danish by Bo Vagner Hoejer 1996
+.\" email bo at petshop.ping.dk - bo at image.dk
+.\"
+.TH MAN.CONF 5 "30 Marts 1994" "da" "Linux filformater"
+.SH NAVN
+man.conf \- konfigurationsfil for manual kommandoen
+.SH BESKRIVELSE
+.LP
+Denne fil bliver l�st af
+.BR man (1)
+og indeholder (a) information om hvordan s�gestien for 'man' konstrueres,
+(b) den fulde sti til programmer som bruges af 'man' f.eks. nroff, eqn, tbl
+etc. og (c) en liste over udpakkeprogrammer til filer med en given endelse.
+En alternativ version af denne fil kan specifiseres med
+.LP
+.RS
+man -C privat_manual.konfiguration ...
+.RE
+.LP
+Programnavne kan angives med parametre. Nyttige parametre til nroff er
+beskrevet p�
+.BR grotty (1)
+manualsiden. Eksempelvis kan standardlinien
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+erstattes med
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+med det form�l at forhindre understregning og fed skrift.
+.SH "SE OGS�"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) og compress(1), gzip(1).
+
diff --git a/man/da/man.man b/man/da/man.man
new file mode 100644
index 0000000..da5f28f
--- /dev/null
+++ b/man/da/man.man
@@ -0,0 +1,253 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" edited and translated to danish by Bo Vagner Hoejer 1996
+.\" email bo at petshop.ping.dk
+.\"
+.TH man 1 "2. September 1995" "da" "Linux brugerkommandoer"
+.LO 1
+.SH NAVN
+man \- formaterer og viser online manual siderne
+.br
+manpath \- udskriver brugerens s�gesti for manual siderne
+.SH SYNTAKS
+man [\-acdfhkKtwW] [\-m system] [\-p streng] [\-C konfigurationsfil] [\-M sti]
+[\-P pager] [\-S kapitelliste] [kapitel] opslagsord ...
+.SH BESKRIVELSE
+.B man
+formaterer og viser online manual siderne. Denne version genkender
+.B MANPATH
+og
+.B (MAN)PAGER
+variablerne, s� du kan derfor fasts�tte dit personlige
+set manual sider og v�lge hvilket program du fortr�kker til at vise de formaterede
+sider med. Hvis
+.I kapitel
+er angivet vil
+.B man
+kun gennems�ge dette kapitel af manualen.
+Man kan ogs� angive hvilken r�kkef�lge kapitlerne gennems�ges for opslag i
+og hvilke preprocessore, som k�res p� kildeteksten, via kommandolinie parametre
+eller skalvariabler.
+Hvis
+.I opslagsordet
+indeholder en skr�streg ('/') bliver det f�rst testet som et filnavn,
+s� man kan anf�re
+.I "man ./foo.5"
+eller selv
+.I "man /cd/foo/bar.1.gz\fR.\fP"
+.SH PARAMETRE
+.TP
+.B \-\^C " konfigurations_fil"
+Angiver hvilken konfigurations_fil som bruges. Normalt anvendes
+ at man_config_file@. (Se man.conf(5).)
+.TP
+.B \-\^M " sti"
+Angiver hvilke kataloger som gennems�ges efter manualsider.
+Hvis en s�dan parameter ikke er angivet bruges skalvariablen
+.BR MANPATH .
+Hvis ingen s�dan skalvariabel findes, konsulteres
+.I @man_config_file@
+for at opbygge en standardliste.
+Hvis MANPATH indeholder et tom delstreng bruges standardlisten.
+.TP
+.B \-\^P " pager"
+Angiver hvilket 'pager' program, som skal bruges.
+Denne parameter tilsides�tter
+.B MANPAGER
+skalvariablen, som igen overskygger
+.B PAGER
+variablen. Normalt bruger 'man'
+.IR @pager@ .
+.TP
+.B \-\^S " kapitel_liste"
+Kapitel_liste er en kolon sepereret liste af kapiteller
+som skal gennems�ges.
+Denne parameter tilsides�tter
+.B MANSECT
+skalvariablen.
+.TP
+.B \-\^a
+Normalt vil man afslutte efter visning af den f�rste fundne manualside
+Brug af denne parameter tvinger 'man' til ikke kun at vise den f�rst fundne
+side, men alle sider der matcher
+.BR opslagsord .
+.TP
+.B \-\^c
+Reformater kildesiden, selvom der findes en preformateret side,
+som er up to date.
+Denne mulighed bruges, hvis for eksempel manualsiden er preformateret
+til en sk�rm med en anden bredde end den, man aktuelt anvender.
+.TP
+.B \-\^d
+Siden vises ikke; men der udskrives adskillige fejlfindingsinformationer
+i stedet.
+.TP
+.B \-\^D
+Udskiver b�de siden og fejlfindingsinformation.
+.TP
+.B \-\^f
+�kvivalent med
+.B whatis.
+.TP
+.B \-\^h
+Udskriv en kort hj�lpetekst og afslut programmet.
+.TP
+.B \-\^k
+�kvivalent med
+.B apropos.
+.TP
+.B \-\^K
+Gennems�ger *alle* manualsiderne efter den angivne streng. Advarsel: det
+kan godt g� meget langsomt. Det hj�per at specifisere et kapitel. P�
+en typisk maskine tager det omkring 1 minut at gennems�ge 500 manualsider.
+.TP
+.B \-\^m " system"
+System angiver et alternativt set manualsider.
+.TP
+.B \-\^p " string"
+Angiver den sekvens af preprocessore som k�res f�r nroff eller troff.
+Ikke alle installationer har et fuldt set preprocessore.
+Bogstaverne som betegner nogle af preprocessorene er:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Denne parameter tilsides�tter
+.B MANROFFSEQ
+skalvariablen.
+.TP
+.B u-\^t
+Brug
+.B @troff@
+til formattering af manualside, uddata sendes til
+.B stdout.
+Uddata fra
+.B @troff@
+m� muligvis viderebearbejdes gennem et filter f�r udskrift.
+.TP
+.BR \-\^w or \-\-path
+Manualsiderne vises ikke, men findestedet for filerne ,som ville blive
+formateret eller vist, udskrives. Hvis ingen argumenter er angivet
+udskrives hvilke kataloger som
+.B man
+gennems�ger efter manualsider.
+Hvis
+.B manpath
+er et link til man, s� er 'manpath' �kvivalent med 'man --path'.
+.TP
+.B \-\^W
+Som \-\^w, men udskriver filnavne en per linie, uden yderligere information.
+Dette er smart i skal kommandoer s�som
+.ft CW
+man -aW man | xargs ls -l
+.ft
+
+.SH "PREFORMATEREDE SIDER"
+.B man
+vil pr�ve p� at gemme de formaterede manualsider, for at spare
+formatteringstid n�ste gang der er brug for siderne.
+Traditionelt bliver de formatterede sider fra KATALOG/manX gemt i
+KATALOG/catX, men rute fra manual kataloget til preformat kataloget
+kan angives i
+.I @man_config_file at .
+Ingen preformaterede sider bliver gemt, hvis det forlangte katalog ikke eksisterer.
+.TP
+Det er muligt at s�tte 'man' suid til bruger man. Hvis cat kataloget har ejer
+man og tilgangsrettighed 0755 (kum skrivetilladelse for man),
+og cat-filerne har ejer man og tilgangsrettighed 0644 eller 0444
+(kun skrivetilladelse for man, eller ingen skriveltilladelse overhovedet),
+kan ingen ordin�r bruger �ndre de preformaterede sider eller
+anbringe andre filer i katalog for preformaterede sider.
+Hvis 'man' ikke er suid, skal kataloget for preformaterede sider have
+tilgangrettighed 0777 hvis alle brugere skal have mulighed for at gemme
+preformaterede sider.
+.TP
+Parameteren -c gennemtvinger reformattering af en side,
+selvom en frisk preformateret side eksisterer.
+
+
+.SH SKALVARIABLE
+.TP
+.B MANPATH
+Hvis
+.B MANPATH
+er sat, bruges dens v�rdi som s�gesti til manualsiderne.
+.TP
+.B MANROFFSEQ
+Hvis
+.B MANROFFSEQ
+is sat, bruges dennes v�rdi til at bestemme hvilke preprocessore som
+gennemk�res f�r nroff eller troff. Normalt bliver siderne sendt gennem
+tabel preprocessoren f�r nroff.
+.TP
+.B MANSECT
+Hvis
+.B MANSECT
+er sat, bruges dens v�rdi til at fasts�tte hvilken manualsektioner
+som gennems�ges.
+.TP
+.B MANWIDTH
+Hvis
+.B MANWIDTH
+is sat, bruges dens v�rdi; som den brede manualsiderne bliver vist med.
+Hvis ikke
+.B MANWIDTH
+er sat, bruges hele sk�rmens bredde.
+.TP
+.B MANPAGER
+Hvis
+.B MANPAGER
+is sat, anvendes dets v�rdi som navnet p� det program som bruges til at vise
+manualsiderne med. Hvis ikke s� bruges
+.BR PAGER .
+Hvis denne heller ikke har nogen v�rdi bruges
+.BR @pager@ .
+.TP
+.B LANG
+Hvis
+.B LANG
+er sat, bruges dets v�rdi til at definere i hvilket underkatalog man
+f�rst kigger efter manualsider. S�ledes vil kommandoen `LANG=da man 1 foo'
+f� man til at lede efter foo manualsiden i .../da/man1/foo.1,
+og hvis der ikke kan finde en s�dan fil forts�ttes der i .../man1/foo.1,
+hvor ... er et katalog p� s�gestien.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Skalvariablerne
+.B NLSPATH
+og
+.B LC_MESSAGES
+(eller
+.B LANG
+n�r den sidste ikke findes)
+spiller en rolle i at lokalisere meddelelses kataloget.
+(Engelske meddelelser er oversat direkte ind i programmet,
+s� derfor beh�ves intet katalog.)
+Bem�rk at nogle programmer, s� som col(1), kaldt af man ogs� bruger LC_CTYPE.
+.TP
+.B STI
+.B STI
+bliver brugt til konstruktion af den normale s�gesti for manualsiderne.
+.TP
+.B SYSTEM
+.B SYSTEM
+bliver brugt til at angive et andet system navn med (for brug
+med
+.B \-m
+parametren).
+.SH "SE OGS�"
+apropos(1), whatis(1), less(1), groff(1).
+.SH FEJL
+.B \-t
+parametren virker kun, hvis der er installeret et troff-lignende program.
diff --git a/man/da/whatis.man b/man/da/whatis.man
new file mode 100644
index 0000000..0d57b74
--- /dev/null
+++ b/man/da/whatis.man
@@ -0,0 +1,32 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" edited and translated to danish by Bo Vagner Hoejer 1996
+.\" email bo at petshop.ping.dk - bo at image.dk
+.\"
+.TH whatis 1 "5. Januar 1991" "da" "Linux brugerkommandoer"
+.LO 1
+.SH NAVN
+whatis \- gennems�g 'whatis' databasen efter komplette ord.
+.SH SYNTAKS
+.BI whatis
+n�gleord ...
+.SH BESKRIVELSE
+whatis gennems�ger et set af databasefiler, som indeholder korte beskrivelser
+af systemets kommandoer, efter n�gleordet og udskriver resultatet paa standard
+udskriftsenheden. Kun ord der matcher fuldst�ndigt bliver vist.
+
+whatis databasen oprettes ved at anvende kommandoen @makewhatis at .
+.SH "SE OGS�"
+apropos(1), man(1).
diff --git a/man/de.txt b/man/de.txt
new file mode 100644
index 0000000..b518853
--- /dev/null
+++ b/man/de.txt
@@ -0,0 +1 @@
+german
diff --git a/man/de/README b/man/de/README
new file mode 100644
index 0000000..2be681b
--- /dev/null
+++ b/man/de/README
@@ -0,0 +1,6 @@
+These german man pages were contributed by Jochen Hein.
+
+#From hein at centeotl.in.tu-clausthal.de Tue May 31 08:52:20 1994
+#To: Andries.Brouwer at cwi.nl
+#Subject: Re: man-1.3
+#From: Hein at student.tu-clausthal.de (Jochen Hein)
diff --git a/man/de/apropos.man b/man/de/apropos.man
new file mode 100644
index 0000000..958f10f
--- /dev/null
+++ b/man/de/apropos.man
@@ -0,0 +1,29 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" �bersetzt von Jochen Hein ( Hein at Student.tu-clausthal.de )
+.\"
+.TH apropos 1 "Jan 15, 1991"
+.LO 1
+.SH NAME
+apropos \- durchsucht die whatis Datenbank nach Zeichenketten
+.SH SYNTAX
+.BI apropos
+keyword ...
+.SH BESCHREIBUNG
+apropos durchsucht eine Reihe von Datenbank-Dateien, die kurze Beschreibungen
+von System-Kommandos enthalten, nach Schl�sselworten und zeigt das Ergebnis
+auf der Standard-Ausgabe an.
+.SH "SIEHE AUCH"
+whatis(1), man(1).
diff --git a/man/de/man.conf.man b/man/de/man.conf.man
new file mode 100644
index 0000000..66ee564
--- /dev/null
+++ b/man/de/man.conf.man
@@ -0,0 +1,43 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "30 Mar 1994"
+.SH NAME
+man.conf \- Konfigurationsdatei f�r man
+.SH BESCHREIBUNG
+.LP
+Diese Datei wird von
+.BR man (1)
+gelesen und enth�lt (a) Informationen dar�ber, wie der Such-Pfad f�r man
+aufgebaut wird, (b) den vollst�ndigen Namen (inclusive Pfad) von diversen
+Programmen wie nroff, eqn, tbl etc, die von man aufgerufen werden und (c)
+eine Liste mit Auspack-Programmen f�r Dateien mit speziellen Erweiterungen.
+Eine alternative Version dieser Datei benutzt werden mit
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+Die Programm-Namen k�nnen mit Optionen angegeben werden. N�tzliche Optionen
+f�r roff sind in grotty(1) beschrieben. Zum Beispiel k�nnte man statt
+des Default-Kommandos
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tascii
+.fi
+.RE
+.LP
+den Befehl
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tascii -P-u -P-b
+.fi
+.RE
+.LP
+verwenden, um Unterstreichungen und �berschreiben zu verhindern.
+.SH "SIEHE AUCH"
+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).
+
+
+
diff --git a/man/de/man.man b/man/de/man.man
new file mode 100644
index 0000000..57681d1
--- /dev/null
+++ b/man/de/man.man
@@ -0,0 +1,225 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" Translated into german by Jochen Hein ( Hein at Student.TU-Clausthal.de )
+.\" and Ralf W. Stephan ( ralf at franken.de ).
+.\"
+.TH man 1 "2. September 1995"
+.LO 1
+.SH NAME
+man \- Formatieren und Anzeigen von Seiten des Online-Handbuches (man pages)
+.br
+manpath \- Anzeigen des Benutzer-eigenen Suchpfades f�r Seiten des Online-Handbuches (man pages)
+.SH SYNTAX
+man [\-acdfhktw] [\-m system] [\-p string] [\-C config_file] [\-M path]
+[\-P pager] [\-S section_list] [section] name ...
+.SH BESCHREIBUNG
+.B man
+formatiert Seiten aus dem Online-Handbuch und zeigt diese an.
+Diese Version unterst�tzt die
+.B MANPATH
+und
+.B (MAN)PAGER
+Umgebungsvariablen, so da�
+Sie ihre eigenen man pages verwenden k�nnen und selbst w�hlen k�nnen, welches
+Programm die formatierten Seiten anzeigen soll. Wenn der Parameter
+.I section
+angegeben wird, so sucht
+.B man
+nur in dieser Sektion des Handbuchs.
+Sie k�nnen auch mit Hilfe von Kommando-Zeilen-Optionen oder Umgebungsvariablen
+die Reihenfolge angeben, in der die Sektionen nach
+Eintr�gen durchsucht werden und welche zus�tzlichen Programme
+die Quelltexte bearbeiten sollen.
+Wenn der Parameter
+.I name
+das Zeichen / enth�lt, dann wird zun�chst versucht, diese Datei zu
+bearbeiten. Damit k�nnen Sie z.B.
+.B "man ./foo.5"
+oder auch
+.B "man /cd/foo/bar.1.gz"
+eingeben.
+.SH OPTIONEN
+.TP
+.B \-\^C " config_file"
+bestimmt welche man.conf-Datei als Steuerdatei verwendet wird.
+.TP
+.B \-\^M " path"
+bestimmt eine Liste von Verzeichnissen, die nach Handbuch-Seiten durchsucht
+werden. Wenn diese Option nicht angegeben ist, so wird die Umgebungsvariable
+.B MANPATH
+benutzt. Ist diese Variable nicht gesetzt, so wird diese Liste aus der
+Datei man.conf erstellt.
+.TP
+.B \-\^P " pager"
+bestimmt welches Programm zur Anzeige der Handbuch-Seiten benutzt wird.
+Als default benutzt man
+.B @pager@
+Diese Option �berschreibt die Umgebungsvariable
+.B PAGER
+.TP
+.B \-\^S " section_list"
+ist eine durch Doppelpunkte getrennte Liste von Handbuch-Sektionen, die
+nach Handbuch-Seiten durchsucht werden soll.
+Diese Option �berschreibt die Umgebungsvariable
+.B MANSECT
+.TP
+.B \-\^a
+Als Default wird
+.B man
+beendet, nachdem es die erste Handbuchseite angezeigt
+hat, die gefunden wurde. Diese Option weist
+.B man
+an, alle Handbuch-Seiten anzuzeigen, die zu
+.B name,
+passen, nicht nur die erste.
+.TP
+.B \-\^d
+zeigt nicht die Handbuch-Seiten an, sondern gibt etliche Informationen
+zur Fehlersuche aus.
+.TP
+.B \-\^f
+ist �quivalent zu
+.BR whatis .
+.TP
+.B \-\^h
+gibt eine (einzeilige) Hilfe aus und beendet
+.BR man .
+.TP
+.B \-\^k
+ist �quivalent zu
+.BR apropos .
+.TP
+.B \-\^K
+Suche in *allen* Manualseiten nach dem angegebenen Schl�sselwort. Achtung:
+Die Suche dauert m�glicherweise sehr lange! Die Angabe der Sektion
+beschleunigt die Suche. (Als groben Richtwert f�r die Suche kann man
+ca. eine Minute f�r 500 Manualseiten ansetzen.)
+.TP
+.B \-\^m " system"
+bestimmt eine andere Menge von Handbuch-Seiten, die aufgrund des
+angegebenen System-Namen durchsucht werden sollen.
+.TP
+.B \-\^p " string"
+bestimmt die Abfolge von Pr�prozessoren, die vor nroff oder troff
+gestartet werden sollen. Nicht alle Installationen verf�gen �ber alle
+Pr�prozessoren. Einige der Pr�prozessoren und die daf�r verwendeten
+Buchstaben sind:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Diese Option �berschreibt die Umgebungsvariable
+.B MANROFFSEQ
+.TP
+.B \-\^t
+benutzt
+.B @troff@
+um die Handbuch-Seite zu formatieren und leitet die Ausgabe weiter nach
+.B stdout.
+Die Ausgabe von
+.B @troff@
+mu� m�glicherweise durch einen Filter weiterbearbeitet werden, bevor
+sie gedruckt werden kann.
+.TP
+.B \-\^w \fRor\fP \-\-path
+die Handbuchseiten werden nicht angezeigt, sondern die Fundorte der Seiten,
+die formatiert oder angezeigt w�rden. Wenn kein Argument angegeben wurde,
+wird die Liste der Verzeichnisse ausgegeben, die von
+.B man
+nach Handbuch-Seiten durchsucht werden. Wenn
+.B manpath
+ein Link zu man ist, dann ist "manpath" �quivalent zu "man --path".
+
+.SH ENVIRONMENT
+.TP
+.B MANPATH
+Wenn die Umgebungsvariable
+.B MANPATH
+gesetzt ist, dann wird dieser Wert als Suchpfad f�r Handbuch-Seiten
+verwendet.
+.TP
+.B MANROFFSEQ
+Wenn die Umgebungsvariable
+.B MANROFFSEQ
+gesetzt ist, dann wird dieser Wert benutzt um die Pr�prozessoren zu bestimmen,
+die aufgerufen werden sollen, bevor die Handbuch-Seite mit nroff oder troff
+bearbeitet wird. Standardm��ig werden Handbuch-Seiten durch den Tabellen
+Pr�prozessor bearbeitet bevor nroff gestartet wird.
+.TP
+.B MANSECT
+Wenn die Umgebungsvariable
+.B MANSECT
+gesetzt ist, dann bestimmt dieser Wert welche Handbuch-Sektionen durchsucht
+werden sollen.
+.TP
+.B MANWIDTH
+Wenn die Umgebungsvariable
+.B MANWIDTH
+gesetzt ist, dann beschreibt deren Wert die Breite auf der die
+Handbuch-Seite angezeigt werden soll. Ansonsten wird die Seite u.U.
+�ber die gesamte Breite des Bildschirmes gezogen.
+.TP
+.B PAGER
+Wenn die Umgebungsvariable
+.B PAGER
+gesetzt ist, so wird dieser Wert als Name des Programms benutzt, mit dem
+die Handbuch-Seiten angezeigt werden sollen. Standardm��ig wird
+.B @pager@
+verwendet.
+.TP
+.B LANG
+Wenn die Umgebungsvariable
+.B LANG
+gesetzt ist, gibt ihr Inhalt den Namen des Unterverzeichnisses
+an, wo zuerst nach der Handbuch-Seite gesucht werden soll.
+So zB bewirkt der Shell-Befehl `LANG=dk man 1 foo', da�
+.B man
+zuerst in ...dk/man1/foo.1 nach der Handbuchseite f�r 'foo' sucht, und
+wenn es dort nicht f�ndig wird, dann in ...man1/foo.1, wobei '...'
+ein Verzeichnis aus dem Suchpfad bedeutet.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Die Umgebungsvariablen
+.B NLSPATH
+und
+.B LC_MESSAGES
+(oder
+.B LANG
+falls erstere nicht existiert) spielen bei der Suche nach dem Message
+Katalog eine Rolle (englische Messages sind fest einkompiliert, daher
+ist auch kein Katalog f�r sie notwendig). Beachten Sie, da� auch
+Programme wie
+.B col(1),
+das von
+.B man
+aufgerufen wird, noch zus�tzliche Variablen wie LC_CTYPE benutzen.
+.TP
+.B PATH
+.B PATH
+wird bei der Konstruktion des vorgegebenen Suchpfades f�r Handbuchseiten
+verwendet.
+.TP
+.B SYSTEM
+.B SYSTEM
+wird verwendet, um einen alternativen Systemnamen herauszufinden
+(sinnvoll zusammen mit der
+.B \-m
+Option).
+.SH "SIEHE AUCH"
+apropos(1), whatis(1), less(1), groff(1).
+.SH BUGS
+Die
+.B \-t
+Option kann nur auf System verwendet werden, auf denen ein troff-Programm
+installiert ist.
diff --git a/man/de/whatis.man b/man/de/whatis.man
new file mode 100644
index 0000000..c632255
--- /dev/null
+++ b/man/de/whatis.man
@@ -0,0 +1,31 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" �bersetzt von Jochen Hein ( Hein at Student.TU-Clausthal.de )
+.\"
+.TH whatis 1 "Jan 5, 1991"
+.LO 1
+.SH NAME
+whatis \- durchsucht die whatis Datenbank nach vollst�ndigen Worten.
+.SH SYNTAX
+.BI whatis
+keyword ...
+.SH BESCHREIBUNG
+whatis durchsucht eine Reihe von Datenbank-Dateien, die kurze Beschreibungen
+von System-Kommandos enthalten, nach Schl�sselworten und zeigt das Ergebnis
+auf der Standard-Ausgabe an. Nur genaue Treffer werden angezeigt.
+
+Die whatis Datenbank wird mit dem Kommando @makewhatis@ erstellt.
+.SH "SIEHE AUCH"
+apropos(1), man(1).
diff --git a/man/el.txt b/man/el.txt
new file mode 100644
index 0000000..360f39a
--- /dev/null
+++ b/man/el.txt
@@ -0,0 +1 @@
+greek
diff --git a/man/el/apropos.man b/man/el/apropos.man
new file mode 100644
index 0000000..159b8d0
--- /dev/null
+++ b/man/el/apropos.man
@@ -0,0 +1,29 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\" �������� ��������� ��� �. ������������ ������� 2003
+.\"
+.TH apropos 1 " 15 ���������� 1991" "���������� ������" "������� ������"
+.LO 1
+.SH ONOMA
+apropos \- ������ �� ���� ��������� whatis ��� �������������
+.SH ������
+.BI apropos
+����-������ ...
+.SH ���������
+� ������ apropos ������ ��� ������ �������,
+�' ��� ������ ������� ������ ���������
+��� ��������� �������� ���������� ������� ����������,
+�� ��������� �� ���������� ��� ������ �����.
+.SH "����� ������"
+whatis(1), man(1).
diff --git a/man/el/hman.man b/man/el/hman.man
new file mode 100644
index 0000000..207bf33
--- /dev/null
+++ b/man/el/hman.man
@@ -0,0 +1,71 @@
+.\" Copyright (c) 1998 Andries 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.
+.\" �������� ��������� ��� �. ������������ edimitro at tee.gr, ������� 2003
+.TH hman 1 "19 ���������� 1998"
+.LO 1
+.SH �����
+hman \- �������� ���� ������������ ������� �����������
+.SH ������
+.B hman
+[ -P \fI�������������\fP ] [ -H \fI�����������_���������\fP ] [ \fI�������\fP ] \fI�����\fP
+.br
+.B hman
+[ -P \fI�������������\fP ] [ -H \fI�����������_���������\fP ] [ \fI�������\fP ] [ ��������� ]
+.SH ���������
+�� �������
+.B hman
+����� ��� ������� ���� �� man2html(1) ��� ��� ��������� �� �������� ��������
+������� ����������� ��� ������ ��������,
+��� �� ������� ��� ����� ��� ������������ ��� ���������� ���.
+� ����������� ������� ��
+.BR man (1)
+���� ������ ������ �� �������� �� ������ ����
+.B hman
+�� ���������
+.BR man .
+�� � �� ������ ������������� ����� � netscape,
+��� �� ������ ���,
+���� �� �������
+.B hman
+�� ����������� ��� ������ �' �����.
+
+.SH ��������
+.TP
+.B \-\^P " �������������"
+������������ �� ������������ (���� lynx, xmosaic, arena, chimera,
+netscape, amaya, ...) ��� �� ��������������.
+���� � ������� ���������� ��� ���������� �������������
+.BR MANHTMLPAGER .
+� ���������� ����� � ��-httpd ������ ���
+.BR lynx .
+.TP
+.B \-\^H " �����������_���������"
+������������ ��� ����� ���������� �� ����� ��� ������� �����������.
+���� � ������� ���������� ��� ���������� �������������
+.BR MANHTMLHOST .
+� ���������� �����
+.BR localhost .
+
+.SH ����������
+.TP
+.B MANHTMLPAGER
+� ��������������� �������������,
+��������� ��� �� ����� ����� ��� ���������� �������������.
+.TP
+.B MANHTMLHOST
+� ��������������� ����������� ���������,
+��������� ��� �� ����� ����� ��� ���������� �������������.
+
+.SH "����� ������"
+.BR man (1),
+.BR man2html (1),
+.BR arena (1),
+.BR lynx (1),
+.BR netscape (1),
+.BR xmosaic (1),
+.BR glimpse (1)
+
+http://www.mcom.com/newsref/std/x-remote.html
diff --git a/man/el/makewhatis.man b/man/el/makewhatis.man
new file mode 100644
index 0000000..2077f8b
--- /dev/null
+++ b/man/el/makewhatis.man
@@ -0,0 +1,109 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at 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.
+.\"
+.\" �������� ��������� �. ������������� edimitro at tee.gr ������� 2003
+.\"
+.TH MAKEWHATIS 8 "22 ���������� 1999" "���������� ������" "���������� ����������"
+.SH �����
+makewhatis \- ���������� ��� ������ ��������� whatis.
+.SH ������
+.BI "makewhatis [-u] [-v] [-w] [-s " �������� " ] [-c [" catpath "]] [" manpath "]"
+.SH ���������
+�
+.B makewhatis
+�������� ���� ��� ������� ����������� ��� ����������� ���� ���������
+.IR �������� " ��� " manpath " , "
+� ��� ���������������� ������� ��� ����������� ���� ���������
+.IR �������� " ��� " catpath " . "
+��� ���� ������,
+������ ��� ������ ��� ���� ��������� whatis�
+���� ������ ���������� ��� �� ����� ��� ������� ��� ��� ������� ���������,
+��� ���������� ��� ��� �����.
+� ��������� ���������,
+��������������� ��� ��������� ����� ��� ������� �����������.
+.LP
+�� �������� ������� ������������� ����������� ��� ��� �� ��������� �����,
+��� �
+.B makewhatis
+����������� ���� ����������� ����� ��� �������, �������, ����������, �������,
+��������� ��� ��������.
+.LP
+�� ��� ������� �� ������
+.I manpath
+���� ���������� ��� �����
+.I /usr/man
+�� �����������.
+.SH ��������
+.TP
+.B -u
+��������� ��� ������ ��������� �� ���� �������.
+.TP
+.B -v
+������ �� ���������� �����������.
+.TP
+.B -w
+����� ��� manpath ��� ���������� ��� ��� � man --path �.
+.TP
+.BI -s " �������� "
+������ ����
+.I ��������
+���
+.IR manpath " � "
+���
+.IR catpath " . "
+�� ���������� � �������,
+� ���� ��� ��������� ��� �����
+.I \'1 2 3 4 5 6 7 8 9 n l\'
+.TP
+.BI -c " catpath"
+���������� �� ���������������� ������� ��� ���������� ���
+.IR catpath " . "
+�� ���������� �� ������,
+���� ��������� ��� �����
+� ������ ��� ���� ������������ ���������� ������ ���
+.IR /usr/man/preformat " ��� " /usr/man ". "
+.SH ������������
+.PP
+��� �� ������������� ���� ��
+.IR /usr/X11R6/man/whatis " ��� " /usr/local/man/whatis
+���� ��� ������
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+��� �� ������������� ���� �� ������ ���������, ������������������� ��� ���
+�����������, �������� ��� �������� �����������
+���� ��� ������,
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH ��������
+�
+.B makewhatis
+���� �� ��� �� ���������� ���� ����,
+�� ������� ��������� �� �� ������������ troff macros,
+���� �� ������� Tcl/Tk.
+.PP
+.B makewhatis
+��� �������� �� ���������������� �����������.
+.SH ����� ������
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
diff --git a/man/el/man.conf.man b/man/el/man.conf.man
new file mode 100644
index 0000000..2517db9
--- /dev/null
+++ b/man/el/man.conf.man
@@ -0,0 +1,45 @@
+.\" @(#)man.conf
+.\" �������� ��������� �. ������������� edimitro at tee.gr ������� 2003
+.TH MAN.CONF 5 "30 ������� 1994" "���������� ������" "���������� �������"
+.SH �����
+man.conf \- ����������� ����������� ��� �� man
+.SH ���������
+.LP
+���� �� ������ ���������� ��� ��
+.BR man (1)
+��� ��������: (�) ����������� ��� �� ���������� ��� ��������� ���������� ��� man,
+(�) ��� ����� �������� ��� ������� ����������� ���� nroff, eqn, tbl ���.
+��� ���������������� ��� �� man,
+��� (�) ��� ����� �� ������������� ������� �� �������� ��������.
+��� ����������� ������ ����� ��� ������� ������ �� ������� �� ���
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+�� ������� ��� ������� ������ �� ������������� ��������.
+�������� �������� ��� nroff ������ �� ������� ��� ������ grotty(1).
+��� ������������,
+��� ���� ��� �������������� �������
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+������� ������ �� ������
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+���� �� ��������������� ������������� ��� �������� ����������.
+.SH ������
+.I "@man_config_file@"
+.SH "����� ������"
+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).
+
diff --git a/man/el/man.man b/man/el/man.man
new file mode 100644
index 0000000..1cae41c
--- /dev/null
+++ b/man/el/man.man
@@ -0,0 +1,491 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" �������� ��������� �. ������������� edimitro at tee.gr ������� 2003
+.\"
+.TH man 1 "2 ����������� 1995" "���������� ������" "������� ������"
+.LO 1
+.SH �����
+man \- ���������� �� ��������� ��� ������������ ������� �����������
+.br
+manpath \- ������������ �� �������� ���������� ������� ����������� ��� �� ������.
+.SH ������
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --�������� ]
+.RB [ \-m
+.IR ������� ]
+.RB [ \-p
+.IR ������������ ]
+.RB [ \-C
+.IR ������_����������� ]
+.RB [ \-M
+.IR �����_��������� ]
+.RB [ \-P
+.IR ����������� ]
+.RB [ \-S
+.IR �����_�������� ]
+.RI [ ������� ]
+.I "����� ..."
+
+.SH ���������
+�
+.B man
+���������� ��� ��������� ��� ������������ ������� �����������. �� ������� ���
+.IR �������
+�
+.B man
+������ ���� �' ���� ��� ������� ��� �����������.
+��
+.I �����
+����� �������� �� ����� ��� ������� �����������,
+��� ������� ����� �� ����� ���� �������, ���������� � �������.
+������ ����, �� ��
+.I �����
+�������� ���
+.RB ( / )
+���� �
+.B man
+�� ������ �� ����� �������, ����� ������� �� ������
+.B "man ./foo.5"
+� ��� �����
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+����� �������� ��� ��������� ��� �� ��� �
+.B man
+������ ��� ������ ������� �����������.
+
+.SH ��������
+.TP
+.B \-\^C " config_file"
+������������ �� ���� ����� ������ �����������
+� ���������� �����
+.BR @man_config_file@ .
+(�����
+.BR man.conf (5).)
+.TP
+.B \-\^M " ��������"
+������������ �� ����� ��� ��������� ���� ��������� ������� �����������.
+��������� ���� ���������� �� ��� ��� ���� �������. ��� ���� ����� ����� �� ����
+�� �� �� �� ������
+.B \-M
+�������.
+�����
+.BR "�������� ���������� ������� �����������".
+.TP
+.B \-\^P " �����������"
+������������ ����� ����������� �� ��������������.
+���� � ������� ���������� ��� ���������� �������������
+.B MANPAGER
+��� �� �� ����� ��� ���������� ��� ����������
+.BR PAGER .
+�� �����������,
+�
+.B man
+������������ ��
+.BR "@pager@" .
+.TP
+.B \-\^S " �����_��������"
+����� ��� ����� �������� ���� ��������� ������� ������������
+�� �������� ���������� ��� ��� ��� ���� �������.
+���� � ������� ���������� ��� ���������� �������������
+.BR MANSECT .
+.TP
+.B \-\^a
+�� �����������, �
+.B man
+�� ����������� ���� ��������� �� ����� ������ �����������
+��� �� ����. ��������������� ���� ��� �������, �
+.B man
+������������� �� ��������� ���� ��� ������� ����������� ��� ���������� �� ��
+.BR ����� ,
+��� ��� ���� �� ����� ������.
+.TP
+.B \-\^c
+��������������� �� ������ ����������,
+����� ��� �� ��������� ����������� ������ cat.
+���� ������ �� ����� ��������� �� � ������ cat
+���� ������������ ��� ��� ����� �� ����������� ������ ������,
+� �� � ���������������� ������
+����� ����������.
+.TP
+.B \-\^d
+��� ��������� ������� �����������,
+���� ��������� ����������� ��������������.
+.TP
+.B \-\^D
+���������
+.I ���
+�������
+.I ���
+����������� ��������������.
+.TP
+.B \-\^f
+��������� �� ���
+.BR whatis .
+.TP
+.BR \-\^F " � " \-\-preformat
+���������� ���� - ��� ���������.
+.TP
+.B \-\^h
+�������� ��������� �������� �� ��� ������ ��� ������.
+.TP
+.B \-\^k
+��������� �� ���
+.BR apropos .
+.TP
+.B \-\^K
+������ ��� ��� �������� ������������ �� *����* ��� ������� �����������.
+�������������: ���� ������� �� �������� �� ������!
+�� ������� ������� ���� ������� �� ��������.
+(��� �� ���� ���� ����, ��� �������� ��� ���� ������� ��� �����
+��� 500 ������� �����������.)
+.TP
+.B \-\^m " �������"
+������ ���� ������, ��� ����������� ������ ������� �����������
+��� ���������� ��� ������� �� �� �������� �����.
+.TP
+.B \-\^p " ������������"
+������ ��� ��������� ��� ��������������� ��� �� ������� ���� ��
+.B nroff
+�
+.BR troff .
+���� �� ������������� ��� ��������� ��� ������ ������ ���������������.
+������� ��������������� ��� �� �������� ��� ���� ������������� �����:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+���� � ������� ���������� ��� ���������� �������������
+.BR MANROFFSEQ .
+.TP
+.B \-\^t
+����� ���
+.B @troff@
+���� ����������� ��� ������� �����������,
+��������� ��� ����� ����
+.BR "������ �����" .
+� ������ ��� ��
+.B @troff@
+������ �� ������ �� ������� ��� ����� ������� ������� ���� ����������.
+.TP
+.B \-\^w \fR�\fP \-\-��������
+��� ��������� ��� ������� �����������, ���� ��������� ��(���) ���������(��) ���
+������� ��� �� ������������� � �����������. �� �� ����� ������:
+��������� (��� ������ �����) �� ����� ��� ��������� ��� ���������� ��� ��
+.B man
+��� ������� �����������. �� �
+.B manpath
+����� ������ ���� �� man,
+���� �manpath� ���������� �� �man --�������.
+.TP
+.B \-\^W
+���� � \-\^w, ���� �������� �������� �������, ��� ��� ������,
+����� �������������� �����������.
+���� ����� ������� �� ������� �������� ���� �
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH "������� CAT"
+� man �� ����������� �� �������� ��� �������������� ������� �����������,
+����� ���� �� ������������� ����� ������������
+��� ��� ������� ���� ��� �� ���������� ����� �� �������.
+������������, �������������� �������� ������� ���� DIR/manX
+����������� ���� DIR/catX, ��� ����� ������������ ��� man dir �� cat dir
+������� �� ������������� ��� ������
+.BR @man_config_file@ .
+���� � ������������ ��������� cat ��� ���������,
+���� ��� ����������� �� ������� cat.
+���� �� ������� cat ����� �������������� ��� ����� �������
+����������� ��� �� 80, ���� ������ ��� �����������.
+������� ������ cat ���������� �� �� ������ man.conf
+�������� �� ������ NOCACHE.
+.PP
+����� ������� �� ����� �
+.B man
+suid �� ��� ������ man. ����, �� ���� ��������� cat
+���� ��������� ��� man ��� ������ 0755 (�������� ���� ��� ��� man),
+��� �� ������ cat ����� ��������� ��� man ��� ������ 0644 � 0444
+(�������� ���� ��� ��� man,
+� ������� ���������� ��������),
+���� ������ ��������� ������� ������ �� �������
+��� ������� cat � �� ����������� ���� ������ ���� �������� cat. �� �
+.B man
+��� ���� ����� suid,
+���� ������ ���� ��������� cat �� ���� ������ 0777,
+����������� ���� �� ������� �� ����� �� ����������
+�� ����������� ���� ������� cat.
+.PP
+� �������
+.B \-c
+���������� ��� ���������������� ���� �������,
+����� ��� �� ��������� �������� ������ cat.
+
+
+.SH "�������� ���������� ������� �����������"
+�
+.B man
+������������ ��� ���������� ������ ���������� ������� ������� �����������,
+��������� ���� �������� ������ ��� ���� ���������� �������������,
+��� ������ �����������
+.B @man_config_file@
+��� �� ��������� ������������� ��������� ��� ��������������.
+.PP
+���' �����, ���� �� ������
+.I �����
+���
+.B man
+�������� ���
+.RB ( / ),
+���� �
+.B man
+�������� ��� ����� ��� ����� �������,
+��� �� �� ������ ��� ������� ����� ����������.
+.PP
+���� ��� �������� ��������� ���� ��
+.I �����
+��� �������� ���
+.RB ( / ),
+���� �
+.B man
+�������� �� ��� �������� ���������,
+��� ������ ��� �� �������� �� �����
+��� ������ ����������� �� �� ������������ �����.
+.PP
+�� ������ ��� �������
+.BI "-M " �����_���������
+����
+.I �����_���������
+����� ��� ����� ���������
+���������� ��� ��� ��� ���� ������� ��� ������ �
+.BR man .
+.PP
+�� ��� ��������������� ��� �������
+.B -M
+���� ������� �� ��������� �������������
+.B MANPATH
+���� � ���� ����� ��� ���������� ����� � ����� ���
+��������� ��� �
+.B man
+������.
+.PP
+�� ��� ������������� ��� ������������ ����� ��������� �� ��� �������
+.B -M
+�
+.BR MANPATH ,
+���� �
+.B man
+������� ��� ����� ��� ������ ���������� ��� ����������� ��� �������
+�����������
+.BR @man_config_file@ .
+� ������
+.B MANPATH
+��� ������ ����������� ������������ �������������� ����������
+��� �� �������������� ��� �������� ����������.
+.PP
+��������, �� ��������
+.B MANPATH_MAP
+���������� ��� �������� ���������� ������� �� �� �������� ��� ���������� �������
+(���. �� ��������� ������������� ���)
+.BR PATH .
+��� ���� �������� ��� ������ �� ��������� ��� �������� ����������
+�������, ��� ������
+.B MANPATH_MAP
+������������ ��� �������� ��� �� ������ �� ��������� ��� ��������
+���������� ��� ������ ������� �����������.
+�
+.B man
+������ ��� ���������
+.B PATH
+��� ��������� ���� ������������ ���������� ��� ��������
+���������� ������� ������� �����������. ����, �� �� ����� ����� ���
+.BR MANPATH_MAP ,
+���� ������ ��� ������
+.BR "man xyz",
+�������� ��� ������ ����������� ��� �� ��������� ��� �� ������
+�� ������ ��� ������
+.BR xyz .
+.PP
+��������, ��� ���� �������� ��� �������� ���������� ������� (��� �� ���
+���������� ��������� �������) ��� ��� �����
+.I ���
+����� ��� ������
+.B MANPATH_MAP
+�
+.B man
+��������� ������ ��� ��� �������� ������� ����������� ���� �����
+������ �' ��� ����������� ��� ����� ��� ��������� ������� �
+��� ������ �������� ��� ��������� �������.
+.PP
+������� �' ���������������� ��� ��������� ����������� ���� �����
+������������������ �� ������
+.B NOAUTOPATH
+��� ������
+.BR @man_config_file@ .
+.PP
+�� ���� ��������,
+��� �������� ���������� ���� ����������� ��������,
+�
+.B man
+������ ��� ��� ������ �� �����
+.IB ���� . �������\fR,
+�� ��� ����������� �������� ���� ������ ��������
+��� ������� �� ��� �������� ���������.
+�� �� ���� ������ ������,
+���� ������ �� ���� ����������� �� �����
+.BI man N
+�
+.BI cat N
+����
+.I N
+����� � ������� �������� ��� �����������.
+�� �� ������ ��������� �' ��� �����������
+.BI cat N,
+���� �
+.B man
+�������� ��� ��������� ��� ������ �������������� ������� ����������� (������ cat).
+�������� �
+.B man
+�������� ��� ����� ������������. �� ����� ����������, �� �� ����� ��� �������
+�������� ��� ������ �������� ��������� (���� �
+.BR .gz ),
+���� �
+.B man
+�������� ��� ����� ����������� �� �� ��������� gzip.
+.PP
+�� ������ �� ���� �� ��� (� ��) �
+.B man
+�� �� ���� �� ������ ����������� ��� ��� �������� ����,
+���� ������������� ��� �������
+.BR "--�������� " ( -w ).
+
+.SH ����������
+.TP
+.B MANPATH
+��� ���� ������� � ���������
+.B MANPATH
+���� �
+.B man
+�� ������������ �� �� �������� ���� ��������� ������� ������� �����������.
+� ��������� ���� ���������� ��� ������� �����������
+��� ��� ��������� ��������� ����������,
+��� ��������� ��� ��� �������
+.B -M
+�����
+.BR "�������� ���������� ������� �����������".
+.TP
+.B MANPL
+��� ���� ������� � ���������
+.B MANPL
+���� ��������������� � ���� ��� �� ����� ��� ������������� �������.
+��������, �������� � ������ ����������� �� ��������� ��� (�������) ������.
+.TP
+.B MANROFFSEQ
+��� ���� ������� � ���������
+.B MANROFFSEQ
+� ���� ��� ��������������� ��� �� ������ �� ������
+��� ��������������� ��� �� ������� ���� ��� ��
+.B nroff
+�
+.BR troff .
+�� �����������, �� ������� ������� ��� �����
+��� �������������� tbl ���� ��� ��
+.BR nroff .
+.TP
+.B MANSECT
+��� ���� ������� � ���������
+.B MANSECT
+� ���� ��� �������������� ��� �� ������
+����� �������� ��� ����������� �� ����������.
+.TP
+.B MANWIDTH
+��� ���� ������� � ���������
+.B MANWIDTH
+� ���� ��� ��������������� ��� �� ������ �� ������ ��������� ��� ������� �����������.
+�������� �� ������� ������ �� ����������� �' ��� �� ������ ��� ������ ���.
+.TP
+.B MANPAGER
+��� ���� ������� � ���������
+.B MANPAGER
+� ���� ��� ��������������� �� �� ����� ��� ������������ ��� �� �������������� ��� ��� ��������
+��� ������� �����������.
+��� ��� ���� �������, ���� ��������������� �
+.BR PAGER .
+��� ��� ���� ��� ���� ���� ���� ��������������� �
+.BR @pager@ .
+.TP
+.B LANG
+��� ���� ������� � ���������
+.B LANG
+� ���� ��� ������������ �� ����� ��� ������������ ���� � man
+������ ���' ����� ��� ������� �����������.
+����, � ������ �LANG=dk man 1 foo�
+�� ���������� �� man �� ����� ��� �� ������ �����������
+foo ��� .../dk/man1/foo.1,
+��� �� ��� ������ �� ���� ������ ������,
+���� ��� .../man1/foo.1,
+���� ... ����� ���� ��������� ��� �������� ����������.
+.TP
+.BR NLSPATH ", " LC_MESSAGES ", " LANG
+�� ���������� �������������
+.B NLSPATH
+���
+.B LC_MESSAGES
+(�
+.B LANG
+���� � ������� ��� ���������)
+������� ���� ���� ��������� ��� ��������� ���������.
+(��������� �� �������� ���� ������� ����� ����������������, ��� ��� �� �������
+��� ���������� ���������.)
+�������� ��� ����������� ���� ��
+.BR col(1)
+��� ��������� ��� �� man ������ ������ ����� ��� LC_CTYPE.
+.TP
+.B PATH
+� ���������
+.B PATH
+����� ���� ������ ��� ��������� ���������� ��� ������ ������� �����������.
+�����
+.BR "�������� ���������� ������� �����������" .
+.TP
+.B SYSTEM
+� ���������
+.B SYSTEM
+��������������� ��� �� ������ �� ������������� ����������� ������� (�����
+�� ��� �������
+.B \-m
+) .
+.SH "����� ������"
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
+.SH ��������
+� �������
+.B \-t
+�������� ���� �� ���� ���������� ��� ��������� ���� �� troff.
+.br
+�� ������� ������� \e255 � <AD> ���� ��� ������� ������,
+���� �LESSCHARSET=latin1� ��� ���������� ���.
+.SH �����
+�� ���������� �� ������
+
+(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+��� ������ ���
+.IR .emacs
+���� �������� F1 �� ������ �� ������ ����������� ��� �� ����� �����������
+��� ������� ��� �������� ���� ��� ������.
+.LP
+��� �� ������ ��� ���� ������� ���� ������� �����������, ����� �����a ��������
+� �������������, �������� ��
+
+ # man foo | col -b > foo.mantxt
+
diff --git a/man/el/man2html.man b/man/el/man2html.man
new file mode 100644
index 0000000..9aae819
--- /dev/null
+++ b/man/el/man2html.man
@@ -0,0 +1,157 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.\" �������� ��������� ��� �. ������������ edimitro at tee.gr, ������� 2003
+.\"
+.TH man2html 1 "1 ���������� 1998"
+.LO 1
+.SH �����
+man2html \- ���������� ��� ������ ����������� �� html
+.SH ������
+man2html [�������] [������]
+.SH ���������
+.B man2html
+���������� ��� ������ ����������� ���� ������� ���
+.I ������
+(� ���� ������ ������,
+�� ������ �� ������ �-� � ������ ������)
+��� �� ����������� ����� nroff �� html,
+�� ��������� �� ���������� ���� ������ �����.
+�������� ���������� ��� �������������� tbl ���� ��� ��� ��� eqn.
+� �������� ���� ���������� ������ ����� 0. �� ���� ���� ���� ������,
+����������� ��� ������ ����� ��� ������ ���������.
+������ �� �������������� �� ��������� ��������,
+���� ����������� ������ �� ������������,
+��� ��������� ����� ������� ��� �������� ���� �������
+����������� �� ��� ������������ html ���� ��
+.BR lynx (1),
+.BR xmosaic (1)
+�
+.BR netscape (1).
+./" (�����
+./" .BR man (1)
+./" ��� ����������� ��������� ���� ������� ����������� ���� ���
+./" .BR man2html .
+./" ������� ����� �� ������� "MANHTMLPAGER=/usr/bin/lynx"
+./" ��� ���������� ���.)
+
+�� ������ ������� ���
+.B man2html
+����� � ������ troff-to-html ��� Richard Verhoeven (rcb5 at win.tue.nl) ���
+��������� �������������� ��� ��� �������� �����:
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://string "method://string"
+www.host.name "http://www.host.name"
+ftp.host.name "ftp://ftp.host.name"
+name at host "mailto:name at host"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(� ����� ������ �� ��������� ���������� �� �������� - ����� ��������.)
+�� ������� ������� - �� ��������������� ��������� ��� ����� ���' ������ ��������.
+������ ������������� ��� ��������� �� ����������� �������������� ���� ��� �������� �����������,
+���� �� ����� ���������� �� ���� ������ �� ����� ���
+���� �� ����������� ������� ����������� ���� �
+.BR bash (1).
+
+.SH ��������
+���� ��� �������� ��� ��� ������ ������,
+��� ����� ������� �������� ��� �� ����� �� ��������� �������� �������.
+� ������� \-D ��������� �' ��� ������� �� ������ ��� �������� ��������.
+.LP
+.TP
+.B \-\^D �����_���������
+��������� �� ��� ��������� ������� ��� �� ����� ���������, ��� ����� ���
+\fIchdir\fP(\fIdir\fP) ���� ������� �� ���������.
+.LP
+� ������� \-E ��������� ��� ������ ���������� ��������� ������
+��� ��� ������� cgi.
+.LP
+.TP
+.B \-\^E ������������
+������ ��� ������ ��������� ��� �������� �� �������� ������ ���������.
+.LP
+� ������ ����� ���� ������������� �������������� ��� ��� ������ ����������� �����
+.LP
+<�������:����/��_cgi><����/��_man2html><����/����><������_man>
+.LP
+�� ���������� �� �������. �� ������� ����� ��� �������������
+����������� �� ��� �������� ��������.
+.TP
+.B \-\^h
+������ �� ������:��������_cgi �� http://localhost ��� ����� � ����������.
+.TP
+.BI \-\^H " �����������_���������[.���������_�����][:����]"
+������ �� ������:��������_cgi ��
+.RI http:// �����������_���������.���������_�����:���� .
+.TP
+.B \-\^l
+������ �� ������:��������_cgi ��
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+������ �� ������:��������_cgi ��
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " ��������_man2html"
+������ ���� ��������_man2html �� ��������������. � ���������� �����
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+������� ���������� �� �/�.
+.TP
+.B \-\^q
+������� ���������� �� �?�. ���� ����� � ����������.
+.TP
+.B \-\^r
+����� �������� ��������� html,
+���� ��� ��������� cgi-bin.
+.LP
+�' ��� �������� ��� ��� ������ ����
+.BR httpd ,
+������ �� �������������� ������ ��
+.B lynx
+��� �������� ���� ������� �����������,
+��������������� �� ������ lynxcgi.
+�� ������ ������� �������� http, ���� � lynx,
+� ������ ����� �������������,
+������ �� �������������� ��� �������� ���� ������� �����������,
+��������������� �� ������ http.
+� ������� \-l (��� �� � lynxcgi �) �������� ��� ����� �����.
+�� ���� ��� �����,
+� ������������� ��������_cgip ����� \fI/home/httpd\fP.
+
+�������, ��� ������� cgi ������ �� ������ ��� ��
+.LP
+<��������_����_��_�������>/<���_�����_��������>?<�������>
+.LP
+��� �� ���������� ������������� PATH_INFO ��� QUERY_STRING
+�� �������� �� <���_�����_��������> ��� <�������>, �����������.
+���� � lynxcgi ��� ������������ �� �� ����� PATH_INFO,
+������������ �������������� �� �� �?� �� ������������� ����������.
+� ������� \-p (��� �� � path �) �������� �� �/� �� ����������,
+��� � ������� \-q (��� �� � query �) �������� �� �?�.
+
+� ������� \-H \fI�����������_���������\fP,
+�� ������ �� ���������������� ���������� ���������
+(���� ��� \fIlocalhost\fP).
+��� ������� cgi �� �������� �� �������������� ��
+.IP
+man2html -H $SERVER_NAME
+.LP
+�� ���� ������� � ��������� SERVER_NAME.
+���� �� �������� ��� �������� ��� �� ���������� �� ������������,
+��� �� ������ ������� �����������.
+
+.SH ��������
+�������� ������ ��������������. � ������ ��� �� ����� ������� ������.
+� ������� lynxcgi �� �� �������� �� �� lynx ���� �������������� �����
+���������� �������. ������ �� �������� ���������� ���������.
+
+.SH "����� ������"
+.BR lynx (1),
+.BR man (1)
diff --git a/man/el/whatis.man b/man/el/whatis.man
new file mode 100644
index 0000000..6820f1c
--- /dev/null
+++ b/man/el/whatis.man
@@ -0,0 +1,31 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\" �������� ��������� �. ������������� edimitro at tee.gr ������� 2003
+.\"
+.TH whatis 1 "Jan 5, 1991" "���������� ������" "������� ������"
+.LO 1
+.SH �����
+whatis \- ������ �� ���� ��������� whatis ��� ������� ������.
+.SH ������
+.BI whatis
+����-������ ...
+.SH ���������
+� ������ whatis ������ ��� ������ �������,
+��� ������ ������� ������ ��������� ��� ��������� �������� ���������� ������� ����������,
+�� ��������� �� ���������� ���� ������ �����.
+������������ ���� ������� ������ ��� ����������.
+
+� ���� ��������� whatis ������������� ��� ������������ �� ��� ������ @makewhatis at .
+.SH "����� ������"
+apropos(1), man(1).
diff --git a/man/en.txt b/man/en.txt
new file mode 100644
index 0000000..97ab12f
--- /dev/null
+++ b/man/en.txt
@@ -0,0 +1 @@
+english
diff --git a/man/en/apropos.man b/man/en/apropos.man
new file mode 100644
index 0000000..9ad50ce
--- /dev/null
+++ b/man/en/apropos.man
@@ -0,0 +1,32 @@
+.\" 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 at 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 at acm.org> is the current maintainer.
+.SH "SEE ALSO"
+whatis(1), man(1).
diff --git a/man/en/makewhatis.man b/man/en/makewhatis.man
new file mode 100644
index 0000000..2108284
--- /dev/null
+++ b/man/en/makewhatis.man
@@ -0,0 +1,100 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at 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 at acm.org> is the current maintainer.
+.SH SEE ALSO
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
diff --git a/man/en/man.conf.man b/man/en/man.conf.man
new file mode 100644
index 0000000..811e6bd
--- /dev/null
+++ b/man/en/man.conf.man
@@ -0,0 +1,46 @@
+.\" @(#)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 "@man_config_file@"
+.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 at 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).
diff --git a/man/en/man.man b/man/en/man.man
new file mode 100644
index 0000000..eff2548
--- /dev/null
+++ b/man/en/man.man
@@ -0,0 +1,524 @@
+.\" 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 at 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 @man_config_file@ .
+(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 "@pager@" .
+.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 @browser@ ,
+.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 @htmlpager@ ,
+.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 @troff@
+to format the manual page, passing the output to
+.B stdout.
+The default output format of
+.B @troff@
+is Postscript, refer to the manual page of
+.B @troff@
+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 @man_config_file@ .
+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 @man_config_file@
+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 @man_config_file@ .
+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 @man_config_file@ .
+.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 @pager@
+is used.
+.TP
+.B BROWSER
+The name of a browser to use for displaying HTML manual pages. If
+it is not set, @browser@ is used.
+.TP
+.B HTMLPAGER
+The command to use for rendering HTML manual pages as text. If
+it is not set, @htmlpager@ 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 at acm.org> is the current maintainer.
+.SH "SEE ALSO"
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
diff --git a/man/en/whatis.man b/man/en/whatis.man
new file mode 100644
index 0000000..7793394
--- /dev/null
+++ b/man/en/whatis.man
@@ -0,0 +1,34 @@
+.\" 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 at 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 @makewhatis at .
+.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 at acm.org> is the current maintainer.
+.SH "SEE ALSO"
+apropos(1), man(1).
diff --git a/man/es.txt b/man/es.txt
new file mode 100644
index 0000000..924ac1f
--- /dev/null
+++ b/man/es.txt
@@ -0,0 +1 @@
+spanish
diff --git a/man/es/README b/man/es/README
new file mode 100644
index 0000000..70b2ef0
--- /dev/null
+++ b/man/es/README
@@ -0,0 +1,9 @@
+Man pages y msgs en castellano por Pablo Saratxaga <srtxg at f2219.n293.z2.fidonet.org>
+Inspiradas de las p�ginas portuguesas de Vitor Duarte <vad at fct.unl.pt>
+
+Fecha: Fri May 24 02:43:10 MET DST 1996
+
+Actualizaci�n de Benjam�n Albi�ana <benalb at escomposlinux.org>
+
+Fecha: vie abr 14 13:21:11 CEST 2006
+
diff --git a/man/es/apropos.man b/man/es/apropos.man
new file mode 100644
index 0000000..16374a4
--- /dev/null
+++ b/man/es/apropos.man
@@ -0,0 +1,41 @@
+.\"
+.\" Generated automatically from apropos.1.in by the
+.\" configure script.
+.\"
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traducido del portugu�s por Pablo Saratxaga <srtxg at f2219.n293.z2.fidonet.org>
+.\"
+.\" Traducci�n actualizada por Benjam�n Albi�ana <benalb at escomposlinux.org>
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "Septiembre 19 2005"
+.LO 1
+.SH NOMBRE
+apropos \- busca `cadenas' en la base de datos "whatis"
+.SH SINOPSIS
+.BI apropos
+palabra_clave ...
+.SH DESCRIPCI�N
+apropos busca el contenido de
+.B palabra_clave,
+en una base de datos que contiene breves descripciones de los comandos,
+mostrando todas las descripciones donde encontra una referencia a la clave.
+.SH AUTOR
+John W. Eaton fue el autor original de
+.BR "man" .
+Zeyd M. Ben-Halim lanz� man 1.2, y Andries Brouwer continu� con
+las versiones 1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> es el encargado actual.
+.SH "V�ASE TAMBI�N"
+whatis(1), man(1).
diff --git a/man/es/makewhatis.man b/man/es/makewhatis.man
new file mode 100644
index 0000000..7486660
--- /dev/null
+++ b/man/es/makewhatis.man
@@ -0,0 +1,108 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at pluto.linux.it>
+.\"
+.\" Traducido por Benjam�n Albi�ana <benalb at escomposlinux.org>
+.\"
+.\" 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 "Septiembre 19 2005"
+.SH NOMBRE
+makewhatis \- Crea la base de datos de whatis
+.SH SINOPSIS
+.BI "makewhatis [-u] [-v] [-w] [-s " secciones " ] [-c [" catpath "]] [" manpath "]"
+.SH DESCRIPCI�N
+.B makewhatis
+lee todas las p�ginas del manual contenidas en las
+.IR secciones " de " manpath
+dadas o de las p�ginas preformateadas contenidas en las
+.IR secciones " de " catpath
+dadas.
+Por cada p�gina, escribe una l�nea en la base de datos de whatis; cada
+l�nea contiene el nombre de la p�gina y una breve descripci�n,
+separadas por una gui�n. La descripci�n se obtiene del contenido de
+la secci�n NOMBRE de la p�gina del manual.
+.LP
+Ya que otros idiomas usan t�rminos diferentes para la secci�n NOMBRE,
+.B makewhatis
+reconoce los t�rminos equivalentes en checo, italiano, finland�s, franc�s,
+alem�n y espa�ol.
+.LP
+Si no se da el argumento
+.I manpath
+se asume por defecto
+.I /usr/man
+.SH OPCIONES
+.TP
+.B -u
+Actualiza la base de datos con p�ginas nuevas.
+.TP
+.B -v
+Salida prolija
+.TP
+.B -w
+Usa la ruta de `man --path`
+.TP
+.BI -s " secciones "
+Mira en las
+.I secciones
+de
+.IR manpath " o " catpaht.
+Si no existe la opci�n, se asume el valor
+.I \'1 2 3 4 5 6 7 8 9 n l\'
+.TP
+.BI -c " catpath"
+Se exploran la p�ginas del manual preformateadas en
+.I catpath
+Si no se da el argumento, se asume que ser� el primer directorio
+existente entre
+.IR /usr/man/preformat " y " /usr/man .
+.SH EJEMPLOS
+.PP
+Para rehacer s�lo
+.IR /usr/X11R6/man/whatis " y " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+Para reconstruir todas las bases de datos, incluyendo las traducciones
+al finland�s, franc�s e italiano
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH FALLOS
+.B makewhatis
+puede que no maneje bien p�ginas del manual hechas con macros troff
+no est�ndar, como las p�ginas de Tcl/Tk.
+.PP
+.B makewhatis
+no funciona con traducciones preformateadas
+.SH AUTOR
+John W. Eaton fue el autor original de
+.BR "man" .
+Zeyd M. Ben-Halim lanz� man 1.2, y Andries Brouwer continu� con
+las versiones 1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> es el encargado actual.
+.SH TRADUCCI�N
+Benjam�n Albi�ana, 2006
+.SH V�ASE TAMBI�N
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
+
+
+
diff --git a/man/es/man.conf.man b/man/es/man.conf.man
new file mode 100644
index 0000000..0ed0772
--- /dev/null
+++ b/man/es/man.conf.man
@@ -0,0 +1,55 @@
+.\"
+.\" Generated automatically from man.conf.5.in by the
+.\" configure script.
+.\"
+.\" @(#)man.conf
+.\" Traducido del portugu�s por Pablo Saratxag <srtxg at f2219.n293.z2.fidonet.org>
+.\"
+.\" Traducci�n actualizada por Benjam�n Albi�ana <benalb at escomposlinux.org>
+.\"
+.TH MAN.CONF 5 "Septiembre 19, 2005"
+.SH NOMBRE
+man.conf \- fichero de configuraci�n para el comando man
+.SH DESCRIPCI�N
+.LP
+Este fichero es leido por
+.BR man (1)
+y contiene: (a) informaci�n para obtener la ruta de b�squeda de las
+p�ginas (manpath); (b) nombres completos
+de varios programas como nroff, eqn, tbl, etc. usados por man; (c) una lista
+de descompresores de ficheros con determinadas extensiones. Se puede indicar
+un fichero alternativo con
+.LP
+.RS
+man -C fich_config ...
+.RE
+.LP
+Los nombres de comandos pueden ser indicados con opciones.
+Las opciones �tiles para nroff se pueden encontrar en grotty(1).
+Por ejemplo, en vez de la l�nea
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+se puede usar
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+para suprimir subrayados y car�cteres en negrita.
+.SH AUTOR
+John W. Eaton fue el autor original de
+.BR "man" .
+Zeyd M. Ben-Halim lanz� man 1.2, y Andries Brouwer continu� con
+las versiones 1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> es el encargado actual.
+.SH V�ASE TAMBI�N
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) e compress(1), gzip(1).
+
diff --git a/man/es/man.man b/man/es/man.man
new file mode 100644
index 0000000..b16b55b
--- /dev/null
+++ b/man/es/man.man
@@ -0,0 +1,240 @@
+.\"
+.\" 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.
+.\" Traducido del portugu�s por Pablo Saratxaga <srtxg at f2219.n293.z2.fidonet.org>
+.\" La secci�n "p�ginas formatadas" ha sido tomada de la version francesa de
+.\" esta p�gina de manual, traducida por Ren� Cougnenc.
+.\"
+.\" Traducci�n actualizada por Benjam�n Albi�ana <benalb at escomposlinux.org>
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.TH man 1 "Septiembre 19 2005"
+.LO 1
+.SH NOMBRE
+man \- da formato y muestra las p�ginas del manual en l�nea
+.br
+manpath \- determina la ruta de b�squeda inicial
+.SH SIN�PSIS
+man [\-acdfhktw] [\-m sistema] [\-p cadena] [\-C fich_config] [\-M ruta]
+[\-P paginador] [\-S lista_sec] [secci�n] nombre ...
+.SH DESCRIPCI�N
+.B man
+da formato y muestra las p�ginas del manual en l�nea. Esta versi�n reconoce
+las variables de entorno (environment)
+.B. MANPATH
+y
+.B (MAN)PAGER
+(ver m�s adelante).
+Si se indica la
+.I secci�n
+,
+.B man
+buscar� �nicamente en ella.
+Es tambi�n posible indicar el orden de b�squeda en la secciones
+y que preprocesamiento efectuar con los manuales, por medio de opciones en la
+l�nea de comando o con variables de entorno.
+Si el
+.I nombre
+contiene el car�cter `/' tratar� primero un fichero con ese nombre, permitiendo
+hacer
+.B "man ./foo.5"
+o tambi�n
+.B "man /cd/foo/bar.1.gz"
+para dar formato y ver un fichero en particular.
+.SH OPCIONES
+.TP
+.B \-\^C " fich_config"
+Indica el fichero de configuraci�n a usar; por defecto se usar�
+/etc/man.conf. (Ver man.conf(5).)
+.TP
+.B \-\^M " ruta"
+Indica la lista de directorios donde buscar los manuales.
+Sin esta opci�n se utilizar� la variable
+.B MANPATH.
+Si esta variable tampoco estuviera definida, se obtendr� una lista
+consultando /etc/man.conf. Un directorio vac�o en MANPATH
+representa la lista anterior.
+.TP
+.B \-\^P " paginador"
+Indica que paginador/visualisador usar. Sin esta opci�n tratar�
+de consultar la variable
+.B PAGER.
+Normalmente, man usar�
+.B /usr/bin/less -is.
+.TP
+.B \-\^S " lista_sec"
+Da la lista de secciones (separadas por `:') donde buscar y en que
+orden. Esta opci�n tiene prioridad sobre la variable
+.B MANSECT.
+.TP
+.B \-\^a
+Normalmente man muestra el primer manual que encuentra. Esta opci�n
+le permite mostrar todas las p�ginas de manual encontradas para la entrada
+.B nombre.
+.TP
+.B \-\^d
+No muestra el manual, sino informaci�n para la depuraci�n de errores.
+.TP
+.B \-\^f
+Equivalente a
+.B whatis.
+.TP
+.B \-\^h
+Muestra un breve mensaje de ayuda.
+.TP
+.B \-\^k
+Equivalente a
+.B apropos.
+.TP
+.B \-\^m " sistema"
+Indica un conjunto de manuales diferentes aplicables al sistema indicado.
+.TP
+.B \-\^p " cadena"
+Especifica una secuencia de preprocesadores a usar antes de nroff o
+troff (los formateadores). Algunas instalaciones de Linux pueden no tener todos los
+preprocesadores. Algunos preprocesadores y las letras a usar para
+indicarlos son:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Esta opci�n tiene proridad sobre la variable
+.B MANROFFSEQ.
+.TP
+.B \-\^t
+Usar
+.B /usr/bin/groff -Tps -mandoc
+para dar formato a las p�ginas de manual, efectu�ndose la salida por
+.B stdout
+Puede ser necesario procesar la salida de este comando con otros filtros
+para poder visualizarla o imprimirla.
+.TP
+.B \-\^w \fRo\fP \-\-path
+No muestra las p�ginas de manual, sino la(s) localizaci�n(es) de los
+ficheros que se hubieran formateado y mostrado, para la entrada de
+.B nombre
+indicado. Si no se da ninguna otra opci�n muestra la lista de
+directorios que ser�an recorrido por .B man
+durante la b�squeda. Si
+.B manpath
+es un enlace a man, entonces "manpath" equivale a "man --path".
+.B \-\^W
+Como \-\^w, pero muestra los nombres de ficheros, uno por linea, sin ninguna
+otra informaci�n. Muy �til en comandos shell del estilo:
+.ft CW
+man -aW man | xargs ls -l
+.ft
+.SH "P�GINAS FORMATEADAS"
+Con el fin de ganar tiempo,
+.B man
+trata de guardar la p�ginas formateadas
+en vez de interpretarlas cada vez que se las pide.
+Tradicionalmente, las versiones formateadas de las p�ginas de REP/manX son
+guardadas en REP/catX, pero se pueden indicar otras correspondencias
+entre los directorios man y cat en el fichero /etc/man.conf. Si el
+directorio �\%cat\%� correspondiente no existe, no se guardar�n las
+p�ginas formateadas.
+Es posible hacer a
+.B man
+suid para un usuario man. En este caso, si un directorio cat pertenece
+a man, y tiene el modo 0755 (�nicamente man tiene permisos de escritura),
+y los ficheros cat pertenecen tambi�n a man y tiene el modo 0644 � 0444 (s�lo
+mana tiene permisos de escritura, o nadie los tiene), ning�n usuario normal
+podr� cambiar las p�ginas formateadas o a�adir ficheros al directorio
+correspondiente. Si
+.B man
+no es suid, los directorios cat deber�n tener el modo 0777 para que todo
+usuario pueda dejar el resultado de los formateos efectuados durante las
+consutlas del manual.
+.LP
+La opci�n -c fuerza el reformateo de una p�gina, aunque ya exista un fichero
+cat m�s reciente que el fichero fuente.
+
+.SH ENTORNO
+.TP
+.B MANPATH
+Si se ha definido
+.B MANPATH
+se usar� su valor como lista de directorios (manpath) donde pueden estar
+las entradas del manual.
+.TP
+.B MANROFFSEQ
+Si se ha definido
+.B MANROFFSEQ
+su valor determinar� los preprocesadores a aplicar
+antes de nroff o troff. Normalmente, las p�ginas de manual, son
+preprocesadas por tbl antes de nroff.
+.TP
+.B MANSECT
+Si se ha definido
+.B MANSECT
+su valor indicar� las secciones a recorrer.
+.TP
+.B PAGER
+Si se ha definido
+.B PAGER
+su valor indicar� el programa a usar para mostrar el manual.
+Normalmente usar�
+.B /usr/bin/less -is.
+.TP
+.B LANG
+Si se ha definido
+.B LANG
+su valor indicar� el nombre del subdirectorio donde
+.B man
+comenzar� la b�squeda de las p�ginas de manual. Por ejemplo, el comando
+�\%LANG=es man 1 pepe\%� tendr� como efecto de hacer una b�squeda de la p�gina
+pepe en .../es/man1/pepe.1, y si ese fichero no existe,
+en .../man1/pepe.1, ( ... indica un directorio en la ruta de b�squeda).
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Las variables de entorno
+.B NLSPATH
+y
+.B LC_MESSAGES
+(o
+.B LANG
+cuando LC_MESSAGES no existe)
+juegan un papel en la localizaci�n del cat�logo de mensajes.
+N�tese que los programas como col(1) que son llamados por
+.B man,
+tambi�n utilizan LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+se utiliza para la construcci�n de la ruta de b�squeda por omisi�n.
+.TP
+.B SYSTEM
+.B SYSTEM
+se emplea para obtener los sistemas alternativos por omisi�n (en vista del
+uso de la opci�n
+.B \-m
+).
+.SH AUTOR
+John W. Eaton fue el autor original de
+.BR "man" .
+Zeyd M. Ben-Halim lanz� man 1.2, y Andries Brouwer continu� con
+las versiones 1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> es el encargado actual.
+.SH "V�ASE TAMBI�N"
+apropos(1), whatis(1), less(1), groff(1).
+.SH BUGS
+.B \-t
+solo funciona si existe un programa troff o equivalente.
+.SH TRADUCCI�N
+Pablo Saratxaga, 1996. A partir de la p�gina en portugu�s de
+Vitor Duarte y la p�gina en franc�s de Ren� Cougnenc.
+
+Actualizaci�n de Benjam�n Albi�ana, 2006.
diff --git a/man/es/whatis.man b/man/es/whatis.man
new file mode 100644
index 0000000..aadf696
--- /dev/null
+++ b/man/es/whatis.man
@@ -0,0 +1,43 @@
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "Septiembre 19 2005"
+.LO 1
+.SH NOMBRE
+whatis \- busca palabras en una base de datos propia
+.SH SINOPSIS
+.BI whatis
+palabra_clave ...
+.SH DESCRIPCI�N
+whatis busca el contenido de
+.B palabra_clave,
+en una base de datos que contiene breves descripciones de los comandos,
+mostrando todas las descripciones que contienen una palabra id�ntica (
+una palabra completa).
+
+La base de datos de "whatis" se crea con el comando /usr/sbin/makewhatis
+.SH AUTOR
+John W. Eaton fue el autor original de
+.BR "man" .
+Zeyd M. Ben-Halim lanz� man 1.2, y Andries Brouwer continu� con
+las versiones 1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> es el encargado actual.
+.SH V�ASE TAMBI�N
+apropos(1), man(1).
+
+
diff --git a/man/fi.txt b/man/fi.txt
new file mode 100644
index 0000000..b864848
--- /dev/null
+++ b/man/fi.txt
@@ -0,0 +1 @@
+finnish
diff --git a/man/fi/apropos.man b/man/fi/apropos.man
new file mode 100644
index 0000000..fcca5be
--- /dev/null
+++ b/man/fi/apropos.man
@@ -0,0 +1,26 @@
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Translated into Finnish by Raimo Koski <rkoski at pp.weppi.fi>
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "Tammi 15, 1991"
+.LO 1
+.SH NIMI
+apropos \- etsi whatis-tietokannasta merkkijonoja
+.SH YLEISKATSAUS
+.BI apropos
+avainsana ...
+.SH KUVAUS
+apropos etsii avainsanoja tietokannoista, joissa on lyhyet kuvaukset j�rjestelm�n komennoista ja n�ytt�� tulokset vakiotulosteessa.
+.SH "KATSO MY�S"
+whatis(1), man(1).
diff --git a/man/fi/man.conf.man b/man/fi/man.conf.man
new file mode 100644
index 0000000..b00e824
--- /dev/null
+++ b/man/fi/man.conf.man
@@ -0,0 +1,39 @@
+.\" @(#)man.conf
+.\" Translated into Finnish by Raimo Koski <rkoski at pp.weppi.fi>
+.TH MAN.CONF 5 "30 Maaliskuu 1994"
+.SH NIMI
+man.conf \- man-ohjelman konfigurointitiedot
+.SH KUVAUS
+.LP
+T�m�n tiedoston lukee
+.BR man (1)
+ja siin� on (a) tiedot, miten man:n hakupolku muodostetaan,
+(b) t�ydet nimet polkuineen ohjelmielle, kuten nroff, eqn, tbl jne. joita man k�ytt��
+ja (c) lista purkuohjelmista, joilla annetun tiedostop��tteen tiedostot voidaan purkaa.
+Vaihtoehtoinen versio t�st� tiedostosta voidaan ottaa k�ytt��n komennolla
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+Komentojen nimille voidaan antaa optioita. K�ytt�kelpoiset optiot nroff-ohjelmalle l�ytyv�t sivulta grotty(1).
+Esimerkiksi oletusrivin
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+sijasta voidaan m��ritell�
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+jotta alle- ja yliviivaus estet��n.
+.SH "KATSO MY�S"
+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).
diff --git a/man/fi/man.man b/man/fi/man.man
new file mode 100644
index 0000000..a8417e4
--- /dev/null
+++ b/man/fi/man.man
@@ -0,0 +1,286 @@
+.\" From rkoski at pp.weppi.fi Sun Jun 28 12:50:44 1998
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" Translated into Finnish by Teppo Kankaanp�� (photon at clinet.fi)
+.\" Proofread by Raimo Koski (rkoski at pp.weppi.fi)
+.\" Reconstructed man.man from man.1 - aeb
+.\"
+.\" TERM man_page man-sivu N�in se oli sotin sivuillakin..
+.\" TERM manual_page ohjesivu
+.\" TERM section osasto Osasto kuvaa melko hyvin manin luonnetta
+.\" TERM pager n�ytinohjelma Tulee ihan IBM ja sen n�yttimet mieleen...
+.\" TERM debugging_info,debugging_information debuggaustiedot
+.\" TERM preprocessor esik�sittelyohjelma,esik�sittelij� Mik� olisi parempi?
+.\" TERM message_catalog viestikirjasto
+.\" TERM search_path hakupolku
+.\" TERM owner_mode k�ytt�oikeudet
+.\" TERM suid suid
+.\" TERM arguments parametrit
+.\"
+.TH MAN 1 "4. Kes�kuuta 1998" "Linux" "K�ytt�j�n sovellusohjelmat"
+.LO 1
+.SH NIMI
+man \- muotoile ja n�yt� on-line -ohjesivuja
+.br
+manpath \- m��rit� k�ytt�j�n hakupolku man-sivuihin
+.SH "YLEISKATSAUS"
+man [\-acdfhkKtwW] [\-m j�rjestelm�] [\-p merkkijono] [\-C konfiguraatiotiedosto] [\-M polku]
+[\-P selausohjelma] [\-S sektiolista] [sektio] nimi ...
+.SH KUVAUS
+.B man
+muotoilee ja n�ytt�� on-line -ohjesivuja. T�m� versio tuntee
+ymp�rist�muuttujat
+.B MANPATH
+ja
+.BR "(MAN)PAGER" ,
+joten sinulla voi olla oma(t) kokoelmasi man-sivuja ja voit valita mink� tahansa
+ohjelman n�ytt�m��n muotoillut sivut. Jos
+.I sektio
+on annettu,
+.B man
+etsii sivuja vain siit� sektiosta.
+Voit my�s m��ritell�, miss� j�rjestyksess� sektiot l�pik�yd��n
+sivuja haettaessa ja mink� esik�sittelyohjelmien l�pi l�hdetiedostot
+ajetaan, joko komentorivioptioiden tai ymp�rist�muuttujien avulla.
+Jos
+.I nimi
+sis�lt�� / -merkin, yritet��n se ensin k�sitell� tiedostonimen�,
+joten voit kirjoittaa
+.B "man ./foo.5"
+tai vaikkapa
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.SH OPTIOT
+.TP
+.B \-\^C " config_file"
+M��rittele k�ytett�v� man.conf -tiedosto. Oletus on
+.BR @man_config_file@ .
+(Katso
+.BR man.conf (5).)
+.TP
+.B \-\^M " polku"
+M��rittele hakemistolista, joista man-sivuja etsit��n.
+Jos optiota ei k�ytet�, katsotaan lista ymp�rist�muuttujasta
+.BR MANPATH .
+Jos t�llaista ymp�rist�muuttujaa ei l�ydy, oletuslista haetaan
+tiedostosta
+.BR @man_config_file@ .
+Jos
+.B MANPATH
+sis�lt�� tyhj�n merkkijonon, k�ytet��n my�s t�ll�in oletuslistaa.
+.TP
+.B \-\^P " pager"
+M��rittele, mill� ohjelmalla sivuja katsotaan.
+T�m� optio kumoaa
+.BR MANPAGER "-ymp�rist�muuttujan"
+vaikutuksen, joka taas l�ytyess��n kumoaa
+.BR PAGER "-ymp�rist�muuttujan"
+vaikutuksen. Oletuksena
+.B man
+k�ytt�� komentoa
+.BR @pager@ .
+.TP
+.B \-\^S " sektiolista"
+Sektiolista on kaksoispisteill� eroteltu lista sektioista, jotka
+k�yd��n l�pi sivua haettaessa. T�m� optio kumoaa
+.BR MANSECT "-ymp�rist�muuttujan"
+vaikutuksen.
+.TP
+.B \-\^a
+Oletuksena
+.B man
+lopettaa toimintansa n�ytetty��n ensimm�isen l�yt�m�ns�
+man-sivun. T�t� optiota k�ytt�m�ll�
+.B man
+pakotetaan n�ytt�m��n
+.I kaikki
+t�sm��v�t man-sivut.
+.TP
+.B \-\^c
+Uudelleenmuotoile l�hteen� oleva man-sivu, vaikka p�ivitetty cat-sivu
+l�ytyisi. T�m� voi olla k�yt�nn�llist�, jos cat-sivu muotoiltiin
+n�yt�lle, jolle mahtuu eri m��r� kirjaimia.
+.TP
+.B \-\^d
+�l� n�yt� itse man-sivua, vaan vain debuggaustiedot.
+.TP
+.B \-\^D
+N�yt� sek� sivu ett� debuggaustiedot.
+.TP
+.B \-\^f
+Vastaa komentoa
+.BR whatis .
+.TP
+.B \-\^h
+N�yt� vain pieni ohje ohjelman k�yt�st�.
+.TP
+.B \-\^k
+Vastaa komentoa
+.BR apropos .
+.TP
+.B \-\^K
+Etsi m��ritelty� merkkijonoa *kaikista* man-sivuista. Varoitus:
+t�m� on todenn�k�isesti hyvin hidasta! Sektion m��rittely auttaa.
+(Omalla koneellani etsint� kest�� minuutin 500 man-sivua kohden)
+.TP
+.B \-\^m " j�rjestelm�"
+M��rittele etsitt�v�ksi vaihtoehtoinen kokoelma man-sivuja,
+pohjautuen annettuun j�rjestelm�nimeen.
+.TP
+.B \-\^p " merkkijono"
+M��rittele esik�sittelij�iden lista, jotka ajetaan ennen
+.BR nroff ":ia"
+tai
+.BR troff ":ia."
+Kaikkiin j�rjestelmiin ei ole asennettu kaikkia esik�sittelyohjelmia.
+Jotkin n�ist� ja niit� vastaavista kirjaimista ovat
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v) ja refer (r).
+T�m� optio kumoaa
+.BR MANROFFSEQ "-ymp�rist�muuttujan"
+vaikutuksen.
+.TP
+.B \-\^t
+K�yt� komentoa
+.B @troff@
+man-sivun muotoiluun ja ohjaa tuloste
+.BR vakiotulosteeseen .
+T�m� tuloste saatetaan joutua ohjaamaan jonkin filtterin l�pi ennen
+tulostamista.
+.TP
+.B \-\^w \fRtai\fP \-\-path
+�l� n�yt� man-sivuja, mutta n�yt� sijainnit sivuille, jotka
+muotoiltaisiin tai n�ytett�isiin. Jos mit��n parametria ei anneta,
+tulostetaan (vakiotulosteeseen) lista hakemistoista, joista
+.B man
+etsisi sivuja. Jos
+.B manpath
+on linkitetty man-ohjelmaan, vastaa "manpath" samaa, kuin "man --path".
+.TP
+.B \-\^W
+Kuten \-\^w, mutta tulosta jokainen tiedostonimi omalle rivilleen ilman
+mit��n lis�tietoja. T�m� on hy�dyllinen komennoissa, kuten
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH CAT-SIVUT
+Man yritt�� tallentaa muotoillut man-sivut s��st��kseen
+muotoiluun kuluneen ajan seuraavalla kerralla, kun n�it�
+sivuja tarvitaan. Perinteisesti muotoillut sivut .../manX:st�
+on tallennettu .../catX:��n (... on hakupolku), mutta
+.BR @man_config_file@ ":issa"
+voidaan s��t�� jokin muu hakemistosijoittelu.
+Jos tarvittavaa cat-hakemistoa ei l�ydy, ei cat-sivuja tallenneta.
+.PP
+On mahdollista asettaa
+.BR man "in"
+suid:ksi k�ytt�j� man. Jos man omistaa cat-hakemiston, jonka
+k�ytt�oikeudet ovat 0755 (vain man-k�ytt�j�n
+kirjoitettavissa) ja cat-tiedostojen k�ytt�oikeudet ovat 0644 tai 0444
+(vain man-k�ytt�j�n
+tai ei kenenk��n kirjoitettavissa), ei tavallinen k�ytt�j� voi
+muuttaa cat-sivuja tai laittaa muita tiedostoja cat-hakemistoon.
+Jos
+.BR man "ille"
+ei ole m��ritelty suidia, silloin cat-hakemiston
+k�ytt�oikeuksien pit�isi olla 0777,
+jolloin jokainen k�ytt�j� voisi j�tt�� cat-sivuja sinne.
+.PP
+Optio
+.B \-c
+pakottaa muotoilemaan sivun uudelleen, vaikka uusi cat-sivu l�ytyisikin.
+.SH YMP�RIST�MUUTTUJAT
+.TP
+.B MANPATH
+Jos
+.B MANPATH
+on asetettu, sen arvoa k�ytet��n polkuna man-sivuja etsitt�ess�.
+.TP
+.B MANROFFSEQ
+Jos
+.B MANROFFSEQ
+on asetettu, sen arvoa k�ytet��n m��rittelem��n esik�sittelij�t,
+jotka ajetaan ennen
+.BR nroff "ia"
+tai
+.BR troff "ia."
+Oletuksena sivut ajetaan
+tbl(1)-esik�sittelij�n l�pi ennen
+.BR nroff "ia."
+.TP
+.B MANSECT
+Jos
+.B MANSECT
+on asetettu, sen arvoa k�ytet��n m��rittelem��n, mist� sektioista
+sivuja etsit��n.
+.TP
+.B MANWIDTH
+Jos
+.B MANWIDTH
+on asetettu, sen arvo kertoo leveyden, jolla sivut n�ytet��n ruudulla.
+Muuten sivut n�ytet��n koko ruudun levyisin�.
+.TP
+.B MANPAGER
+Jos
+.B MANPAGER
+on asetettu, sen arvo kertoo ohjelman nimen, jota k�ytet��n man-sivujen
+esitt�miseen. Muuten k�ytet��n ymp�rist�muuttujaa
+.BR PAGER .
+Jos sit�k��n ei ole asetettu, k�ytet��n komentoa
+.BR @pager@ .
+.TP
+.B LANG
+Jos
+.B LANG
+on asetettu, sen arvo m��rittelee alihakemiston nimen, mist�
+man etsii ensin sivuja. Niinp� komento 'LANG=fi man 1 foo'
+saa manin etsim��n ensin sivua .../fi/man1/foo.1.
+Jos t�t� ei l�ydy, etsii man sivua .../man1/foo.1.
+Merkit ... tarkoittavat hakupolkua.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Ymp�rist�muuttujat
+.B NLSPATH
+ja
+.B LC_MESSAGES
+(tai
+.BR LANG ,
+jos j�lkimm�ist� ei ole asetettu) kertovat k�ytett�v�n viestikirjaston.
+(Englanninkieliset viestit on k��nnetty ohjelman sis��n,
+joten ne eiv�t tarvitse erillist� viestikirjastoa.)
+Huomaa, ett� man saattaa k�ytt�� ohjelmia, kuten col(1), jotka
+k�ytt�v�t my�s esimerkiksi muuttujaa LC_CTYPE.
+.TP
+.B PATH
+.BR PATH ":ia"
+k�ytet��n muodostamaan oletushakupolkua man-sivuille.
+.TP
+.B SYSTEM
+.B SYSTEM "-ymp�rist�muuttujaa"
+k�ytet��n vaihtoehtoisen j�rjestelm�n oletusnimeksi (optiota
+.B \-m
+k�ytett�ess�).
+.SH BUGIT
+Optio
+.B \-t
+toimii vain, jos troffin kaltainen ohjelma on asennettu.
+.br
+Jos n�et tavuviivojen tilalla vilkkuvan \e255:n tai <AD>:n,
+aseta ymp�rist�muuttuja 'LESSCHARSET=latin1'.
+.SH "KATSO MY�S"
+apropos(1) whatis(1) less(1) groff(1).
+
+
diff --git a/man/fi/whatis.man b/man/fi/whatis.man
new file mode 100644
index 0000000..449c845
--- /dev/null
+++ b/man/fi/whatis.man
@@ -0,0 +1,28 @@
+.\" Man page for whatis
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Translated into Finnish by Raimo Koski <rkoski at pp.weppi.fi>
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "Tammikuun 5, 1991"
+.LO 1
+.SH NIMI
+whatis \- etsii whatis-tietokannasta kokonaisia sanoja.
+.SH YLEISKATSAUS
+.BI whatis
+avainsana ...
+.SH KUVAUS
+whatis etsii avainsanoja tietokannoista, joissa on lyhyet kuvaukset j�rjestelm�n komennoista ja n�ytt�� tulokset vakiotulosteessa. Vain l�ytyneet kokonaiset sanat n�ytet��n.
+
+Whatis-tietokanta luodaan komennolla @makewhatis at .
+.SH "KATSO MY�S"
+apropos(1), man(1).
diff --git a/man/fr.txt b/man/fr.txt
new file mode 100644
index 0000000..4836cc2
--- /dev/null
+++ b/man/fr.txt
@@ -0,0 +1 @@
+french
diff --git a/man/fr/apropos.man b/man/fr/apropos.man
new file mode 100644
index 0000000..383de43
--- /dev/null
+++ b/man/fr/apropos.man
@@ -0,0 +1,47 @@
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traduction fran�aise Ren� Cougnenc - Mai 1995.
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH APROPOS 1 "19 septembre 2005" "Manuel Linux" "Commandes utilisateur"
+.LO 1
+.SH NOM
+apropos \- recherche de cha�nes de caract�res dans la base de donn�es whatis
+.SH SYNOPSIS
+.BI apropos
+mot-cl� ...
+.SH DESCRIPTION
+apropos effectue une recherche de cha�nes de caract�res dans un
+ensemble de fichiers de donn�es contenant de br�ves descriptions des
+commandes syst�me, et affiche le r�sultat sur la sortie standard.
+
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi at acm.org> en assure aujourd'hui la maintenance.
+
+.SH "VOIR AUSSI"
+.BR whatis (1),
+.BR man (1).
+
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Ren� Cougnenc en mai 1995 et mise
+� jour par Alain Portal <aportal AT univ-montp2 DOT fr> le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 1\ apropos\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
+
diff --git a/man/fr/makewhatis.man b/man/fr/makewhatis.man
new file mode 100644
index 0000000..abd5981
--- /dev/null
+++ b/man/fr/makewhatis.man
@@ -0,0 +1,123 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at pluto.linux.it>
+.\"
+.\" Traduction : Alain Portal <aportal AT univ-montp2 DOT fr> le 1/6/2005
+.\"
+.\" 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 "19 septembre 2005"
+.SH NOM
+makewhatis \- Cr�e la base de donn�es whatis
+.SH SYNOPSIS
+.BI "makewhatis [-u] [-v] [-w] [-s " sections " ] [-c [" catpath "]] [" manpath "]"
+.SH DESCRIPTION
+.B makewhatis
+lit toutes les pages de manuels contenues dans les sections
+.I sections
+du r�pertoire
+. I manpath
+ou les pages pr�format�es contenues dans les sections
+.I sections
+du r�pertoire
+.IR catpath .
+Pour chacune des pages,
+.B makewhatis
+�crit une ligne dans la base de donn�es whatis\ ; chaque ligne est constitu�e
+du nom de la page de manuel et d'une courte description de celle-ci, s�par�s
+par un trait. La description est extraite du contenu de la section NAME de la
+page de manuel.
+.LP
+Du fait que d'autres langues utilisent un terme diff�rent pour la section NAME,
+.B makewhatis
+reconna�t les termes �quivalents en allemand, espagnol, finnois, fran�ais,
+italien et tch�que.
+.LP
+Si aucun argument
+.I manpath
+n'est fourni, la valeur par d�faut est
+.IR /usr/man .
+.SH OPTIONS
+.TP
+.B -u
+Mettre � jour la base de donn�es avec de nouvelles pages.
+.TP
+.B -v
+Sortie bavarde.
+.TP
+.B -w
+Utiliser le chemin de recherche
+.I manpath
+obtenu par la commande �\ man --path\ �.
+.TP
+.BI -s " sections"
+Chercher dans les sections
+.I sections
+de
+.IR manpath " ou " catpath .
+Si cette option est absente, sa valeur est
+.IR " " \' "1 2 3 4 5 6 7 8 9 n l"\'
+.TP
+.BI -c " catpath"
+Les pages pr�format�es de manuel situ�es dans
+.I catpath
+sont scrut�es. Si l'argument n'est pas fourni, il est suppos� �tre le premier
+des deux r�pertoires existant entre
+.IR /usr/man/preformat " et " /usr/man .
+.SH EXEMPLES
+.PP
+Pour reconstruire seulement les bases de donn�es
+.IR /usr/X11R6/man/whatis " et " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+Pour reconstruire toutes les bases de donn�es en incluant les traductions
+finnoise, fran�aise et italienne
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH BOGUES
+.B makewhatis
+peut ne pas tr�s bien g�rer les pages de manuels qui ont �t� �crites avec
+des macros troff non standard, comme les pages Tcl/Tk.
+.PP
+.B makewhatis
+ne fonctionne pas avec les traductions pr�format�es.
+
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi at acm.org> en assure aujourd'hui la maintenance.
+
+.SH "VOIR AUSSI"
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
+
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Alain Portal
+<aportal AT univ-montp2 DOT fr> le 1er juin 2005 et mise � jour
+le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 8\ makewhatis\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
+
diff --git a/man/fr/man.conf.man b/man/fr/man.conf.man
new file mode 100644
index 0000000..49d9bbd
--- /dev/null
+++ b/man/fr/man.conf.man
@@ -0,0 +1,77 @@
+.\" @(#)man.conf
+.\" Traduction fran�aise Ren� Cougnenc - Mai 1995
+.\"
+.TH MAN.CONF 5 "19 septembre 2005" "Manuel Linux" "Commandes utilisateur"
+.SH NOM
+man.conf \- fichier de configuration de la commande man
+.SH DESCRIPTION
+.LP
+Ce fichier est lu par
+.BR man (1)
+et contient\ : (a) des informations sur la mani�re de construire le
+chemin de recherche des pages de manuel, (b) les chemins d'acc�s
+complets de divers programmes de formatage tels nroff, eqn, tbl, etc.
+utilis�s par man, et (c) une liste des d�compacteurs � employer pour
+traiter les pages pr�format�es selon l'extension de leur nom de
+fichier. Il est possible de sp�cifier un autre fichier que celui-ci en
+pr�cisant\ :
+.LP
+.RS
+man -C man.conf_personnel ...
+.RE
+.LP
+Les noms de commandes peuvent comporter des options.
+Les options utiles pour nroff se trouvent dans grotty(1).
+Par exemple, au lieu de la ligne par d�faut\ :
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+vous pouvez mettre\ :
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+afin de supprimer le soulignement et les caract�res gras.
+
+Notez que l'option -Tlatin1 pass�e � la commande groff est importante
+pour nous autres, francophones\ ; associ�e � un visualiseur et un
+terminal supportant ce jeu de caract�res (comme less et xterm), elle
+permet de conserver nos pr�cieux accents dans les pages de manuel.
+.SH FICHIERS
+.I "@man_config_file@"
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi at acm.org> en assure aujourd'hui la maintenance.
+.SH "VOIR AUSSI"
+.BR col (1),
+.BR (g)eqn (1),
+.BR (g)pic (1),
+.BR groff (1),
+.BR grotty (1),
+.BR (g)refer (1),
+.BR (g)tbl (1),
+.BR less (1),
+.BR man (1)
+et
+.BR compress (1),
+.BR gzip (1).
+
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Ren� Cougnenc en mai 1995 et mise
+� jour par Alain Portal <aportal AT univ-montp2 DOT fr> le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 5\ man.conf\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
+
diff --git a/man/fr/man.man b/man/fr/man.man
new file mode 100644
index 0000000..ad09529
--- /dev/null
+++ b/man/fr/man.man
@@ -0,0 +1,496 @@
+.\" Man page for man (and the former manpath)
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traduction fran�aise Ren� Cougnenc - Mai 1995
+.\" Mise � jour importante Alain Portal le 2 juin 2005
+.\"
+.\" 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 at 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 "19 septembre 2005" "Manuel Linux" "Commandes utilisateur"
+.LO 1
+.SH NOM
+man \- formate et affiche les pages du manuel en ligne
+.SH SYNOPSIS
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --path ]
+.RB [ \-m
+.IR syst�me ]
+.RB [ \-p
+.IR cha�ne ]
+.RB [ \-C
+.IR fichier_config ]
+.RB [ \-M
+.IR chemin ]
+.RB [ \-P
+.IR visualiseur ]
+.RB [ \-B
+.IR navigateur ]
+.RB [ \-H
+.IR visualiseur_html ]
+.RB [ \-S
+.IR liste_sections ]
+.RI [ section ]
+.I "nom ..."
+
+.SH DESCRIPTION
+.B man
+formate et affiche les pages du manuel en ligne. Si
+.I section
+est sp�cifi�e,
+.B man
+ne recherchera que dans cette section du manuel.
+.I nom
+est le nom de la page qui est g�n�ralement le nom d'une commande,
+d'une fonction ou d'un fichier. Toutefois, si
+.I nom
+contient une barre oblique
+.RB " �\ "/ \ �,
+il sera d'abord consid�r� en tant que nom de fichier, vous pouvez donc faire\ :
+.B "man ./toto.5"
+ou m�me
+.B "man /truc/machin/bidule.1.gz\fR.\fP"
+.PP
+Voir plus loin pour une description sur la fa�on dont
+.B man
+cherche les fichiers pages de manuel.
+
+.SH OPTIONS
+.TP
+.B \-\^C " fichier_config"
+Sp�cifie le fichier de configuration � utiliser\ ; par d�faut il s'agit de
+.BR @man_config_file@ .
+(Voir
+.BR man.conf (5).)
+.TP
+.B \-\^M " chemin"
+Indique la liste des r�pertoires dans lesquels la recherche des pages
+sera effectu�e. Veuillez s�parer les r�pertoires par le symbole deux points
+.RB " �\ ": \ �.
+Une liste vide est �quivalent � ne pas sp�cifier l'option
+.BR \-M .
+Voir
+.BR "CHEMIN DE RECHERCHE POUR LES PAGES DE MANUEL" .
+.TP
+.B \-\^P " visualiseur"
+Indique le programme de visualisation des pages � employer.
+Cette option a priorit� sur la variable d'environnement
+.BR MANPAGER ,
+qui, � son tour, a priorit� sur la variable d'environnement
+.BR PAGER .
+Par d�faut,
+.B man
+utilisera
+.B @pager at .
+.TP
+.B \-\^B
+Sp�cifie quel navigateur utiliser pour les fichiers HTML.
+Cette option supplante la variable d'environnement
+.B BROWSER
+Par d�faut,
+.B man
+utilise
+.BR @browser@ .
+.TP
+.B \-\^H
+Sp�cifie une commande qui produit un fichier texte � partir du fichier HTML.
+Cette option supplante la variable d'environnement
+.B HTMLPAGER
+Par d�faut,
+.B man
+utilise
+.BR @htmlpager@ .
+.TP
+.B \-\^S " liste_sections"
+Il s'agit d'une liste de sections, s�par�es par le symbole deux points
+.RB " �\ ": \ �,
+dans lesquelles les pages seront recherch�es. Elle a priorit� sur
+la variable d'environnement
+.B MANSECT.
+.TP
+.B \-\^a
+Par d�faut,
+.B man
+s'arr�te apr�s avoir affich� la premi�re page de
+manuel trouv�e. Cette option permet de l'obliger � afficher toutes
+les pages correspondant � la requ�te
+.RB " �\ "nom \ �
+de l'utilisateur, s'il y en a plusieurs, et pas seulement la premi�re trouv�e.
+.TP
+.B \-\^c
+Reformater la page de manuel, m�me si une version pr�format�e � jour
+existe. Cela peut �tre utile si cette derni�re a �t� pr�vue pour un
+�cran de taille diff�rente ou bien si elle est ab�m�e.
+.TP
+.B \-\^d
+Ne pas afficher les pages de manuel, mais fournir une grande quantit�
+d'informations de d�bogage.
+.TP
+.B \-\^D
+Afficher � la fois les pages de manuel et les informations de d�bogage.
+.TP
+.B \-\^f
+�quivalent �
+.BR whatis .
+.TP
+.B \-\^h
+Afficher un court message d'aide et quitter.
+.TP
+.B \-\^k
+�quivalent �
+.B apropos.
+.TP
+.B \-\^K
+Chercher la cha�ne sp�cifi�e dans *toutes* les pages de manuel. Attention\ :
+cela peut �tre tr�s long\ ! Et il peut �tre utile de sp�cifier une section.
+(Pour donner une vague id�e, sur ma machine, il faut environ une minute
+pour 500 pages de manuel.)
+.TP
+.B \-\^m " syst�me"
+Demander l'utilisation d'un autre jeu de pages de manuel, en fonction
+du nom de syst�me indiqu�.
+.TP
+.B \-\^p " cha�ne"
+Sp�cifie la s�quence de pr�processeurs � ex�cuter avant
+.B nroff
+ou
+.BR troff .
+Selon votre installation de Linux, vous ne disposerez pas forc�ment
+de tous les programmes possibles. Voici les plus courants et les lettres
+qui les d�signent\ :
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Cette option a priorit� sur la variable d'environnement
+.B MANROFFSEQ.
+.TP
+.B \-\^t
+Utiliser
+.B @troff@
+pour formater la page de manuel, la sortie se faisant sur
+.B stdout.
+La sortie de
+.B @troff@
+peut n�cessiter un passage par certains filtres avant de pouvoir
+�tre affich�e ou imprim�e.
+.TP
+.B \-\^w \fRou\fP \-\-path
+Ne pas afficher les pages de manuel, mais les emplacements des fichiers
+qui auraient �t� format�s ou affich�s. Si aucun argument n'est pr�cis�,
+indique sur la sortie standard la liste des r�pertoires dans lesquels
+.B man
+recherche les pages. Si
+.B manpath
+est un lien sur le programme man, alors �\ manpath\ � est �quivalent
+� la commande �\ man --path\ �.
+.TP
+.B \-\^W
+Comme \-\^w, mais affiche les noms de fichiers, un par ligne, sans aucune
+autre information. Tr�s utile dans des commandes shell du genre\ :
+.ft CW
+.B man -aW man | xargs ls -l
+.ft
+
+.SH "PAGES FORMAT�ES"
+Afin de gagner du temps,
+.B man
+tente de sauvegarder les pages format�es
+au lieu de les interpr�ter chaque fois qu'elles sont demand�es.
+Traditionnellement, les versions format�es des pages de REP/manX sont
+enregistr�es dans REP/catX, mais d'autres correspondances entre les
+r�pertoires man et les r�pertoires cat peuvent �tre indiqu�es dans
+le fichier
+.BR @man_config_file@ .
+Aucune page format�e n'est enregistr�e si le r�pertoire �\ cat\ � correspondant
+n'existe pas.
+Aucune page format�e n'est enregistr�e si elle est format�e avec une longueur
+de ligne diff�rente de 80.
+Aucune page format�e n'est enregistr�e si le fichier
+.B @man_config_file@
+contient la ligne NOCACHE.
+.PP
+Il est possible de rendre
+.B man
+suid utilisateur man. Dans ce cas, si un r�pertoire �\ cat\ � appartient
+� man et a le mode 0755 (seul man peut l'�crire), et que les fichiers
+format�s appartiennent eux aussi � man et ont le mode 0644 ou 0444 (seul
+man peut les �crire, voire personne), aucun utilisateur normal ne pourra
+modifier les pages format�es ou mettre d'autre fichiers dans le r�pertoire
+correspondant. Si
+.B man
+n'est pas suid, les r�pertoires � cat � devront avoir le mode 0777 afin
+que tout utilisateur puisse y laisser le r�sultat des formatages lors
+des consultations du manuel.
+.PP
+L'option
+.B \-c
+force le reformatage d'une page, m�me si un fichier cat
+plus r�cent que le fichier source existe.
+
+.SH "CHEMIN DE RECHERCHE POUR LES PAGES DE MANUEL"
+.B man
+utilise une m�thode sophistiqu�e pour chercher les pages de manuels,
+bas�e sur l'invocation d'options et de variables d'environnement,
+le fichier de configuration
+.BR @man_config_file@ ,
+des heuristiques et conventions pr�d�finies.
+.PP
+En premier lieu, lorsque l'argument
+.I nom
+de
+.B man
+contient une barre oblique
+.RB " �\ "/ \ �,
+.B man
+suppose qu'il s'agit d'un fichier et aucune recherche complexe n'est lanc�e.
+.PP
+Mais dans la plupart des cas o�
+.I nom
+ne contient pas de barre oblique,
+.B man
+recherche dans plusieurs r�pertoires un fichier qui pourrait �tre une page
+de manuel pour le sujet nomm�.
+.PP
+Si vous sp�cifiez l'option
+.B \-M
+.IR liste_chemins ,
+.I liste_chemins
+est une liste de r�pertoires, s�par�s par le symbole deux points
+.RB " �\ ": \ �,
+dans lesquels
+.B man
+effectuera sa recherche.
+.PP
+Si vous ne sp�cifiez pas
+.B -M
+mais que vous positionniez la variable d'environnement
+.BR MANPATH ,
+la valeur de cette variable est la liste des r�pertoires dans lesquels
+.B man
+effectuera sa recherche.
+.PP
+Si vous ne sp�cifiez pas une liste de chemins explicite avec
+.B -M
+ou
+.BR MANPATH ,
+.B man
+d�veloppe sa propre liste de chemins bas�e sur le contenu du fichier de
+configuration
+.BR @man_config_file@ .
+Les d�clarations
+.B MANPATH
+dans le fichier de configuration identifient des r�pertoires particuliers
+� inclure dans le chemin de recherche.
+.PP
+Qui plus est, les d�clarations
+.B MANPATH_MAP
+compl�tent le chemin de recherche en fonction du chemin de recherche de vos
+commandes (autrement dit, de votre variable d'environnement
+.BR PATH ).
+La d�claration
+.B MANPATH_MAP
+indique, pour chacun des r�pertoires pouvant se trouver dans le chemin de
+recherche des commandes, un r�pertoire qui devrait �tre ajout� au chemin de
+recherche des pages de manuel.
+.B man
+scrute la variable
+.B PATH
+et ajoute au chemin de recherche des pages de manuel les r�pertoires
+correspondants. Ainsi, avec une utilisation correcte de
+.BR MANPATH_MAP ,
+lorsque vous tapez la commande
+.BR "man xyz" ,
+vous obtenez la page de manuel du programme que vous lanceriez si vous
+tapiez la commande
+.BR xyz .
+.PP
+De plus, pour chacun des r�pertoires situ�s dans le chemin de recherche des
+commandes (nous l'appellerons �\ r�pertoire commandes\ �) pour lequel vous
+.IR n "'avez " pas
+d'instruction
+.BR MANPATH_MAP ,
+.B man
+cherchera automatiquement un r�pertoire de pages de manuel � proximit�,
+� savoir un sous-r�pertoire du �\ r�pertoire commandes\ � lui-m�me ou dans
+le r�pertoire parent du �\ r�pertoire commandes\ �.
+.PP
+Vous pouvez d�sactiver la recherche automatique de proximit� en incluant
+l'instruction
+.B NOAUTOPATH
+dans le fichier de configuration
+.BR @man_config_file@ .
+.PP
+Dans chaque r�pertoire du chemin de recherche d�crit plus haut,
+.B man
+cherche un fichier nomm�
+.IB sujet . section\fR,
+avec un suffixe optionnel sur le num�ro de section et un possible suffixe
+de compression. S'il ne peut trouver un tel fichier, il regarde alors dans
+tous les sous-r�pertoires nomm�s
+.BI man N
+ou
+.BI cat N
+o�
+.I N
+est le num�ro de la section du manuel. Si le fichier se trouve dans
+le sous-r�pertoire
+.B cat
+.IR N ,
+.B man
+suppose qu'il s'agit d'une page de manuel format�e (page cat). Autrement,
+.B man
+suppose qu'elle n'est pas format�e. Dans tous les cas, si le nom de
+fichier comporte une extension indiquant une compression connue (comme
+.BR .gz ),
+.B man
+suppose que le fichier est gzipp�.
+.PP
+Si vous vouloir savoir o� (ou si)
+.B man
+peut trouver une page de manuel sur un sujet particulier, utilisez l'option
+.BR "--path " ( -w ).
+
+.SH ENVIRONNEMENT
+.TP
+.B MANPATH
+Si la variable
+.B MANPATH
+est positionn�e,
+.B man
+utilisera sa valeur comme chemin de recherche des pages de manuel.
+Cette variable est prioritaire sur le fichier de configuration et le chemin
+de recherche automatique, mais c�de cette priorit� si l'option
+.B -M
+est utilis�e. Voir
+.BR "CHEMIN DE RECHERCHE POUR LES PAGES DE MANUEL" .
+.TP
+.B MANPL
+Si la variable
+.B MANPL
+est positionn�e, sa valeur servira � d�finir la longueur de l'affichage de la
+page. Autrement, la page enti�re est affich�e sur une seule et longue page.
+.TP
+.B MANROFFSEQ
+Si
+.B MANROFFSEQ
+est positionn�e, sa valeur servira � d�terminer le jeu de pr�processeurs
+� ex�cuter avant de lancer
+.B nroff
+ou
+.BR troff .
+Par d�faut, les pages sont pass�es dans le processeur de tableaux avant
+.BR nroff .
+.TP
+.B MANSECT
+Si
+.B MANSECT
+est positionn�e, sa valeur d�terminera les sections du manuel dans
+lesquelles les pages seront recherch�es.
+.TP
+.B MANWIDTH
+Si
+.B MANWIDTH
+est positionn�e, sa valeur servira � d�finir la largeur de l'affichage de la
+page. Autrement, la page sera affich�e sur toute la largeur de l'�cran.
+.TP
+.B MANPAGER
+Si
+.B MANPAGER
+est positionn�e, sa valeur sera consid�r�e comme le nom du programme
+� utiliser pour visualiser la page de manuel. Dans le cas contraire,
+.B PAGER
+sera utilis�e. Si aucune des deux variables n'est positionn�e,
+.B @pager@
+sera utilis�.
+.TP
+.B LANG
+Si
+.B LANG
+est positionn�e, sa valeur d�finira le nom du sous-r�pertoire o�
+.B man
+commencera la recherche des pages de manuel. Ainsi, la commande
+�\ LANG=fr man 1 toto\ � aura pour effet de faire rechercher la page
+toto dans .../fr/man1/toto.1, et si ce fichier n'existe pas,
+dans .../man1/toto.1, o� ... est un r�pertoire du chemin de recherche.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Les variables d'environnement
+.B NLSPATH
+et
+.B LC_MESSAGES
+(ou
+.B LANG
+lorsque la derni�re n'existe pas)
+jouent un r�le dans la localisation du catalogue de messages.
+(Mais les messages anglais sont inclus dans le programme � la compilation,
+aucun catalogue n'est donc n�cessaire pour un affichage dans la langue de
+Shakespeare.)
+Notez que les programmes comme
+.BR col (1)
+qui sont appel�s par
+.BR man ,
+utilisent �galement LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+est utilis�e pour la construction du chemin de recherche par d�faut. Voir
+.BR "CHEMIN DE RECHERCHE POUR LES PAGES DE MANUEL" .
+.TP
+.B SYSTEM
+.B SYSTEM
+est employ�e pour obtenir le nom du syst�me alternatif par d�faut (en vue de
+l'utilisation de l'option
+.B \-m
+).
+.SH BOGUES
+L'option
+.B \-t
+ne fonctionne que si un programme �\ troff-like\ � est install�.
+.br
+Si vous voyez clignoter \e255 ou <AD> au lieu de traits d'union,
+mettez �\ LESSCHARSET=latin1\ � dans votre environnement.
+.SH ASTUCES
+Si vous ajoutez la ligne
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+� votre fichier
+.IR .emacs ,
+vous obtiendrez la page de manuel de l'appel de la biblioth�que situ� � la
+position courante du curseur lorsque vous presserez la touche F1.
+.LP
+Pour obtenir une version texte seul d'une page de manuel, sans retour arri�re
+ni caract�re de soulignement, essayez
+
+ # man foo | col -b > foo.mantxt
+
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi at acm.org> en assure aujourd'hui la maintenance.
+.SH "VOIR AUSSI"
+.BR apropos (1),
+.BR whatis (1),
+.BR less (1),
+.BR groff (1),
+.BR man.conf (5).
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Ren� Cougnenc en mai 1995 et mise
+� jour par Alain Portal <aportal at univ-montp2.fr> le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 1\ man\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
+
diff --git a/man/fr/whatis.man b/man/fr/whatis.man
new file mode 100644
index 0000000..ed6d897
--- /dev/null
+++ b/man/fr/whatis.man
@@ -0,0 +1,49 @@
+.\" Man page for whatis
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traduction fran�aise Ren� Cougnenc - Mai 1995.
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH WHATIS 1 "19 septembre 2005" "Manuel Linux" "Commandes utilisateur"
+.LO 1
+.SH NOM
+whatis \- recherche de noms complets dans la base de donn�es whatis.
+.SH SYNOPSIS
+.BI whatis
+mot-cl� ...
+.SH DESCRIPTION
+whatis effectue une recherche de mots-cl�s dans un ensemble de
+fichiers de donn�es contenant de br�ves descriptions des commandes
+syst�me, et affiche le r�sultat sur la sortie standard. Seules les
+entr�es contenant le mot-cl� complet sont affich�es.
+.LP
+La base de donn�es whatis est r�alis�e et mise � jour par la commande
+ at makewhatis@.
+
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi at acm.org> en assure aujourd'hui la maintenance.
+.SH "VOIR AUSSI"
+.BR apropos (1),
+.BR man (1).
+
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Ren� Cougnenc en mai 1995 et mise
+� jour par Alain Portal <aportal at univ-montp2.fr> le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 1\ whatis\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
diff --git a/man/hr.txt b/man/hr.txt
new file mode 100644
index 0000000..6db2627
--- /dev/null
+++ b/man/hr.txt
@@ -0,0 +1 @@
+croatian
diff --git a/man/hr/apropos.man b/man/hr/apropos.man
new file mode 100644
index 0000000..f1ca427
--- /dev/null
+++ b/man/hr/apropos.man
@@ -0,0 +1,31 @@
+.\" Man stranica za 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.
+.\"
+.\" Mo�ete distribuirati pod uvjetima GNU Op�e javne licence kako je
+.\" odre�eno u datoteci README koja dolazi s distribucijom mana 1.0.
+.\"
+.\" John W. Eaton
+.\" jwe at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela at public.srce.hr>, META.
+.TH apropos 1 "15. sije�nja 1991."
+.SH IME
+apropos \- tra�i niz u whatis bazi podataka
+.SH SA�ETAK
+.BI apropos klju�na_rije�
+...
+.SH OPIS
+.B apropos
+tra�i klju�ne rije�i u skupu baza podataka koje sadr�e kratke
+opise naredbi sustava i prikazuje rezultate na standardnom izlazu.
+.SH "TAKO�ER POGLEDAJTE"
+.BR whatis (1),
+.BR man (1).
diff --git a/man/hr/man.conf.man b/man/hr/man.conf.man
new file mode 100644
index 0000000..c450f58
--- /dev/null
+++ b/man/hr/man.conf.man
@@ -0,0 +1,56 @@
+.\" @(#)man.conf
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela at public.srce.hr>, META.
+.TH MAN.CONF 5 "30. o�ujka 1994."
+.SH IME
+man.conf \- konfiguracijski podaci za man
+.SH OPIS
+Ovu datoteku �ita
+.BR man (1),
+a sadr�i
+(a) informacije o izgradnji staze pretra�ivanja za man,
+(b) pune staze i imena raznih programa kao �to je
+.BR nroff ", " eqn ", " tbl
+itd. koje man koristi, te
+(c) popis programa za dekomprimiranje datoteka s navedenim nastavcima.
+Neka druga verzija ove datoteke mo�e se odrediti pomo�u
+.LP
+.RS
+man -C osobni_man.conf ...
+.RE
+.LP
+Imenima naredbi mogu se dodati opcije.
+Opcije korisne za
+.B nroff
+mogu se na�i u
+.BR grotty (1).
+Na primjer, umjesto predodre�enog reda
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+mo�ete napisati
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+kako biste isklju�ili potcrtavanje i precrtavanje.
+.SH "TAKO�ER POGLEDAJTE"
+.BR col (1),
+.BR (g)eqn (1),
+.BR (g)pic (1),
+.BR groff (1),
+.BR grotty (1),
+.BR (g)refer (1),
+.BR (g)tbl (1),
+.BR less (1),
+.BR man (1),
+te
+.BR compress (1),
+.BR gzip (1).
diff --git a/man/hr/man.man b/man/hr/man.man
new file mode 100644
index 0000000..be92d5c
--- /dev/null
+++ b/man/hr/man.man
@@ -0,0 +1,280 @@
+.\" Man stranica za man (i biv�i 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.
+.\"
+.\" Mo�ete distribuirati pod uvjetima GNU Op�e javne licence kako je
+.\" odre�eno u datoteci README koja dolazi s distribucijom mana 1.0.
+.\"
+.\" John W. Eaton
+.\" jwe at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Mnoge promjene -- aeb
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela at public.srce.hr>, META.
+.TH man 1 "2. rujna 1998."
+.SH IME
+man \- formatira i prikazuje ra�unalne man stranice
+.br
+manpath \- saznaje korisnikovu stazu pretra�ivanja za man stranice
+.SH SA�ETAK
+man [\-acdfhkKtwW] [\-m sustav] [\-p niz] [\-C konfiguracijska_datoteka]
+[\-M staza] [\-P preglednik] [\-S popis_dijelova] [dio] ime ...
+.SH OPIS
+.B man
+formatira i prikazuje ra�unalne man stranice. Ova verzija poznaje varijable
+okru�ja
+.B MANPATH
+i
+.BR (MAN)PAGER ,
+pa mo�ete imati svoje vlastite skupove osobnih man stranica i odabrati
+�eljeni program za prikaz formatiranih stranica. Ako je naveden
+.IR dio ,
+.B man
+pretra�uje samo taj dio man stranica.
+Tako�er mo�ete preko opcija na naredbenom redu ili varijabli okru�ja
+odrediti red po kojem se pretra�uju dijelovi te preprocesore kojima se
+obra�uju izvorne datoteke.
+Ako
+.I ime
+sadr�i /, prvo ga se isku�ava kao ime datoteke, pa tako mo�ete pokrenuti
+``man ./foo.5'' ili �ak ``man /cd/foo/bar.1.gz''.
+.SH OPCIJE
+.TP
+.B \-\^C " konfiguracijska_datoteka"
+Koristi drugi
+.IR man.conf ;
+predodre�eni je
+.BR @man_config_file@ .
+(Pogledajte
+.BR man.conf (5).)
+.TP
+.B \-\^M " staza"
+.I staza
+je popis direktorija u kojima se tra�e man stranice.
+Ako takva opcija nije dana, koristi varijablu okru�ja
+.BR MANPATH .
+Ako takve varijable okru�ja nema, predodre�eni popis se nalazi u
+.BR @man_config_file@ .
+Neispunjen dio u
+.B MANPATH
+odgovara predodre�enom popisu.
+.TP
+.B \-\^P " preglednik"
+Odre�uje kori�teni preglednik.
+Ova opcija ima prednost nad varijablom okru�ja
+.BR MANPAGER ,
+koja pak ima prednost nad varijablom
+.BR PAGER .
+.B man
+predodre�eno koristi
+.BR @pager@ .
+.TP
+.B \-\^S " popis_dijelova"
+.I popis_dijelova
+je popis dvoto�kama razdvojenih dijelova man stranica koje se pretra�uje.
+Ova opcija ima prednost nad varijablom okru�ja
+.BR MANSECT .
+.TP
+.B \-\^a
+.B man
+predodre�eno izlazi nakon prikazivanja prve na�ene man stranice. Ova opcija
+prisiljava
+.B man
+na prikaz svih man stranica �ije je ime
+.IR ime ,
+a ne samo prve.
+.TP
+.B \-\^c
+Ponovno formatira izvornu man stranicu, �ak i kada postoji svje�a cat
+stranica. Ovo ima smisla ako je cat stranica formatirana za druk�iju �irinu
+zaslona ili ako je preformatirana stranica pokvarena.
+.TP
+.B \-\^d
+U stvari ne prikazuje man stranice, ali zato ispisuje gomilu informacija za
+otklanjanje gre�aka.
+.TP
+.B \-\^D
+I prikazuje i ispisuje informacije za otklanjanje gre�aka.
+.TP
+.B \-\^f
+Isto �to i
+.BR whatis .
+.TP
+.B \-\^h
+Ispisuje poruku o kori�tenju od jednog reda i zavr�ava.
+.TP
+.B \-\^k
+Isto �to i
+.BR apropos .
+.TP
+.B \-\^K
+Navedeni niz tra�i u
+.I svim
+man stranicama. Upozorenje: ovo je vjerojatno vrlo sporo! Navo�enje dijela
+ubrzava stvari.
+(Samo okvirno, na mom stroju ovo traje oko minutu na 500 man stranica.)
+.TP
+.B \-\^m " sustav"
+Pretra�uje se drugi skup man stranica na osnovu danog imena sustava.
+.TP
+.B \-\^p " niz"
+.I niz
+odre�uje niz preprocesora koje treba pokrenuti prije pokretanja
+.B nroff
+odnosno
+.BR troff .
+Sve instalacije nemaju potpun skup preprocesora. Neki od preprocesora i
+slova koja ih ozna�uju su:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Ova opcija ima prednost nad varijablom okru�ja
+.BR MANROFFSEQ .
+.TP
+.B \-\^t
+Za formatiranje man stranica koristi
+.BR @troff@ ,
+�alju�i izlaz na standardni izlaz. Izlaz iz
+.B @troff@
+mo�e prije samog tiskanja zahtijevati prolazak kroz neki filter.
+.TP
+.B \-\^w \fRili\fP \-\-path
+U stvari ne prikazuje man stranice, ali zato ispisuje lokacije datoteka koje
+bi se formatirale ili prikazale. Ako nije dan nijedan argument, prikazuje
+(na standardnom izlazu) popis direktorija u kojima
+.B man
+tra�i man stranice. Ako je
+.B manpath
+veza na
+.BR man ,
+onda ``manpath'' ima isti u�inak kao ``man --path''.
+.TP
+.B \-\^W
+Kao \-\^w, ali svako ime datoteke ispisuje u zasebnom redu, bez dodatnih
+informacija. Ovo je korisno u naredbama ljuske kao �to je
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+.SH "CAT STRANICE"
+.B man
+�e poku�ati snimiti formatirane man stranice kako bi u�tedio vrijeme
+formatiranja slijede�i put kada te man stranice budu potrebne.
+Tradicionalno se formatirane verzije stranica iz
+.I DIREKTORIJ/manX
+snimaju u
+.IR DIREKTORIJ/catX ,
+no druga mapiranja man direktorija u cat direktorije se mogu odrediti u
+.BR @man_config_file@ .
+Kada potrebni cat direktorij ne postoji, cat stranice se ne snimaju.
+.PP
+.B man
+se mo�e suid-ati na korisnika man. Potom �e, ako je vlasnik cat direktorija
+man, uz dozvole 0755 (pisati mo�e samo man), a vlasnik cat datoteka man uz
+dozvole 0644 ili 0444 (pisati mo�e samo man, odnosno nitko ne mo�e pisati),
+nijedan obi�ni korisnik ne mo�e mijenjati cat stranice ili stavljati druge
+datoteke u cat direktorij. Ako
+.B man
+nije suid-an, cat direktorij bi trebao imati dozvole 0777
+ako bi svi korisnici trebali mo�i tamo ostavljati cat stranice.
+.PP
+Opcija
+.B \-c
+prisiljava na ponovno formatiranje stranice, �ak i ako postoji svje�a cat
+stranica.
+.SH OKRU�JE
+.TP
+.B MANPATH
+Ako je
+.B MANPATH
+postavljenja, njena se vrijednost koristi kao staza za tra�enje man
+stranica.
+.TP
+.B MANROFFSEQ
+Ako je
+.B MANROFFSEQ
+postavljena, njena vrijednost odre�uje skup preprocesora
+koje treba pokrenuti prije pokretanja
+.B nroff
+odnosno
+.BR troff .
+Stranice predodre�eno prolaze kroz preprocesor tablica prije nego pro�u
+kroz
+.BR nroff .
+.TP
+.B MANSECT
+Ako je
+.B MANSECT
+postavljena, njena vrijednost odre�uje dijelove man stranica
+koje treba pretra�iti.
+.TP
+.B MANWIDTH
+Ako je
+.B MANWIDTH
+postavljena, njena se vrijednost koristi kao �irina u kojoj bi se man
+stranice trebale prikazivati. Ina�e se stranice mogu prikazati preko cijele
+�irine va�eg zaslona.
+.TP
+.B MANPAGER
+Ako je
+.B MANPAGER
+postavljena, njena se vrijednost koristi kao ime programa za prikaz man
+stranice. Ako nije, koristi se
+.BR PAGER .
+Ako ni to nema vrijednosti, koristi se
+.BR @pager@ .
+.TP
+.B LANG
+Ako je
+.B LANG
+postavljena, njena vrijednost odre�uje ime poddirektorija u kojem
+.B man
+najprije tra�i man stranice. Dakle, naredba `LANG=hr man 1 foo'
+.B man
+tjera na tra�enje man stranice foo u .../hr/man1/foo.1, a ako takvu datoteku
+ne mo�e na�i, u .../man1/foo.1, gdje ... ozna�ava direktorij u stazi
+pretrage.
+.TP
+.B NLSPATH, LC_MESSAGES, LANG
+Varijable okru�ja
+.B NLSPATH
+i
+.B LC_MESSAGES
+(odnosno
+.B LANG
+kada ova druga ne postoji) igraju ulogu u nala�enju kataloga poruka.
+(No engleske su poruke ugra�ene i engleski katalog nije potreban.)
+Primjetite da programi koje
+.B man
+pokre�e, kao �to je
+.BR col (1),
+tako�er mogu koristiti npr.
+.BR LC_CTYPE .
+.TP
+.B PATH
+.B PATH
+se koristi u gra�enju predodre�ene staze tra�enja man stranica.
+.TP
+.B SYSTEM
+.B SYSTEM
+se koristi za odre�ivanje predodre�enog imena drugog sustava (za kori�tenje
+uz opciju
+.BR \-m ).
+.SH "TAKO�ER POGLEDAJTE"
+.BR apropos (1),
+.BR whatis (1),
+.BR less (1),
+.BR groff (1).
+.SH GRE�KE
+Opcija
+.B \-t
+radi samo ako je instaliran
+.BR troff-olik
+program.
+.PP
+Ako umjesto crtica vidite trep�u�i \e255 ili <AD>, u okru�je dodajte
+`LESSCHARSET=latin1'.
diff --git a/man/hr/whatis.man b/man/hr/whatis.man
new file mode 100644
index 0000000..a19ea76
--- /dev/null
+++ b/man/hr/whatis.man
@@ -0,0 +1,35 @@
+.\" Man stranica za 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.
+.\"
+.\" Mo�ete distribuirati pod uvjetima GNU Op�e javne licence kako je
+.\" odre�eno u datoteci README koja dolazi s distribucijom mana 1.0.
+.\"
+.\" John W. Eaton
+.\" jwe at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela at public.srce.hr>, META.
+.TH whatis 1 "5. sije�nja 1991."
+.SH IME
+whatis \- tra�i potpune rije�i u whatis bazi podataka
+.SH SA�ETAK
+.BI whatis klju�na_rije�
+...
+.SH OPIS
+.B whatis
+tra�i klju�ne rije�i u skupu baza podataka koje sadr�e kratke opise naredbi
+sustava i prikazuje rezultate na standardnom izlazu.
+Prikazuju se samo rije�i koje potpuno odgovaraju zadanima.
+.PP
+.B whatis
+baza podataka se stvara naredbom @makewhatis at .
+.SH "TAKO�ER POGLEDAJTE"
+.BR apropos (1),
+.BR man (1).
diff --git a/man/it.txt b/man/it.txt
new file mode 100644
index 0000000..a809ed0
--- /dev/null
+++ b/man/it.txt
@@ -0,0 +1 @@
+italian
diff --git a/man/it/apropos.man b/man/it/apropos.man
new file mode 100644
index 0000000..5f52a72
--- /dev/null
+++ b/man/it/apropos.man
@@ -0,0 +1,37 @@
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traduzione italiana by Michele Dalla Silvestra - dalla at maya.dei.unipd.it
+.\" Luglio 1996
+.\" Aggiornamento alla versione 1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Agosto 2006
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "19 settembre 2005"
+.LO 1
+.SH NOME
+apropos \- ricerca stringhe nel database di whatis
+.SH SINTASSI
+.BI apropos
+parola ...
+.SH DESCRIZIONE
+apropos ricerca una parola chiave in database contenenti brevi
+descrizioni dei comandi di sistema e mostra i risultati sullo
+standard output.
+.SH AUTORE
+John W. Eaton � l'autore originale di
+.BR "man" .
+Zeyd M. Ben-Halim ha rilasciato man 1.2, e Andries Brouwer le versioni da
+1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> � il maintainer attuale.
+.SH "VEDERE ANCHE"
+whatis(1), man(1).
\ No newline at end of file
diff --git a/man/it/makewhatis.man b/man/it/makewhatis.man
new file mode 100644
index 0000000..84d9450
--- /dev/null
+++ b/man/it/makewhatis.man
@@ -0,0 +1,103 @@
+.\" $Id: makewhatis.8,v 1.2 1999/05/24 14:40:26 otto Exp $
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at pluto.linux.it>
+.\" Traduzione italiana del medesimo
+.\" Aggiornamento alla versione 1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Agosto 2006
+.\"
+.\" 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 "19 settembre 2005"
+.SH NOME
+makewhatis \- Crea il database di whatis
+.SH SINTASSI
+.BI "makewhatis [-u] [-v] [-w] [-s " sezioni " ] [-c [" percorso_cat "]] [" percorso_man "]"
+.SH DESCRIZIONE
+.B makewhatis
+legge tutte le pagine di manuale contenute nelle date
+.IR sezioni " in " percorso_man
+o nelle corrispondenti
+.IR sezioni " in " percorso_cat .
+Scrive, per ogni pagina, una riga nel database di whatis: ognuna
+consiste nel nome della pagina e in una breve descrizione separata da
+un trattino. La descrizione viene estratta basandosi sul contenuto
+della sezione NOME della pagina di manuale.
+.LP
+Poich� lingue diverse usano nomi diversi per indicare la sezione NOME,
+.B makewhatis
+riconosce il termine equivalente in ceco, finlandese, francese,
+inglese, italiano, spagnolo e tedesco.
+.LP
+Se non viene passato nessun argomento
+.I percorso_man ,
+viene usato
+.I /usr/man .
+.SH OPZIONI
+.TP
+.B -u
+Aggiorna il database con le nuove pagine.
+.TP
+.B -v
+Output pi� dettagliato.
+.TP
+.B -w
+Ottiene il percorso da `man --path`
+.TP
+.BI -s " sezioni"
+Guarda nelle
+.I sezioni
+di
+.IR percorso_man " or " percorso_cat .
+Se l'opzione manca, il suo valore viene posto a
+.I \'1 2 3 4 5 6 7 8 9 n l\'
+.TP
+.BI -c " percorso_cat"
+Vengono considerate le pagine preformattate che si trovano in
+.I catpath .
+Se l'argomento � assente, viene usata la prima directory esistente fra
+.I /usr/man/preformat " e " /usr/man .
+.SH ESEMPI
+.PP
+Per ricostruire solo
+.IR /usr/X11R6/man/whatis " e " /usr/local/man/whatis :
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+Per ricostruire tutti i database, inclusi quelli con le traduzioni
+finlandesi, francesi e italiane:
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH BACHI
+.B makewhatis
+potrebbe non aprezzare molto le pagine scritte con macro Troff non
+standard, come quelle di Tcl/Tk.
+.PP
+.B makewhatis
+non funziona con le traduzioni preformattate.
+.SH AUTORE
+John W. Eaton � l'autore originale di
+.BR "man" .
+Zeyd M. Ben-Halim ha rilasciato man 1.2, e Andries Brouwer le versioni da
+1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> � il maintainer attuale.
+.SH VEDERE ANCHE
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
\ No newline at end of file
diff --git a/man/it/man.conf.man b/man/it/man.conf.man
new file mode 100644
index 0000000..c8b7d71
--- /dev/null
+++ b/man/it/man.conf.man
@@ -0,0 +1,55 @@
+.\" @(#)man.conf
+.\" Traduzione italiana by Michele Dalla Silvestra - dalla at maya.dei.unipd.it
+.\" Luglio 1996
+.\" Correzioni stilistiche di Daniele Giacomini <daniele at evo.it>
+.\" Gennaio 1999
+.\" Aggiornamento alla versione 1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Agosto 2006
+.\"
+.TH MAN.CONF 5 "19 settembre 2005"
+.SH NOME
+man.conf \- configurazione di man
+.SH DESCRIZIONE
+.LP
+Questo file � letto da
+.BR man (1)
+e contiene (a) informazioni su come costruire il percorso di ricerca per
+man, (b) percorso completo per vari programmi tipo nroff, eqn, tbl ecc.
+usati da man, e (c) una lista con programmi di dearchiviazione per file con una
+data estensione. Una versione alternativa di questo file pu� essere
+specificata con:
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+I nomi dei comandi possono essere forniti con opzioni.
+Opzioni utili a nroff possono essere trovate in grotty(1).
+Per esempio, invece della riga predefinita:
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+si potrebbe scrivere:
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+per eliminare la sottolineatura e la sovrascrittura.
+.SH FILE
+.I "@man_config_file@"
+.SH AUTORE
+John W. Eaton � l'autore originale di
+.BR "man" .
+Zeyd M. Ben-Halim ha rilasciato man 1.2, e Andries Brouwer le versioni da
+1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> � il maintainer attuale.
+.SH "VEDERE ANCHE"
+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).
diff --git a/man/it/man.man b/man/it/man.man
new file mode 100644
index 0000000..4a1ab57
--- /dev/null
+++ b/man/it/man.man
@@ -0,0 +1,504 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" More changes - flc
+.\"
+.\" Traduzione italiana by Michele Dalla Silvestra - dalla at maya.dei.unipd.it
+.\" Luglio 1996
+.\" Correzioni stilistiche di Daniele Giacomini <daniele at evo.it>
+.\" Gennaio 1999
+.\" Aggiornamento a 1.5g di Ottavio Rizzo <rizzo at pluto.linux.it>
+.\" Aggiornamento alla versione 1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Agosto 2006
+.\"
+.TH man 1 "19 settembre 2005"
+.LO 1
+.SH NOME
+man \- formatta e mostra le pagine di manuale
+.SH SINTASSI
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --path ]
+.RB [ \-m
+.IR sistema ]
+.RB [ \-p
+.IR stringa ]
+.RB [ \-C
+.IR config_file ]
+.RB [ \-M
+.IR lista_percorsi ]
+.RB [ \-P
+.IR impaginatore ]
+.RB [ \-B
+.IR browser ]
+.RB [ \-H
+.IR impaginatorehtml ]
+.RB [ \-S
+.IR lista_sezione ]
+.RI [ sezione ]
+.I "nome ..."
+
+.SH DESCRIZIONE
+.B man
+formatta e mostra le pagine di manuale. Se si specifica
+.IR sezione
+.B man
+cerca solo in quella sezione del manuale.
+.I nome
+normalmente � il nome della pagina di manuale, che � tipicamente il nome
+di un comando, funzione, o file.
+Tuttavia, se
+.I name
+contiene uno slash
+.RB ( / )
+allora
+.B man
+lo interpreta come la specificazione di un file, quindi si pu� fare
+.B "man ./foo.5"
+o anche
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+Vedere pi� avanti per una descrizione di dove
+.B man
+cerca i file delle pagine di manuale.
+
+.SH OPZIONI
+.TP
+.B \-\^C " file_configurazione"
+Specifica il file di configurazione da usare; il valore predefinito �
+.BR @man_config_file@
+(vedere
+.BR man.conf (5)).
+.TP
+.B \-\^M " percorso"
+Specifica la lista di directory in cui cercare le pagine di manuale.
+Separare le directory con caratteri ":". Una lista vuota � come non
+specificare
+.B \-M
+vedere
+.BR "PERCORSO DI RICERCA DELLE PAGINE DI MANUALE" .
+.TP
+.B \-\^P " impaginatore"
+Specifica il programma di impaginazione da usare.
+Questa opzione sovrascrive la variabile d'ambiente
+.BR MANPAGER ,
+che sovrascrive a sua volta la variabile
+.BR PAGER
+Per default,
+.B man
+usa
+.BR "@pager@" .
+.TP
+.B \-\^B
+Specifica quale browser usare con i file HTML.
+Questa opzione sovrascrive la variabile d'ambiente
+.B BROWSER
+Per default
+.B man
+usa
+.BR @browser@ ,
+.TP
+.B \-\^H
+Specifica un comando che riproduce i file HTML come testo.
+Questa opzione sovrascrive la variabile d'ambiente
+.B HTMLPAGER
+Per default,
+.B man
+usa
+.BR @htmlpager@ ,
+.TP
+.B \-\^S " lista_sezione"
+Lista � una lista di sezioni di manuale in cui cercare, separate da ":".
+Questa opzione sovrascrive la variabile d'ambiente
+.B MANSECT .
+.TP
+.B \-\^a
+Per default,
+.B man
+terminer� dopo aver visualizzato la prima pagina di manuale che trova.
+L'uso di questa opzione forza
+.B man
+a visualizzare tutte le pagine di manuale che corrispondono a
+.B nome,
+non solo la prima.
+.TP
+.B \-\^c
+Riformatta la pagina di manuale sorgente, anche se esiste una pagina cat
+aggiornata. Questo pu� essere importante se la pagina cat � stata
+formattata per uno schermo con un numero di colonne diverso, o se la
+pagina preformattata � danneggiata.
+.TP
+.B \-\^d
+Non visualizza le pagine di manuale, ma stampa informazioni di debug.
+.TP
+.B \-\^D
+Visualizza e stampa informazioni di debug.
+.TP
+.B \-\^f
+Equivalente di
+.BR whatis .
+.TP
+.BR \-\^F " or " \-\-preformat
+Formatta solo - non visualizza.
+.TP
+.B \-\^h
+stampa un messaggio di aiuto ed esce.
+.TP
+.B \-\^k
+Equivalente di
+.BR apropos .
+.TP
+.B \-\^K
+Cerca la stringa specificata in *tutte* le pagine di manuale. Attenzione:
+questo probabilmente � molto lento! Pu� essere di aiuto specificare una
+sezione.
+(Solo per dare un'idea di massima, sulla mia macchina impiega circa un
+minuto per 500 pagine di manuale).
+.TP
+.B \-\^m " sistema"
+Specifica un insieme alternativo di pagine di manuale in cui cercare
+basato sul nome di sistema dato.
+.TP
+.B \-\^p " stringa"
+specifica la sequenza dei preprocessori da eseguire prima di
+.B nroff
+o
+.BR troff .
+Non tutte le installazioni avranno un insieme completo di preprocessori.
+Alcuni dei preprocessori, e le lettere usate per designarli, sono:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Questa opzione sovrascrive la variabile d'ambiente
+.B MANROFFSEQ .
+.TP
+.B \-\^t
+Usa
+.B @troff@
+per formattare la pagina di manuale, passando l'output a
+.B stdout.
+Il formato di output predefinito di
+.B @troff@
+� Postscript, fare riferimento alla pagina di manuale di
+.B @troff@
+per vedere i modi per scegliere un formato alternativo.
+.PP
+Secondo il formato selezionato e la disponibilit� di dispositivi di stampa
+l'output deve passare attraverso alcuni filtri prima di essere stampato.
+.TP
+.B \-\^w \fRor\fP \-\-path
+Non visualizza le pagine di manuale, ma stampa la locazione(i) dei file
+che verrebbero formattati o visualizzati. Se non viene dato alcun
+argomento visualizza (sullo standard output) l'elenco delle directory in
+cui
+.B man
+cerca le pagine di manuale. Se
+.B manpath
+� un collegamento a man, allora "manpath" � equivalente a "man --path".
+.TP
+.B \-\^W
+Come \-\^w, ma stampa i nomi di file uno per linea, senza informazioni
+aggiuntive. Questo � utile in comandi shell come
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH "PAGINE CAT"
+Man cercher� di salvare le pagine formattate, allo scopo di risparmiare
+tempo di formattazione la prossima volta che queste pagine saranno
+necessarie. Tradizionalmente le versioni formattate delle pagine in
+DIR/manX sono salvate in DIR/catX, ma possono essere specificati
+altri percorsi da man dir a cat dir in
+.BR @man_config_file@ .
+Non viene salvata alcuna pagina cat quando la directory cat richiesta non
+esiste.
+Le pagine cat non vengono salvate quando sono formattate per una lunghezza
+della linea diversa da 80.
+Le pagine cat non vengono salvate quando man.conf contiene la linea NOCACHE.
+.PP
+E' possibile fare un suid di
+.B man
+a un utente man. In questo caso se una directory di cat ha come proprietario
+man e permessi 0755 (scrivibile solo da man), e i file cat hanno
+proprietario man e permessi 0644 o 0444 (scrivibili solo da man, o non
+scrivibili del tutto), nessun utente ordinario pu� cambiare le pagine cat
+o mettere altri file nella directory di cat. Se su
+.B man
+non viene fatto un suid, allora una directory cat deve avere permessi 0777
+se tutti gli utenti devono poter lasciare l� le pagine cat.
+.PP
+L'opzione
+.B \-c
+forza la riformattazione di una pagina, anche se esiste una pagina cat
+recente.
+
+.SH "PAGINE HTML"
+Man trover� le pagine HTML se esse vivono in directory con nome
+'html' seguita da una sezione. L'ultima estensione del
+file deve essere ".html", quindi un nome valido per una versione HTML
+della pagina di manuale di
+.BR ls (1)
+sarebbe
+.IR /usr/share/man/htmlman1/ls.1.html .
+
+.SH "PERCORSO DI RICERCA DELLE PAGINE DI MANUALE"
+.B man
+usa un metodo sofisticato per trovare i file delle pagine di manuale,
+basato su opzioni di invocazione e variabili d'ambiente, il file di
+configurazione
+.B @man_config_file@
+e alcune convenzioni e metodi euristici inclusi.
+.PP
+Prima di tutto, quando l'argomento
+.I nome
+di
+.B man
+contiene uno slash
+.RB ( / ),
+.B man
+assume che si tratti di una specificazione di file,
+e non viene fatta alcuna ricerca.
+.PP
+Ma nel caso normale in cui
+.I nome
+non contenga uno slash,
+.B man
+cerca in una variet� di directory un file che possa essere una pagina di
+manuale per il nome dato.
+.PP
+Se si specifica l'opzione
+.BI "-M " lista_percorsi
+.I lista_percorsi
+� un elenco di directory, separate da ":", nelle quali
+.B man
+cerca.
+.PP
+Se non si specifica
+.B -M
+ma si imposta la variabile d'ambiente
+.B MANPATH
+il valore di tale variabile � la lista di directory nelle quali
+.B man
+cerca.
+.PP
+Se non si specifica una lista percorsi esplicita con
+.B -M
+o
+.BR MANPATH ,
+.B man
+sviluppa la propria lista percorsi basata sul contenuto del file di
+configurazione
+.BR @man_config_file@ .
+La dichiarazione
+.B MANPATH
+nel file di configurazione identifica particolari direcotry da includere
+nel percorso di ricerca.
+.PP
+Inoltre le dichiarazioni
+.B MANPATH_MAP
+fanno aggiunte al percorso di ricerca in funzione del proprio percorso di
+ricerca dei comandi
+(es. la propria variabile d'ambiente
+.B PATH
+). Per ciascuna directory che potrebbe essere nel percorso di ricerca del
+comando, una dichiarazione
+.B MANPATH_MAP
+specifica una directory che deve essere aggiunta al percorso di ricerca
+dei file delle pagine di manuale.
+.B man
+guarda nella variabile
+.B PATH
+e aggiunge le directory corrispondenti al percorso di ricerca del file
+della pagina di manuale.
+Quindi, con l'uso appropriato di
+.BR MANPATH_MAP ,
+quando si d� il comando
+.BR "man xyz" ,
+si ottiene una pagina di manuale per il programma che verrebbe eseguito se
+si desse il comando
+.BR xyz .
+.PP
+In aggiunta, per ciascuna directory nel percorso di ricerca del comando
+(lo chiameremo una "directory del comando") per il quale
+.I non
+si ha una dichiarazione
+.B MANPATH_MAP ,
+.B man
+automaticamente cerca una directory di pagina di manuale "vicina", come
+una sottodirectory nella stessa directory del comando o nella directory di
+livello superiore della directory del comando.
+.PP
+Si possono disabilitare le ricerche automatiche "vicine" includendo una
+direttiva
+.B NOAUTOPATH
+in
+.BR @man_config_file@ .
+.PP
+In ciascuna directory nel percorso di ricerca come descritto in precedenza,
+.B man
+cerca un file chiamato
+.IB argomento . sezione\fR,
+con un suffisso opzionale sul numero di sezione e
+magari un suffisso di compressione.
+Se non trova un tale file, esso allora cerca in tutte le sottodirectory
+che si chiamano
+.BI man N
+o
+.BI cat N
+dove
+.I N
+� il numero di sezione del manuale.
+Se il file � in una sottodirectory
+.BI cat N
+.B man
+suppone che sia un file di una pagina di manuale formattata (pagina cat).
+Altrimenti
+.B man
+suppone che non sia formattato. In ogni caso se il nome del file ha un
+suffisso di compressione noto (come
+.BR .gz ),
+.B man
+suppone che sia compresso con gzip.
+.PP
+Se si vuole vedere dove (o se)
+.B man
+troverebbe la pagina di manuale per un particolare soggetto usare l'opzione
+.BR "--path " ( -w ) .
+
+.SH AMBIENTE
+.TP
+.B MANPATH
+Se
+.B MANPATH
+� impostata,
+.B man
+la usa come percorso di ricerca dei file delle pagine di manuale. Esso
+sovrascrive il file di configurazione e il percorso di ricerca automatico,
+ma � sovrascritta a sua volta dall'opzione di invocazione
+.B -M
+Vedere
+.BR "PERCORSO DI RICERCA DELLE PAGINE DI MANUALE" .
+.TP
+.B MANPL
+Se
+.B MANPL
+� impostata il suo valore � usato come lunghezza della pagina da
+visualizzare. Altrimenti l'intera pagina di manuale occuper� una (lunga)
+pagina.
+.TP
+.B MANROFFSEQ
+Se
+.B MANROFFSEQ
+� impostata il suo valore � usato per determinare l'insieme di
+preprocessori da eseguire prima di eseguire
+.B nroff
+o
+.BR troff .
+Per default le pagine vengono passate attraverso il preprocessore
+tbl prima di
+.BR nroff .
+.TP
+.B MANSECT
+Se
+.B MANSECT
+� impostata il suo valore � usato per determinare in quali sezioni del
+manuale cercare.
+.TP
+.B MANWIDTH
+Se
+.B MANWIDTH
+� impostata il suo valore � usato come ampiezza a cui le pagine di manuale
+devono essere visualizzate. Altrimenti le pagine possono essere
+visualizzate sull'intera larghezza del proprio schermo.
+.TP
+.B MANPAGER
+Se
+.B MANPAGER
+� impostata il suo valore � usato come nome del programma da usare per
+visualizzare la pagina di manuale. Se non lo � allora viene usata
+.B PAGER .
+Se nemmeno questa � impostata, viene usato
+.B @pager@ .
+.TP
+.B BROWSER
+Il nome di un browser da usare per visualizzare le pagine di manuale HTML.
+Se non � impostata viene usato @browser@ .
+.TP
+.B HTMLPAGER
+Il comando da usare per riprodurre le pagine di manuale HTML come testo.
+Se non � impostata viene usato @htmlpager@ .
+.TP
+.B LANG
+Se
+.B LANG
+� impostata il suo valore definisce il nome della sottodirectory ove man
+fa la prima ricerca delle pagine di manuale. Perci� il comando `LANG=dk man 1 foo'
+far� s� che man cerchi la pagina di manuale foo in .../dk/man1/foo.1,
+e, se non pu� trovare tale file, allora in .../man1/foo.1,
+dove ... � una directory nel percorso di ricerca.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Le variabili d'ambiente
+.B NLSPATH
+e
+.B LC_MESSAGES
+(o
+.B LANG
+quando l'ultima non esiste)
+giocano un ruolo nel localizzare il catalogo messaggi.
+(Ma i messaggi in inglese sono compilati nel programma, e per l'inglese
+non � necessario alcun catalogo).
+Notare che anche programmi come
+.BR col(1)
+chiamati da man usano ad es. LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+aiuta a determinare il percorso di ricerca dei file delle pagine di
+manuale. Vedere
+.BR "PERCORSO DI RICERCA DELLE PAGINE DI MANUALE" .
+.TP
+.B SYSTEM
+.B SYSTEM
+� usata per ottenere il nome di sistema alternativo (da usare con l'
+opzione
+.B \-m
+).
+.SH BACHI
+L'opzione
+.B \-t
+funziona solo se � installato un programma tipo troff.
+.br
+Se si vedono lampeggiare \e255 o <AD> invece dei trattini,
+mettere `LESSCHARSET=latin1' nel proprio ambiente.
+.SH SUGGERIMENTI
+Se si aggiunge la linea
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+al proprio file
+.IR .emacs ,
+allora la pressione di F1 dar� la pagina di manuale della chiamata di
+libreria alla posizione corrente del cursore.
+.LP
+Per ottenere una versione testuale di una pagina di manuale, senza
+backspace e sottolineature, provare
+
+ # man foo | col -b > foo.mantxt
+.SH AUTORE
+John W. Eaton � l'autore originale di
+.BR "man" .
+Zeyd M. Ben-Halim ha rilasciato man 1.2, e Andries Brouwer le versioni da
+1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> � il maintainer attuale.
+.SH VEDERE ANCHE
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
diff --git a/man/it/whatis.man b/man/it/whatis.man
new file mode 100644
index 0000000..7c2380d
--- /dev/null
+++ b/man/it/whatis.man
@@ -0,0 +1,39 @@
+.\" Man page for whatis
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Traduzione italiana by Michele Dalla Silvestra - dalla at maya.dei.unipd.it
+.\" Luglio 1996
+.\" Aggiornamento alla versione 1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Agosto 2006
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "19 settembre 2005"
+.LO 1
+.SH NOME
+whatis \- ricerca parole complete nel database di whatis.
+.SH SINTASSI
+.BI whatis
+parola chiave ...
+.SH DESCRIZIONE
+whatis ricerca una parola chiave in database contenenti brevi
+descrizioni dei comandi di sistema e mostra i risultati sullo standard
+output. Solo le corrispondenze con parole intere sono mostrate.
+
+Il database whatis � creato usando il comando @makewhatis at .
+.SH AUTORE
+John W. Eaton � l'autore originale di
+.BR "man" .
+Zeyd M. Ben-Halim ha rilasciato man 1.2, e Andries Brouwer le versioni da
+1.3 a 1.5p.
+Federico Lucifredi <flucifredi at acm.org> � il maintainer attuale.
+.SH "VEDERE ANCHE"
+apropos(1), man(1).
diff --git a/man/ja.txt b/man/ja.txt
new file mode 100644
index 0000000..01d5538
--- /dev/null
+++ b/man/ja.txt
@@ -0,0 +1 @@
+japanese
diff --git a/man/ja/apropos.man b/man/ja/apropos.man
new file mode 100644
index 0000000..881c9ed
--- /dev/null
+++ b/man/ja/apropos.man
@@ -0,0 +1,34 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Japanese Version Copyright (c) 1996 Tanoshima Hidetohsi
+.\" all rights reserved.
+.\" Dec 31, 1996 Tanoshima Hidetoshi <tano at sainet.or.jp>
+.\"
+.\" Modified Thu Jan 29 01:53:11 JST 1998
+.\" by HANATAKA Shinya <hanataka at abyss.rim.or.jp>
+.\"
+.TH apropos 1 "Jan 15, 1991"
+.LO 1
+.SH ̾��
+apropos \- whatis �ǡ����١������ʸ��������롣
+.SH ��
+.BI apropos
+keyword ...
+.SH ����
+apropos ���ޥ�ɤϡ������ƥࡦ���ޥ�ɤδ�ñ�ʲ��⤬����
+�ǡ����١������ե����뤫�饭����ɤ�����
+���η�̤�ɸ����Ϥ�ɽ�����롣
+.SH "��Ϣ����"
+whatis(1), man(1).
diff --git a/man/ja/man.conf.man b/man/ja/man.conf.man
new file mode 100644
index 0000000..1221fe5
--- /dev/null
+++ b/man/ja/man.conf.man
@@ -0,0 +1,47 @@
+.\" @(#)man.conf
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\" all rights reserved.
+.\" Translated Thu Jan 29 01:49:33 JST 1998
+.\" by HANATAKA Shinya <hanataka at abyss.rim.or.jp>
+.\"
+.TH MAN.CONF 5 "30 Mar 1994"
+.SH ̾��
+man.conf \- man ���ޥ�ɤΤ��������ե�����
+.SH ����
+.LP
+���Υե������
+.BR man (1)
+���ޥ�ɤ��ɤ߹��ޤ졢(a) man �Τ��ḡ���ѥ���ɤΤ�äƹ��ۤ��뤫�ξ���
+(b) nroff, eqn, tbl �ʤɤΤ褦�� man �ˤ�äƻ��Ѥ���뤤���Ĥ���
+�ץ���δ����ʥѥ�̾��(c) �ե�����γ�ĥ�Ҥ��Ȥ�Ÿ����ˡ���ʤɤ�
+�����ޤ�Ǥ��롣���Υե�������̤ΥС�������ʲ��Τ褦��
+���ꤹ�뤳�Ȥ��Ǥ��롣
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+���ޥ��̾�ˤϥ��ץ������դ��뤳�Ȥ��Ǥ��롣
+nroff �˴ؤ��Ƥ������ʥ��ץ����� grotty(1) �˸��Ĥ��뤳�Ȥ��Ǥ��롣
+�㤨�С��ǥե���Ȥ�
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+������
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+�Ƚ��ळ�Ȥ��Ǥ���������Ť��Ǥ����������뤳�Ȥ��Ǥ��롣
+.SH ��Ϣ����
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1), compress(1), gzip(1).
+
diff --git a/man/ja/man.man b/man/ja/man.man
new file mode 100644
index 0000000..725981c
--- /dev/null
+++ b/man/ja/man.man
@@ -0,0 +1,262 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" Japanese Version Copyright (c) 1996 Tanoshima Hidetohsi
+.\" all rights reserved.
+.\" Dec 31, 1996 Tanoshima Hidetoshi <tano at sainet.or.jp>
+.\"
+.\" Modified Thu Jan 29 01:52:36 JST 1998
+.\" by HANATAKA Shinya <hanataka at abyss.rim.or.jp>
+.\"
+.TH man 1 "September 12, 1995"
+.LO 1
+.SH ̾��
+man \- ����饤��ޥ˥奢��ڡ�����������ɽ�����롣
+.br
+manpath \- �桼�����ġ��Υޥ˥奢��ڡ����θ����ѥ�����롣
+.SH ��
+man [\-adfhktwW] [\-m system] [\-p string] [\-C config_file] [\-M path]
+[\-P pager] [\-S section_list] [section] name ...
+.SH ����
+.B man
+�ϥ���饤�ޥ˥奢�롦�ڡ�����������ɽ�����롣���ΥС������
+�� man ���ޥ�ɤǤϴĶ��ѿ� MANPATH �� (MAN)PAGER ������Ǥ��롣
+����ˤ�ꡢ�Ŀ�Ū�ʥޥ˥奢��ڡ��������ꤷ���ꡢ���������ڡ�����
+ɽ������ץ���������٤롣
+.I section
+����ꤹ��ȡ�
+.B man
+�ϥޥ˥奢��Τ��Υ��������Τ�õ�����ޤ����ޥ�ɥ饤���ץ�����
+�Ķ��ѿ�ǡ����줾��Υ����������������䡢���������ե������
+�Ф��Ƥɤ�ʥץ�ץ�å����Ѥ��뤫����ꤷ���ꤹ�뤳�Ȥ��Ǥ��롣
+.I name
+�� / ���ޤޤ�Ƥ���Ȥ� man ���ޥ�ɤϤޤ��ե�����̾�Ȥ��ư�����
+�������ä�
+.B "man ./foo.5"
+�ޤ���
+.B "man /cd/foo/bar.1.gz\fR\fP"
+�Ȥ����Ǥ��롣
+.SH ���ץ����
+.TP
+.B \-\^C " config_file"
+���Ѥ��� man.conf �ե��������ꤹ�롣�ǥե���Ȥ�
+.BR @man_config_file@
+(���ȡ� man.conf(5))
+.TP
+.B \-\^M " path"
+�ޥ˥奢�롦�ڡ�����õ���ǥ��쥯�ȥ�Υꥹ�Ȥ���ꤹ�롣
+���Υ��ץ�������ꤷ�ʤ���硢�Ķ��ѿ�
+.B MANPATH
+��Ȥ������δĶ��ѿ����ꤷ�ʤ��ȡ�
+.BR @man_config_file@
+�˻��ꤵ�줿�ǥե���ȤΥꥹ�Ȥ�Ȥ���
+MANPATH ��ζ���ʸ����ϥǥե���ȤΥꥹ�Ȥ��̣���롣
+.TP
+.B \-\^P " pager"
+���Ѥ���ڡ����㡼����ꤹ�롣�ǥե���ȤǤ� man ��
+.BR @pager@
+��Ȥ������Υ��ץ����ϴĶ��ѿ�
+.B MANPAGER
+���ͥ�褹�롣���δĶ��ѿ��
+.B PAGER
+����ͥ�褹�롣�ǥե���ȤǤ�
+.B man
+��
+.BR @pager@
+����Ѥ��롣
+.TP
+.B \-\^S " section_list"
+������ʬ����줿�ꥹ�Ȥǡ��ޥ˥奢���õ������������
+���ꤹ�롣���Υ��ץ����ϴĶ��ѿ�
+.B MANSECT
+���ͥ�褵��롣
+.TP
+.B \-\^a
+�ǥե���ȤǤϡ�man �ϸ��Ĥ��ä��ǽ�Υޥ˥奢��ڡ�����ɽ��
+�������Ƚ�λ���롣���Υ��ץ�����Ȥ��ȡ�man �Ϻǽ�ˤߤĤ��ä�
+��Τ����Ǥʤ�
+.B name
+�˥ޥå��������٤ƤΥڡ�����ɽ�����롣
+.TP
+.B \-\^c
+�ǿ��� cat �����Υڡ��������äƤ�ޥ˥奢��ڡ����Υ�������
+�������ʤ��������Υ��ץ����� cat �ڡ�����ü���Ȱ�ä�����
+��������Ƥ���Ȥ������Ƥ�����ʤɤ�ͭ�ѤǤ��롣
+.TP
+.B \-\^d
+�ޥ˥奢�롦�ڡ�����ɽ�����������̤ΥǥХå��������Ϥ��롣
+.TP
+.B \-\^D
+�ǥХå�����ȥޥ˥奢�롦�ڡ�����ξ����ɽ�����롣
+.TP
+.B \-\^f
+.B whatis
+���ޥ�ɤ�Ʊ����
+.TP
+.B \-\^h
+1�ԥإ�ס���å�������ɽ�����ƽ�λ���롣
+.TP
+.B \-\^k
+.B apropos
+���ޥ�ɤ�Ʊ����
+.B \-\^K
+�����ƤΡץޥ˥奢�롦�ڡ��������ꤷ��ʸ�����õ�����ٹ�: �����
+�����٤��Τ� ������������ꤷ�������ɤ���(��Υޥ���Ǥϡ�
+�����������ܰ¤Ȥ��ơ�500 �ڡ���������Τ� 1ʬ�֤����롣)
+.TP
+.B \-\^m " system"
+�̤Υ����ƥ�Υޥ˥奢�롦�ڡ���������褦�˻��ꤹ�롣
+.TP
+.B \-\^p " string"
+.B nroff
+��
+.B troff
+�Τޤ��˼¹Ԥ���ץ�ץ�å��ν��֤���ꤹ�롣
+���ȡ���ξ��֤ˤ�äƤϥե륻�åȤ�
+�ץ�ץ�å����Ѱդ���Ƥʤ����⤷�ʤ���������
+���Υץ�ץ�å��Ȥ����ؤ�����ʸ���ϼ��ΤȤ��ꡧ
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r)��
+���Υ��ץ����ϴĶ��ѿ�
+.B MANROFFSEQ
+���ͥ�褵��롣
+.TP
+.B \-\^t
+�ޥ˥奢�롦�ڡ�����������
+.B @troff@
+��Ȥ���
+.B stdout
+�˽��Ϥ��롣
+.B @troff@
+����ν��Ϥϰ�������ޤ��ˤʤ�餫�Υե��륿���ʤɤ��̤�ɬ��
+�����뤫�⤷��ʤ���
+.TP
+.B \-\^w \fRor\fP \-\-path
+�ޥ˥奢����ڡ�����ɽ�����������Ǥ˥ե����ޥåȤޤ���ɽ���˻��Ѥ���
+���������ե�����ΰ��֤�ɽ�����롣�����Ϳ���ʤ���
+.B man
+���ޥ˥奢����ڡ���������ǥ��쥯�ȥ�Υꥹ�Ȥ�(ɸ����Ϥ�)ɽ�����롣
+.B manpath
+�� man �˥����Ƥ���Ȥ��� "manpath" �� "man --path" ��
+Ʊ���ˤʤ롣
+.TP
+.B \-\^W
+\-\^w �˻��Ƥ��뤬���ե�����̾���ɲþ���ʤ��ˣ��ԣ��Ĥ���ɽ�����롣
+����ϥ�������
+.ft CW
+,B "man -aW man | xargs ls -l"
+.ft
+�ʤɤȻȤ��Τ������Ǥ��롣
+
+.SH "CAT �ڡ���"
+man ���ޥ�ɤϤ��Ǥ��������줿�ޥ˥奢��ڡ������ˤ���
+�ڡ�����ɬ�פˤʤä��Ȥ����������֤�����Τ���ˡ���¸���褦
+�Ȥ��롣����Ū�ˡ�DIR/manX �������Ѥߥޥ˥奢��� DIR/catX ��
+�����֤���뤬��man �ǥ��쥯�ȥ꤫�� cat �ǥ��쥯�ȥ�ؤ�
+¾�Υޥåԥ���ˡ��
+.BR @man_config_file@
+�˻���Ǥ��롣
+cat �ǥ��쥯�ȥ꤬�Ѱդ���Ƥʤ��ä���硢cat �ڡ����ϥ����֤���ʤ���
+.PP
+man ���ޥ�ɤ�桼���� man �� suid ���뤳�Ȥ��Ǥ��롣���Τ����
+ cat �ǥ��쥯�ȥ�Υ����ʡ��� man ���ĥ⡼�ɤ� 0755 (�桼���� man ������
+���߲�)�ǡ�cat �ե�����Υ����ʡ��� man ���ĥ⡼�ɤ� 0644 �ޤ���
+0444 (�桼���� man ���������߲ġ��ޤ��ϥ桼�������٤Ƥ������Բ�)
+�ΤȤ������̤Υ桼������ cat �ڡ������ѹ�������¾�Υե������ cat �ǥ���
+���ȥ��֤����ꤹ�뤳�Ȥ��Ǥ��ʤ��ʤ롣 man ���ޥ�ɤ� suid ����Ƥ��ʤ���С�
+���٤ƤΥ桼������ cat �ڡ����� cat �ǥ��쥯�ȥ���֤���褦�ˡ�
+cat �ǥ��쥯�ȥ�Υ⡼�ɤ� 0777 �ˤ���ɬ�פ����롣
+.PP
+cat �ڡ��������ä��Ȥ��Ƥ⡢���ץ����
+.B \-c
+��Ĥ���ȶ���Ū�˥ޥ˥奢��ڡ�������������롣
+
+.SH �Ķ��ѿ�
+.TP
+.B MANPATH
+.B MANPATH
+�����ꤹ��ȡ��ޥ˥奢�롦�ڡ�����õ���Ȥ����Υѥ���Ȥ���
+.TP
+.B MANROFFSEQ
+.B MANROFFSEQ
+�����ꤹ��ȡ�nroff �� troff �����˼¹Ԥ���ץ�ץ�å�
+����ꤹ��Τˤ����ͤ�Ȥ����ǥե���ȤǤϥޥ˥奢��ڡ�����
+.B nroff
+�Τޤ��˥ơ��֥��ѤΥץ�ץ�å����̤���롣
+.TP
+.B MANSECT
+.B MANSECT
+�����ꤹ��ȡ������ͤˤɤΥޥ˥奢�롦����������õ��������롣
+.TP
+.B MANWIDTH
+.B MANWIDTH
+�����ꤹ��ȡ������ͤ�ɽ������ޥ˥奢�롦�ڡ��������Ȥ��ƻ��Ѥ��롣
+���ꤷ�ʤ��ä����ˤϲ��̤������դޤǻ��Ѥ��롣
+.TP
+.B MANPAGER
+.B MANPAGER
+�����ꤹ��ȡ��ޥ˥奢�롦�ڡ�����ɽ������ץ���Ȥ��ƻ��Ѥ��롣
+���ꤷ�ʤ��ä����ˤϡ�
+.B PAGER
+�����Ѥ���롣�ɤ�������ꤵ��Ƥ��ʤ����ˤ�
+.B @pager@
+���Ȥ��롣
+.TP
+.B LANG
+.B LANG
+�����ꤹ��ȡ�man ���ޥ�ɤ���̾���Υ��֥ǥ��쥯�ȥ꤫��ǽ��
+�ޥ˥奢�롦�ڡ�����õ��������椨��'LANG=dk man 1 foo'
+�ȥ��ޥ�ɥ饤���ǤĤȡ�man ���ޥ�ɤϤޤ� .../dk/man1/foo.1 ��õ����
+���Ĥ���ʤ���� .../man1/foo.1 ��õ�������� ... �ϥ������ѥ�
+�Υǥ��쥯�ȥ�Ǥ��롣
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+�Ķ��ѿ�
+.B NLSPATH
+��
+.B LC_MESSAGES
+(�ޤ���Ԥ��ʤ��Ȥ���
+.B LANG
+)�ϥ�å�������������ΰ��֤���ꤹ�롣
+(�Ѹ�Υ�å������ϥ���ѥ�������Ȥ߹��ޤ�Ƥ���Τǡ��Ѹ�ξ���
+ �������ɬ�פʤ�)
+man �˸ƤӽФ���� col(1) �Τ褦��
+mo�ץ���� �����Ȥ��� LC_CTYPE
+�Ȥ����Ȥ���դ��뤳�ȡ�
+.TP
+.B PATH
+.B PATH
+�ϥޥ˥奢�롦�ڡ����Υǥե���Ȥθ����ѥ��ι��ۤ˻Ȥ��롣
+.TP
+.B SYSTEM
+.B SYSTEM
+�ϥǥե���ȤΥ����ƥ�̾������Τ˻Ȥ��롣
+(
+.B \-m
+���ץ����ȤȤ�˻Ȥ�)
+.SH ��Ϣ����
+apropos(1), whatis(1), less(1), groff(1).
+.SH �Х�
+.B \-t
+���ץ����� troff �饤���ʥץ��ब���ȡ��뤵��Ƥ���
+���Τ�ͭ���Ǥ��롣
+.br
+�⤷�ϥ��ե�Τ����ˡ����Ǥ��� \e255 �� <AD> ��ɽ�����줿���ˤ�
+�Ķ��ѿ�� 'LESSCHARSET=latin1' �����ꤹ����ɤ���
+
+(����: ���ܸ����Ѥ�����ˤ�
+'JLESSCHARSET=ja_JP.ujis' �ޤ��� 'LESSCHARSET=ja_JP.ujis'
+����Ѥ��뤿��ˡ�������ˡ�Ǥ��б��Ǥ��ʤ���groff �Υ��ץ�����
+\-Tnippon �ޤ� \-Tascii ����Ѥ��뤳�ȡ�)
diff --git a/man/ja/whatis.man b/man/ja/whatis.man
new file mode 100644
index 0000000..d2b27e6
--- /dev/null
+++ b/man/ja/whatis.man
@@ -0,0 +1,34 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\" all rights reserved.
+.\" Translated Thu Jan 29 01:52:06 JST 1998
+.\" by HANATAKA Shinya <hanataka at abyss.rim.or.jp>
+.\"
+.TH whatis 1 "Jan 5, 1991"
+.LO 1
+.SH ̾��
+whatis \- whatis �ǡ����١������鴰����ñ�������
+.SH ��
+.BI whatis
+keyword ...
+.SH ����
+whatis �ϥ����ƥ�Υ��ޥ�ɤ˴ؤ��������ȥ�����ɤ�ޤ���ǡ���
+�١����ν����������̤�ɸ����Ϥ�ɽ�����롣�����˥ޥå�����ñ��
+�Τߤ�ɽ������롣
+
+whatis �ǡ����١����� /usr/sbin/makewhatis ���ޥ�ɤ���Ѥ��ƺ������롣
+.SH ��Ϣ����
+apropos(1), man(1).
diff --git a/man/ko.txt b/man/ko.txt
new file mode 100644
index 0000000..69c04c6
--- /dev/null
+++ b/man/ko.txt
@@ -0,0 +1 @@
+korean
diff --git a/man/ko/apropos.man b/man/ko/apropos.man
new file mode 100644
index 0000000..d34a72e
--- /dev/null
+++ b/man/ko/apropos.man
@@ -0,0 +1,25 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "Jan 15, 1991"
+.LO 1
+.SH NAME
+apropos \- whatis ����Ÿ���̽��� ���ڿ��� �˻��Ѵ�
+.SH SYNOPSIS
+.BI apropos
+���� ...
+.SH DESCRIPTION
+apropos�� �ý��� ����� Ű����� �ϴ� ���� ������ �̷���� ����Ÿ���̽��� �˻��Ͽ� �� ����� ǥ��������� �����ش�.
+.SH "SEE ALSO"
+whatis(1), man(1).
diff --git a/man/ko/man.conf.man b/man/ko/man.conf.man
new file mode 100644
index 0000000..b2f6a8b
--- /dev/null
+++ b/man/ko/man.conf.man
@@ -0,0 +1,42 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "30 Mar 1994"
+.SH �̸�
+man.conf \- man�� ���� ���� �ڷ�
+.SH ����
+.LP
+�� ������
+.BR man (1)
+�� ���� �о�����, (a) man�� ���� �˻� ��� ���� ����� ���� ����,
+(b) nroff, eqn, tbl ��� ���� man�� ���� ���Ǵ� �������� ���α��� ����
+���� ��θ�, (c) ���Ͽ� �־��� Ȯ���ڸ� ���� ����Ǯ���� ����Ʈ �� �����ϰ�
+�ִ�. �� ������ ����ϴ� ������ ���� ó�� ������ �� �ִ�.
+.LP
+.RS
+man -C private_man.config ...
+.RE
+.LP
+��� �̸��� �ɼǵ�� ���� ���� �� �� �ִ�.
+nroff�� ���� ������ �ɼ��� grotty(1)���� ã�� �� �ִ�.
+���� ���, �⺻ ����
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+���
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+�� ���ٰ� ���� �۾�(����ü)�� �����ϱ� ���� ������ ��.
+.SH ���� ��
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) �� compress(1), gzip(1).
+.SH ����
+�輺�� <plodder at kldp.org>, 2000�� 5�� 5��
+
diff --git a/man/ko/man.man b/man/ko/man.man
new file mode 100644
index 0000000..109781f
--- /dev/null
+++ b/man/ko/man.man
@@ -0,0 +1,264 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.TH man 1 "September 2, 1995"
+.LO 1
+.SH �̸�
+man \- �¶��� �Ŵ��� �������� ����ȭ�ϰ� ǥ��
+.br
+manpath \- �� �������� ���� ������� �˻� ��θ� ����
+.SH ����
+man [\-acdfFhkKtwW] [\-m system] [\-p string] [\-C config_file] [\-M path]
+[\-P pager] [\-S section_list] [section] name ...
+.SH ����
+.B man
+�� �¶��� �Ŵ��� �������� ����ȭ�ϰ� ǥ���Ѵ�.
+�� ������
+.B MANPATH
+��
+.B (MAN)PAGER
+ȯ�� ������ �ν��Ѵ�. ���Ƿ� �ڽ��� �������� �� ������ ������ ���� �� �ְ�
+����ȭ�� �������� ǥ���ϱ� ���� �����ϴ� ���α��� ������ �� �ִ�. ����
+.I section
+�� �����Ǹ�,
+.B man
+�� ���� �� ���ǿ����� �Ŵ����� ã�� �����ش�. ����� �ɼ��̳� ȯ�� ������ ���ؼ����� �˻� ������ �ҽ� ���Ͽ� ���� ��� ��ó���⸦ ����� ������ ������ �� �ִ�.
+����
+.I name
+�� / �� �����ϸ�, �̰��� ���ϸ����� ���� ó���ȴ�. ����
+.B "man ./foo.5"
+Ȥ��
+.B "man /cd/foo/bar.1.gz"
+ó�� ���� �� �� �ִ�.
+.SH �ɼ�
+.TP
+.B \-\^C " config_file"
+��� �� man.conf ������ ����; �⺻ ����
+.B @man_config_file@
+�̴�.
+(
+.BR man.conf (5) ����.)
+.TP
+.B \-\^M " path"
+�� ������ �˻��� ���� ���丮 ����Ʈ�� �����Ѵ�.
+�� �ɼ��� �־����� ������, ȯ�� ����
+.B MANPATH
+�� ����Ѵ�. ���� ȯ�� ������ �߰����� ���ϸ�
+.B @man_config_file@
+�� ���� �⺻ ����Ʈ�� ����Ѵ�.
+.B MANPATH
+�� �� ������ �⺻ ����Ʈ�̴�.
+.TP
+.B \-\^P " pager"
+����� �������� �����Ѵ�.
+�� �ɼ���
+.B MANPAGER
+ȯ�� �������� �켱�Ѵ�.
+environment variable,
+.B PAGER
+���� ���ٵ� �켱�Ѵ�. �⺻ ��������
+.B man
+��
+.BR @pager@ �� �̿��Ѵ�.
+.TP
+.B \-\^S " section_list"
+�˻��� ���� �Ŵ��� ������ ����Ʈ�� �ݷ����� ������ ����Ʈ.
+�� �ɼ���
+.B MANSECT
+ȯ�� ���� ���� �켱�Ѵ�.
+.TP
+.B \-\^a
+�⺻ ��������,
+.B man
+�� ù��° �߰ߵ� �Ŵ��� �������� ǥ���� �� �����Ѵ�.
+�� �ɼ��� ����ϸ�,
+.B man
+�� ù��° �Ӹ� �ƴ϶�
+.B name
+�� �´� ��� �Ŵ��� �������� ǥ���Ѵ�.
+.TP
+.B \-\^c
+�ֽ��� cat �������� �����Ͽ��� �ҽ� �� �������� �� ����ȭ�Ѵ�.
+���� cat �������� �ٸ� ���� Į���� ���� ��ũ���� �°� ����ȭ�Ǿ��ų�,
+Ȥ��, ���� ������ ����ȭ�� �������� �ջ�Ǹ� �̰��� �ǹ̰� ���� �� �ִ�.
+.TP
+.B \-\^d
+������ �� �������� ǥ������ �ʰ�, ����� ������ ����� ����Ʈ�Ѵ�.
+.TP
+.B \-\^D
+ǥ�ÿ� ����� ���� �Ѵ� ����Ѵ�.
+.TP
+.B \-\^f
+.BR whatis
+�� ����.
+.TP
+.BR \-\^F " or " \-\-preformat
+����ȭ�� �ϰ� ǥ������ �ʴ´�.
+.TP
+.B \-\^h
+������ ���� ������ ����ϰ� �����Ѵ�.
+.TP
+.B \-\^k
+.BR apropos
+�� ����.
+.TP
+.B \-\^K
+*���* �� ���������� ������ ���ڿ��� ã�´�. ���: �� ���� �ſ� ������!
+������ �����ϴ� ���� ����.(��ü��, ���� ��迡�� 500 �������� �˻��ϴµ�
+1�� �ɸ���.)
+.TP
+.B \-\^m " system"
+�־��� �ý��� �̸��� ���ؼ� �˻��ϱ� ���� ��ü �� ������ ������ �����Ѵ�.
+.TP
+.B \-\^p " string"
+.B nroff
+or
+.BR troff
+�� �տ� �����ϴ� ��ó������ ���ʸ� �����Ѵ�.
+��� ��ġ�� ��ó������ ������ ������ ������ ���� ���̴�
+���� �����ϱ� ���� ���Ǵ� ��� õó����� ���� :
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+�� �ɼ���
+.B MANROFFSEQ
+ȯ�� �������� �켱�Ѵ�.
+.TP
+.B \-\^t
+�� �������� ����ȭ�� ����
+.B @troff@
+�� ����ϰ�,
+.B stdout
+�� ����Ѵ�.
+.B @troff@
+������ ����� �μ��ϱ� ���� ���� �����ų �ʿ䰡 �������� ��.
+.TP
+.B \-\^w \fRor\fP \-\-path
+������ �� �������� ǥ������ �ʰ�, ����ȭ Ȥ�� ǥ�õ� ������ ��ġ�� ����Ѵ�.
+���� ���ڰ� ������:
+.B man
+�� �� �������� �˻��ϴ� ���丮�� ����Ʈ�� ǥ��(ǥ�� ��¿�)�Ѵ�.
+����
+.B manpath
+�� man�� ����Ǿ� ������, "manpath"�� "man --path"�� ����.
+.TP
+.B \-\^W
+\-\^w�� ���������, �߰� �������� �� � �� ���� ǥ���Ѵ�.
+�̰��� ������ ���� �� ��ɿ��� ����ϸ� ��ϴ�.
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH "CAT ������"
+Man�� ����ȭ�� �� �������� ������ �� �������� �ʿ��ϰ� �Ǿ��� �� ����ȭ
+�ð��� ���̱� ���� �����Ѵ�. ����������, DIR/manX�� ����ȭ�� ������ ������
+DIR/catX�� ����ȴ�. ������ man dir�� �ٸ� cat dir�� �����ϴ� �������
+.BR @man_config_file@
+�� �ٸ� ���� ������ �� �ִ�.
+cat ���丮�� �������� ������ cat �������� �������� �ʴ´�.
+.PP
+.B man
+�� ����� man�� suid �� �� �ִ�. ����, cat ���丮�� �����ڰ� man��
+��� 0755(���� man�� ���� ���Ⱑ��), cat ���� �����ڰ� man�� ��� 0644 Ȥ��
+0444(���� man�� ���� ���Ⱑ��, Ȥ�� ��� ����Ұ�)��, ���� ������ cat ��������
+�����ϰų�, �ٸ� ������ cat ���丮�� �ΰų� �ϴ� ���� �� �� ����. ����
+.B man
+�� suid �� �ƴϸ�, ��� ������ cat �������� cat ���丮�� �� �� �ִ� ��ó��
+cat ���丮�� ��带 0777�� �ؾ� �Ѵ�.
+.PP
+��� �ֱ��� cat �������� �����ϴ���
+.B \-c
+�� ����ϸ� �������� �� ����ȭ�Ѵ�.
+
+.SH ȯ��
+.TP
+.B MANPATH
+.B MANPATH
+�� �����Ǹ�, �̰��� �Ŵ��� ������ �˻��� ���� ��η� ����Ѵ�.
+.TP
+.B MANROFFSEQ
+.B MANROFFSEQ
+�� �����Ǹ�, �̰���
+.B nroff
+��
+.BR troff
+�� �տ� �����ϴ� ��ó������ �������� �����Ͽ� ����Ѵ�.
+�⺻ ������,
+.BR nroff
+�տ� ���̺� ��ó���⸦ �����Ų��.
+.TP
+.B MANSECT
+.B MANSECT
+�� �����Ǹ�, �̰��� �˻��� ���� �Ŵ��� �������� �����Ѵ�.
+.TP
+.B MANWIDTH
+.B MANWIDTH
+�� �����Ǹ�, �̰��� ǥ���ϴ� ���������� ������ ����Ѵ�.
+���� ������, ȭ���� ��ü �� �̻����� ǥ�õ� ���� �ִ�.
+.TP
+.B MANPAGER
+.B MANPAGER
+�� �����Ǹ�, �̰��� �������� ǥ�ñ�� ����Ѵ�. ���� ���ٸ�,
+.B PAGER
+�� ���ȴ�. ���� �Ѵ� ���� ������ ���� ������
+.B @pager@
+�� ����Ѵ�.
+.TP
+.B LANG
+.B LANG
+�� �����Ǹ�, �̰��� man�� ���������� ù��°�� �����ֱ� ���� ����
+���丮�� �̸����� �����Ѵ�. ����, `LANG=dk man 1 foo' �����
+.../dk/man1/foo.1���� for ���������� ���� �ٷ��� �� ���̰�,
+���� file�� �߰ߵ��� ������, .../man1/for.1�� ã�´�. ...�� �˻�
+����� ���丮�̴�.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+ȯ�� ����
+.B NLSPATH
+��
+.B LC_MESSAGES
+(�Ǵ� ���ڰ� �����Ǿ� ���� ������
+.B LANG
+)�� ���� īŻ�α��� ��ġ�� �����Ѵ�. (������ ���� ������ �����ϵɶ�
+�����ǰ�, ��� ���� īŻ�α״� �ʿ����� �ʴ�.)
+man�� ���� ȣ��Ǵ� col(1)�� ���� ���α��� LC_CTYPE�� ����ϴ� ���� �����ض�.
+.TP
+.B PATH
+.B PATH
+�� ���������� ���� �⺻ �˻� ����� ������ ���ȴ�.
+.TP
+.B SYSTEM
+.B SYSTEM
+�� �⺻ ������ �������� ��ſ� �ý��� �̸��� ����Ѵ�.
+(
+.B \-m
+�ɼǰ� �Բ� ���)
+.SH ���� ��
+apropos(1), whatis(1), less(1), groff(1).
+.SH ����
+.B \-t
+�ɼ��� troff�� ���� ���α��� ��ġ�Ǿ� �ִ� ��쿡�� �����Ѵ�.
+.br
+���� ������ ��ſ� \e255 Ȥ�� <AD>�� ������� ����,
+`LESSCHARSET=latin1'�� ȯ�濡 �־��.
+.SH ��
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+��
+.IR .emacs
+���Ͽ� �߰��ϸ�, F1�� ���� �� ������ Ŀ�� ��ġ���� ���̺귯�� ȣ���� ���� ��
+�������� ���� �� ���̴�.
+.SH ����
+�輺�� <plodder at kldp.org>, 2000�� 5�� 5��
+
diff --git a/man/ko/whatis.man b/man/ko/whatis.man
new file mode 100644
index 0000000..9b80c85
--- /dev/null
+++ b/man/ko/whatis.man
@@ -0,0 +1,29 @@
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "Jan 5, 1991"
+.LO 1
+.SH NAME
+whatis \- �ܾ �ϼ���Ű�� ���� whatis ����Ÿ���̽��� ã�´�.
+.SH SYNOPSIS
+.BI whatis
+���� ...
+.SH DESCRIPTION
+whatis�� �ý��� ����� ������ ������ Ű����� �ϴ� ���� ������ ������ ����Ÿ���̽� ������ �˻��Ͽ� �� ����� ǥ�� ����� �����ش�. ������ �ܾ ��ġ�� ��츸 �����ش�.
+
+whatis ����Ÿ���̽��� @makewhatis@�� �̿��Ͽ� �����
+.SH "SEE ALSO"
+apropos(1), man(1).
+
diff --git a/man/nl.txt b/man/nl.txt
new file mode 100644
index 0000000..909c946
--- /dev/null
+++ b/man/nl.txt
@@ -0,0 +1 @@
+dutch
diff --git a/man/nl/apropos.man b/man/nl/apropos.man
new file mode 100644
index 0000000..0c225b7
--- /dev/null
+++ b/man/nl/apropos.man
@@ -0,0 +1,28 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "Jan 15, 1991"
+.LO 1
+.SH NAAM
+apropos \- zoek een gegeven string in de whatis database
+.SH SYNTAX
+.BI apropos
+string ...
+.SH BESCHRIJVING
+.B apropos
+zoekt naar de opgegeven strings in een aantal database bestanden
+die korte beschrijvingen van systeem\%commando's bevatten
+en stuurt het resultaat naar standaard uitvoer.
+.SH "ZIE OOK"
+whatis(1), man(1).
diff --git a/man/nl/man.conf.man b/man/nl/man.conf.man
new file mode 100644
index 0000000..9fccc18
--- /dev/null
+++ b/man/nl/man.conf.man
@@ -0,0 +1,42 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "30 Mar 1994"
+.SH NAAM
+man.conf \- configuratie bestand voor man
+.SH BESCHRIJVING
+.LP
+Dit bestand wordt door
+.BR man (1)
+gelezen, en bevat (a) informatie over hoe het zoekpad voor man
+gemaakt moet worden, (b) volledige padnamen voor de benodigde
+programma's, zoals nroff, eqn, tbl enz., en (c) een lijst
+van decomprimeerprogramma's voor bestanden met een gegeven extensie.
+Een prive versie van dit bestand kan gebruikt worden door
+man de -C optie mee te geven:
+.LP
+.RS
+man -C prive_man.conf ...
+.RE
+.LP
+Aan de programmanamen kunnen opties worden meegegeven.
+Nuttige opties om bij nroff te gebruiken kunnen in grotty(1)
+gevonden worden. Bijvoorbeeld, in plaats van het gebruikelijke
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+kan men
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+schrijven, teneinde onderstrepingen en overprintingen weg te halen.
+.SH "ZIE OOK"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) en compress(1), gzip(1).
+
diff --git a/man/nl/man.man b/man/nl/man.man
new file mode 100644
index 0000000..4dfafdb
--- /dev/null
+++ b/man/nl/man.man
@@ -0,0 +1,259 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.TH man 1 "2 September 1995"
+.LO 1
+.SH NAAM
+man \- formatteer en vertoon documentatie bladzijden
+.br
+manpath \- geef het zoekpad voor documentatie bladzijden van de gebruiker weer
+.SH SYNTAX
+man [\-acdfhktwW] [\-m systeem] [\-p preprocessoren] [\-C configuratiebestand] [\-M pad]
+[\-P pagineerprogramma] [\-S lijst_van_hoofdstukken] [hoofdstuk] naam ...
+.SH BESCHRIJVING
+.B man
+formatteert en vertoont bladzijden van de programma documentatie.
+Deze versie kent de
+.B MANPATH
+en
+.B (MAN)PAGER
+omgevings\%variabelen, zodat
+je je eigen collectie documentatiebladzijden en je eigen
+pagineerprogramma kunt gebruiken.
+Als het
+.I hoofdstuk
+is opgegeven, dan kijkt
+.B man
+alleen in dat hoofdstuk.
+Je kunt ook met omgevings\%variabelen of met programmaopties
+opgeven in welke volgorde de hoofdstukken moeten worden
+afgezocht, en welke preprocessoren de tekst moeten voorbewerken.
+Als
+.I naam
+een / bevat, dan wordt hij eerst geprobeerd als bestandsnaam,
+zodat opdrachten als
+.B "man ./foo.5"
+of
+.B "man /cd/foo/bar.1.gz"
+mogelijk zijn.
+.SH OPTIES
+.TP
+.B \-\^C " configuratiebestand"
+Geef aan welk configuratiebestand gebruikt moet worden.
+Als deze optie niet is opgegeven, dan wordt
+ at man_config_file@ gebruikt. (Voor een beschrijving van dit
+bestand, zie man.conf(5).)
+.TP
+.B \-\^M " pad"
+Geef de lijst van directories waarin gezocht moet worden.
+Als deze optie niet is opgegeven, dan wordt de omgevings\%variabele
+.B MANPATH
+gebruikt. En als er niet zo'n omgevings\%variabele is, dan wordt de
+standaardlijst gevonden door @man_config_file@ te raadplegen.
+Een lege deelstring in MANPATH wordt vervangen door de standaardlijst.
+.TP
+.B \-\^P " pagineerprogramma"
+Geef aan welk pagineerprogramma gebruikt moet worden.
+Als deze optie niet is opgegeven, dan wordt het programma vermeld in
+de omgevings\%variabele
+.B MANPAGER
+of, als deze niet bestaat,
+.B PAGER
+gebruikt. Is er ook niet zo'n omgevings\%variabele, dan wordt
+.B @pager@
+gebruikt.
+.TP
+.B \-\^S " lijst_van_hoofdstukken"
+Deze lijst is een lijst van hoofdstukken, door dubbele punten van elkaar
+gescheiden, waarin gezocht wordt.
+Als deze optie niet is opgegeven, dan wordt de omgevings\%variabele
+.B MANSECT
+gebruikt.
+.TP
+.B \-\^a
+Normaal zal
+.B man
+termineren na het vertonen van de eerste documentatie bladzijde
+die hij vindt. Deze optie zegt dat alle bladzijden over
+.B naam
+vertoond moeten worden.
+.TP
+.B \-\^c
+Formatteer de bron bladzijde, zelfs als er een recente voorgeformatteerde
+bladzijde bestaat. Dit kan nuttig zijn als die bladzijde
+geformatteerd was voor een scherm met een andere breedte,
+of als de voorgeformatteerde bladzijde niet deugt.
+.TP
+.B \-\^d
+Vertoon de bladzijden niet echt, maar vertel gedetailleerd wat
+gedaan wordt - deze optie is alleen nuttig om fouten op te sporen.
+.TP
+.B \-\^D
+Als by -d, maar vertoon de bladzijden ook.
+.TP
+.B \-\^f
+Voer het programma
+.B whatis
+uit.
+.TP
+.B \-\^h
+Druk een hulptekst af.
+.TP
+.B \-\^k
+Voer het programma
+.B apropos
+uit.
+.TP
+.B \-\^K
+Zoek de opgegeven tekst in *alle* handboekbladzijden. Pas op: dit
+kan lang duren! (Op mijn machine kost dit bijvoorbeeld een minuut
+voor elke 500 pagina's.) Het helpt om een sectie op te geven.
+.TP
+.B \-\^m " systeem"
+Gebruik een andere collectie documentatie\%bladzijden, afhankelijk
+van de opgegeven systeem\%naam.
+.TP
+.B \-\^p " preprocessoren"
+Geef aan welke preprocessoren de tekst moeten voorbewerken voordat
+deze aan nroff of troff gevoerd wordt. Enige preprocessoren, en de
+letters waarmee ze aangeduid worden, zijn:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Niet elke installatie zal al deze programma's hebben.
+Als deze optie niet is opgegeven, dan wordt de omgevings\%variabele
+.B MANROFFSEQ
+gebruikt.
+.TP
+.B \-\^t
+Gebruik
+.B @troff@
+om de bladzijde te formatteren, en stuur het resultaat naar
+.B stdout.
+De uitvoer van
+.B @troff@
+moet mogelijk nog door een of ander filter gestuurd worden
+voordat hij afgedrukt kan worden.
+.TP
+.B \-\^w \fRor\fP \-\-path
+Vertoon geen documentatie, maar druk de padnamen af van de bestanden
+waarin documentatie gevonden werd. Als geen
+.I naam
+opgegeven is, dan: druk het zoekpad af. Als
+.B manpath
+een link is naar man, dan is "manpath" equivalent met "man --path".
+.TP
+.B \-\^W
+Als \-\^w, maar druk alleen de padnamen af, zonder additionele informatie.
+Dit komt van pas in opdrachten zoals
+.ft CW
+man -aW man | xargs ls -l
+.ft
+
+.SH "VOORGEFORMATTEERDE BLADZIJDEN"
+Man probeert om geformatteerde bladzijden te bewaren, om de volgende
+keer dat ze nodig zijn tijd te sparen. Gewoonlijk worden de geformatteerde
+versies van de bladzijden uit DIR/manX bewaard in DIR/catX, maar andere
+afbeeldingen van man directories naar cat directories kunnen in
+ at man_config_file@ worden aangegeven. Geformatteerde bladzijden worden
+niet bewaard als het bijbehorende cat directory niet bestaat.
+.LP
+Het is mogelijk om man suid te maken, met eigenaar man. Als dan een
+cat directory eigenaar man heeft, en mode 0755 (alleen door man beschrijfbaar),
+en de geformatteerde bladzijden hebben eigenaar man en mode 0644 of 0444
+(alleen beschrijfbaar door man, of helemaal niet beschrijfbaar),
+dan kan geen gewone gebruiker de geformatteerde bladzijden wijzigen
+of andere bestanden opslaan in dat directory. Als man niet suid is,
+dan moet een cat directory waar voor alle gebruikers geformatteerde
+bladzijden geschreven moeten kunnen worden mode 0777 hebben.
+.LP
+De optie -c laat man een pagina opnieuw formatteren, zelfs als een
+recente geformatteerde pagina bestaat.
+
+.SH OMGEVINGSVARIABELEN
+.TP
+.B MANPATH
+Als
+.B MANPATH
+een waarde heeft, dan wordt deze waarde als zoekpad gebruikt.
+.TP
+.B MANROFFSEQ
+Als
+.B MANROFFSEQ
+een waarde heeft, dan wordt deze waarde gebruikt om te bepalen door
+welke preprocessoren de tekst bewerkt moet worden. Standaard wordt
+tbl gebruikt.
+.TP
+.B MANSECT
+Als
+.B MANSECT
+een waarde heeft, dan wordt deze waarde gebruikt om te bepalen in welke
+hoofdstukken gezocht wordt.
+.TP
+.B MANWIDTH
+Als
+.B MANWIDTH
+een waarde heeft, dan geeft deze waarde aan hoeveel kolommen de uitvoer
+breed moet zijn. Vooral bij heel brede schermen geven veel mensen er de
+voorkeur aan het aantal kolommen tot 80 of 100 te beperken.
+.TP
+.B MANPAGER
+Als
+.B MANPAGER
+een waarde heeft, dan wordt deze waarde gebruikt als naam van het te gebruiken
+pagineerprogramma. Zo niet, dan wordt de waarde van
+.B PAGER
+gebruikt. Bestaat deze ook niet, dan wordt
+.B @pager@
+gebruikt.
+.TP
+.B LANG
+Als
+.B LANG
+een waarde heeft, dan bepaalt deze de naam van een onderdirectory
+waar man eerst in zoekt. Bijvoorbeeld, na `LANG=nl man 1 iets'
+zal man eerst in .../nl/man1/iets.1 zoeken, en als dat niet bestaat,
+dan in .../man1/iets.1. Hierbij is ... een directory uit het zoekpad.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+De omgevingsvariabelen
+.B NLSPATH
+en
+.B LC_MESSAGES
+(of, als deze niet bestaat,
+.B LANG\c
+) spelen een rol bij het vinden van de versie in de opgegeven taal
+van de mededelingen (voornamelijk foutmeldingen) die man produceert.
+(Maar de Engelse teksten zijn meegecompileerd, en hoeven niet uit een
+bestand gehaald te worden.)
+Programma's als col(1) die door man aangeroepen worden,
+gebruiken ook LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+wordt gebruikt bij het construeren van het standaard zoekpad van man.
+.TP
+.B SYSTEM
+.B SYSTEM
+wordt gebruikt als standaard naam bij de optie
+.B \-m.
+.SH "ZIE OOK"
+apropos(1), whatis(1), less(1), groff(1).
+.SH FOUTEN
+De
+.B \-t
+optie werkt alleen als een troff-achtig programma geinstalleerd is.
+.br
+Als je \e255 of <AD> ziet knipperen waar afbreekstreepjes hadden
+moeten staan, zet dan `LESSCHARSET=latin1' in je omgeving.
diff --git a/man/nl/whatis.man b/man/nl/whatis.man
new file mode 100644
index 0000000..2b2c38a
--- /dev/null
+++ b/man/nl/whatis.man
@@ -0,0 +1,32 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "Jan 5, 1991"
+.LO 1
+.SH NAAM
+whatis \- zoek gegeven woorden in de whatis database
+.SH SYNTAX
+.BI whatis
+woord ...
+.SH BESCHRIJVING
+.B whatis
+zoekt naar de opgegeven woorden in een aantal database bestanden
+die korte beschrijvingen van systeem\%commando's bevatten
+en stuurt het resultaat naar standaard uitvoer.
+De opgegeven woorden moeten als volledige woorden gevonden worden.
+
+De whatis database bestanden wordem aangemaakt met behulp van
+het commando @makewhatis at .
+.SH "ZIE OOK"
+apropos(1), man(1).
diff --git a/man/pl.txt b/man/pl.txt
new file mode 100644
index 0000000..88ffee5
--- /dev/null
+++ b/man/pl.txt
@@ -0,0 +1 @@
+polish
diff --git a/man/pl/apropos.man b/man/pl/apropos.man
new file mode 100644
index 0000000..8d92ed4
--- /dev/null
+++ b/man/pl/apropos.man
@@ -0,0 +1,35 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" T�umaczenie: 950322 Rafa� Maszkowski <rzm at pdi.net>
+.\"
+.TH apropos 1 "19 wrze�nia 2005"
+.LO 1
+.SH NAZWA
+apropos \- wyszukuje �a�cuchy znak�w w bazie whatis
+.SH SK�ADNIA
+.BI apropos
+s�owo_kluczowe ...
+.SH OPIS
+apropos wyszukuje s�owa kluczowe w plikach bazy danych, kt�re
+zawieraj� kr�tkie opisy polece� systemowych i wy�wietla wynik
+na standardowe wyj�cie.
+.SH AUTOR
+Pierwotnym autorem programu
+.BR "man"
+jest John W. Eaton.
+Zeyd M. Ben-Halim opublikowa� man w wersji 1.2, a Andries Brouwer wersje od 1.3 do 1.5p.
+Aktualnym opiekunem jest Federico Lucifredi <flucifredi at acm.org>.
+.SH "ZOBACZ TAK�E"
+whatis(1), man(1).
diff --git a/man/pl/man.conf.man b/man/pl/man.conf.man
new file mode 100644
index 0000000..1df8ccf
--- /dev/null
+++ b/man/pl/man.conf.man
@@ -0,0 +1,49 @@
+.\" @(#)man.conf
+.\" T�umaczenie: 950322 Rafa� Maszkowski <rzm at pdi.net>
+.TH MAN.CONF 5 "19 wrze�nia 2005"
+.SH NAZWA
+man.conf \- dane konfiguracyjne dla programu man
+.SH OPIS
+.LP
+Ten plik jest czytany przez
+.BR man (1)
+i zawiera (a) informacj� jak utworzy� �cie�k� przeszukiwan� przez man,
+(b) pe�ne �cie�ki do r�nych program�w jak nroff, eqn, tbl itd., kt�re
+s� u�ywane przez man oraz (c) list� program�w rozpakowuj�cych pliki z
+podanymi rozszerzeniami.
+Alternatywna wersja pliku man.conf mo�e by� podana przez
+.LP
+.RS
+man -C prywatny_man.conf ...
+.RE
+.LP
+Nazwy polece� mog� by� podane z opcjami.
+U�yteczne opcje nroff mo�na znale�� w grotty(1).
+Na przyk�ad zamiast domy�lnej linii
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+mo�na napisa�
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+�eby wy��czy� podkre�lanie i wyt�uszczanie.
+.SH PLIKI
+.I "@man_config_file@"
+.SH AUTOR
+Pierwotnym autorem programu
+.BR "man"
+jest John W. Eaton.
+Zeyd M. Ben-Halim opublikowa� man w wersji 1.2, a Andries Brouwer wersje od 1.3 do 1.5p.
+Aktualnym opiekunem jest Federico Lucifredi <flucifredi at acm.org>.
+.SH "ZOBACZ TAK�E"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) i compress(1), gzip(1).
diff --git a/man/pl/man.man b/man/pl/man.man
new file mode 100644
index 0000000..eb29b4e
--- /dev/null
+++ b/man/pl/man.man
@@ -0,0 +1,427 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" T�umaczenie - 950322 Rafa� Maszkowski <rzm at pdi.net>
+.\" 960619 - aktualizacja -K
+.\" 20011102 - aktualizacja do wersji z man-1.5i2, cz�ciowo w oparciu
+.\" o alternatywne t�umaczenie PB z PTM - AMK
+.\"
+.TH man 1 "2 wrze�nia 1995"
+.LO 1
+.SH NAZWA
+man \- formatowanie i wy�wietlanie dost�pnych stron podr�cznika man
+.br
+manpath \- wyznaczanie �cie�ki poszukiwania stron podr�cznika odpowiedniej dla
+danego u�ytkownika
+.SH SK�ADNIA
+.TP 4
+.B man
+.RB [ \-adfhkKtwW ]
+.RB [ \-m
+.IR system ]
+.RB [ \-p
+.IR �a�cuch_znak�w ]
+.RB [\-C
+.IR plik_konfiguracyjny ]
+.RB [ \-M
+.IR �cie�ka ]
+.RB [ \-P
+.IR pager ]
+.RB [ \-S
+.IR lista_rozdzia��w ]
+.RI [ rozdzia� ]
+.IR nazwa ...
+.SH OPIS
+.B man
+formatuje i wy�wietla dost�pne w systemie strony podr�cznika man.
+.\" Ta wersja sprawdza zmienne �rodowiskowe
+.\" .B MANPATH
+.\" i
+.\" .BR (MAN)PAGER ,
+.\" wi�c mo�esz mie� sw�j w�asny zestaw stron podr�cznika man i wybra� do ich
+.\" wy�wietlania ulubiony program.
+Je�eli zostanie podany
+.IR rozdzia� ,
+.B man
+sprawdza tylko ten rozdzia� podr�cznika.
+.\" U�ywaj�c opcji lub zmiennych �rodowiskowych mo�esz tak�e poda� porz�dek,
+.\" w jakim nale�y przeszukiwa� rozdzia�y oraz jakie preprocesory powinny
+.\" zosta� u�yte do wst�pnego przetworzenia stron.
+Je�eli
+.I nazwa
+zawiera znak /, to man pr�buje najpierw znale�� podany plik, wi�c mo�na np.
+wyda� polecenie
+.B "man ./foo.5"
+a nawet
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+Ni�ej znajdziesz informacje, gdzie
+.B man
+szuka plik�w stron podr�cznika.
+
+.SH OPCJE
+.TP
+.B \-\^C " plik_konfiguracyjny"
+Okre�la plik konfiguracyjny, kt�rego nale�y u�y�. Domy�lnym jest
+.BR @man_config_file@ .
+(Zobacz
+.BR man.conf (5).)
+.TP
+.B \-\^M " �cie�ka"
+Okre�la list� katalog�w, w kt�rych b�d� szukane strony podr�cznika man.
+Katalogi nale�y rozdziela� dwukropkami. Pusta lista jest r�wnoznaczna z nie
+podaniem tej opcji. Zobacz
+.BR "�CIE�KA PRZESZUKIWANIA DLA STRON PODR�CZNIKA" .
+.TP
+.B \-\^P " pager"
+Okre�la, kt�ry pager ma zosta� u�yty. Je�eli podana jest ta opcja,
+ignorowana jest zmienna �rodowiskowa
+.BR MANPAGER ,
+kt�rej u�ycie z kolei powoduje zignorowanie zmiennej �rodowiskowej
+.BR PAGER .
+Domy�lnie
+.B man
+u�ywa
+.BR @pager@ .
+.TP
+.B \-\^S " lista_rozdzia��w"
+Rozdzielona dwukropkami lista rozdzia��w podr�cznika, kt�re maj� by�
+przeszukane. Je�eli podana jest ta opcja, zmienna �rodowiskowa
+.B MANSECT
+jest ignorowana.
+.TP
+.B \-\^a
+Domy�lnie man ko�czy dzia�anie po wy�wietleniu pierwszej znalezionej
+strony. Podanie tej opcji powoduje wy�wietlenie wszystkich stron
+podr�cznika, kt�re pasuj� do
+.BR nazwa ,
+a nie tylko pierwszej.
+.TP
+.B \-\^c
+Przeformatowuje �r�d�ow� stron� podr�cznika, nawet je�eli istnieje aktualna
+strona cat. Mo�e to by� istotne, je�eli strona cat jest sformatowana
+dla ekranu z inn� liczb� kolumn.
+.TP
+.B \-\^d
+Zamiast stron podr�cznika wy�wietla mn�stwo informacji diagnostycznych.
+.TP
+.B \-\^D
+Wy�wietla zar�wno stron� podr�cznika jak i informacje diagnostyczne.
+.TP
+.B \-\^f
+R�wnowa�ne
+.BR whatis .
+.TP
+.B \-\^h
+Wy�wietla kr�tk� informacj� pomocy i ko�czy prac�.
+.TP
+.B \-\^k
+R�wnowa�ne
+.BR apropos .
+.TP
+.B \-\^K
+Szuka podanego �a�cucha znak�w we *wszystkich* stronach podr�cznika. Uwaga:
+b�dzie to prawdopodobnie bardzo powolne! Podanie rozdzia��w pomaga
+przyspieszy� szukanie. (Dla og�lnej orientacji: na mojej maszynie zajmuje to
+ok. minuty na ka�de 500 stron podr�cznika.)
+.TP
+.B \-\^m " system"
+Podanie alternatywnego zestawu stron podr�cznika, odpowiedniego dla
+systemu o podanej nazwie.
+.TP
+.B \-\^p " �a�cuch_znak�w"
+Podanie listy nazw preprocesor�w, ktore zostan� uruchomione przed
+.B nroff
+i
+.BR troff .
+Nie wszystkie intalacje maj� pe�ny zestaw preprocesor�w.
+Niekt�re z nich oraz oznaczaj�ce je litery to:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Podanie tej opcji powoduje zignorowanie zmiennej �rodowiskowej
+.BR MANROFFSEQ .
+.TP
+.B \-\^t
+Sformatuj stron� podr�cznika za pomoc�
+.BR @troff@ ,
+a wynik wy�lij na
+.B stdout
+(standardowe wyj�cie).
+Mo�e by� konieczne przepuszczenie wyniku z
+.B @troff@
+przez jaki� filtr przed wydrukowaniem.
+.TP
+.B \-\^w \fRlub\fP \-\-path
+Nie wy�wietlaj stron podr�cznika, podaj tylko gdzie znajduj� si� pliki, kt�re
+by�yby sformatowane i wy�wietlone. Je�eli nie podano �adnych argument�w:
+wy�wietla (na stdout) list� katalog�w, w kt�rych
+.B man
+poszukuje stron podr�cznika. Je�eli
+.B manpath
+jest dowi�zaniem man to "manpath" jest r�wnowa�ne "man --path".
+.TP
+.B \-\^W
+Podobne do \-\^w, lecz podaje nazwy plik�w, ka�d� w osobnej linii, bez
+dodatkowych informacji. Przydaje si� w poleceniach pow�oki, np.
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH "STRONY CAT"
+Man b�dzie pr�bowa� zachowa� sformatowane strony podr�cznika aby
+skr�ci� czas potrzebny na sformatowanie ich po raz kolejny,
+kiedy te strony b�d� znowu potrzebne.
+Tradycyjnie, sformatowane wersje stron podr�cznika z katalogu DIR/manX s�
+zachowywane w DIR/catX, ale mo�na te� w pliku
+.BR @man_config_file@
+okre�li� inne zasady.
+Strony cat nie s� tworzone, je�eli wymagany katalog nie istnieje.
+.PP
+Mo�liwe jest uczynienie programu
+.B man
+suidowym na u�ytkownika man. Wtedy, je�li katalogi cat maj� w�a�ciciela man
+i prawa dost�pu 0755 (zapisywalne tylko przez u�ytkownika man), a pliki cat
+maj� w�a�ciciela man i prawa dost�pu 0644 lub 0444 (zapisywalne przez
+u�ytkownika man lub przez nikogo), to �aden zwyk�y u�ytkownik nie mo�e
+zmienia� stron cat lub umieszcza� w katalogach cat innych plik�w. Je�eli
+.B man
+nie jest suidowy to katalog cat powinien mie� prawa dost�pu 0777,
+o ile wszyscy u�ytkownicy powinni mie� mo�liwo�� pozostawiania tam stron cat.
+.PP
+Opcja
+.B \-c
+wymusza przeformatowanie strony nawet je�eli istnieje ju� odpowiednia strona
+cat.
+
+
+.SH "�CIE�KA PRZESZUKIWANIA DLA STRON PODR�CZNIKA"
+.B man
+stosuje wymy�ln� metod� poszukiwania plik�w stron podr�cznika, opart� na
+opcjach wywo�ania, zmiennych �rodowiskowych, pliku konfiguracyjnym
+.B @man_config_file@
+oraz na pewnych wbudowanych konwencjach i heurystyce.
+.PP
+Najpierw, gdy argument
+.I nazwa
+polecenia
+.B man
+zawiera uko�nik
+.RB ( / ),
+.B man
+zak�ada, �e jest on nazw� w�a�ciwego pliku i nie prowadzi poszukiwania.
+.PP
+Ale zazwyczaj, gdy
+.I nazwa
+nie zawiera uko�nika,
+.B man
+poszukuje pliku, kt�ry m�g�by stanowi� stron� podr�cznika o zadanym temacie,
+w r�nych katalogach.
+.PP
+Je�li zostanie podana opcja
+.BI "-M " �cie�ka\fR,
+to
+.I �cie�ka
+jest rozdzielon� dwukropkami list� przeszukiwanych przez program
+.B man
+katalog�w.
+.PP
+Gdy opcja
+.B -M
+nie zostanie podana, ale zostanie zdefiniowana zmienna �rodowiskowa
+.BR MANPATH ,
+warto�� tej zmiennej stanowi list� przeszukiwanych przez program
+.B man
+katalog�w.
+.PP
+Je�li �cie�ka nie zostanie podana w spos�b jawny ani za pomoc�
+.B -M
+ani poprzez
+.BR MANPATH ,
+.B man
+rozwija swoj� w�asn� �cie�k� w oparciu o zawarto�� pliku konfiguracyjnego
+.BR @man_config_file@ .
+Instrukcje
+.B MANPATH
+w pliku konfiguracyjnym okre�laj� poszczeg�lne katalogi w��czane do �cie�ki
+przeszukiwania.
+.PP
+Ponadto, instrukcje
+.B MANPATH_MAP
+dodaj� do �cie�ki przeszukiwania katalogi zale�ne od �cie�ki przeszukiwania
+dla polece� (tzn. zawartej w zmiennej �rodowiskowej
+.B PATH
+).
+Instrukcja
+.B MANPATH_MAP
+dodaje do �cie�ki przeszukiwania dla stron podr�cznika po jednym katalogu dla
+ka�dego katalogu zawartego w �cie�ce przeszukiwania dla polece�.
+.B man
+przegl�da zmienn�
+.B PATH
+i dodaje odpowiednie katalogi do �cie�ki przeszukiwania dla stron podr�cznika.
+Zatem przy w�a�ciwym u�yciu
+.BR MANPATH_MAP ,
+po wydaniu polecenia
+.BR "man xyz" ,
+otrzyma si� stron� podr�cznika dla programu, kt�ry zosta�by uruchomiony
+poprzez wydanie polecenia
+.BR xyz .
+.PP
+Dodatkowo, dla ka�dego katalogu w �cie�ce przeszukiwania dla polece�
+(b�dziemy go nazywa� "katalogiem polece�"), dla kt�rego
+.I nie
+ma instrukcji
+.BR MANPATH_MAP ,
+.B man
+automatycznie poszukuje "bliskiego" katalogu stron podr�cznika jako
+podkatalogu w�a�ciwego katalogu polece� lub w katalogu nadrz�dnym dla katalogu
+polece�.
+.PP
+Mo�na wy��czy� automatyczne "bliskie" przeszukiwania do��czaj�c instrukcj�
+.B NOAUTOPATH
+do
+.BR @man_config_file@ .
+.PP
+Jak opisano powy�ej, w ka�dym z katalog�w �cie�ki przeszukiwania
+.B man
+poszukuje pliku o nazwie
+.IB tytu� . rozdzia�\fR,
+z opcjonalnym przyrostkiem dla numeru rozdzia�u i mo�liwym przyrostkiem
+kompresji. Je�li nie znajdzie takiego pliku, b�dzie szuka� w podkatalogach
+o nazwach
+.BI man N
+i
+.BI cat N\fR,
+gdzie
+.I N
+jest numerem rozdzia�u podr�cznika.
+Je�li plik znajduje si� w podkatalogu
+.BIR cat N ,
+.B man
+zak�ada, �e jest to sformatowany plik strony podr�cznika (cat page).
+W przeciwnym przypadku,
+.B man
+zak�ada, �e jest ona niesformatowana. W obu przypadkach, je�li nazwa pliku
+zawiera znany przyrostek kompresji (jak
+.BR .gz ),
+.B man
+zak�ada, �e jest ona spakowania gzipem.
+.PP
+Aby zobaczy�, gdzie (lub czy)
+.B man
+znajdzie stron� podr�cznika o okre�lonym tytule, nale�y pos�u�yc si� opcj�
+.BR "--path " ( -w ).
+
+.SH "�RODOWISKO"
+.TP
+.B MANPL
+Je�li zmienna
+.B MANPL
+jest zdefinowana, to jej warto�� jest u�ywana do okre�lenia d�ugo�ci strony.
+W przeciwnym przypadku, ca�a strona podr�cznika b�dzie stanowi� jedn� (d�ug�)
+stron�.
+.TP
+.B MANROFFSEQ
+Je�li zmienna
+.B MANROFFSEQ
+jest zdefinowana, to jej warto�� jest u�ywana do zdefinowania zestawu
+preprocesor�w uruchamianych przed
+.B nroff
+i
+.BR troff .
+Domy�lnie strony s� przepuszczane przez preprocesor tbl przed u�yciem nroff.
+.TP
+.B MANSECT
+Je�li zmienna
+.B MANSECT
+jest zdefiniowana, to jej warto�� jest u�ywana do okre�lenia jakie rozdzia�y
+podr�cznika powinny zosta� przeszukane.
+.TP
+.B MANWIDTH
+Je�li zmienna
+.B MANWIDTH
+jest zdefiniowana, to jej warto�� jest u�ywana jako szeroko�� wy�wietlanych
+stron podr�cznika man. W przeciwnym wypadku, strony b�d� wy�wietlane na ca�ej
+szeroko�ci ekranu.
+.TP
+.B MANPAGER
+Je�li zmienna
+.B MANPAGER
+jest zdefiniowana, to jej warto�� jest u�ywana jako nazwa programu do
+wy�wietlania strony podr�cznika man. Je�li nie jest zdefiniowana, to u�ywana
+jest zmienna
+.BR PAGER .
+Je�eli ta r�wnie� nie ma nadanej warto�ci, to u�ywany jest
+.BR @pager@ .
+.TP
+.B LANG
+Je�li zmienna
+.B LANG
+jest zdefiniowana, to jej warto�� okre�la nazw� podkatalogu, w kt�rym man
+najpierw b�dzie szuka� stron podr�cznika. Zatem polecenie `LANG=pl man 1 co�'
+(w sh lub bash) spowoduje, �e man b�dzie szuka� strony "co�"
+w .../pl/man1/co�.1, a nast�pnie, je�eli takiego pliku nie znajdzie,
+w .../man1/co�.1, gdzie ... jest katalogiem ze �cie�ki przeszukiwania.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Zmienne �rodowiskowe
+.B NLSPATH
+i
+.B LC_MESSAGES
+(lub
+.BR LANG ,
+je�eli ta druga nie istnieje)
+steruj� przeszukiwaniem katalog�w z komunikatami.
+(Komunikaty angielskie s� wkompilowane, wi�c dla angielskiego taki
+katalog nie jest potrzebny.)
+Zauwa�, �e programy takie jak
+.BR col(1) ,
+wo�ane przez man, r�wnie� u�ywaj� np. LC_TYPE.
+.TP
+.B PATH
+.B PATH
+pomaga okre�li� �cie�k� przeszukiwania dla plik�w stron podr�cznika.
+Zobacz
+.BR "�CIE�KA PRZESZUKIWANIA DLA STRON PODR�CZNIKA" .
+.TP
+.B SYSTEM
+.B SYSTEM
+jest u�ywana do pobierania domy�lnej alternatywnej nazwy systemu (do u�ywania
+razem z opcj�
+.BR \-m ).
+.SH "ZOBACZ TAK�E"
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
+.SH B��DY
+Opcja
+.B \-t
+dzia�a tylko je�eli jest zainstalowany jaki� program dzia�aj�cy jak troff.
+.br
+Je�eli zamiast my�lnik�w pojawi� si� migaj�ce \e255 lub <AD>, to nale�y
+ustawi� w �rodowisku u�ytkownika `LESSCHARSET=latin1'.
+.SH ZAKO�CZENIE
+Je�li do pliku
+.IR .emacs
+u�ytkownika dodana zostanie linia
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+to naci�ni�cie F1 spowoduje wy�wietlenie strony podr�cznika dla funkcji
+bibliotecznej, na kt�rej ustawiony jest kursor.
+.LP
+Aby uzyska� czysto tekstow� wersj� strony podr�cznika, bez cofni��
+i podkre�le�, nale�y wyda� polecenie
+
+ # man co� | col -b > co�.mantxt
+
diff --git a/man/pl/whatis.man b/man/pl/whatis.man
new file mode 100644
index 0000000..936627f
--- /dev/null
+++ b/man/pl/whatis.man
@@ -0,0 +1,37 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" T�umaczenie - 950322 Rafa� Maszkowski <rzm at pdi.net>
+.\"
+.TH whatis 1 "19 wrze�nia 2005"
+.LO 1
+.SH NAZWA
+whatis \- wyszukuje s�owa w bazie whatis.
+.SH SK�ADNIA
+.BI whatis
+s�owo_kluczowe ...
+.SH OPIS
+whatis wyszukuje s�owa kluczowe w zestawie plik�w zawieraj�cych kr�tkie
+opisy polece� systemowych i wy�wietla rezultat na standardowe wyj�cie.
+Wy�wietlane s� tylko polecenia, kt�rych nazwy pasuj� dok�adnie.
+
+Baza whatis jest tworzona przy u�yciu polecenia @makewhatis at .
+.SH AUTOR
+Pierwotnym autorem programu
+.BR "man"
+jest John W. Eaton.
+Zeyd M. Ben-Halim opublikowa� man w wersji 1.2, a Andries Brouwer wersje od 1.3 do 1.5p.
+Aktualnym opiekunem jest Federico Lucifredi <flucifredi at acm.org>.
+.SH "ZOBACZ TAK�E"
+apropos(1), man(1).
diff --git a/man/pt.txt b/man/pt.txt
new file mode 100644
index 0000000..5150030
--- /dev/null
+++ b/man/pt.txt
@@ -0,0 +1 @@
+portuguese
diff --git a/man/pt/README b/man/pt/README
new file mode 100644
index 0000000..832c6db
--- /dev/null
+++ b/man/pt/README
@@ -0,0 +1,6 @@
+These portuguese man pages were contributed by Vitor Duarte.
+
+#From vad at fct.unl.pt Tue Jun 21 14:15:01 1994
+#To: Andries.Brouwer at cwi.nl
+#Subject: portuguese man
+#From: Vitor Duarte <vad at fct.unl.pt>
diff --git a/man/pt/apropos.man b/man/pt/apropos.man
new file mode 100644
index 0000000..477d478
--- /dev/null
+++ b/man/pt/apropos.man
@@ -0,0 +1,28 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "15/1/1991"
+.LO 1
+.SH NOME
+apropos \- procura `strings' na base de dados "whatis"
+.SH SINOPSE
+.BI apropos
+palavra_chave ...
+.SH DESCRI��O
+apropos procura a
+.B palavra_chave,
+numa base de dados contendo breves descri��es dos comandos,
+mostrando todas as descri��es onde encontre a referida chave.
+.SH "VEJA TAMB�M"
+whatis(1), man(1).
diff --git a/man/pt/man.conf.man b/man/pt/man.conf.man
new file mode 100644
index 0000000..c3e71d1
--- /dev/null
+++ b/man/pt/man.conf.man
@@ -0,0 +1,39 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "30/3/1994"
+.SH NOME
+man.conf \- dicheiro de configura��o para man
+.SH DESCRI��O
+.LP
+Este ficheiro � lido por
+.BR man (1)
+e cont�m: (a) informa��o de como construir o manpath; (b) nomes completos
+de v�rios programas como nroff, eqn, tbl, etc. usados por man; (c) a lista
+de descompressores dos ficheiros com determinadas extens�es. Um ficheiro
+alternativo pode ser indicado com
+.LP
+.RS
+man -C fich_config ...
+.RE
+.LP
+Os nomes de comandos podem ser indicados com op��es se pretendido.
+Op��es uteis para o nroff podem ser encontradas em grotty(1).
+Por exemplo, am vez de linha
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+pode-se usar
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+para suprimir sublinhados e carregados.
+.SH "VEJA TAMB�M"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) e compress(1), gzip(1).
diff --git a/man/pt/man.man b/man/pt/man.man
new file mode 100644
index 0000000..87b2001
--- /dev/null
+++ b/man/pt/man.man
@@ -0,0 +1,156 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.TH man 1 "15/3/1994"
+.LO 1
+.SH NOME
+man \- formatar e mostrar as p�ginas do manual on-line
+.br
+manpath \- determinar o manpath inicial para o utilizador
+.SH SINOPSE
+man [\-acdfhktw] [\-m sistema] [\-p string] [\-C fich_config] [\-M path]
+[\-P paginador] [\-S lista_sec] [sec��o] nome ...
+.SH DESCRI��O
+.B man
+formata e mostra as p�ginas do manual `on-line'. Esta vers�o reconhece
+as vari�veis de ambiente (environment)
+.B MANPATH
+e
+.B (MAN)PAGER
+(v�r a seguir).
+Se a
+.I sec��o
+for indicada,
+.B man
+apenas procura nessa sec��o de manuais.
+Pode tamb�m indicar por que ordem das sec��es deve procurar
+e que preprocessamento efectuar nos manuais, por meio de op��es na
+linha de comando ou vari�veis de ambiente.
+Se
+.I nome
+contiver uma / tentar� primeiro o ficheiro com esse nome, permitindo
+fazer
+.B "man ./foo.5"
+ou mesmo
+.B "man /cd/foo/bar.1.gz"
+para formatar e v�r um ficheiro em particular.
+.SH OP��ES
+.TP
+.B \-\^C " fich_config"
+Indica o ficheiro de configura��o a usar; por omiss�o ser� usado
+ at man_config_file@. (Veja man.conf(5).)
+.TP
+.B \-\^M " path"
+Indica a lista de direct�rios onde procurar manuais.
+Sem esta op��o, ser� consultada a vari�vel
+.B MANPATH.
+Se tamb�m esta vari�vel estiver definida, uma lista ser� obtida
+por consulta de @man_config_file at . Um direct�rio vazio em MANPATH
+representa a lista anterior.
+.TP
+.B \-\^P " paginador"
+Indica qual o paginador/visualisador a usar. Sem esta op��o tentar�
+consultar a vari�vel
+.B PAGER.
+Normalmente, man usar�
+.B @pager at .
+.TP
+.B \-\^S " lista_sec"
+Fornece a lista de sec��es (separadas por ,) onde procurar e por que
+ordem. Esta op��o substitui o que � indicado pela vari�vel
+.B MANSECT
+quando esta est� definida.
+.TP
+.B \-\^a
+Normalmente man mostra o primeiro manual que encontrar. Esta op��o
+faz com que mostre todas as p�ginas de manuais encontradas para a entrada
+.B nome.
+.TP
+.B \-\^d
+N�o mostra o manual, imprimindo v�ria informa��o para `debug'.
+.TP
+.B \-\^f
+Equivalente a
+.B whatis.
+.TP
+.B \-\^h
+Imprime apenas uma mensagem de ajuda.
+.TP
+.B \-\^k
+Equivalente a
+.B apropos.
+.TP
+.B \-\^m " sistema"
+Indica um conjunto de manuais diferente aplic�veis ao sistema indicado.
+.TP
+.B \-\^p " string"
+Especifica uma sequ�ncia de preprocessadores a usar antes de nroff ou
+troff (os formatadores). Algumas instala��es podem n�o ter todos os
+preprocessadores. Alguns preprocessadores e as letras a usar para os
+indicar s�o:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Esta op��o sobrep�e-se � vari�vel
+.B MANROFFSEQ.
+.TP
+.B \-\^t
+Usar
+.B @troff@
+para formatar as p�ginas do manual. A sa�da deste comando
+pode ter ainda de ser processada por outro antes de a poder
+imprimir.
+.TP
+.B \-\^w \fRor\fP \-\-path
+N�o imprime as p�ginas do manual, mas mostra a(s) localiza��o(�es) dos
+ficheiros a formatar e mostrar, para a entrada de
+.B nome
+indicado. Se n�o fornecer mais nenhuma op��o mostra a lista de
+direct�rios que ser�o percorridos por
+.B man
+nas suas buscas. Se
+.B manpath
+� um `link' para man, ent�o "manpath" � equivalente a "man --path".
+
+.SH AMBIENTE
+.TP \w'MANROFFSEQ\ \ 'u
+.B MANPATH
+Se
+.B MANPATH
+estiver definido, o seu valor ser� usado como a lista de direct�rios
+(manpath) onde podem estar entradas do manual.
+.TP
+.B MANROFFSEQ
+Se
+.B MANROFFSEQ
+est� definido, o seu valor determina os preprocessamentos a aplicar
+antes de nroff ou troff. Normalmente, as p�ginas de manual, s�o
+preprocessadas pelo tbl antes de nroff.
+.TP
+.B MANSECT
+Se
+.B MANSECT
+existir, o seu valor indica as sec��es a percorrer.
+.TP
+.B PAGER
+Se
+.B PAGER
+est� definido, indicar� o programa a usar para mostrar o manual.
+Normalmente usar�
+.B @pager at .
+.SH "VEJA TAMB�M"
+apropos(1), whatis(1), less(1), groff(1).
+.SH BUGS
+.B \-t
+s� funciona se existir o programa troff ou equivalente.
diff --git a/man/pt/whatis.man b/man/pt/whatis.man
new file mode 100644
index 0000000..7b39873
--- /dev/null
+++ b/man/pt/whatis.man
@@ -0,0 +1,30 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "5/1/1991"
+.LO 1
+.SH NOME
+whatis \- procura palavras numa base de dados pr�pria
+.SH SINOPSE
+.BI whatis
+palavra_chave ...
+.SH DESCRI��O
+whatis procura numa base de dados contendo breves descri��es dos comandos,
+as palavras chave indicadas. S� quando uma palavra completa � igual a uma
+.B palavra_chave
+ser� mostrada a respectiva descri��o.
+
+A base de dados do "whatis" � criada usando o comando @makewhatis at .
+.SH "VEJA TAMB�M"
+apropos(1), man(1).
diff --git a/man/ro.txt b/man/ro.txt
new file mode 100644
index 0000000..1ea12dc
--- /dev/null
+++ b/man/ro.txt
@@ -0,0 +1 @@
+romanian
diff --git a/man/ro/apropos.man b/man/ro/apropos.man
new file mode 100644
index 0000000..aa86ad2
--- /dev/null
+++ b/man/ro/apropos.man
@@ -0,0 +1,32 @@
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH apropos 1 "15 Ian 1991"
+.LO 1
+.SH NUME
+apropos \- caut� �iruri de caractere �n baza de date whatis
+.SH SUMAR
+.BI apropos
+cuv�nt_cheie ...
+.SH DESCRIERE
+apropos caut� cuvinte cheie �ntr-un set de baze de date con�in�nd scurte
+descrieri ale comenzilor sistem �i afi�eaz� rezultatul la ie�irea
+standard (stdout).
+.SH "VEZI �I"
+whatis(1), man(1).
diff --git a/man/ro/makewhatis.man b/man/ro/makewhatis.man
new file mode 100644
index 0000000..e4b1e0e
--- /dev/null
+++ b/man/ro/makewhatis.man
@@ -0,0 +1,96 @@
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo at 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.
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH MAKEWHATIS 8 "22 Ianuarie 1999"
+.SH NUME
+makewhatis \- Creaz� baza de date whatis
+.SH SUMAR
+.BI "makewhatis [-u] [-v] [-w] [-s " sec�iuni " ] [-c [" cale_cat "]] [" cale_man "]"
+.SH DESCRIERE
+.B makewhatis
+cite�te toate paginile de manual con�inute �n
+.IR sec�iunile " date �n " cale_man
+sau paginile preformatate con�inute �n
+.IR sec�iunile " din " cale_cat .
+Pentru fiecare pagin�, scrie o linie �n baza de date whatis; fiecare
+linie const� �n numele paginii �i o scurt� descriere, separate de o
+liniut�. Descrierea este extras� folosind con�inutul sec�iunii NUME din
+pagina de manual.
+.LP
+Din moment ce alte limbi folosesc un termen diferit pentru sec�iunea NUME,
+.B makewhatis
+recunoa�te termenii echivalen�i �n ceh�, italian�, finlandez�, francez�,
+german� �i spaniol�.
+.LP
+Dac� nici un argument
+.I cale_man
+nu este furnizat,
+.I /usr/man
+este considerat implicit.
+.SH OP�IUNI
+.TP
+.B -u
+Actualizeaz� baza de date cu pagini noi.
+.TP
+.B -v
+Opera�ii explicite
+.TP
+.B -w
+Folose�te cale_man ob�inut� din `man --path`
+.TP
+.BI -s " sec�iuni"
+Caut� �n
+.I sec�iuni
+ale
+.IR cale_man " sau " cale_cat .
+Dac� op�iunea este absent�, valoarea sa este considerat� a fi
+.I \'1 2 3 4 5 6 7 8 9 n l\'
+.TP
+.BI -c " cale_cat"
+Paginile preformatate de manual aflate �n
+.I cale_cat
+sunt scanate. Dac� argumentul nu este furnizat, este considerat a fi
+primul director existent �ntre
+.IR /usr/man/preformat " �i " /usr/man .
+.SH EXEMPLE
+.PP
+Pentru a recrea doar
+.IR /usr/X11R6/man/whatis " �i " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+Pentru a recrea toate bazele de date, inclusiv cele cu traducerile
+finlandeze, franceze �i italiene
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH ERORI
+.B makewhatis
+ar putea s� nu manipuleze prea bine paginile de manual scrise cu
+macrouri troff nestandard, cum ar fi paginile Tcl/Tk.
+.PP
+.B makewhatis
+nu func�ioneaza pentru traducerile preformatate.
+.SH VEZI �I
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
diff --git a/man/ro/man.conf.man b/man/ro/man.conf.man
new file mode 100644
index 0000000..454c609
--- /dev/null
+++ b/man/ro/man.conf.man
@@ -0,0 +1,42 @@
+.\" @(#)man.conf
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH MAN.CONF 5 "30 Mar 1994"
+.SH NUME
+man.conf \- date de configurare pentru man
+.SH DESCRIERE
+.LP
+Acest fi�ier este citit de
+.BR man (1)
+�i con�ine (a) informa�ii despre cum se construie�te calea de c�utare
+pentru man, (b) c�i complete pentru diferite programe ca nroff, eqn, tbl
+etc. folosite de man, �i (c) o list� cu decomprimatoare pentru fi�ierele
+cu o anumit� extensie. O versiune alternativ� a acestui fi�ier poate fi
+specificat� cu
+.LP
+.RS
+man -C man_privat.conf ...
+.RE
+.LP
+Numele de comenzi pot fi completate cu op�iuni. Op�iuni folositoare
+pentru nroff pot fi g�site �n grotty(1). De exemplu, �n loc de linia
+implicit�
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+se poate scrie
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+pentru a elimina sublinierea �i t�ierea.
+.SH "VEZI �I"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) �i compress(1), gzip(1).
+
diff --git a/man/ro/man.man b/man/ro/man.man
new file mode 100644
index 0000000..62aa3a6
--- /dev/null
+++ b/man/ro/man.man
@@ -0,0 +1,434 @@
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH man 1 "2 Septembrie 1995"
+.LO 1
+.SH NUME
+man \- formateaz� �i afi�eaz� paginile de manual
+.br
+manpath \- determin� calea de c�utare a utilizatorului pentru paginile
+de manual
+.SH SUMAR
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --path ]
+.RB [ \-m
+.IR sistem ]
+.RB [ \-p
+.IR �ir ]
+.RB [ \-C
+.IR fi�ier_configurare ]
+.RB [ \-M
+.IR list�_c�i ]
+.RB [ \-P
+.IR paginator ]
+.RB [ \-S
+.IR list�_sec�iuni ]
+.RI [ sec�iune ]
+.I "nume ..."
+
+.SH DESCRIERE
+.B man
+formateaz� �i afi�eaz� paginile de manual. Dac� specifica�i
+.IR sec�iune ,
+.B man
+caut� doar �n acea sec�iune a manualului.
+.I nume
+este �n mod normal numele paginii de manual, care este de obicei numele
+unei comenzi, func�ii, sau fi�ier. Totu�i, dac�
+.I nume
+con�ine un slash
+.RB ( / )
+atunci
+.B man
+�l interpreteaz� ca o specificare de fi�ier, astfel �nc�t pute�i executa
+.B "man ./foo.5"
+sau chiar
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+Vede�i mai jos pentru o descriere a locurilor unde caut�
+.B man
+fi�ierele cu paginile de manual.
+
+.SH OP�IUNI
+.TP
+.B \-\^C " fii�ier_configurare"
+Specific� fi�ierul de configurare care se va folosi; inplicit este
+.BR @man_config_file@ .
+(Vezi
+.BR man.conf (5).)
+.TP
+.B \-\^M " cale"
+Specific� lista de directoare unde se caut� paginile man. Separa�i
+directoarele cu dou� puncte (:). O list� goal� este echivalent cu a nu
+specifica
+.B \-M
+de loc. Vezi �i
+.BR "CALEA DE C�UTARE A PAGINILOR MAN" .
+.TP
+.B \-\^P " paginator"
+Specific� ce paginator de va folosi.
+Aceast� op�iune ignor� variabila de mediu
+.B MANPAGER
+, care �n schimb ignor� variabila
+.BR PAGER .
+Implicit,
+.B man
+folose�te
+.BR @pager@ .
+.TP
+.B \-\^S " list�_sec�iuni"
+Lista este un �ir de sec�iuni de manual care vor fi c�utate, desp�r�ite
+prin dou� puncte (:). Aceast� op�iune ignor� variabila de mediu
+.BR MANSECT .
+.TP
+.B \-\^a
+Implicit, executia
+.B man
+se va termina dup� afi�area primei pagini de manual pe care o g�se�te.
+Folosirea acestei op�iuni for�eaz�
+.B man
+s� afi�eze toate paginila de manual care verific�
+.B nume,
+nu doar prima.
+.TP
+.B \-\^c
+Reformateaz� pagina man surs�, chiar dac� exist� o pagin� cat
+actualizat�. Acest lucru poate fi important dac� pagina cat a fost
+formatat� pentru un ecran cu un num�r diferit de coloane, sau dac�
+pagina preformatat� este alterat�.
+.TP
+.B \-\^d
+Nu afi�eaz� efectiv paginile man, ci tip�re�te multe informa�ii de
+depanare.
+.TP
+.B \-\^D
+Afi�eaz� at�t paginile man, c�t �i informa�ii de depanare.
+.TP
+.B \-\^f
+Echivalent cu
+.BR whatis .
+.TP
+.BR \-\^F " sau " \-\-preformat
+Doar formateaz� - nu afi�eaz�.
+.TP
+.B \-\^h
+Tip�re�te un mesaj de ajutor �i termin� execu�ia.
+.TP
+.B \-\^k
+Echivalent cu
+.BR apropos .
+.TP
+.B \-\^K
+Caut� �irul de caractere specificat �n *toate* paginile man.
+Avertisment: aceasta este probabil o opera�ie foarte lent�! Ajut�
+specificarea unei sec�iuni. (Pentru a da o idee general�, pe ma�ina mea
+aceasta dureaz� aproape un minut pentru 500 pagini man.)
+.TP
+.B \-\^m " sistem"
+Specific� un set alternativ de pagini man de c�utat, bazat pe numele de
+sistem dat.
+.TP
+.B \-\^p " �ir"
+Specific� secven�a de preprocesoare ce vor fi rulate �nainte de
+.B nroff
+sau
+.BR troff .
+Nu toate instal�rile vor avea un set complet de preprocesoare. Unele din
+preprocesoare �i literele folosite pentru a le desemna sunt: eqn (e),
+grap (g), pic (p), tbl (t), vgrind (v), refer (r). Aceast� op�iune duce
+la ignorarea variabilei de mediu
+.BR MANROFFSEQ .
+.TP
+.B \-\^t
+Folose�te
+.B @troff@
+pentru a formata pegina man, trimi��nd rezultatul la ie�irea standard
+.BR (stdout) .
+Rezultatul comenzii
+.B @troff@
+ar putea necesita s� fie trecut printr-un filtru �nante de a fi tip�rit.
+.TP
+.B \-\^w \fRsau\fP \-\-path
+Nu afi�eaz� efectiv paginile man, ci tip�re�te loca�ia(ile) fi�ierelor
+care ar fi formatate sau afi�ate. Dac� nici un argument nu este dat:
+afi�eaz� (la ie�irea standard (stdout)) lista directoarelor �n care sunt
+c�utate de
+.B man
+paginile man. Dac�
+.B manpath
+este o leg�tur� la man, atunci "manpath" este echivalent cu "man --path".
+.TP
+.B \-\^W
+Ca \-\^w, dar afi�eaz� numele de fi�iere unul pe linie, f�r� informa�ii adi�ionale.
+Aceast� op�iune este util� �n comenzi shell ca
+.ft CW
+.B "man -aW man | xargs ls -l"
+.ft
+
+.SH "PAGINILE CAT"
+Man va �ncerca s� salveze paginile man formatate, pentru a reduce timpul
+de formatare data viitoare c�nd aceste pagini sunt necesare.
+Tradi�ional, versiunile formatate ale paginilor din DIR/manX sunt
+salvate �n DIR/catX, dar alte map�ri de la directorul man la directorul
+cat pot fi specificate �n
+.BR @man_config_file@ .
+Nici o pagin� cat nu este salvat� dac� directorul cat necesar nu exist�.
+.PP
+Este posibil s� face�i
+.B man
+suid la un utilizator man. Atunci, dac� un director cat are proprietar
+man �i modul 0755 (scriere doar de c�tre man), �i fi�ierele cat au
+proprietarul man �i modul 0644 sau 0444 (scriere doar de c�tre man, sau
+nici o permisiune de scriere), nici un utilizator normal nu poate
+modifica paginile cat sau s� pun� alte fi�iere �n directorul cat. Dac�
+.B man
+nu este f�cut suid, atunci un director cat ar trebui s� aib� modul 0777
+dac� to�i utilizatorii trebuie s� poat� l�sa pagini cat acolo.
+.PP
+Op�iunea
+.B \-c
+for�eaz� reformatarea unei pagini, chiar dac� exist� o pagin� cat
+recent�.
+
+.SH "CALEA DE C�UTARE A PAGINILOR MAN"
+.B man
+folose�te o metod� sofisticat� pentru a g�si paginile de manual, bazat�
+pe op�iuni de apelare �i variabile de mediu, fi�ierul de configurare
+.B @man_config_file@
+�i anumite conven�ii �i euristici.
+.PP
+�nainte de toate, c�nd argumentul
+.I nume
+al
+.B man
+con�ine un slash
+.RB ( / ),
+.B man
+consider� c� este un specificator de fi�ier �i nu se efectueaz� nici o
+c�utare.
+.PP
+Dar �n cazul normal �n care
+.I nume
+nu con�ine un slash,
+.B man
+caut� �n o mul�ime de directoare un fi�ier care a putea fi o pagin� de
+manual pentru subiectul numit.
+.PP
+Dac� specifica�i op�iunea
+.BI "-M " list�_c�i\fR,
+.I list�_c�i
+este o list� de directoare desp�r�ite prin dou� puncte (:) �n care caut�
+.BR man .
+.PP
+Dac� nu specifica�i
+.B -M
+dar seta�i variabila de mediu
+.BR MANPATH ,
+valoarea acestei variabile este lista de directoare �n care caut�
+.BR man .
+.PP
+Dac� nu specifica�i explicit o list� de c�i cu
+.B -M
+sau
+.BR MANPATH ,
+.B man
+�i creeaz� propria list� de c�i bazat� pe con�inutul fi�ierului de
+configurare
+.BR @man_config_file@ .
+Declara�iile
+.B MANPATH
+din fi�ierul de configurare definesc anumite directoare care s� fie
+incluse �n calea de c�utare.
+.PP
+Mai mult, declara�iile
+.B MANPATH_MAP
+se adaug� la calea de c�utare depinz�nd de calea de c�utare a
+comenzilor (de ex. variabila de mediu
+.BR PATH ).
+Pentru fiecare director care este �n calea de c�utare a comenzilor, o
+declara�ie
+.B MANPATH_MAP
+specific� un director care trebuie c� fie ad�ugat la calea de c�utare a
+fi�ierelor cu paginile de manual.
+.B man
+analizeaz� variabila
+.B PATH
+�i adaug� directoarele corespunz�toare la calea de c�utare a fi�ierelor
+cu paginile de manual. Astfel, prin folosirea corect� a
+.BR MANPATH_MAP ,
+c�nd executa�i comanda
+.BR "man xyz" ,
+ob�ine�i o pagin� de manual pentru programul care ar rula dac� a�i
+executa comanda
+.BR xyz .
+.PP
+�n plus, pentru fiecare director �n calea de c�utare a comenzilor (o vom
+denumi "director de comenzi") pentru care
+.I nu
+ave�i o declara�ie
+.BR MANPATH_MAP ,
+.B man
+caut� �n mod automat un director cu pagini de manual "�nvecinat",
+respectiv ca un subdirector al directorului de comenzi sau �n directorul
+p�rinte al directorului de comenzi.
+.PP
+Pute�i dezactiva c�utarea "�nvecinat�" automat� incluz�nd o declara�ie
+.B NOAUTOPATH
+�n
+.BR @man_config_file@ .
+.PP
+�n fiecare director din calea de c�utare descris mai sus,
+.B man
+caut� un fi�ier numit
+.IB topic . section\fR,
+cu un sufix op�ional la num�rul sec�iunii �i posibil un sufix de
+compresie. Dac� nu g�se�te un astfel de fi�ier, caut� �n orice
+subdirectoare numite
+.BI man N
+sau
+.BI cat N
+unde
+.I N
+este num�rul sec�iunii de manual.
+Dac� fi�ierul este �ntr-ul subdirector
+.BI cat N\fR,
+.B man
+consider� c� este o pagin� de manual formatat� (pagin� cat). Altfel,
+.B man
+consider� c� este neformatat�. �n oricare caz, dac� numele fi�ierului
+are un sufix cunoscut de compresie (ca
+.BR .gz ),
+.B man
+consider� c� este comprimat cu gzip.
+.PP
+Dac� dori�ie s� vede�i unde (sau dac�)
+.B man
+ar g�si pagina de manual pentru un anumit subiect, folosi�i op�iunea
+.BR "--path " ( -w ).
+
+.SH "VARIABILE DE MEDIU"
+.TP
+.B MANPATH
+Dac�
+.B MANPATH
+este setat�,
+.B man
+o folose�te drept cale de c�utare a fi�ierelor cu paginile de manual. Ignor� fi�ierul de configurare �i
+calea de c�utare automat�, dar este ignorat� de op�iunea de apelare
+.BR -M .
+Vezi �i
+.BR "CALEA DE C�UTARE A PAGINILOR MAN" .
+.TP
+.B MANPL
+Dac�
+.B MANPL
+este setat�, valoarea ei este folosit� ca lungimea paginii afi�ate.
+Altfel, �ntreaga pagin� man va ocupa o singur� pagin� (lung�).
+.TP
+.B MANROFFSEQ
+Dac�
+.B MANROFFSEQ
+este setat�, valoarea ei este folosit� pentru determinarea setului de
+preprocesoare rulate �nainte de a rula
+.B nroff
+sau
+.BR troff .
+Implicit, paginile sunt trecute prin preprocesorul tbl �nainte de
+.BR nroff .
+.TP
+.B MANSECT
+Dac�
+.B MANSECT
+este setat�, valoare ei este folosit� pentru a determina �n ce sec�iune
+de manual s� se caute.
+.TP
+.B MANWIDTH
+Dac�
+.B MANWIDTH
+este setat�, valoare ei este folosit� ca l��imea pe care paginile de
+manual ar trebui s� fie afi�ate. Altfel paginile ar putea fi afi�ate
+peste l��imea ecranului.
+.TP
+.B MANPAGER
+Dac�
+.B MANPAGER
+este setat�, valoarea ei este folosit� ca numele programului ce va fi
+folosit pentru a afi�a pagina man. Dac� nu, atunci
+.B PAGER
+este folosit�. Dac� nici aceasta nu are o valoare,
+.B @pager@
+este folosit.
+.TP
+.B LANG
+Dac�
+.B LANG
+este setat�, valoarea ei define�te numele subdirectorului unde man caut�
+prima dat� paginile man. Astfel, comanda `LANG=dk man 1 foo' va
+determina man s� caute pagina man foo �n .../dk/man1/foo.1 �i dac� nu
+poate g�si un astfel de fi�ier, �n .../man1/foo.1, unde ... este un
+director �n calea de c�utare.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Variabilele de mediu
+.B NLSPATH
+�i
+.B LC_MESSAGES
+(sau
+.B LANG
+c�nd ultima nu exist�) joac� un rol �n localizarea catalogului de
+mesaje. (Dar mesajele �n englez� sunt incluse la compilare �i pentru
+englez� nu este necesar nici un catalog.) Nota�i c� programe apelate de
+man ca
+.BR col(1)
+folosesc �i ele de ex. LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+ajut� la determinarea c�ii de c�utare a fi�ierelor cu paginile de
+manual. Vezi �i
+.BR "CALEA DE C�UTARE A PAGINILOR MAN" .
+.TP
+.B SYSTEM
+.B SYSTEM
+este folosit� pentru a ob�ine numele implicit al sistemului alternativ
+(pentru a fi utilizat cu op�iunea
+.BR \-m ).
+.SH "VEZI �I"
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
+.SH ERORI
+Op�iunea
+.B \-t
+func�ioneaz� doar dac� un program gen troff este instalat.
+.br
+Dac� vede�i \e255 sau <AD> clipind �n loc de liniu�e, seta�i
+`LESSCHARSET=latin1' �n mediu.
+.SH SFATURI
+Dac� ad�uga�i linia
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+�n fi�ierul dumneavoastr�
+.IR .emacs\fR,
+ap�s�nd F1 ve�i ob�ine pagina man pentru apelul de libr�rie la pozi�ia
+curent� a cursorului.
+.LP
+Pentru a ob�ine o versiune doar text a paginii man, f�r� backspace �i
+liniu�e de subliniere (underscore), �ncerca�i
+
+ # man foo | col -b > foo.mantxt
+
diff --git a/man/ro/man2html.man b/man/ro/man2html.man
new file mode 100644
index 0000000..ebe05d0
--- /dev/null
+++ b/man/ro/man2html.man
@@ -0,0 +1,144 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH man2html 1 "1 Ianuarie 1998"
+.LO 1
+.SH NUME
+man2html \- formateaz� o pagin� de manual �n html
+.SH SUMAR
+man2html [op�uni] [fi�ier]
+.SH DESCRIERE
+.B man2html
+converte�te o pagin� de manual a�a cum se g�se�te �n
+.I fi�ier
+(sau intrarea standard (stdin), �n caz c� argumentul fi�ier lipse�te,
+sau argumentul "-" este folosit) din stilul man nroff �n html, �i
+tip�re�te rezultatul la ie�irea standard (stdout). Suport� tbl dar nu
+�tie de eqn. Starea de ie�ire este 0. Dac� ceva merge eronat, o pagin�
+de eroare este tip�rit� la ie�irea standard (stdout).
+
+Poate fi folosit ca un utilitar de sine st�t�tor, dar este �n principal
+conceput ca un auxiliar, pentru a permite utilizatorilor s� navigheze
+prin paginile de manual folosind un navigator html ca
+.BR lynx (1),
+.BR xmosaic (1)
+sau
+.BR netscape (1).
+./" (Vezi
+./" .BR man (1)
+./" pentru informa�ii despre cum s� navighezi prin paginile de manual cu
+./" .BR man2html .
+./" De obicei este suficient� ad�ugarea "MANHTMLPAGER=/usr/bin/lynx"
+./" la mediu.)
+
+Partea principal� a
+.B man2html
+este motorul troff-to-html scris de Richard Verhoeven (rcb5 at win.tue.nl).
+Adaug� leg�turi pentru urm�toarele construc�ii:
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://�ir "method://�ir"
+www.nume.gazd� "http://www.nume.gazd�"
+ftp.nume.gazd� "ftp://ftp.nume.gazd�"
+nume at gazd� "mailto:nume at gazd�"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(Primele din acestea pot fi modificate cu op�iuni - vezi mai jos.) Nici
+o verificare nu este f�cut� - leg�turile generate nu trebuie s� existe.
+De asemenea, este generat un cuprins cu leg�turi interne spre diverse
+sec�iuni, astfel �nc�t este mai u�or pentru cineva s� se descurce �n
+paginile mari de manual ca
+.BR bash (1).
+
+.SH OP�IUNI
+C�nd se cite�te de la intrarea standard, nu este �ntotdeauna clar cum s�
+se fac� expansiunea .so. Op�iunea \-D permite unui script s� defineasc�
+directorul de lucru.
+.LP
+.TP
+.B \-\^D cale
+Elimin� ultimele dou� p�r�i din cale, �i face un
+\fIchdir\fP(\fIdir\fP) �nainte de a �ncepe conversia.
+.LP
+Op�iunea \-E permite generarea u�oar� a mesajelor de eroare dintr-un
+script cgi.
+.LP
+.TP
+.B \-\^E �ir
+Produce o pagin� de eroare con�in�nd mesajul de eroare dat.
+.LP
+Forma general� a unei leg�turi generate pentru o referin�� la o pagin�
+de manual este
+.IP
+<metod�:cale_cgi><cale_man2html><separator><pagin�_man>
+.LP
+cu o form� implicit� ca mai sus. P�r�ile acestei leg�turi sunt
+configurate folosind diverse op�iuni.
+.TP
+.B \-\^h
+Configureaz� metod�:cele_cgi ca http://localhost. Aceast� op�iune este implicit�.
+.TP
+.BI \-\^H " gazd�[.domeniu][:port]"
+Configureaz� metod�:cale_cgi ca
+.RI http:// gazd�.domeniu:port .
+.TP
+.B \-\^l
+Configureaz� metod�:cale_cgi ca
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+Configureaz� metod�:cale_cgi ca
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " cale_man2html"
+Configureaz� cale_man2html care va fi folosit�. Implicit ea este
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+Configureaz� separatorul ca '/'.
+.TP
+.B \-\^q
+Configureaz� separatorul ca '?'. Aceast� op�iune este implicit�.
+.LP
+Pe o ma�in� care nu ruleaz�
+.BR httpd ,
+se poate folosi
+.B lynx
+pentru a naviga prin paginile de manual, folosind metoda lynxcgi. C�nd
+un demon http ruleaz�, lynx, sau orice alt navigator, poate fi folosit
+pentru a naviga prin paginile de manual, folosind metoda http. Op�iunea
+\-l (pentru `lynxcgi') selecteaz� comportamentul precedent. Cu ea,
+cale_cgi este \fI/home/httpd\fP.
+
+�n general, un script cgi poate fi apelat prin
+.IP
+<cale_la_script>/<mai_mult�_cale>?<cerere>
+.LP
+�i variabilele de mediu PATH_INFO �i QUERY_STRING vor fi configurate ca
+<mai_mult�_cale> �i respectiv <cere>. Din moment ce lynxcgi nu trateaz�
+partea PATH_INFO, gener�m leg�turi cu `?' drept separator �n mod
+implicit. Op�iunea \-p (de la eng. `path' (cale)) selecteaz� '/' ca
+separator, �n timp ce op�iunea \-q (de la eng. `query'(cerere))
+selecteaz� '?' ca separator.
+
+Op�iunea \-H \fIgazd�\fP va specifica gazda care va fi folosit� (�n loc
+de \fIlocalhost\fP). Un script cgi ar putea folosi
+.IP
+man2html -H $SERVER_NAME
+.LP
+dac� variabila SERVER_NAME este configurat�. Aceasta ar permite ma�inii
+s� se comporte ca un server �i s� exporte pagini de manual.
+
+.SH ERORI
+Sunt multe euristici. Rezultatul nu va fi �ntotdeauna perfect. Metoda
+lynxcgi nu va func�iona dac� lynx a fost compilat f�r� a selecta suport
+pentru ea. Ar putea fi probleme de securitate.
+
+.SH "VEZI �I"
+.BR lynx (1),
+.BR man (1)
diff --git a/man/ro/whatis.man b/man/ro/whatis.man
new file mode 100644
index 0000000..0efed35
--- /dev/null
+++ b/man/ro/whatis.man
@@ -0,0 +1,34 @@
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft at xnet.ro>
+.TH whatis 1 "5 Ian 1991"
+.LO 1
+.SH NUME
+whatis \- caut� cuvinte complete �n baza de date whatis.
+.SH SUMAR
+.BI whatis
+cuv�nt_cheie ...
+.SH DESCRIERE
+whatis caut� �ntr-un set de baze de date con�in�nd scurte descrieri ale
+comenzilor sistem cuvinte cheie �i afi�eaz� rezultatul la ie�irea
+standard (stdout). Doar rezultatele complete sunt afi�ate.
+
+Baza de date whatis este creat� folosind comanda @makewhatis at .
+.SH "VEZI �I"
+apropos(1), man(1).
diff --git a/man/sl.txt b/man/sl.txt
new file mode 100644
index 0000000..70dd991
--- /dev/null
+++ b/man/sl.txt
@@ -0,0 +1 @@
+slovenian
diff --git a/man/sl/apropos.man b/man/sl/apropos.man
new file mode 100644
index 0000000..833441f
--- /dev/null
+++ b/man/sl/apropos.man
@@ -0,0 +1,29 @@
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Slovenski prevod Primo� Peterlin <primoz.peterlin at biofiz.mf.uni-lj.si>,
+.\" julij 1996.
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "15. januar 1991"
+.LO 1
+.SH IME
+apropos \- poi��i klju�no besedo v datoteki whatis
+.SH SINTAKSA
+.BI apropos
+klju�na_beseda ...
+.SH OPIS
+apropos pre��ie za klju�no besedo mno�ico datotek, ki vsebujejo
+kratke opise sistemskih ukazov, in izpi�e rezultat na standardni
+izhod.
+.SH "GLEJ TUDI"
+whatis(1), man(1).
diff --git a/man/sl/man.conf.man b/man/sl/man.conf.man
new file mode 100644
index 0000000..69f275f
--- /dev/null
+++ b/man/sl/man.conf.man
@@ -0,0 +1,42 @@
+.\" @(#)man.conf
+.TH MAN.CONF 5 "30. marec 1994"
+.SH IME
+man.conf \- nastavitvena datoteka za program man
+.SH OPIS
+.LP
+To datoteko prebere program
+.BR man (1).
+Vsebuje (a) informacijo o sestavljanju poti, v katerih man i��e
+strani priro�nika, (b) celotne poti do programov, ki jih man
+uporablja, kot npr. nroff, eqn, tbl itd., ter (c) seznam
+programov, ki znajo dekompresirati datoteke z dolo�enimi priponami.
+Alternativo privzeti verziji te datoteke lahko dolo�imo z izbiro
+.LP
+.RS
+man -C privatni_man.conf ...
+.RE
+.LP
+Ukazi so lahko navedeni skupaj z izbirami. Nekaj uporabnih izbir
+za nroff lahko najdete na strani grotty(1).
+Na primer, namesto privzete vrstice
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+lahko navedemo
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+in prepre�imo pod�rtanje in polkrepki tisk z ve�kratnim odtisom
+(overstrike).
+.SH "GLEJTE TUDI"
+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).
+
diff --git a/man/sl/man.man b/man/sl/man.man
new file mode 100644
index 0000000..a6856cc
--- /dev/null
+++ b/man/sl/man.man
@@ -0,0 +1,263 @@
+.\" Man page for man (and the former manpath)
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Slovenski prevod Primo� Peterlin <primoz.peterlin at biofiz.mf.uni-lj.si>,
+.\" julij 1996.
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\"
+.TH man 1 "2. september 1995"
+.LO 1
+.SH IME
+man \- oblikovanje in prikaz strani on-line priro�nika
+.br
+manpath \- prikaz poti do imenikov, kjer man i��e priro�nike
+.SH SINTAKSA
+.\" man [\-acdfhkKtwW] [\-m system] [\-p string] [\-C config_file] [\-M path]
+.\" [\-P pager] [\-S section_list] [section] name ...
+man [\-adfhkKtwW] [\-m sistem] [\-p niz] [\-C nastavitvena_datoteka]
+[\-M pot] [\-P paginator] [\-S seznam_poglavij] [poglavje] ime ...
+.SH OPIS
+.B man
+oblikuje in prika�e strani on-line priro�nika. Ta izvedba pozna
+spremenljivki
+.B MANPATH
+in
+.BR (MAN)PAGER ,
+tako da si lahko pripravite
+lasten nabor osebnih strani priro�nika in izberete va� najljub�i
+program za prikaz oblikovanih strani.
+�e je dolo�eno
+.I poglavje,
+.B man
+i��e samo v tem poglavju priro�nika.
+Iz ukazne vrstice ali prek spremenljivk okolja lahko dolo�ite
+tudi vrsti red poglavij, ki jih
+.B man
+prei��e, ter katere predprocesorje se pred prikazom uporabijo na
+izvornem besedilu.
+�e
+.I ime
+vsebuje znak /, se najprej preveri, �e obstaja datoteka s tem
+imenom. Ukaz
+.B "man ./foo.5"
+ali celo
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+sta zato povsem veljavna.
+.SH IZBIRE
+.TP
+.B \-\^C " nastavitvena_datoteka"
+Dolo�imo nastavitveno datoteko man.conf, ki jo �elimo
+uporabljati; privzeta izbira je
+ at man_config_file@. (glejte man.conf(5).)
+.TP
+.B \-\^M " pot"
+Dolo�imo seznam imenikov, v katerih se i��e za stranmi
+priro�nika. �e izbira ni podana, se uporabi spremenljivka okolja
+.B MANPATH
+�e tudi spremenljivke s tem imenom ni, se uporabi privzeta izbira
+iz nastavitvene datoteke @man_config_file at .
+Prazen niz v MANPATH implicira privzet seznam imenikov.
+.TP
+.B \-\^P " paginator"
+Dolo�imo paginator. Ta izbira ima prednost pred spremenljivko
+okolja
+.B MANPAGER,
+ki ima nadalje prednost pred spremenljivko okolja
+.B PAGER.
+Privzeta izbira za paginator je
+.BR @pager@ .
+.TP
+.B \-\^S " seznam_poglavij"
+Seznam_poglavij je z dvopi�ji lo�en seznam poglavij priro�nika,
+v katerem se i��e geslo. Ta izbira ima prednost pred
+spremenljivko okolja
+.B MANSECT.
+.TP
+.B \-\^a
+Sam po sebi man prika�e prvo stran, ki ustreza imenu
+.B name.
+S to izbiro zahtevamo, da prika�e vse strani, ki ustrezajo
+pogoju, ne le prve.
+.TP
+.B \-\^c
+Izrecno zahtevamo ponovno oblikovanje strani, �etudi �e
+oblikovana stran obstaja. Izbira je lahko smiselna, �e je bila
+stran oblikovana za druga�no �irino zaslona.
+.TP
+.B \-\^d
+Ne prika�i oblikovane strani, ampak le "debugging" informacije.
+.TP
+.B \-\^D
+Prika�i tako oblikovano stran kot tudi "debugging" informacije.
+.TP
+.B \-\^f
+Isto kot
+.B whatis.
+.TP
+.B \-\^h
+Izpi�i eno vrstico navodila in kon�aj.
+.TP
+.B \-\^k
+Isto kot
+.B apropos.
+.TP
+.B \-\^K
+Prei��i *vse* strani priro�nika za dani niz. Pozor: to zelo
+verjetno vzame kar nekaj �asa! Hitreje gre, �e iskanje omejimo
+na poglavje.
+(Kot grob primer: na avtorjevem ra�unalniku traja iskanje prek
+500 strani priro�nika pribli�no minuto.)
+.TP
+.B \-\^m " sistem"
+Dolo�imo alternativni nabor strani priro�nika na podanem
+sistemu.
+.TP
+.B \-\^p " niz"
+Dolo�imo zaporedje predprocesorjev, ki se po�enejo pred nroff ali
+troff.
+Nekateri od predprocesorjev, in njihove eno�rkovne okraj�ave:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+Ni nujno, da so na va�em sistemu vsi na�teti
+predprocesorji na voljo.
+Ta izbira ima prednost pred spremenljivko okolja
+.B MANROFFSEQ.
+.TP
+.B \-\^t
+Uporabi
+.B @troff@
+za oblikovanje strani priro�nika in usmeri izhod na standardni
+izhod
+.B stdout.
+Lahko, da je izhod iz
+.B @troff@
+pred tiskom potrebno obdelati s �e kak�nim filtrom.
+.TP
+.B \-\^w \fRali\fP \-\-path
+Ne prika�i oblikovanih strani priro�nika, ampak pot do datotek,
+ki bi bile oblikovane in prikazane. �e je izbira brez argumenta,
+prika�i pot do imenikov, v katerih
+.B man
+i��e strani priro�nika. �e je
+.B manpath
+povezava na man, tedaj je "manpath" enakovredno "man --path".
+.TP
+.B \-\^W
+Kot \-\^w, le da prika�e po eno ime datoteke v vrstici in brez
+dodatnih informacij.
+To je lahko uporabno v ukazih ukazne lupine, kot npr.
+.ft CW
+man -aW man | xargs ls -l
+.ft
+
+.SH "OBLIKOVANE STRANI"
+Man poskusi shraniti oblikovane strani in tako prihraniti �as,
+potreben za oblikovanje, ko se stran naslednji� rabi.
+Tradicionalno se oblikovane strani iz imenikov DIR/manX
+shranjujejo v imenike DIR/catX, druga�en dogovor glede preslikave
+med izvornimi in oblikovanimi razli�icami pa je mo�no dolo�iti v
+ at man_config_file@.
+Oblikovane strani se ne shranijo, �e ustrezni imenik ne obstaja.
+.TP
+Program man je mo�no pripisati (SUID) uporabniku z imenom man. V
+tem primeru, kadar je imenik z oblikovanimi stranmi v lasti man,
+na�in za��ite pa 0755 (dovoljeno pisanje samo lastniku -- man),
+oblikovane datoteke pa so za��itene z 0644 ali 0444 (dovoljeno
+pisanje samo lastniku, ali pa sploh prepovedano pisanje), nih�e
+od uporabnikov ne more ne more spreminjati oblikovanih strani ali
+pu��ati svojih datotek v imeniku z oblikovanimi stranmi. �e man
+ni v lasti (SUID) uporabnika man, mora biti imenik z oblikovanimi
+stranmi dovoljen za pisanje (0777), �e naj bo tam vsem uporabnikom
+dovoljeno pu��ati oblikovane strani.
+.TP
+Izbira \-\^c zahteva ponovno oblikovanje strani, �etudi recentna
+oblikovana stran �e obstaja.
+
+
+.SH SPREMENLJIVKE OKOLJA
+.TP
+.B MANPATH
+�e nastavimo spremenljivko
+.B MANPATH,
+se njena vrednost uporabi za pot do strani priro�nika.
+.TP
+.B MANROFFSEQ
+�e nastavimo spremenljivko
+.B MANROFFSEQ,
+z njeno vrednostjo dolo�imo zaporedje predprocesorjev, ki
+obdelajo stran pred nroff ali troff. Privzeta izbira je
+tabelarni predprocesor tbl.
+.TP
+.B MANSECT
+�e nastavimo spremenljivko
+.B MANSECT,
+njena vrednost dolo�a poglavja v priro�niku, v katerih man i��e
+zahtevano stran.
+.TP
+.B MANWIDTH
+�e nastavimo spremenljivko
+.B MANWIDTH,
+njena vrednost dolo�a �irino zaslona, za katero se oblikujejo
+strani priro�nika. Privzeta izbira je cela �irina zaslona.
+.TP
+.B MANPAGER
+�e nastavimo spremenljivko
+.B MANPAGER,
+njena vrednost dolo�a paginator -- program, ki prika�e oblikovano
+stran. �e spremenljivka ni nastavljena, se uporabi vrednost
+spremenljivke
+.B PAGER.
+�e tudi ta ni nastavljena, se uporabi privzeta izbira
+.B @pager at .
+.TP
+.B LANG
+�e nastavimo spremenljivko
+.B LANG,
+njena vrednost dolo�a podimenik, v katerem man najprej poskusi
+poiskati stran priro�nika. Na primer, pri ukazu ,,LANG=dk man 1 foo''
+man najprej poskusi poiskati ustrezno stran priro�nika v
+datoteki .../dk/man1/foo.1, �e ta ne obstaja, pa v .../man1/foo.1.
+Pri tem je ... eden od imenikov, v katerih man i��e strani.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+Spremenljivki
+.B NLSPATH
+in
+.B LC_MESSAGES
+(ali
+.B LANG
+�e LC_MESSAGES ne obstaja)
+dolo�ajo katalog s sporo�ili programa.
+(Angle�ka sporo�ila so izjema, ker so �e vklju�ena v program,
+tako da zanje ne potrebujemo posebnega kataloga.)
+Programi kot npr. col(1), ki ga kli�e man, prav tako uporabljajo
+lokalizacijske spremenljivke (npr. LC_CTYPE).
+.TP
+.B PATH
+.B PATH
+se uporablja za sestavljanje privzete poti, v katerih man i��e
+strani priro�nika.
+.TP
+.B SYSTEM
+.B SYSTEM
+se uporablja za dolo�itev imena alternativnega sistema (z izbiro
+.B \-m).
+.SH "GLEJTE TUDI"
+apropos(1), whatis(1), less(1), groff(1).
+.SH NAPAKE
+The
+.B \-t
+deluje samo, kadar je na voljo troff ali drug enakovreden program.
+.br
+�e namesto pomi�ljajev vidite utripajo�e \e255 or <AD>, dodajte
+med spremenljivke okolja `LESSCHARSET=latin1'.
diff --git a/man/sl/whatis.man b/man/sl/whatis.man
new file mode 100644
index 0000000..40e391d
--- /dev/null
+++ b/man/sl/whatis.man
@@ -0,0 +1,31 @@
+.\" Man page for whatis
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\" Slovenski prevod Primo� Peterlin <primoz.peterlin at biofiz.mf.uni-lj.si>
+.\" avgust 1996
+.\"
+.\" 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 at che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "5. januar 1991"
+.LO 1
+.SH IME
+whatis \- poi��i besedo v zbirki whatis.
+.SH SINTAKSA
+.BI whatis
+klju�na_beseda ...
+.SH OPIS
+whatis poskusi v podatkovnih zbirkah s kratkimi opisi sistemskih
+ukazov poiskati klju�ne besede in izpi�e rezultat na standardni
+izhod. Samo ujemanja celih besed se izpi�ejo.
+
+Podatkovno zbirko whatis napravimo z ukazom @makewhatis at .
+.SH "GLEJTE TUDI"
+apropos(1), man(1).
diff --git a/man2html/Makefile.in b/man2html/Makefile.in
new file mode 100644
index 0000000..b41eaba
--- /dev/null
+++ b/man2html/Makefile.in
@@ -0,0 +1,66 @@
+CC = @CC@
+CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
+OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
+EXEEXT = @EXEEXT@
+bindir = $(DESTDIR)$(PREFIX)/usr/bin
+mandir = $(DESTDIR)$(PREFIX)@mandir@
+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. at man1ext@
+
+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%, at version@,' hman.sh > hman
+
+install-hman: hman
+ install -m 555 hman $(bindir)/hman
+ install -m 644 hman.1 $(mandir)/man1/hman. at man1ext@
+
+clean:
+ rm -f core hman man2html$(EXEEXT) $(OBJECTS) *~
+
+spotless: clean
+ rm -f Makefile
+
+$(OBJECTS): defs.h
diff --git a/man2html/README b/man2html/README
new file mode 100644
index 0000000..6dabd52
--- /dev/null
+++ b/man2html/README
@@ -0,0 +1,91 @@
+This directory contains the following.
+
+1. man2html
+
+This is a pure manroff -> html converter.
+No manpath search etc.
+
+Call: man2html [-l | -H host.domain:port] [filename]
+
+The contents of FILENAME (or STDIN, in case FILENAME is "-" or absent)
+are converted from man-style nroff to html, and printed on STDOUT.
+
+With "-l" URLs of the form "lynxcgi:/home/httpd/cgi-bin/..." are generated.
+With "-H host" we make URLs of the form "http://host/cgi-bin/...".
+The default is "http://localhost/cgi-bin/...".
+
+2. A collection of scripts
+
+This part is not installed by "make install" of the global Makefile.
+There are security considerations: it is very unlikely that these
+scripts (still in alpha) are secure, so for the time being they
+should only be used where security is not a major concern.
+
+If you are not afraid, or are not running a httpd, do
+"make install-scripts" in this directory.
+This does three things: install man stuff, install glimpse stuff,
+and install user interface stuff.
+
+2A. man stuff
+
+This first part (that can be done separately with "make install-man-scripts")
+puts various scripts under /home/httpd/cgi-bin and /home/httpd/cgi-aux
+in a subdirectory man.
+It will create a directory /var/man2html to hold the indices.
+(This directory should be writable by the cgi scripts;
+probably that means that the owner should be nobody.
+Choose a group and add all non-httpd users that should be
+able to write this directory to that group.)
+
+Structure of the collection of scripts:
+ man2html is the main script.
+ It uses man.aux when called without arguments.
+ It uses manwhatis when asked for an index of manpages+descriptions.
+ It uses mansec when asked for a compact index of manpages.
+ It uses mansearch when asked for a glimpse search.
+ In its turn mansearch uses mansearch.aux when called
+ without arguments. It uses mansearchhelp (which uses
+ mansearchhelp.aux) when asked for help.
+
+2B. glimpse stuff
+The second part (that can be done separately with
+"make install-glimpse-stuff") installs .glimpse_filters
+in /var/man2html, in order to tell glimpse what decompressors to use.
+
+2C. user interface stuff
+The third part (that can be done separately with "make install-hman")
+installs a user interface to these scripts in /usr/bin/hman.
+Now people can say
+ alias man=/usr/bin/hman
+and have a man that uses a html browser.
+The browser is chosen via environment variables - look at the script.
+
+3. Glimpse.
+
+For the glimpse part, I quote Michael Hamilton:
+----------------------------------------------------------------------
+To use the Glimpse full text searching, you will need to install
+glimpse in /usr/bin. Redhat rpm users can get glimpse from
+
+ ftp://ftp.redhat.com/pub/contrib/i386/glimpse-4.0-6.i386.rpm
+
+The glimpse home ftp site is cs.arizona.edu. N.B. glimpse is not
+freely redistributable for commercial use, I'd be very interested in a
+more liberal alternative. Having installed glimpse, you will need to
+build a glimpse index in /var/man2html. This doesn't take too long -
+about 3 minutes on my 486DX2/66 16MB machine. As root do:
+
+ /usr/bin/glimpseindex -z -H /var/man2html /usr/man/man* /usr/X11R6/man/man* \
+ /usr/local/man/man* /opt/man/man*
+ chmod ugo+r /var/man2html/.glimpse*
+
+The -z option causes glimpse to apply any filters (for decompression etc)
+specified in /var/man2html/.glimpse_filters.
+
+This could be set up as a cron job in /etc/crontab, e.g. (the following
+must be all on one line):
+
+ 21 04 * * 1 root /usr/bin/glimpseindex -z -H /var/man2html /usr/man/man*
+ /usr/X11R6/man/man* /usr/local/man/man* /opt/man/man* ;
+ chmod +r /var/man2html/.glimpse*
+--------------------------------------------------------------------------
diff --git a/man2html/TODO b/man2html/TODO
new file mode 100644
index 0000000..b0101ad
--- /dev/null
+++ b/man2html/TODO
@@ -0,0 +1,43 @@
+There are still many problems with man2html.
+Partly these are caused by the imprecise definition
+of the man file format. (And the many buggy man pages.)
+Partly by the incomplete implementation of the man/doc macro packages.
+Partly by the imperfect emulation of troff.
+Partly by the variation between various browsers in the
+accepted html.
+Partly just because man2html is buggy.
+
+Of course in reality a man2html converter must contain
+large parts of the troff source, so that it can be fed
+with the defining macro packages and always do the right thing.
+
+On a RedHat 5.0 system:
+- /usr/man/mann/DirDlg.n is not formatted correctly.
+ (It does not start with .TH)
+- <i>bug_readline</i>@<i>prep.ai.mit.edu</i> does not generate
+ a mailto: link. It should generate
+ <a href="mailto:bug_readline at prep.ai.mit.edu>
+ <i>bug_readline</i>@<i>prep.ai.mit.edu</i>
+ </a>
+ but this requires parsing of the surrounding html markup.
+ Easy, but not done yet.
+- Some manpages generate bad whatis information
+ [where the name in the whatis line is not the filename of the man page].
+ (E.g., tc589_cs.4, auto.master.5, pcmcia.5, proc.5 and autofs.8
+ generate whatis lines
+ 3c589_cs (4) - 3Com 3c589 Etherlink III device driver
+ /etc/auto.master (5) - Master Map for automounter
+ /etc/init.d/rc.d/autofs (8) - Control Script for automounter
+ /etc/pcmcia/config (5) - PCMCIA card configuration database
+ /proc (5) - process information pseudo-filesystem
+ )
+ As a consequence, the corresponding manwhatis links are bad.
+- Some manpages have bad .so information.
+ (E.g., TIFFScanlineSize.3t contains .so TIFFsize.3t
+ instead of .so man3/TIFFsize.3t .)
+ This also confuses whatis, and generates bad links.
+ (But right now these happen to work.)
+
+Of course, patches are welcome!
+
+
diff --git a/man2html/abbrev.c b/man2html/abbrev.c
new file mode 100644
index 0000000..fa7df06
--- /dev/null
+++ b/man2html/abbrev.c
@@ -0,0 +1,62 @@
+#include <string.h>
+#include "defs.h"
+/*
+ * lookup_abbrev() is used for TX macros - is that
+ * something SUN-specific?
+ */
+
+char *abbrev_list[] = {
+ "GSBG", "Getting Started ",
+ "SUBG", "Customizing SunOS",
+ "SHBG", "Basic Troubleshooting",
+ "SVBG", "SunView User's Guide",
+ "MMBG", "Mail and Messages",
+ "DMBG", "Doing More with SunOS",
+ "UNBG", "Using the Network",
+ "GDBG", "Games, Demos & Other Pursuits",
+ "CHANGE", "SunOS 4.1 Release Manual",
+ "INSTALL", "Installing SunOS 4.1",
+ "ADMIN", "System and Network Administration",
+ "SECUR", "Security Features Guide",
+ "PROM", "PROM User's Manual",
+ "DIAG", "Sun System Diagnostics",
+ "SUNDIAG", "Sundiag User's Guide",
+ "MANPAGES", "SunOS Reference Manual",
+ "REFMAN", "SunOS Reference Manual",
+ "SSI", "Sun System Introduction",
+ "SSO", "System Services Overview",
+ "TEXT", "Editing Text Files",
+ "DOCS", "Formatting Documents",
+ "TROFF", "Using <B>nroff</B> and <B>troff</B>",
+ "INDEX", "Global Index",
+ "CPG", "C Programmer's Guide",
+ "CREF", "C Reference Manual",
+ "ASSY", "Assembly Language Reference",
+ "PUL", "Programming Utilities and Libraries",
+ "DEBUG", "Debugging Tools",
+ "NETP", "Network Programming",
+ "DRIVER", "Writing Device Drivers",
+ "STREAMS", "STREAMS Programming",
+ "SBDK", "SBus Developer's Kit",
+ "WDDS", "Writing Device Drivers for the SBus",
+ "FPOINT", "Floating-Point Programmer's Guide",
+ "SVPG", "SunView 1 Programmer's Guide",
+ "SVSPG", "SunView 1 System Programmer's Guide",
+ "PIXRCT", "Pixrect Reference Manual",
+ "CGI", "SunCGI Reference Manual",
+ "CORE", "SunCore Reference Manual",
+ "4ASSY", "Sun-4 Assembly Language Reference",
+ "SARCH", "<FONT SIZE=\"-1\">SPARC</FONT> Architecture Manual",
+ "KR", "The C Programming Language",
+ 0, 0 };
+
+char *lookup_abbrev (char *s)
+{
+ int i=0;
+
+ if (!s)
+ return "";
+ while (abbrev_list[i] && strcmp(s, abbrev_list[i]))
+ i = i+2;
+ return abbrev_list[i] ? abbrev_list[i+1] : s;
+}
diff --git a/man2html/cgibase.c b/man2html/cgibase.c
new file mode 100644
index 0000000..de31cdf
--- /dev/null
+++ b/man2html/cgibase.c
@@ -0,0 +1,143 @@
+/*
+ * Here are the routines of man2html that output a HREF string.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <ctype.h> /* tolower() */
+#include <string.h> /* strlen() */
+#include "defs.h"
+
+/*
+ * The default is to use cgibase. With relative html style
+ * we generate URLs of the form "../manX/page.html".
+ */
+static int relat_html_style = 0;
+
+/*
+ * Either the user is non-local (or local, but using httpd),
+ * in which case we use http:/cgi-bin, or the user is local
+ * and uses lynx, and we use lynxcgi:/home/httpd/cgi-bin.
+ */
+
+static char *man2htmlpath = "/cgi-bin/man/man2html"; /* default */
+static char *cgibase_format = "http://%s"; /* host.domain:port */
+static char *cgibase_ll_format = "lynxcgi:%s"; /* directory */
+static char *cgibase = "http://localhost"; /* default */
+
+/*
+ * Separator between URL and argument string.
+ *
+ * With http:<path to script>/a/b?c+d+e the script is called
+ * with PATH_INFO=/a/b and QUERY_STRING=c+d+e and args $1=c, $2=d, $3=e.
+ * With lynxcgi:<full path to script>?c+d+e no PATH_INFO is possible.
+ */
+static char sep = '?'; /* or '/' */
+
+void
+set_separator(char s) {
+ sep = s;
+}
+
+void
+set_lynxcgibase(char *s) {
+ int n = strlen(cgibase_ll_format) + strlen(s);
+ char *t = (char *) xmalloc(n);
+
+ sprintf(t, cgibase_ll_format, s);
+ cgibase = t;
+}
+
+void
+set_cgibase(char *s) {
+ int n = strlen(cgibase_format) + strlen(s);
+ char *t = (char *) xmalloc(n);
+
+ sprintf(t, cgibase_format, s);
+ cgibase = t;
+}
+
+void
+set_man2htmlpath(char *s) {
+ man2htmlpath = xstrdup(s);
+}
+
+void
+set_relative_html_links(void) {
+ relat_html_style = 1;
+}
+
+/* What shall we say in case of relat_html_style? */
+static char *signature = "<HR>\n"
+"This document was created by\n"
+"<A HREF=\"%s%s\">man2html</A>,\n"
+"using the manual pages.<BR>\n"
+"%s\n";
+
+#define TIMEFORMAT "%T GMT, %B %d, %Y"
+#define TIMEBUFSZ 500
+
+void print_sig()
+{
+ char timebuf[TIMEBUFSZ];
+ struct tm *timetm;
+ time_t clock;
+
+ timebuf[0] = 0;
+#ifdef TIMEFORMAT
+ sprintf(timebuf, "Time: ");
+ clock=time(NULL);
+ timetm=gmtime(&clock);
+ strftime(timebuf+6, TIMEBUFSZ-6, TIMEFORMAT, timetm);
+ timebuf[TIMEBUFSZ-1] = 0;
+#endif
+ printf(signature, cgibase, man2htmlpath, timebuf);
+}
+
+void
+include_file_html(char *g) {
+ printf("<A HREF=\"file:/usr/include/%s\">%s</A>>", g,g);
+}
+
+void
+man_page_html(char *sec, char *h) {
+ if (relat_html_style) {
+ if (!h)
+ printf("<A HREF=\"../index.html\">"
+ "Return to Main Contents</A>");
+ else
+ printf("<A HREF=\"../man%s/%s.%s.html\">%s</A>",
+ sec, h, sec, h);
+ } else {
+ if (!h)
+ printf("<A HREF=\"%s%s\">Return to Main Contents</A>",
+ cgibase, man2htmlpath);
+ else if (!sec)
+ printf("<A HREF=\"%s%s%c%s\">%s</A>",
+ cgibase, man2htmlpath, sep, h, h);
+ else
+ printf("<A HREF=\"%s%s%c%s+%s\">%s</A>",
+ cgibase, man2htmlpath, sep, sec, h, h);
+ }
+}
+
+void
+ftp_html(char *f) {
+ printf("<A HREF=\"ftp://%s\">%s</A>", f, f);
+}
+
+void
+www_html(char *f) {
+ printf("<A HREF=\"http://%s\">%s</A>", f, f);
+}
+
+void
+mailto_html(char *g) {
+ printf("<A HREF=\"mailto:%s\">%s</A>", g, g);
+}
+
+void
+url_html(char *g) {
+ printf("<A HREF=\"%s\">%s</A>", g, g);
+}
diff --git a/man2html/defs.h b/man2html/defs.h
new file mode 100644
index 0000000..f3e75ef
--- /dev/null
+++ b/man2html/defs.h
@@ -0,0 +1,41 @@
+extern int nroff;
+extern int local_lynx;
+
+typedef struct STRDEF STRDEF;
+struct STRDEF {
+ int nr,slen;
+ char *st;
+ STRDEF *next;
+};
+
+typedef struct INTDEF INTDEF;
+struct INTDEF {
+ int nr;
+ int val;
+ int incr;
+ INTDEF *next;
+};
+
+extern STRDEF *chardef, *strdef, *defdef;
+extern INTDEF *intdef;
+
+#define V(A,B) ((A)*256+(B))
+
+#include <sys/types.h>
+extern void stdinit(void);
+extern void print_sig(void);
+extern char *lookup_abbrev(char *);
+extern void include_file_html(char *);
+extern void man_page_html(char*, char *);
+extern void ftp_html(char *);
+extern void www_html(char *);
+extern void mailto_html(char *);
+extern void url_html(char *);
+extern void set_separator(char);
+extern void set_lynxcgibase(char *);
+extern void set_cgibase(char *);
+extern void set_man2htmlpath(char *);
+extern void set_relative_html_links(void);
+extern void *xmalloc(size_t size);
+extern void *xrealloc(void *ptr, size_t size);
+extern char *xstrdup(const char *s);
diff --git a/man2html/glimpse_filters b/man2html/glimpse_filters
new file mode 100644
index 0000000..1814e5d
--- /dev/null
+++ b/man2html/glimpse_filters
@@ -0,0 +1,3 @@
+*.gz gzip -d -c
+*.Z gzip -d -c
+
diff --git a/man2html/hman.1 b/man2html/hman.1
new file mode 100644
index 0000000..4676f55
--- /dev/null
+++ b/man2html/hman.1
@@ -0,0 +1,69 @@
+.\" Copyright (c) 1998 Andries 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.
+.TH hman 1 "19 January 1998"
+.LO 1
+.SH NAME
+hman \- browse the on-line manual pages
+.SH SYNOPSIS
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
+.br
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] [ index ]
+.SH DESCRIPTION
+The
+.B hman
+script is an interface to man2html(1) that allows you to enter man page
+requests at the command line and view the output in your favourite
+browser.
+The behaviour reminds of that of
+.BR man (1)
+so that many people will be able to alias
+.B hman
+to
+.BR man .
+If the browser used is netscape, and an incarnation of netscape
+is running already,
+.B hman
+will pass the request to the existing browser.
+
+.SH OPTIONS
+.TP
+.B \-\^P " browser"
+Specify which browser (like lynx, xmosaic, arena, chimera,
+netscape, amaya, ...) to use.
+This option overrides the
+.B MANHTMLPAGER
+environment variable.
+The default is the non-httpd version of
+.BR lynx .
+.TP
+.B \-\^H " host"
+Specify from what host to get the man pages.
+This option overrides the
+.B MANHTMLHOST
+environment variable.
+The default is
+.BR localhost .
+
+.SH ENVIRONMENT
+.TP
+MANHTMLPAGER
+The default browser to use is selected using this environment variable.
+.TP
+MANHTMLHOST
+The default host to use is selected using this environment variable.
+
+.SH "SEE ALSO"
+.BR man (1),
+.BR man2html (1),
+.BR arena (1),
+.BR lynx (1),
+.BR netscape (1),
+.BR xmosaic (1),
+.BR glimpse (1)
+
+http://www.mcom.com/newsref/std/x-remote.html
diff --git a/man2html/hman.sh b/man2html/hman.sh
new file mode 100755
index 0000000..c484acc
--- /dev/null
+++ b/man2html/hman.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# hman - interface to the man2html scripts
+#
+# Michael Hamilton <michael at actrix.gen.nz>, Apr 1996
+# Andries Brouwer <aeb at cwi.nl>, Jan 1998.
+#
+# Usage examples:
+# hman - get start page
+# hman man2html - get man page for man2html
+# hman 7 locale - get section 7 man page for locale
+# hman 1 - section 1 index of names only
+# hman 3 index - section 3 index names+descriptions
+# hman -k editor - search all man pages for some string
+# hman -P arena ./twm.man - specify browser; specify man page
+#
+# hman from %version%
+#
+
+if [ x"$1" = x"-v" -o x"$1" = x"-V" ]; then
+ echo "`basename $0` from %version%"
+ exit 0
+fi
+
+# The user has to set MANHTMLPAGER (or he will get httpd-free lynx).
+# Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ...
+BROWSER=${MANHTMLPAGER-lynxcgi}
+#
+# If the man pages are on a remote host, specify it in MANHTMLHOST.
+HOST=${MANHTMLHOST-localhost}
+
+# Perhaps the browser was specified on the command line?
+if [ $# -gt 1 -a "$1" = "-P" ]; then
+ BROWSER="$2"
+ shift; shift
+fi
+
+# Perhaps the host was specified on the command line?
+if [ $# -gt 1 -a "$1" = "-H" ]; then
+ HOST="$2"
+ shift; shift
+fi
+
+# Interface to a live (already running) netscape browser.
+function nsfunc () {
+ if ( /bin/ps xc | grep -q 'netscape$' ) ; then
+ if [ -x netscape-remote ] ; then
+ exec netscape-remote -remote "openURL($1,new_window)"
+ else
+ exec netscape -remote "openURL($1,new_window)"
+ fi
+ else
+ netscape $1 &
+ fi
+}
+
+case $BROWSER in
+ lynxcgi)
+ BROWSER=lynx
+ CG="lynxcgi:/home/httpd/cgi-bin/man"
+ ;;
+ netscape)
+ BROWSER=nsfunc
+ CG="http://$HOST/cgi-bin/man"
+ ;;
+ *)
+ CG="http://$HOST/cgi-bin/man"
+ ;;
+esac
+
+ case $# in
+ 0) $BROWSER $CG/man2html ;;
+ 1) case "$1" in
+ 1|2|3|4|5|6|7|8|l|n)
+ $BROWSER "$CG/mansec?$CG+$1" ;;
+ /*)
+ $BROWSER "$CG/man2html?$1" ;;
+ */*)
+ $BROWSER "$CG/man2html?$PWD/$1" ;;
+ *)
+ $BROWSER "$CG/man2html?$1" ;;
+ esac ;;
+ 2) case "$1" in
+ -k)
+ $BROWSER "$CG/mansearch?$2" ;;
+ *)
+ if [ "$2" = index ]; then
+ $BROWSER "$CG/manwhatis?$CG+$1"
+ else
+ $BROWSER "$CG/man2html?$1+$2"
+ fi ;;
+ esac ;;
+ *) echo "bad number of args" ;;
+ esac
+
+exit 0
diff --git a/man2html/locales/en/hman.1 b/man2html/locales/en/hman.1
new file mode 100644
index 0000000..4676f55
--- /dev/null
+++ b/man2html/locales/en/hman.1
@@ -0,0 +1,69 @@
+.\" Copyright (c) 1998 Andries 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.
+.TH hman 1 "19 January 1998"
+.LO 1
+.SH NAME
+hman \- browse the on-line manual pages
+.SH SYNOPSIS
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
+.br
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] [ index ]
+.SH DESCRIPTION
+The
+.B hman
+script is an interface to man2html(1) that allows you to enter man page
+requests at the command line and view the output in your favourite
+browser.
+The behaviour reminds of that of
+.BR man (1)
+so that many people will be able to alias
+.B hman
+to
+.BR man .
+If the browser used is netscape, and an incarnation of netscape
+is running already,
+.B hman
+will pass the request to the existing browser.
+
+.SH OPTIONS
+.TP
+.B \-\^P " browser"
+Specify which browser (like lynx, xmosaic, arena, chimera,
+netscape, amaya, ...) to use.
+This option overrides the
+.B MANHTMLPAGER
+environment variable.
+The default is the non-httpd version of
+.BR lynx .
+.TP
+.B \-\^H " host"
+Specify from what host to get the man pages.
+This option overrides the
+.B MANHTMLHOST
+environment variable.
+The default is
+.BR localhost .
+
+.SH ENVIRONMENT
+.TP
+MANHTMLPAGER
+The default browser to use is selected using this environment variable.
+.TP
+MANHTMLHOST
+The default host to use is selected using this environment variable.
+
+.SH "SEE ALSO"
+.BR man (1),
+.BR man2html (1),
+.BR arena (1),
+.BR lynx (1),
+.BR netscape (1),
+.BR xmosaic (1),
+.BR glimpse (1)
+
+http://www.mcom.com/newsref/std/x-remote.html
diff --git a/man2html/locales/en/man2html.1 b/man2html/locales/en/man2html.1
new file mode 100644
index 0000000..c1c25b3
--- /dev/null
+++ b/man2html/locales/en/man2html.1
@@ -0,0 +1,151 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.TH man2html 1 "1 January 1998"
+.LO 1
+.SH NAME
+man2html \- format a manual page in html
+.SH SYNOPSIS
+man2html [options] [file]
+.SH DESCRIPTION
+.B man2html
+converts a manual page as found in
+.I file
+(or stdin, in case no file argument, or the argument "-", is given)
+from man-style nroff into html, and prints the result on stdout.
+It does support tbl but does not know about eqn.
+The exit status is 0. If something goes wrong,
+an error page is printed on stdout.
+
+This can be used as a stand-alone utility, but is mainly intended
+as an auxiliary, to enable users to browse their man pages using
+a html browser like
+.BR lynx (1),
+.BR xmosaic (1)
+or
+.BR netscape (1).
+./" (See
+./" .BR man (1)
+./" for info on how to browse man pages via
+./" .BR man2html .
+./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+./" in the environment.)
+
+The main part of
+.B man2html
+is the troff-to-html engine written by Richard Verhoeven (rcb5 at win.tue.nl).
+It adds hyperlinks for the following constructs:
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://string "method://string"
+www.host.name "http://www.host.name"
+ftp.host.name "ftp://ftp.host.name"
+name at host "mailto:name at host"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(The first of these can be tuned by options - see below.)
+No lookup is done - the links generated need not exist.
+Also an index with internal hyperlinks to the various sections
+is generated, so that it is easier to find one's way
+in large man pages like
+.BR bash (1).
+
+.SH OPTIONS
+When reading from stdin, it is not always clear how to
+do .so expansion. The \-D option allows a script to define
+the working directory.
+.LP
+.TP
+.B \-\^D pathname
+Strip the last two parts from the pathname, and do a
+\fIchdir\fP(\fIdir\fP) before starting the conversion.
+.LP
+The \-E option allows the easy generation of error messages
+from a cgi script.
+.LP
+.TP
+.B \-\^E string
+Output an error page containing the given error message.
+.LP
+The general form of a hyperlink generated for a man page reference is
+.IP
+<method:cgipath><man2htmlpath><separator><manpage>
+.LP
+with a default as shown above. The parts of this hyperlink
+are set using the various options.
+.TP
+.B \-\^h
+Set method:cgipath to http://localhost. This is the default.
+.TP
+.BI \-\^H " host[.domain][:port]"
+Set method:cgipath to
+.RI http:// host.domain:port .
+.TP
+.B \-\^l
+Set method:cgipath to
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+Set method:cgipath to
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " man2htmlpath"
+Set the man2htmlpath to use. The default is
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+Set separator to '/'.
+.TP
+.B \-\^q
+Set separator to '?'. This is the default.
+.TP
+.B \-\^r
+Use relative html paths, instead of cgi-bin paths.
+.LP
+On a machine without running
+.BR httpd ,
+one can use
+.B lynx
+to browse the man pages, using the lynxcgi method.
+When some http daemon is running, lynx, or any other browser,
+can be used to browse the man pages, using the http method.
+The option \-l (for `lynxcgi') selects the former behaviour.
+With it, the default cgipath is \fI/home/httpd\fP.
+
+In general, a cgi script can be called by
+.IP
+<path_to_script>/<more_path>?<query>
+.LP
+and the environment variables PATH_INFO and QUERY_STRING
+will be set to <more_path> and <query>, respectively.
+Since lynxcgi does not handle the PATH_INFO part, we generate
+hyperlinks with `?' as a separator by default.
+The option \-p (for `path') selects '/' as a separator, while
+the option \-q (for `query') selects '?' as a separator.
+
+The option \-H \fIhost\fP will specify the host to use
+(instead of \fIlocalhost\fP). A cgi script could use
+.IP
+man2html -H $SERVER_NAME
+.LP
+if the variable SERVER_NAME is set. This would allow your machine
+to act as a server and export man pages.
+
+.SH BUGS
+There are many heuristics. The output will not always be perfect.
+The lynxcgi method will not work if lynx was compiled without
+selecting support for it. There may be problems with security.
+
+.SH AUTHOR
+Richard Verhoeven was the original author of
+.BR "man2html" .
+Michael Hamilton and Andries Brouwer subsequently improved on it.
+Federico Lucifredi <flucifredi at acm.org> is the current maintainer.
+
+.SH "SEE ALSO"
+.BR lynx (1),
+.BR man (1)
diff --git a/man2html/locales/fr/man2html.1 b/man2html/locales/fr/man2html.1
new file mode 100644
index 0000000..1e99cd8
--- /dev/null
+++ b/man2html/locales/fr/man2html.1
@@ -0,0 +1,165 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.TH man2html 1 "1er janvier 1998" "Manuel Linux" "Commandes utilisateur"
+.LO 1
+.SH NOM
+man2html \- formate une page de manuel en html
+.SH SYNOPSIS
+man2html [options] [fichier]
+.SH DESCRIPTION
+.B man2html
+convertit une page de manuel telle que trouv�e dans
+.I fichier
+(ou l'entr�e standard stdin si aucun argument fichier n'est donn�
+ou si l'argument �\ -\ � est donn�) � partir du format nroff
+(celui des pages de manuels) vers un format html et affiche le r�sultat
+sur la sortie standard (stdout).
+.B man2html
+supporte
+.BR tbl (1)
+mais ne conna�t rien � propos de
+.BR eqn (1).
+Le code de sortie est 0. Si quelque chose va mal, une page d'erreur
+est affich�e sur la sortie standard stdout.
+
+Cette commande peut �tre utilis�e seule mais a �t� principalement con�ue pour
+�tre un auxiliaire afin que les utilisateurs puissent naviguer dans les pages
+de manuel avec un navigateur html comme
+.BR lynx (1),
+.BR xmosaic (1)
+ou
+.BR netscape (1).
+./" (See
+./" .BR man (1)
+./" for info on how to browse man pages via
+./" .BR man2html .
+./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+./" in the environment.)
+
+La plus grande partie de
+.B man2html
+est l'engin �\ troff-vers-html\ � �crit par Richard Verhoeven (rcb5 at win.tue.nl).
+Il ajoute des hyperliens aux constructions suivantes\ :
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://string "method://string"
+www.host.name "http://www.host.name"
+ftp.host.name "ftp://ftp.host.name"
+name at host "mailto:name at host"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(La premi�re de celles\-ci peut �tre ajust�e par des options - voir plus loin.)
+Aucune consultation n'est effectu�e - les liens g�n�r�s n'ont pas besoin
+d'exister. Un index avec des hyperliens internes vers les diverses
+sections est �galement cr�� rendant plus facile la navigation dans les grandes
+pages comme
+.BR bash (1).
+
+.SH OPTIONS
+Lorsqu'on lit � partir de stdin, il n'est pas toujours �vident de savoir
+comment se fait l'expansion .so. L'option \-D permet � un script de d�finir
+le r�pertoire de travail.
+.LP
+.TP
+.B \-\^D chemin
+Retire les deux derniers �l�ments du chemin et effectue un changement
+de r�pertoire courant \fIchdir\fP(\fIdir\fP) avant de d�buter la conversion.
+.LP
+L'option \-E option facilite la production de messages d'erreurs � partir
+de scripts cgi.
+.LP
+.TP
+.B \-\^E cha�ne
+Produire en sortie une page d'erreur contenant le message d'erreur donn�.
+.LP
+La forme g�n�rale d'un hyperlien g�n�r� pour r�f�rencer une page de manuel est
+.IP
+<method:cgipath><man2htmlpath><separator><manpage>
+.LP
+qui est d'ailleurs la forme par d�faut. Les �l�ments de cet hyperlien sont
+positionn�s en utilisant diverses options.
+.TP
+.B \-\^h
+Positionner method:cgipath � http://localhost.
+C'est le comportement par d�faut.
+.TP
+.BI \-\^H " h�te[.domaine][:port]"
+Positionner method:cgipath �
+.RI http:// h�te.domaine:port .
+.TP
+.B \-\^l
+Positionner method:cgipath �
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+Positionner method:cgipath �
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " man2htmlpath"
+Positionner le chemin vers man2html � utiliser. La valeur par d�faut est
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+Positionner le s�parateur � �\ /\ �.
+.TP
+.B \-\^q
+Positionner le s�parateur � �\ ?\ �. C'est la valeur par d�faut.
+.TP
+.B \-\^r
+Utiliser des chemins html relatifs plut�t que les chemins cgi-bin.
+.LP
+Sur une machine sur laquelle
+.BR httpd
+ne tourne pas, vous pouvez utiliser
+.B lynx
+pour naviguer dans les pages de manuel en utilisant la m�thode lynxcgi.
+Lorsqu'un d�mon http est en service, vous pouvez utiliser lynx ou n'importe
+quel autre navigateur pour parcourir les pages de manuel en utilisant
+la m�thode http.
+L'option \-l (pour �\ lynxcgi\ �) s�lectionne ce fonctionnement.
+Avec elle, le chemin cgi par d�faut est \fI/home/httpd\fP.
+
+En g�n�ral, un script cgi peut �tre appel� de la fa�on suivante
+.IP
+<path_to_script>/<more_path>?<query>
+.LP
+et les variables d'environnement PATH_INFO et QUERY_STRING seront positionn�es
+respectivement � <more_path> et <query>.
+Puisque lynxcgi ne g�re pas l'�l�ment PATH_INFO, nous allons g�n�rer des
+hyperliens avec �\ ?\ � comme s�parateur par d�faut.
+L'option \-p (pour �\ path\ �) s�lectionne �\ /\ � comme s�parateur, alors que
+l'option \-q (for �\ query\ �) s�lectionne �\ ?\ �.
+
+L'option \-H \fIhost\fP sp�cifiera l'h�te � utiliser
+(� la place \fIlocalhost\fP). Un script cgi pourra utiliser
+.IP
+man2html -H $SERVER_NAME
+.LP
+si la variable SERVER_NAME est positionn�e. Cela permettra � votre machine
+de fonctionner en tant que serveur et d'exporter les pages manuel.
+
+.SH BOGUES
+Il y a beaucoup d'heuristiques. La sortie produite ne sera pas toujours
+parfaite. La m�thode lynxcgi ne fonctionnera pas si lynx a �t� compil� sans
+le support de celle-ci. Il peut y avoir des probl�mes de s�curit�.
+
+.SH "VOIR AUSSI"
+.BR lynx (1),
+.BR man (1)
+
+.SH TRADUCTION
+.PP
+Ce document est une traduction r�alis�e par Alain Portal
+<aportal AT univ-montp2 DOT fr> le 1er juin 2005 et mise � jour
+le 7 novembre 2005.
+.PP
+L'�quipe de traduction a fait le maximum pour r�aliser une adaptation
+fran�aise de qualit�. La version anglaise la plus � jour de ce document est
+toujours consultable via la commande\ : �\ \fBLANG=en\ man\ 1\ man2html\fR\ �.
+N'h�sitez pas � signaler � l'auteur ou au traducteur, selon le cas, toute
+erreur dans cette page de manuel.
diff --git a/man2html/locales/it/hman.1 b/man2html/locales/it/hman.1
new file mode 100644
index 0000000..730de9c
--- /dev/null
+++ b/man2html/locales/it/hman.1
@@ -0,0 +1,71 @@
+.\" Copyright (c) 1998 Andries 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.
+.\" Traduzione da man-1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni at gmail.com>
+.\" agosto 2006
+.\"
+.TH hman 1 "19 Gennaio 1998"
+.LO 1
+.SH NOME
+hman \- naviga le pagine di manuale on-line
+.SH SINTASSI
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] \fIname\fP
+.br
+.B hman
+[ -P \fIbrowser\fP ] [ -H \fIhost\fP ] [ \fIsection\fP ] [ index ]
+.SH DESCRIZIONE
+Lo script
+.B hman
+� un'interfaccia per man2html(1), che permette di inserire richieste di man
+page dalla linea di comando e vedere l'output nel browser
+preferito.
+Il comportamento ricorda quello di
+.BR man (1)
+perci� molte persone potranno utilizzare un alias da
+.B hman
+a
+.BR man .
+Se il browser usato � netscape, e una copia di netscape
+� gi� in esecuzione,
+.B hman
+passer� la richiesta a quest'ultima
+
+.SH OPZIONI
+.TP
+.B \-\^P " browser"
+Specifica quale browser (lynx, xmosaic, arena, chimera,
+netscape, amaya, ...) usare.
+Questa opzione sovrascrive la variabile d'ambiente
+.B MANHTMLPAGER .
+Il valore predefinito � la versione non-httpd di
+.BR lynx .
+.TP
+.B \-\^H " host"
+Specifica da quale host prendere le man page.
+Questa opzione sovrascrive la variabile d'ambiente
+.B MANHTMLHOST .
+Il valore predefinito �
+.BR localhost .
+
+.SH AMBIENTE
+.TP
+MANHTMLPAGER
+Il browser predefinito in uso � selezionato da questa variabile d'ambiente.
+.TP
+MANHTMLHOST
+L'host predefinito in uso � selezionato da questa variabile d'ambiente.
+
+.SH "VEDERE ANCHE"
+.BR man (1),
+.BR man2html (1),
+.BR arena (1),
+.BR lynx (1),
+.BR netscape (1),
+.BR xmosaic (1),
+.BR glimpse (1)
+
+http://www.mcom.com/newsref/std/x-remote.html
diff --git a/man2html/locales/it/man2html.1 b/man2html/locales/it/man2html.1
new file mode 100644
index 0000000..45feef0
--- /dev/null
+++ b/man2html/locales/it/man2html.1
@@ -0,0 +1,153 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.\" Traduzione da man-1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni at gmail.com>
+.\" giugno 2006
+.\"
+.TH man2html 1 "1 gennaio 1998"
+.LO 1
+.SH NOME
+man2html \- formatta una pagina di manuale in html
+.SH SINTASSI
+man2html [options] [file]
+.SH DESCRIZIONE
+.B man2html
+converte una pagina di manuale che si trova in
+.I file
+(o standard input (stdin); nel caso non venga fornito alcun file come
+argomento, o sia indicato "-", come argomento)
+dallo stile man nroff in html, e stampa il risultato in standard output (stdout).
+Supporta tbl, ma non conosce eqn.
+Lo stato di uscita � 0. Se qualcosa va male
+viene stampata su stdout una pagina di errore.
+
+Pu� essere usato come utilit� stand-alone, ma � pensato principalmente
+come ausilio per permettere agli utenti di navigare le proprie man page
+usando un browser html come
+.BR lynx (1),
+.BR xmosaic (1)
+o
+.BR netscape (1).
+./" (See
+./" .BR man (1)
+./" for info on how to browse man pages via
+./" .BR man2html .
+./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+./" in the environment.)
+
+La parte principale di
+.B man2html
+� il motore da troff a html scritto da Richard Verhoeven (rcb5 at win.tue.nl).
+Esso aggiunge dei collegamenti ipertestuali per i seguenti costrutti:
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://string "method://string"
+www.host.name "http://www.host.name"
+ftp.host.name "ftp://ftp.host.name"
+name at host "mailto:name at host"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(Il primo di questi pu� essere controllato dalle opzioni - vedere sotto).
+Non viene fatto nessun controllo - i collegamenti generati non sono
+necessari o indispensabili.
+Inoltre viene generato un indice con collegamenti interni alle varie sezioni,
+in modo che sia pi� facile effettuare ricerche personalizzate in pagine di
+manuale grandi come
+.BR bash (1).
+
+.SH OPZIONI
+Quando si legge da stdin non � sempre chiaro come effettuare l'espansione
+.so . L'opzione \-D permette a uno script di definire la
+directory di lavoro.
+.LP
+.TP
+.B \-\^D pathname
+Estrae le ultime due parti dal percorso, ed esegue
+\fIchdir\fP(\fIdir\fP) prima di iniziare la conversione.
+.LP
+L'opzione \-E permette una facile generazione di messaggi di errore
+da uno script cgi.
+.LP
+.TP
+.B \-\^E string
+Genera una pagina di errore contenente il messaggio di errore che si � verificato.
+.LP
+La forma generale di un collegamento ipertestuale creato per una
+man page di riferimento �
+.IP
+<method:cgipath><man2htmlpath><separator><manpage>
+.LP
+con un valore predefinito come mostrato sopra. Le parti di questo collegamento
+ipertestuale sono impostate usando le varie opzioni.
+.TP
+.B \-\^h
+Set method:cgipath to http://localhost. Questo � il valore predefinito.
+.TP
+.BI \-\^H " host[.domain][:port]"
+Set method:cgipath to
+.RI http:// host.domain:port .
+.TP
+.B \-\^l
+Set method:cgipath to
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+Set method:cgipath to
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " man2htmlpath"
+Imposta il man2htmlpath da usare. Il valore predefinito �
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+Imposta '/' come separatore.
+.TP
+.B \-\^q
+Imposta '?' come separatore. Questo � il valore predefinito.
+.TP
+.B \-\^r
+Usa percorsi html relativi, invece dei percorsi cgi-bin.
+.LP
+Su una macchina, senza eseguire
+.BR httpd ,
+si pu� usare
+.B lynx
+per navigare le man page, usando il metodo lynxcgi.
+Quando � attivo qualche demone http, lynx, o qualunque altro browser,
+pu� essere usato per navigare le man page, usando il metodo http.
+L'opzione \-l (per `lynxcgi') seleziona il comportamento precedente.
+Con esso, il valore predefinito di cgipath � \fI/home/httpd\fP.
+
+In generale, uno script cgi pu� essere chiamato da
+.IP
+<path_to_script>/<more_path>?<query>
+.LP
+e le variabili d'ambiente PATH_INFO e QUERY_STRING
+verranno impostate rispettivamente in <more_path> e <query>.
+Poich� lynxcgi non gestisce la parte PATH_INFO, vengono generati
+collegamenti ipertestualil con `?' come separatore predefinito.
+L'opzione \-p (per `path') seleziona '/' come separatore, mentre
+l'opzione \-q (per `query') seleziona '?' come separatore.
+
+L'opzione \-H \fIhost\fP specificher� l'host da usare
+(invece di \fIlocalhost\fP). Uno script cgi pu� usare
+.IP
+man2html -H $SERVER_NAME
+.LP
+se � impostata la variabile SERVER_NAME . Questo permetter� alla propria
+macchina di comportarsi come un server ed esportare man page.
+
+.SH BUG
+Ci sono molti fattori difficilmente prevedibili. L'output potrebbe non
+essere sempre perfetto. Il metodo lynxcgi non funzioner� se lynx � stato
+compilato senza selezionare il supporto per quest'ultimo. Ci potrebbero
+essere problemi di sicurezza.
+
+.SH "VEDERE ANCHE"
+.BR lynx (1),
+.BR man (1)
diff --git a/man2html/man2html.1 b/man2html/man2html.1
new file mode 100644
index 0000000..c1c25b3
--- /dev/null
+++ b/man2html/man2html.1
@@ -0,0 +1,151 @@
+'\" t
+.\" Man page for man2html
+.\" aeb, 980101
+.\"
+.TH man2html 1 "1 January 1998"
+.LO 1
+.SH NAME
+man2html \- format a manual page in html
+.SH SYNOPSIS
+man2html [options] [file]
+.SH DESCRIPTION
+.B man2html
+converts a manual page as found in
+.I file
+(or stdin, in case no file argument, or the argument "-", is given)
+from man-style nroff into html, and prints the result on stdout.
+It does support tbl but does not know about eqn.
+The exit status is 0. If something goes wrong,
+an error page is printed on stdout.
+
+This can be used as a stand-alone utility, but is mainly intended
+as an auxiliary, to enable users to browse their man pages using
+a html browser like
+.BR lynx (1),
+.BR xmosaic (1)
+or
+.BR netscape (1).
+./" (See
+./" .BR man (1)
+./" for info on how to browse man pages via
+./" .BR man2html .
+./" Usually it would suffice to put "MANHTMLPAGER=/usr/bin/lynx"
+./" in the environment.)
+
+The main part of
+.B man2html
+is the troff-to-html engine written by Richard Verhoeven (rcb5 at win.tue.nl).
+It adds hyperlinks for the following constructs:
+.LP
+.TS
+l l.
+foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo"
+method://string "method://string"
+www.host.name "http://www.host.name"
+ftp.host.name "ftp://ftp.host.name"
+name at host "mailto:name at host"
+<string.h> "file:/usr/include/string.h"
+.TE
+.LP
+(The first of these can be tuned by options - see below.)
+No lookup is done - the links generated need not exist.
+Also an index with internal hyperlinks to the various sections
+is generated, so that it is easier to find one's way
+in large man pages like
+.BR bash (1).
+
+.SH OPTIONS
+When reading from stdin, it is not always clear how to
+do .so expansion. The \-D option allows a script to define
+the working directory.
+.LP
+.TP
+.B \-\^D pathname
+Strip the last two parts from the pathname, and do a
+\fIchdir\fP(\fIdir\fP) before starting the conversion.
+.LP
+The \-E option allows the easy generation of error messages
+from a cgi script.
+.LP
+.TP
+.B \-\^E string
+Output an error page containing the given error message.
+.LP
+The general form of a hyperlink generated for a man page reference is
+.IP
+<method:cgipath><man2htmlpath><separator><manpage>
+.LP
+with a default as shown above. The parts of this hyperlink
+are set using the various options.
+.TP
+.B \-\^h
+Set method:cgipath to http://localhost. This is the default.
+.TP
+.BI \-\^H " host[.domain][:port]"
+Set method:cgipath to
+.RI http:// host.domain:port .
+.TP
+.B \-\^l
+Set method:cgipath to
+.RI lynxcgi: /home/httpd .
+.TP
+.BI \-\^L " dir"
+Set method:cgipath to
+.RI lynxcgi: dir .
+.TP
+.BI \-\^M " man2htmlpath"
+Set the man2htmlpath to use. The default is
+.IR /cgi-bin/man/man2html .
+.TP
+.B \-\^p
+Set separator to '/'.
+.TP
+.B \-\^q
+Set separator to '?'. This is the default.
+.TP
+.B \-\^r
+Use relative html paths, instead of cgi-bin paths.
+.LP
+On a machine without running
+.BR httpd ,
+one can use
+.B lynx
+to browse the man pages, using the lynxcgi method.
+When some http daemon is running, lynx, or any other browser,
+can be used to browse the man pages, using the http method.
+The option \-l (for `lynxcgi') selects the former behaviour.
+With it, the default cgipath is \fI/home/httpd\fP.
+
+In general, a cgi script can be called by
+.IP
+<path_to_script>/<more_path>?<query>
+.LP
+and the environment variables PATH_INFO and QUERY_STRING
+will be set to <more_path> and <query>, respectively.
+Since lynxcgi does not handle the PATH_INFO part, we generate
+hyperlinks with `?' as a separator by default.
+The option \-p (for `path') selects '/' as a separator, while
+the option \-q (for `query') selects '?' as a separator.
+
+The option \-H \fIhost\fP will specify the host to use
+(instead of \fIlocalhost\fP). A cgi script could use
+.IP
+man2html -H $SERVER_NAME
+.LP
+if the variable SERVER_NAME is set. This would allow your machine
+to act as a server and export man pages.
+
+.SH BUGS
+There are many heuristics. The output will not always be perfect.
+The lynxcgi method will not work if lynx was compiled without
+selecting support for it. There may be problems with security.
+
+.SH AUTHOR
+Richard Verhoeven was the original author of
+.BR "man2html" .
+Michael Hamilton and Andries Brouwer subsequently improved on it.
+Federico Lucifredi <flucifredi at acm.org> is the current maintainer.
+
+.SH "SEE ALSO"
+.BR lynx (1),
+.BR man (1)
diff --git a/man2html/man2html.c b/man2html/man2html.c
new file mode 100644
index 0000000..86d5040
--- /dev/null
+++ b/man2html/man2html.c
@@ -0,0 +1,3241 @@
+/*
+** This program was written by Richard Verhoeven (NL:5482ZX35)
+** at the Eindhoven University of Technology. Email: rcb5 at win.tue.nl
+**
+** Permission is granted to distribute, modify and use this program
+** as long as this comment is not removed or changed.
+*/
+
+/* BSD mandoc stuff added by Michael Hamilton. */
+
+/* This program is rather buggy, but in spite of that it often works.
+ Improved things a little - April 1997 & January 1998 & Dec 2001 -
+ aeb at cwi.nl. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include "defs.h"
+#include "../src/version.h"
+
+/* BSD mandoc Bd/Ed example(?) blocks */
+#define BD_LITERAL 1
+#define BD_INDENT 2
+
+#define SIZE(a) (sizeof(a)/sizeof(*a))
+
+static char NEWLINE[2]="\n";
+static char idxlabel[6] = "ixAAA";
+
+#define INDEXFILE "/tmp/manindex.list"
+
+char *fname;
+char *directory;
+FILE *idxfile;
+
+char eqndelimopen=0, eqndelimclose=0;
+char escapesym='\\', nobreaksym='\'', controlsym='.', fieldsym=0, padsym=0;
+
+char *buffer=NULL;
+int buffpos=0, buffmax=0;
+int scaninbuff=0;
+int still_dd=0;
+int tabstops[20] = { 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96 };
+int maxtstop=12;
+int curpos=0;
+
+static char *scan_troff(char *c, int san, char **result);
+static char *scan_troff_mandoc(char *c, int san, char **result);
+
+static char **argument=NULL;
+
+static char charb[3];
+
+static char *
+expand_char(int nr)
+{
+ STRDEF *h;
+
+ if (!nr)
+ return NULL;
+
+ h = chardef;
+ if (h->nr != V('*','*')) {
+ printf("chardef corrupted\n");
+ exit(1);
+ }
+
+ for (h = chardef; h; h = h->next)
+ if (h->nr == nr) {
+ curpos += h->slen;
+ return h->st;
+ }
+ charb[0] = nr/256;
+ charb[1] = nr%256;
+ charb[2] = 0;
+ curpos += 2;
+ return charb;
+}
+
+static char *
+expand_string(int nr)
+{
+ STRDEF *h;
+
+ if (!nr)
+ return NULL;
+ for (h = strdef; h; h = h->next)
+ if (h->nr == nr) {
+ curpos += h->slen;
+ return h->st;
+ }
+ return NULL;
+}
+
+
+static char outbuffer[1024];
+static int obp=0;
+static int no_newline_output=0; /* boolean, set by \c */
+static int newline_for_fun=0;
+static int output_possible=0;
+static int out_length=0;
+
+static void
+add_links(char *c)
+{
+ /*
+ ** Add the links to the output.
+ ** At the moment the following are recognized:
+ **
+ ** name(*) -> ../man?/name.*
+ ** method://string -> method://string
+ ** www.host.name -> http://www.host.name
+ ** ftp.host.name -> ftp://ftp.host.name
+ ** name at host -> mailto:name at host
+ ** <name.h> -> file:/usr/include/name.h (guess)
+ **
+ ** Other possible links to add in the future:
+ **
+ ** /dir/dir/file -> file:/dir/dir/file
+ */
+ int i,j,nr;
+ char *f, *g, *h;
+ char *idtest[6]; /* url, mailto, www, ftp, manpage, include file */
+
+ out_length+=strlen(c);
+
+ nr=0;
+ idtest[0]=strstr(c+1,"://");
+ idtest[1]=strchr(c+1,'@');
+ idtest[2]=strstr(c,"www.");
+ idtest[3]=strstr(c,"ftp.");
+ idtest[4]=strchr(c+1,'(');
+ idtest[5]=strstr(c+1,".h>");
+ for (i=0; i<6; i++) nr += (idtest[i]!=NULL);
+ while (nr) {
+ j=-1;
+ for (i=0; i<6; i++)
+ if (idtest[i] && (j<0 || idtest[i]<idtest[j])) j=i;
+ switch (j) {
+ case 5: /* <name.h> */
+ f=idtest[5];
+ h=f+2;
+ g=f;
+ while (g>c && g[-1]!=';') g--;
+ if (g!=c) {
+ char t;
+ t=*g;
+ *g=0;
+ printf("%s",c);
+ *g=t;*h=0;
+ include_file_html(g);
+ c=f+6;
+ } else {
+ f[5]=0;
+ printf("%s",c);
+ f[5]=';';
+ c=f+5;
+ }
+ break;
+ case 4: /* manpage? */
+ f=idtest[j];
+ /* find section - accept (1), (3F), (3Xt), (n), (l) */
+ g=strchr(f,')');
+ if (g && g-f<7 /* section has length at most 5, like 3Xlib */
+ /* preceded by name or html markup */
+ && (isalnum(f[-1]) || f[-1]=='>')
+ /* section is n or l or starts with a digit */
+ && strchr("123456789nl", f[1])
+ && (g-f == 2 || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
+ || (f[2] == 'X' && isdigit(f[1])))
+ ) {
+ /* this might be a link */
+ h=f-1;
+ /* skip html markup */
+ while (h>c && *h=='>') {
+ while (h!=c && *h!='<') h--;
+ if (h!=c) h--;
+ }
+ if (isalnum(*h)) {
+ char t,te,tg,*e;
+ e=h+1;
+ while (h>c && (isalnum(h[-1]) || h[-1]=='_' ||
+ h[-1]=='-' || h[-1]=='.' || h[-1]==':'))
+ h--;
+ t=*h; *h=0;
+ printf("%s", c);
+ *h=t;
+ tg=*g; *g=0;
+ te=*e; *e=0;
+ man_page_html(f+1, h); /* section, page */
+ *e=te;
+ *g=tg;
+ c=e;
+ }
+ }
+ *f=0;
+ printf("%s", c);
+ *f='(';
+ idtest[4]=f-1;
+ c=f;
+ break; /* manpage */
+ case 3: /* ftp */
+ case 2: /* www */
+ g=f=idtest[j];
+ while (*g && (isalnum(*g) || *g=='_' || *g=='-' || *g=='+' ||
+ *g=='.')) g++;
+ if (g[-1]=='.') g--;
+ if (g-f>4) {
+ char t;
+ t=*f; *f=0;
+ printf("%s",c);
+ *f=t; t=*g;*g=0;
+ if (j==3)
+ ftp_html(f);
+ else
+ www_html(f);
+ *g=t;
+ c=g;
+ } else {
+ f[3]=0;
+ printf("%s",c);
+ c=f+3;
+ f[3]='.';
+ }
+ break;
+ case 1: /* mailto */
+ g=f=idtest[1];
+ while (g>c && (isalnum(g[-1]) || g[-1]=='_' || g[-1]=='-' ||
+ g[-1]=='+' || g[-1]=='.' || g[-1]=='%')) g--;
+ h=f+1;
+ while (*h && (isalnum(*h) || *h=='_' || *h=='-' || *h=='+' ||
+ *h=='.')) h++;
+ if (h[-1]=='.') h--;
+ if (h-f>4 && f-g>1) {
+ char t;
+ t=*g;
+ *g=0;
+ printf("%s",c);
+ *g=t;t=*h;*h=0;
+ mailto_html(g);
+ *h=t;
+ c=h;
+ } else {
+ *f=0;
+ printf("%s",c);
+ *f='@';
+ idtest[1]=c;
+ c=f;
+ }
+ break;
+ case 0: /* url */
+ g=f=idtest[0];
+ while (g>c && isalpha(g[-1]) && islower(g[-1])) g--;
+ h=f+3;
+ while (*h && !isspace(*h) && *h!='<' && *h!='>' && *h!='"' &&
+ *h!='&') h++;
+ if (f-g>2 && f-g<7 && h-f>3) {
+ char t;
+ t=*g;
+ *g=0;
+ printf("%s", c);
+ *g=t; t=*h; *h=0;
+ url_html(g);
+ *h=t;
+ c=h;
+ } else {
+ f[1]=0;
+ printf("%s", c);
+ f[1]='/';
+ c=f+1;
+ }
+ break;
+ default:
+ break;
+ }
+ nr=0;
+ if (idtest[0] && idtest[0]<c) idtest[0]=strstr(c+1,"://");
+ if (idtest[1] && idtest[1]<c) idtest[1]=strchr(c+1,'@');
+ if (idtest[2] && idtest[2]<c) idtest[2]=strstr(c,"www.");
+ if (idtest[3] && idtest[3]<c) idtest[3]=strstr(c,"ftp.");
+ if (idtest[4] && idtest[4]<c) idtest[4]=strchr(c+1,'(');
+ if (idtest[5] && idtest[5]<c) idtest[5]=strstr(c+1,".h>");
+ for (i=0; i<6; i++) nr += (idtest[i]!=NULL);
+ }
+ printf("%s", c);
+}
+
+int current_font=0;
+int current_size=0;
+int fillout = 1;
+
+/*
+ * Kludge: remove \a - in the context
+ * .TH NAME 2 date "Version" "Title"
+ * we got output \aTitle\a.
+ */
+static void
+out_html(char *c) {
+ if (!c)
+ return;
+ if (no_newline_output) { /* remove \n if present */
+ int i=0;
+ while (c[i]) {
+ if (!no_newline_output)
+ c[i-1]=c[i];
+ if (c[i]=='\n')
+ no_newline_output=0;
+ i++;
+ }
+ if (!no_newline_output)
+ c[i-1]=0;
+ }
+ if (scaninbuff) {
+ while (*c) {
+ if (buffpos >= buffmax) {
+ buffer = xrealloc(buffer, buffmax*2);
+ buffmax = buffmax*2;
+ }
+ if (*c != '\a')
+ buffer[buffpos++] = *c;
+ c++;
+ }
+ } else if (output_possible) {
+ while (*c) {
+ if (*c != '\a')
+ outbuffer[obp++] = *c;
+ if (*c == '\n' || obp > 1000) {
+ outbuffer[obp] = 0;
+ add_links(outbuffer);
+ obp = 0;
+ }
+ c++;
+ }
+ }
+}
+
+/* --------------------------------------------------------------- */
+/* All references to dl_set and itemdepth are here. */
+/* --------------------------------------------------------------- */
+static int itemdepth=0;
+static int dl_set[30]= { 0 };
+#define noDL 0
+#define DL 1
+#define UL 2
+#define OL 3
+static char *dl_open[4] = { "", "<DL COMPACT>\n", "<UL>", "<OL>" };
+static char *dl_close[4] = { "", "</DL>\n", "</UL>", "</OL>" };
+
+static inline void
+dl_begin(void) {
+ if (itemdepth < SIZE(dl_set) && dl_set[itemdepth] == noDL) {
+ out_html(dl_open[DL]);
+ dl_set[itemdepth]=DL;
+ }
+ out_html("<DT>");
+}
+
+static inline void
+dl_end(void) {
+ if (itemdepth < SIZE(dl_set)) {
+ int type = dl_set[itemdepth];
+ if (type == DL) {
+ out_html(dl_close[type]);
+ dl_set[itemdepth]=noDL;
+ }
+ }
+}
+
+static inline void
+dl_newlevel(void) {
+ itemdepth++;
+ if (itemdepth < SIZE(dl_set))
+ dl_set[itemdepth]=noDL;
+ out_html("<DL COMPACT><DT><DD>");
+}
+
+static inline void
+dl_endlevel(void) {
+ if (itemdepth) {
+ dl_end();
+ out_html("</DL>\n");
+ itemdepth--;
+ }
+}
+
+static inline void
+dl_down(void) {
+ while (itemdepth)
+ dl_endlevel();
+ dl_end();
+}
+
+static inline int
+dl_type(int type) {
+ return (itemdepth < SIZE(dl_set) && dl_set[itemdepth] == type);
+}
+
+static inline void
+dl_newlevel_type(int type) {
+ itemdepth++;
+ if (itemdepth < SIZE(dl_set)) {
+ dl_set[itemdepth]=type;
+ out_html(dl_open[type]);
+ }
+}
+
+static inline void
+dl_endlevel_type(void) {
+ if (itemdepth) {
+ if (itemdepth < SIZE(dl_set))
+ out_html(dl_close[dl_set[itemdepth]]);
+ itemdepth--;
+ }
+}
+/* --------------------------------------------------------------- */
+/* This stuff is broken.
+It generates
+ <DT><B>TIOCLINUX, subcode=0<DD>
+ Dump the screen.
+ </B><I>argp</I> points to a
+from
+ .IP "\fBTIOCLINUX, subcode=0"
+ Dump the screen.
+ \fIargp\fP points to a
+Bug 1: incorrect nesting: </B> is needed before <DD>.
+Bug 2: incorrect font: after the .IP things are roman again.
+*/
+
+#define FO0 ""
+#define FC0 ""
+#define FO1 "<I>"
+#define FC1 "</I>"
+#define FO2 "<B>"
+#define FC2 "</B>"
+#define FO3 "<TT>"
+#define FC3 "</TT>"
+
+char *switchfont[16] = { "" , FC0 FO1, FC0 FO2, FC0 FO3,
+ FC1 FO0, "" , FC1 FO2, FC1 FO3,
+ FC2 FO0, FC2 FO1, "" , FC2 FO3,
+ FC3 FO0, FC3 FO1, FC3 FO2, "" };
+
+static char *
+change_to_font(int nr)
+{
+ int i;
+ switch (nr) {
+ case '0': nr++;
+ case '1': case '2': case '3': case '4':
+ nr = nr-'1'; break;
+ case V('C','W'): nr=3; break;
+ case 'L': nr=3; break;
+ case 'B': nr=2; break;
+ case 'I': nr=1; break;
+ case 0: case 1: case 2: case 3:
+ break;
+ case 'P': case 'R':
+ default: nr=0; break;
+ }
+ i= current_font*4+nr%4;
+ current_font=nr%4;
+ return switchfont[i];
+}
+
+static char sizebuf[200];
+
+static char *
+change_to_size(int nr)
+{
+ int i;
+ switch (nr) {
+ case '0': case '1': case '2': case '3': case '4': case '5': case '6':
+ case '7': case '8': case '9': nr=nr-'0'; break;
+ case '\0': break;
+ default: nr=current_size+nr; if (nr>9) nr=9; if (nr< -9) nr=-9; break;
+ }
+ if (nr==current_size) return "";
+ i=current_font;
+ sizebuf[0]=0;
+ strcat(sizebuf, change_to_font(0));
+ if (current_size) strcat(sizebuf, "</FONT>");
+ current_size=nr;
+ if (nr) {
+ int l;
+ strcat(sizebuf, "<FONT SIZE=\"");
+ l=strlen(sizebuf);
+ if (nr>0) sizebuf[l++]='+'; else sizebuf[l++]='-',nr=-nr;
+ sizebuf[l++]=nr+'0';
+ sizebuf[l++]='"';
+ sizebuf[l++]='>';
+ sizebuf[l]=0;
+ }
+ strcat(sizebuf, change_to_font(i));
+ return sizebuf;
+}
+
+int asint=0;
+int intresult=0;
+
+#define SKIPEOL while (*c && *c++!='\n')
+
+static int skip_escape=0;
+static int single_escape=0;
+
+static char *
+scan_escape(char *c) {
+ char *h=NULL;
+ char b[5];
+ INTDEF *intd;
+ int exoutputp,exskipescape;
+ int i,j;
+
+ intresult=0;
+ switch (*c) {
+ case 'e': h="\\"; curpos++;break;
+ case '0':
+ case ' ': h=" ";curpos++; break;
+ case '|': h=""; break;
+ case '"': SKIPEOL; c--; h=""; break;
+ case '$':
+ if (argument) {
+ c++;
+ i=(*c -'1');
+ if (!(h=argument[i])) h="";
+ }
+ break;
+ case 'z':
+ c++;
+ if (*c=='\\') { c=scan_escape(c+1); c--;h=""; }
+ else {
+ b[0]=*c;
+ b[1]=0;
+ h="";
+ }
+ break;
+ case 'k': c++; if (*c=='(') c+=2;
+ case '^':
+ case '!':
+ case '%':
+ case 'a':
+ case 'd':
+ case 'r':
+ case 'u':
+ case '\n':
+ case '&': h=""; break;
+ case '(':
+ c++;
+ i= c[0]*256+c[1];
+ c++;
+ h = expand_char(i);
+ break;
+ case '*':
+ c++;
+ if (*c=='(') {
+ c++;
+ i= c[0]*256+c[1];
+ c++;
+ } else
+ i= *c *256+' ';
+ h = expand_string(i);
+ break;
+ case 'f':
+ c++;
+ if (*c=='\\') {
+ c++;
+ c=scan_escape(c);
+ c--;
+ i=intresult;
+ } else if (*c != '(')
+ i=*c;
+ else {
+ c++;
+ i=c[0]*256+c[1];
+ c++;
+ }
+ if (!skip_escape) h=change_to_font(i); else h="";
+ break;
+ case 's':
+ c++;
+ j=0;i=0;
+ if (*c=='-') {j= -1; c++;} else if (*c=='+') {j=1; c++;}
+ if (*c=='0') c++; else if (*c=='\\') {
+ c++;
+ c=scan_escape(c);
+ i=intresult; if (!j) j=1;
+ } else
+ while (isdigit(*c) && (!i || (!j && i<4))) i=i*10+(*c++)-'0';
+ if (!j) { j=1; if (i) i=i-10; }
+ if (!skip_escape) h=change_to_size(i*j); else h="";
+ c--;
+ break;
+ case 'n':
+ c++;
+ j=0;
+ switch (*c) {
+ case '+': j=1; c++; break;
+ case '-': j=-1; c++; break;
+ default: break;
+ }
+ if (*c=='(') {
+ c++;
+ i=V(c[0],c[1]);
+ c=c+1;
+ } else {
+ i=V(c[0],' ');
+ }
+ intd=intdef;
+ while (intd && intd->nr!=i) intd=intd->next;
+ if (intd) {
+ intd->val=intd->val+j*intd->incr;
+ intresult=intd->val;
+ } else {
+ switch (i) {
+ case V('.','s'): intresult=current_size; break;
+ case V('.','f'): intresult=current_font; break;
+ default: intresult=0; break;
+ }
+ }
+ h="";
+ break;
+ case 'w':
+ c++;
+ i=*c;
+ c++;
+ exoutputp=output_possible;
+ exskipescape=skip_escape;
+ output_possible=0;
+ skip_escape=1;
+ j=0;
+ while (*c!=i) {
+ j++;
+ if (*c==escapesym) c=scan_escape(c+1); else c++;
+ }
+ output_possible=exoutputp;
+ skip_escape=exskipescape;
+ intresult=j;
+ break;
+ case 'l': h="<HR>"; curpos=0;
+ case 'b':
+ case 'v':
+ case 'x':
+ case 'o':
+ case 'L':
+ case 'h':
+ c++;
+ i=*c;
+ c++;
+ exoutputp=output_possible;
+ exskipescape=skip_escape;
+ output_possible=0;
+ skip_escape=1;
+ while (*c != i)
+ if (*c==escapesym) c=scan_escape(c+1);
+ else c++;
+ output_possible=exoutputp;
+ skip_escape=exskipescape;
+ break;
+ case 'c': no_newline_output=1; break;
+ case '{': newline_for_fun++; h="";break;
+ case '}': if (newline_for_fun) newline_for_fun--; h="";break;
+ case 'p': h="<BR>\n";curpos=0; break;
+ case 't': h="\t";curpos=(curpos+8)&0xfff8; break;
+ case '<': h="<";curpos++; break;
+ case '>': h=">";curpos++; break;
+ case '\\': if (single_escape) { c--; break;}
+ default: b[0]=*c; b[1]=0; h=b; curpos++; break;
+ }
+ c++;
+ if (!skip_escape) out_html(h);
+ return c;
+}
+
+typedef struct TABLEITEM TABLEITEM;
+
+struct TABLEITEM {
+ char *contents;
+ int size,align,valign,colspan,rowspan,font,vleft,vright,space,width;
+ TABLEITEM *next;
+};
+
+static TABLEITEM emptyfield = {NULL,0,0,0,1,1,0,0,0,0,0,NULL};
+typedef struct TABLEROW TABLEROW;
+
+struct TABLEROW {
+ TABLEITEM *first;
+ TABLEROW *prev, *next;
+};
+
+static char *tableopt[]= { "center", "expand", "box", "allbox", "doublebox",
+ "tab", "linesize", "delim", NULL };
+static int tableoptl[] = { 6,6,3,6,9,3,8,5,0};
+
+
+static void clear_table(TABLEROW *table)
+{
+ TABLEROW *tr1,*tr2;
+ TABLEITEM *ti1,*ti2;
+
+ tr1=table;
+ while (tr1->prev) tr1=tr1->prev;
+ while (tr1) {
+ ti1=tr1->first;
+ while (ti1) {
+ ti2=ti1->next;
+ if (ti1->contents) free(ti1->contents);
+ free(ti1);
+ ti1=ti2;
+ }
+ tr2=tr1;
+ tr1=tr1->next;
+ free(tr2);
+ }
+}
+
+char *scan_expression(char *c, int *result);
+
+static char *scan_format(char *c, TABLEROW **result, int *maxcol)
+{
+ TABLEROW *layout, *currow;
+ TABLEITEM *curfield;
+ int i,j;
+ if (*result) {
+ clear_table(*result);
+ }
+ layout= currow=(TABLEROW*) xmalloc(sizeof(TABLEROW));
+ currow->next=currow->prev=NULL;
+ currow->first=curfield=(TABLEITEM*) xmalloc(sizeof(TABLEITEM));
+ *curfield=emptyfield;
+ while (*c && *c!='.') {
+ switch (*c) {
+ case 'C': case 'c': case 'N': case 'n':
+ case 'R': case 'r': case 'A': case 'a':
+ case 'L': case 'l': case 'S': case 's':
+ case '^': case '_':
+ if (curfield->align) {
+ curfield->next=(TABLEITEM*)xmalloc(sizeof(TABLEITEM));
+ curfield=curfield->next;
+ *curfield=emptyfield;
+ }
+ curfield->align=toupper(*c);
+ c++;
+ break;
+ case 'i': case 'I': case 'B': case 'b':
+ curfield->font = toupper(*c);
+ c++;
+ break;
+ case 'f': case 'F':
+ c++;
+ curfield->font = toupper(*c);
+ c++;
+ if (!isspace(*c)) c++;
+ break;
+ case 't': case 'T': curfield->valign='t'; c++; break;
+ case 'p': case 'P':
+ c++;
+ i=j=0;
+ if (*c=='+') { j=1; c++; }
+ if (*c=='-') { j=-1; c++; }
+ while (isdigit(*c)) i=i*10+(*c++)-'0';
+ if (j) curfield->size= i*j; else curfield->size=j-10;
+ break;
+ case 'v': case 'V':
+ case 'w': case 'W':
+// c=scan_expression(c+2,&curfield->width);
+ c++;
+ if (*c == '(') {
+ c=scan_expression(c+1,&curfield->width);
+ } else {
+ i=0;
+ while (isdigit(*c)) i=i*10+(*c++)-'0';
+ curfield->width=i;
+ }
+ break;
+ case '|':
+ if (curfield->align) curfield->vleft++;
+ else curfield->vright++;
+ c++;
+ break;
+ case 'e': case 'E':
+ c++;
+ break;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ i=0;
+ while (isdigit(*c)) i=i*10+(*c++)-'0';
+ curfield->space=i;
+ break;
+ case ',': case '\n':
+ currow->next=(TABLEROW*)xmalloc(sizeof(TABLEROW));
+ currow->next->prev=currow;
+ currow=currow->next;
+ currow->next=NULL;
+ curfield=currow->first=(TABLEITEM*)xmalloc(sizeof(TABLEITEM));
+ *curfield=emptyfield;
+ c++;
+ break;
+ default:
+ c++;
+ break;
+ }
+ }
+ if (*c=='.') while (*c++!='\n');
+ *maxcol=0;
+ currow=layout;
+ while (currow) {
+ curfield=layout->first;
+ i=0;
+ while (curfield) {
+ i++;
+ curfield=curfield->next;
+ }
+ if (i>*maxcol) *maxcol=i;
+ currow=currow->next;
+ }
+ *result=layout;
+ return c;
+}
+
+static TABLEROW *
+next_row(TABLEROW *tr)
+{
+ if (tr->next) {
+ tr=tr->next;
+ if (!tr->next) next_row(tr);
+ return tr;
+ } else {
+ TABLEITEM *ti, *ti2;
+ tr->next=(TABLEROW*)xmalloc(sizeof(TABLEROW));
+ tr->next->prev=tr;
+ ti=tr->first;
+ tr=tr->next;
+ tr->next=NULL;
+ if (ti) tr->first=ti2=(TABLEITEM*) xmalloc(sizeof(TABLEITEM));
+ else tr->first=ti2=NULL;
+ while (ti!=ti2) {
+ *ti2=*ti;
+ ti2->contents=NULL;
+ if ((ti=ti->next)) {
+ ti2->next=(TABLEITEM*) xmalloc(sizeof(TABLEITEM));
+ }
+ ti2=ti2->next;
+ }
+ return tr;
+ }
+}
+
+char itemreset[20]="\\fR\\s0";
+
+static char *
+scan_table(char *c) {
+ char *h;
+ char *g;
+ int center=0, expand=0, box=0, border=0, linesize=1;
+ int i,j,maxcol=0, finished=0;
+ int oldfont, oldsize,oldfillout;
+ char itemsep='\t';
+ TABLEROW *layout=NULL, *currow;
+ TABLEITEM *curfield;
+ while (*c++!='\n'); /* skip TS */
+ h=c;
+ if (*h=='.') return c-1;
+ oldfont=current_font;
+ oldsize=current_size;
+ oldfillout=fillout;
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout=1;
+ out_html("</PRE>");
+ }
+ while (*h && *h!='\n') h++;
+ if (h[-1]==';') {
+ /* scan table options */
+ while (c<h) {
+ while (isspace(*c)) c++;
+ for (i=0; tableopt[i] && strncmp(tableopt[i],c,tableoptl[i]);i++);
+ c=c+tableoptl[i];
+ switch (i) {
+ case 0: center=1; break;
+ case 1: expand=1; break;
+ case 2: box=1; break;
+ case 3: border=1; break;
+ case 4: box=2; break;
+ case 5: while (*c++!='('); itemsep=*c++; break;
+ case 6: while (*c++!='('); linesize=0;
+ while (isdigit(*c)) linesize=linesize*10+(*c++)-'0';
+ break;
+ case 7: while (*c!=')') c++;
+ default: break;
+ }
+ c++;
+ }
+ c=h+1;
+ }
+ /* scan layout */
+ c=scan_format(c,&layout, &maxcol);
+ currow=layout;
+ next_row(currow);
+ curfield=layout->first;
+ i=0;
+ while (!finished && *c) {
+ /* search item */
+ h=c;
+ if ((*c=='_' || *c=='=') && (c[1]==itemsep || c[1]=='\n')) {
+ if (c[-1]=='\n' && c[1]=='\n') {
+ if (currow->prev) {
+ currow->prev->next=(TABLEROW*) xmalloc(sizeof(TABLEROW));
+ currow->prev->next->next=currow;
+ currow->prev->next->prev=currow->prev;
+ currow->prev=currow->prev->next;
+ } else {
+ currow->prev=layout=(TABLEROW*) xmalloc(sizeof(TABLEROW));
+ currow->prev->prev=NULL;
+ currow->prev->next=currow;
+ }
+ curfield=currow->prev->first=
+ (TABLEITEM*) xmalloc(sizeof(TABLEITEM));
+ *curfield=emptyfield;
+ curfield->align=*c;
+ curfield->colspan=maxcol;
+ curfield=currow->first;
+ c=c+2;
+ } else {
+ if (curfield) {
+ curfield->align=*c;
+ do {
+ curfield=curfield->next;
+ } while (curfield && curfield->align=='S');
+ }
+ if (c[1]=='\n') {
+ currow=next_row(currow);
+ curfield=currow->first;
+ }
+ c=c+2;
+ }
+ } else if (*c=='T' && c[1]=='{') {
+ h=c+2;
+ c=strstr(h,"\nT}");
+ c++;
+ *c=0;
+ g=NULL;
+ scan_troff(h, 0, &g);
+ scan_troff(itemreset, 0, &g);
+ *c='T';
+ c+=3;
+ if (curfield) {
+ curfield->contents=g;
+ do {
+ curfield=curfield->next;
+ } while (curfield && curfield->align=='S');
+ } else
+ if (g) free(g);
+ if (c[-1]=='\n') {
+ currow=next_row(currow);
+ curfield=currow->first;
+ }
+ } else if (*c=='.' && c[1]=='T' && c[2]=='&' && c[-1]=='\n') {
+ TABLEROW *hr;
+ while (*c++!='\n');
+ hr=currow;
+ currow=currow->prev;
+ hr->prev=NULL;
+ c=scan_format(c,&hr, &i);
+ hr->prev=currow;
+ currow->next=hr;
+ currow=hr;
+ next_row(currow);
+ curfield=currow->first;
+ } else if (*c=='.' && c[1]=='T' && c[2]=='E' && c[-1]=='\n') {
+ finished=1;
+ while (*c++!='\n');
+ if (currow->prev)
+ currow->prev->next=NULL;
+ currow->prev=NULL;
+ clear_table(currow);
+ } else if (*c=='.' && c[-1]=='\n' && !isdigit(c[1])) {
+ /* skip troff request inside table (usually only .sp ) */
+ while (*c++!='\n');
+ } else {
+ h=c;
+ while (*c && (*c!=itemsep || c[-1]=='\\') &&
+ (*c!='\n' || c[-1]=='\\')) c++;
+ i=0;
+ if (*c==itemsep) {i=1; *c='\n'; }
+ if (h[0]=='\\' && h[2]=='\n' &&
+ (h[1]=='_' || h[1]=='^')) {
+ if (curfield) {
+ curfield->align=h[1];
+ do {
+ curfield=curfield->next;
+ } while (curfield && curfield->align=='S');
+ }
+ h=h+3;
+ } else {
+ g=NULL;
+ h=scan_troff(h,1,&g);
+ scan_troff(itemreset,0,&g);
+ if (curfield) {
+ curfield->contents=g;
+ do {
+ curfield=curfield->next;
+ } while (curfield && curfield->align=='S');
+ } else if (g) free(g);
+ }
+ if (i) *c=itemsep;
+ c=h;
+ if (c[-1]=='\n') {
+ currow=next_row(currow);
+ curfield=currow->first;
+ }
+ }
+ }
+ /* calculate colspan and rowspan */
+ currow=layout;
+ while (currow->next) currow=currow->next;
+ while (currow) {
+ TABLEITEM *ti, *ti1=NULL, *ti2=NULL;
+ ti=currow->first;
+ if (currow->prev) ti1=currow->prev->first;
+ while (ti) {
+ switch (ti->align) {
+ case 'S':
+ if (ti2) {
+ ti2->colspan++;
+ if (ti2->rowspan<ti->rowspan) ti2->rowspan=ti->rowspan;
+ }
+ break;
+ case '^':
+ if (ti1) ti1->rowspan++;
+ default:
+ if (!ti2) ti2=ti;
+ else {
+ do {
+ ti2=ti2->next;
+ } while (ti2 && curfield->align=='S');
+ }
+ break;
+ }
+ ti=ti->next;
+ if (ti1) ti1=ti1->next;
+ }
+ currow=currow->prev;
+ }
+ /* produce html output */
+ if (center) out_html("<CENTER>");
+ if (box==2) out_html("<TABLE BORDER><TR><TD>");
+ out_html("<TABLE");
+ if (box || border) {
+ out_html(" BORDER");
+ if (!border) out_html("><TR><TD><TABLE");
+ if (expand) out_html(" WIDTH=100%");
+ }
+ out_html(">\n");
+ currow=layout;
+ while (currow) {
+ j=0;
+ out_html("<TR VALIGN=top>");
+ curfield=currow->first;
+ while (curfield) {
+ if (curfield->align!='S' && curfield->align!='^') {
+ out_html("<TD");
+ switch (curfield->align) {
+ case 'N':
+ curfield->space+=4;
+ case 'R':
+ out_html(" ALIGN=right");
+ break;
+ case 'C':
+ out_html(" ALIGN=center");
+ default:
+ break;
+ }
+ if (!curfield->valign && curfield->rowspan>1)
+ out_html(" VALIGN=center");
+ if (curfield->colspan>1) {
+ char buf[5];
+ out_html(" COLSPAN=");
+ sprintf(buf, "%i", curfield->colspan);
+ out_html(buf);
+ }
+ if (curfield->rowspan>1) {
+ char buf[5];
+ out_html(" ROWSPAN=");
+ sprintf(buf, "%i", curfield->rowspan);
+ out_html(buf);
+ }
+ j=j+curfield->colspan;
+ out_html(">");
+ if (curfield->size) out_html(change_to_size(curfield->size));
+ if (curfield->font) out_html(change_to_font(curfield->font));
+ switch (curfield->align) {
+ case '=': out_html("<HR><HR>"); break;
+ case '_': out_html("<HR>"); break;
+ default:
+ if (curfield->contents) out_html(curfield->contents);
+ break;
+ }
+ if (curfield->space)
+ for (i=0; i<curfield->space;i++) out_html(" ");
+ if (curfield->font) out_html(change_to_font(0));
+ if (curfield->size) out_html(change_to_size(0));
+ if (j>=maxcol && curfield->align>'@' && curfield->align!='_')
+ out_html("<BR>");
+ out_html("</TD>");
+ }
+ curfield=curfield->next;
+ }
+ out_html("</TR>\n");
+ currow=currow->next;
+ }
+ if (box && !border) out_html("</TABLE>");
+ out_html("</TABLE>");
+ if (box==2) out_html("</TABLE>");
+ if (center) out_html("</CENTER>\n");
+ else out_html("\n");
+ if (!oldfillout) out_html("<PRE>");
+ fillout=oldfillout;
+ out_html(change_to_size(oldsize));
+ out_html(change_to_font(oldfont));
+ return c;
+}
+
+char *scan_expression(char *c, int *result) {
+ int value=0,value2,sign=1,opex=0;
+ char oper='c';
+
+ if (*c=='!') {
+ c=scan_expression(c+1, &value);
+ value= (!value);
+ } else if (*c=='n') {
+ c++;
+ value=nroff;
+ } else if (*c=='t') {
+ c++;
+ value=1-nroff;
+ } else if (*c=='\'' || *c=='"' || *c<' ' || (*c=='\\' && c[1]=='(')) {
+ /* ?string1?string2?
+ ** test if string1 equals string2.
+ */
+ char *st1=NULL, *st2=NULL, *h;
+ char *tcmp=NULL;
+ char sep;
+ sep=*c;
+ if (sep=='\\') {
+ tcmp=c;
+ c=c+3;
+ }
+ c++;
+ h=c;
+ while (*c!= sep && (!tcmp || strncmp(c,tcmp,4))) c++;
+ *c='\n';
+ scan_troff(h, 1, &st1);
+ *c=sep;
+ if (tcmp) c=c+3;
+ c++;
+ h=c;
+ while (*c!=sep && (!tcmp || strncmp(c,tcmp,4))) c++;
+ *c='\n';
+ scan_troff(h,1,&st2);
+ *c=sep;
+ if (!st1 && !st2) value=1;
+ else if (!st1 || !st2) value=0;
+ else value=(!strcmp(st1, st2));
+ if (st1) free(st1);
+ if (st2) free(st2);
+ if (tcmp) c=c+3;
+ c++;
+ } else {
+ while (*c && !isspace(*c) && *c!=')') {
+ opex=0;
+ switch (*c) {
+ case '(':
+ c=scan_expression(c+1, &value2);
+ value2=sign*value2;
+ opex=1;
+ break;
+ case '.':
+ case '0': case '1':
+ case '2': case '3':
+ case '4': case '5':
+ case '6': case '7':
+ case '8': case '9': {
+ int num=0,denum=1;
+ value2=0;
+ while (isdigit(*c)) value2=value2*10+((*c++)-'0');
+ if (*c=='.') {
+ c++;
+ while (isdigit(*c)) {
+ num=num*10+((*c++)-'0');
+ denum=denum*10;
+ }
+ }
+ if (isalpha(*c)) {
+ /* scale indicator */
+ switch (*c) {
+ case 'i': /* inch -> 10pt */
+ value2=value2*10+(num*10+denum/2)/denum;
+ num=0;
+ break;
+ default:
+ break;
+ }
+ c++;
+ }
+ value2=value2+(num+denum/2)/denum;
+ value2=sign*value2;
+ opex=1;
+ break;
+ }
+ case '\\':
+ c=scan_escape(c+1);
+ value2=intresult*sign;
+ if (isalpha(*c)) c++; /* scale indicator */
+ opex=1;
+ break;
+ case '-':
+ if (oper) { sign=-1; c++; break; }
+ case '>':
+ case '<':
+ case '+':
+ case '/':
+ case '*':
+ case '%':
+ case '&':
+ case '=':
+ case ':':
+ if (c[1]=='=') oper=(*c++) +16; else oper=*c;
+ c++;
+ break;
+ default: c++; break;
+ }
+ if (opex) {
+ sign=1;
+ switch (oper) {
+ case 'c': value=value2; break;
+ case '-': value=value-value2; break;
+ case '+': value=value+value2; break;
+ case '*': value=value*value2; break;
+ case '/': if (value2) value=value/value2; break;
+ case '%': if (value2) value=value%value2; break;
+ case '<': value=(value<value2); break;
+ case '>': value=(value>value2); break;
+ case '>'+16: value=(value>=value2); break;
+ case '<'+16: value=(value<=value2); break;
+ case '=': case '='+16: value=(value==value2); break;
+ case '&': value = (value && value2); break;
+ case ':': value = (value || value2); break;
+ default: fprintf(stderr,
+ "man2html: Unknown operator %c.\n", oper);
+ }
+ oper=0;
+ }
+ }
+ if (*c==')') c++;
+ }
+ *result=value;
+ return c;
+}
+
+static void
+trans_char(char *c, char s, char t) {
+ char *sl = c;
+ int slash = 0;
+
+ while (*sl && (*sl != '\n' || slash)) {
+ if (!slash) {
+ if (*sl == escapesym)
+ slash = 1;
+ else if (*sl == s)
+ *sl = t;
+ } else
+ slash = 0;
+ sl++;
+ }
+}
+
+/*
+ * Read STR until end-of-line (not preceded by \).
+ * Find whitespace separated words, and store starts in WORDS of lth MAXN.
+ * Return number of words in N.
+ * Replace each end-of-word by the character EOW (usually \n or 0).
+ * Return pointer to last char seen (either \n or 0).
+ *
+ * A part \"... is skipped.
+ * Quotes not preceded by \ are replaced by \a.
+ */
+static char *
+fill_words(char *str, char *words[], int maxn, int *n, char eow) {
+ char *s = str;
+ int backslash = 0;
+ int skipspace = 0; /* 1 if space is not end-of-word */
+
+ *n = 0;
+ words[*n] = s;
+ while (*s && (*s != '\n' || backslash)) {
+ if (!backslash) {
+ if (*s == '"') {
+ *s = '\a';
+ skipspace = !skipspace;
+ } else if (*s == escapesym) {
+ backslash = 1;
+ } else if ((*s == ' ' || *s == '\t') && !skipspace) {
+ *s = eow;
+ if (words[*n] != s && *n < maxn-1)
+ (*n)++;
+ words[*n] = s+1;
+ }
+ } else {
+ if (*s == '"') {
+ s--;
+ *s = eow;
+ if (words[*n] != s && *n < maxn-1)
+ (*n)++;
+ s++;
+ while (*s && *s != '\n') s++;
+ words[*n] = s;
+ s--;
+ }
+ backslash = 0;
+ }
+ s++;
+ }
+ if (s != words[*n])
+ (*n)++;
+ return s;
+}
+
+
+char *section_list[] = {
+ "1", "User Commands ",
+ "1C", "User Commands",
+ "1G", "User Commands",
+ "1S", "User Commands",
+ "1V", "User Commands ",
+ "2", "System Calls",
+ "2V", "System Calls",
+ "3", "C Library Functions",
+ "3C", "Compatibility Functions",
+ "3F", "Fortran Library Routines",
+ "3K", "Kernel VM Library Functions",
+ "3L", "Lightweight Processes Library",
+ "3M", "Mathematical Library",
+ "3N", "Network Functions",
+ "3R", "RPC Services Library",
+ "3S", "Standard I/O Functions",
+ "3V", "C Library Functions",
+ "3X", "Miscellaneous Library Functions",
+ "4", "Devices and Network Interfaces",
+ "4F", "Protocol Families",
+ "4I", "Devices and Network Interfaces",
+ "4M", "Devices and Network Interfaces",
+ "4N", "Devices and Network Interfaces",
+ "4P", "Protocols",
+ "4S", "Devices and Network Interfaces",
+ "4V", "Devices and Network Interfaces",
+ "5", "File Formats",
+ "5V", "File Formats",
+ "6", "Games and Demos",
+ "7", "Environments, Tables, and Troff Macros",
+ "7V", "Environments, Tables, and Troff Macros",
+ "8", "Maintenance Commands",
+ "8C", "Maintenance Commands",
+ "8S", "Maintenance Commands",
+ "8V", "Maintenance Commands",
+ "L", "Local Commands",
+/* for Solaris:
+ "1", "User Commands",
+ "1B", "SunOS/BSD Compatibility Package Commands",
+ "1b", "SunOS/BSD Compatibility Package Commands",
+ "1C", "Communication Commands ",
+ "1c", "Communication Commands",
+ "1F", "FMLI Commands ",
+ "1f", "FMLI Commands",
+ "1G", "Graphics and CAD Commands ",
+ "1g", "Graphics and CAD Commands ",
+ "1M", "Maintenance Commands",
+ "1m", "Maintenance Commands",
+ "1S", "SunOS Specific Commands",
+ "1s", "SunOS Specific Commands",
+ "2", "System Calls",
+ "3", "C Library Functions",
+ "3B", "SunOS/BSD Compatibility Library Functions",
+ "3b", "SunOS/BSD Compatibility Library Functions",
+ "3C", "C Library Functions",
+ "3c", "C Library Functions",
+ "3E", "C Library Functions",
+ "3e", "C Library Functions",
+ "3F", "Fortran Library Routines",
+ "3f", "Fortran Library Routines",
+ "3G", "C Library Functions",
+ "3g", "C Library Functions",
+ "3I", "Wide Character Functions",
+ "3i", "Wide Character Functions",
+ "3K", "Kernel VM Library Functions",
+ "3k", "Kernel VM Library Functions",
+ "3L", "Lightweight Processes Library",
+ "3l", "Lightweight Processes Library",
+ "3M", "Mathematical Library",
+ "3m", "Mathematical Library",
+ "3N", "Network Functions",
+ "3n", "Network Functions",
+ "3R", "Realtime Library",
+ "3r", "Realtime Library",
+ "3S", "Standard I/O Functions",
+ "3s", "Standard I/O Functions",
+ "3T", "Threads Library",
+ "3t", "Threads Library",
+ "3W", "C Library Functions",
+ "3w", "C Library Functions",
+ "3X", "Miscellaneous Library Functions",
+ "3x", "Miscellaneous Library Functions",
+ "4", "File Formats",
+ "4B", "SunOS/BSD Compatibility Package File Formats",
+ "4b", "SunOS/BSD Compatibility Package File Formats",
+ "5", "Headers, Tables, and Macros",
+ "6", "Games and Demos",
+ "7", "Special Files",
+ "7B", "SunOS/BSD Compatibility Special Files",
+ "7b", "SunOS/BSD Compatibility Special Files",
+ "8", "Maintenance Procedures",
+ "8C", "Maintenance Procedures",
+ "8c", "Maintenance Procedures",
+ "8S", "Maintenance Procedures",
+ "8s", "Maintenance Procedures",
+ "9", "DDI and DKI",
+ "9E", "DDI and DKI Driver Entry Points",
+ "9e", "DDI and DKI Driver Entry Points",
+ "9F", "DDI and DKI Kernel Functions",
+ "9f", "DDI and DKI Kernel Functions",
+ "9S", "DDI and DKI Data Structures",
+ "9s", "DDI and DKI Data Structures",
+ "L", "Local Commands",
+*/
+ NULL, "Misc. Reference Manual Pages",
+ NULL, NULL
+};
+
+static char *
+section_name(char *c)
+{
+ int i=0;
+
+ if (!c) return "";
+ while (section_list[i] && strcmp(c,section_list[i])) i=i+2;
+ if (section_list[i+1]) return section_list[i+1];
+ else return c;
+}
+
+int manidxlen = 0;
+char *manidx = NULL;
+int subs = 0;
+int mip = 0; /* current offset in manidx[] */
+char label[5]="lbAA";
+
+static void
+manidx_need(int m) {
+ if (mip + m >= manidxlen) {
+ manidxlen += 10000;
+ manidx = xrealloc(manidx, manidxlen);
+ }
+}
+
+static void
+add_to_index(int level, char *item)
+{
+ char *c = NULL;
+
+ label[3]++;
+ if (label[3]>'Z') {
+ label[3]='A';
+ label[2]++;
+ }
+
+ if (level != subs) {
+ manidx_need(6);
+ if (subs) {
+ strcpy(manidx+mip, "</DL>\n");
+ mip += 6;
+ } else {
+ strcpy(manidx+mip, "<DL>\n");
+ mip += 5;
+ }
+ }
+ subs = level;
+
+ scan_troff(item, 1, &c);
+ manidx_need(100 + strlen(c));
+ sprintf(manidx+mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c);
+ if (c) free(c);
+ while (manidx[mip]) mip++;
+}
+
+static char *
+skip_till_newline(char *c)
+{
+ int lvl=0;
+
+ while (*c && (*c!='\n' || lvl>0)) {
+ if (*c=='\\') {
+ c++;
+ if (*c=='}') lvl--; else if (*c=='{') lvl++;
+ }
+ c++;
+ }
+ c++;
+ if (lvl<0 && newline_for_fun) {
+ newline_for_fun = newline_for_fun+lvl;
+ if (newline_for_fun<0) newline_for_fun=0;
+ }
+ return c;
+}
+
+int ifelseval=0;
+
+static char *
+scan_request(char *c) {
+ /* BSD Mandoc stuff - by Michael Hamilton */
+ static int mandoc_synopsis=0; /* True if we are in the synopsis section */
+ static int mandoc_command=0; /* True if this is mandoc page */
+ static int mandoc_bd_options; /* Only copes with non-nested Bd's */
+ static int inXo=0;
+
+ int i,j,mode = 0;
+ char *h;
+ char *wordlist[20];
+ int words;
+ char *sl;
+ STRDEF *owndef;
+
+ while (*c == ' ' || *c == '\t')
+ c++;
+ if (c[0] == '\n')
+ return c+1;
+ if (c[1] == '\n')
+ j = 1;
+ else
+ j = 2;
+ while (c[j] == ' ' || c[j] == '\t')
+ j++;
+ if (c[0] == escapesym) {
+ /* some pages use .\" .\$1 .\} */
+ /* .\$1 is too difficult/stupid */
+ if (c[1] == '$')
+ c = skip_till_newline(c);
+ else
+ c = scan_escape(c+1);
+ } else {
+ i=V(c[0],c[1]);
+ switch (i) {
+ case V('a','b'):
+ h=c+j;
+ while (*h && *h !='\n') h++;
+ *h=0;
+ if (scaninbuff && buffpos) {
+ buffer[buffpos]=0;
+ printf("%s\n", buffer);
+ }
+ fprintf(stderr, "%s\n", c+2); /* XXX */
+ exit(0);
+ break;
+ case V('d','i'):
+ {
+ STRDEF *de;
+ c=c+j;
+ i=V(c[0],c[1]);
+ if (*c == '\n') { c++;break; }
+ while (*c && *c!='\n') c++;
+ c++;
+ h=c;
+ while (*c && strncmp(c,".di",3)) while (*c && *c++!='\n');
+ *c=0;
+ de=strdef;
+ while (de && de->nr !=i) de=de->next;
+ if (!de) {
+ de=(STRDEF*) xmalloc(sizeof(STRDEF));
+ de->nr=i;
+ de->slen=0;
+ de->next=strdef;
+ de->st=NULL;
+ strdef=de;
+ } else {
+ if (de->st) free(de->st);
+ de->slen=0;
+ de->st=NULL;
+ }
+ scan_troff(h,0,&de->st);
+ *c='.';
+ while (*c && *c++!='\n');
+ break;
+ }
+ case V('d','s'):
+ mode=1;
+ case V('a','s'):
+ {
+ STRDEF *de;
+ int oldcurpos=curpos;
+ c=c+j;
+ while (*c == ' ') c++;
+ i=V(c[0],c[1]);
+ j=0;
+ while (c[j] && c[j]!='\n') j++;
+ if (j<3) { c=c+j; break; }
+ if (c[1] == ' ') c=c+1; else c=c+2;
+ while (isspace(*c)) c++;
+ if (*c == '"') c++;
+ de=strdef;
+ while (de && de->nr != i) de=de->next;
+ single_escape=1;
+ curpos=0;
+ if (!de) {
+ char *h;
+ de=(STRDEF*) xmalloc(sizeof(STRDEF));
+ de->nr=i;
+ de->slen=0;
+ de->next=strdef;
+ de->st=NULL;
+ strdef=de;
+ h=NULL;
+ c=scan_troff(c, 1, &h);
+ de->st=h;
+ de->slen=curpos;
+ } else {
+ if (mode) { /* .ds */
+ char *h=NULL;
+ c=scan_troff(c, 1, &h);
+ free(de->st); /* segfault XXX */
+ de->slen=curpos;
+ de->st=h;
+ } else { /* .as */
+ c=scan_troff(c,1,&de->st); /* XXX */
+ de->slen+=curpos;
+ }
+ }
+ single_escape=0;
+ curpos=oldcurpos;
+ }
+ break;
+ case V('b','r'):
+ if (still_dd) out_html("<DD>");
+ else out_html("<BR>\n");
+ curpos=0;
+ c=c+j;
+ if (c[0] == escapesym) { c=scan_escape(c+1); }
+ c=skip_till_newline(c);break;
+ case V('c','2'):
+ c=c+j;
+ if (*c!='\n') { nobreaksym=*c; }
+ else nobreaksym='\'';
+ c=skip_till_newline(c);
+ break;
+ case V('c','c'):
+ c=c+j;
+ if (*c!='\n') { controlsym=*c; }
+ else controlsym='.';
+ c=skip_till_newline(c);
+ break;
+ case V('c','e'):
+ c=c+j;
+ if (*c == '\n') { i=1; }
+ else {
+ i=0;
+ while ('0'<=*c && *c<='9') {
+ i=i*10+*c-'0';
+ c++;
+ }
+ }
+ c=skip_till_newline(c);
+ /* center next i lines */
+ if (i>0) {
+ out_html("<CENTER>\n");
+ while (i && *c) {
+ char *line=NULL;
+ c=scan_troff(c,1, &line);
+ if (line && strncmp(line, "<BR>", 4)) {
+ out_html(line);
+ out_html("<BR>\n");
+ i--;
+ }
+ }
+ out_html("</CENTER>\n");
+ curpos=0;
+ }
+ break;
+ case V('e','c'):
+ c=c+j;
+ if (*c!='\n') { escapesym=*c; }
+ else escapesym='\\';
+ break;
+ c=skip_till_newline(c);
+ case V('e','o'):
+ escapesym=0;
+ c=skip_till_newline(c);
+ break;
+ case V('e','x'):
+ exit(0);
+ break;
+ case V('f','c'):
+ c=c+j;
+ if (*c == '\n') {
+ fieldsym=padsym=0;
+ } else {
+ fieldsym=c[0];
+ padsym=c[1];
+ }
+ c=skip_till_newline(c);
+ break;
+ case V('f','i'):
+ if (!fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("</PRE>\n");
+ }
+ curpos=0;
+ fillout=1;
+ c=skip_till_newline(c);
+ break;
+ case V('f','t'):
+ c=c+j;
+ if (*c == '\n') {
+ out_html(change_to_font(0));
+ } else {
+ if (*c == escapesym) {
+ int fn;
+ c=scan_expression(c, &fn);
+ c--;
+ out_html(change_to_font(fn));
+ } else {
+ out_html(change_to_font(*c));
+ c++;
+ }
+ }
+ c=skip_till_newline(c);
+ break;
+ case V('e','l'):
+ /* .el anything : else part of if else */
+ if (ifelseval) {
+ c=c+j;
+ c[-1]='\n';
+ c=scan_troff(c,1,NULL);
+ } else
+ c=skip_till_newline(c+j);
+ break;
+ case V('i','e'):
+ /* .ie c anything : then part of if else */
+ case V('i','f'):
+ /* .if c anything
+ * .if !c anything
+ * .if N anything
+ * .if !N anything
+ * .if 'string1'string2' anything
+ * .if !'string1'string2' anything
+ */
+ c=c+j;
+ c=scan_expression(c, &i);
+ ifelseval=!i;
+ if (i) {
+ *c='\n';
+ c++;
+ c=scan_troff(c,1,NULL);
+ } else
+ c=skip_till_newline(c);
+ break;
+ case V('i','g'): /* .ig: ignore until .. */
+ {
+ char *endwith="..\n";
+ i=3;
+ c=c+j;
+ while (*c == ' ') c++;
+ if (*c == escapesym && c[1] == '"')
+ while (*c != '\n') c++;
+ if (*c!='\n') { /* .ig yy: ignore until .yy, then call .yy */
+ endwith=c-1;i=1;
+ c[-1]='.';
+ while (*c && *c!='\n') c++,i++;
+ }
+ c++;
+ while (*c && strncmp(c,endwith,i))
+ while (*c && *c++!='\n');
+ while (*c && *c++!='\n');
+ break;
+ }
+ case V('n','f'):
+ if (fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("<PRE>\n");
+ }
+ curpos=0;
+ fillout=0;
+ c=skip_till_newline(c);
+ break;
+ case V('p','s'):
+ c=c+j;
+ if (*c == '\n') {
+ out_html(change_to_size('0'));
+ } else {
+ j=0;i=0;
+ if (*c == '-') { j= -1;c++; } else if (*c == '+') { j=1;c++;}
+ c=scan_expression(c, &i);
+ if (!j) { j=1; if (i>5) i=i-10; }
+ out_html(change_to_size(i*j));
+ }
+ c=skip_till_newline(c);
+ break;
+ case V('s','p'):
+ c=c+j;
+ if (fillout) out_html("<P>"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ case V('s','o'):
+ {
+ FILE *f;
+ struct stat stbuf;
+ int l; char *buf;
+ char *name = NULL;
+
+ curpos=0;
+ c += j; /* skip .so part and whitespace */
+ if (*c == '/') {
+ h = c;
+ } else { /* .so man3/cpow.3 -> ../man3/cpow.3 */
+ h = c-3;
+ h[0] = '.';
+ h[1] = '.';
+ h[2] = '/';
+ }
+ while (*c != '\n') c++;
+ while (c[-1] == ' ') c--;
+ while (*c != '\n') *c++ = 0;
+ *c = 0;
+ scan_troff(h,1, &name);
+ if (name[3] == '/') h=name+3; else h=name;
+ l = 0;
+ if (stat(h, &stbuf)!=-1) l=stbuf.st_size;
+ buf = (char*) xmalloc((l+4)*sizeof(char));
+#if NOCGI
+ if (!out_length) {
+ char *t,*s;
+ t=strrchr(fname, '/');
+ if (!t) t=fname;
+ fprintf(stderr, "ln -s %s.html %s.html\n", h, t);
+ s=strrchr(t, '.');if (!s) s=t;
+ printf("<HTML><HEAD><TITLE> Manpage of %s</TITLE>\n"
+ "</HEAD><BODY>\n"
+ "See the manpage for <A HREF=\"%s.html\">%s</A>.\n"
+ "</BODY></HTML>\n",
+ s, h, h);
+ } else
+#endif
+ {
+ /* this works alright, except for section 3 */
+ if (!l || !(f = fopen(h,"r"))) {
+ fprintf(stderr,
+ "man2html: unable to open or read file %s\n", h);
+ out_html("<BLOCKQUOTE>"
+ "man2html: unable to open or read file\n");
+ out_html(h);
+ out_html("</BLOCKQUOTE>\n");
+ } else {
+ i=fread(buf+1,1,l,f);
+ fclose(f);
+ buf[0]=buf[l]='\n';
+ buf[l+1]=buf[l+2]=0;
+ scan_troff(buf+1,0,NULL);
+ }
+ if (buf) free(buf);
+ }
+ *c++='\n';
+ break;
+ }
+ case V('t','a'):
+ c=c+j;
+ j=0;
+ while (*c!='\n') {
+ sl=scan_expression(c, &tabstops[j]);
+ if (*c == '-' || *c == '+') tabstops[j]+=tabstops[j-1];
+ c=sl;
+ while (*c == ' ' || *c == '\t') c++;
+ if (j+1 < SIZE(tabstops))
+ j++;
+ }
+ maxtstop=j;
+ curpos=0;
+ break;
+ case V('t','i'):
+#if 0
+ dl_down();
+#endif
+ out_html("<BR>\n");
+ c=c+j;
+ c=scan_expression(c, &j);
+ for (i=0; i<j; i++) out_html(" ");
+ curpos=j;
+ c=skip_till_newline(c);
+ break;
+ case V('t','m'):
+ c=c+j;
+ h=c;
+ while (*c!='\n') c++;
+ *c=0;
+ fprintf(stderr,"%s\n", h); /* XXX */
+ *c='\n';
+ break;
+ case V('B',' '):
+ case V('B','\n'):
+ case V('I',' '):
+ case V('I','\n'):
+ /* parse one line in a certain font */
+ out_html(change_to_font(*c));
+ trans_char(c, '"', '\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('O','P'): /* groff manpages use this construction */
+ /* .OP a b : [ <B>a</B> <I>b</I> ] */
+ mode=1;
+ c[0]='B'; c[1]='I';
+ out_html(change_to_font('R'));
+ out_html("[");
+ curpos++;
+ case V('B','R'):
+ case V('B','I'):
+ case V('I','B'):
+ case V('I','R'):
+ case V('R','B'):
+ case V('R','I'):
+ {
+ char font[2];
+ font[0] = c[0]; font[1] = c[1];
+ c = c+j;
+ if (*c == '\n') c++;
+ sl = fill_words(c, wordlist, SIZE(wordlist), &words, '\n');
+ c = sl+1;
+ /* .BR name (section)
+ ** indicates a link. It will be added in the output routine.
+ */
+ for (i=0; i<words; i++) {
+ if (mode) { out_html(" "); curpos++; }
+ wordlist[i][-1]=' ';
+ out_html(change_to_font(font[i&1]));
+ scan_troff(wordlist[i],1,NULL);
+ }
+ out_html(change_to_font('R'));
+ if (mode) { out_html(" ]"); curpos++;}
+ out_html(NEWLINE); if (!fillout) curpos=0; else curpos++;
+ }
+ break;
+ case V('D','T'):
+ maxtstop = SIZE(tabstops);
+ for (j=0; j<maxtstop; j++)
+ tabstops[j]=(j+1)*8;
+ c=skip_till_newline(c); break;
+ case V('I','P'):
+ sl = fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
+ c = sl+1;
+ dl_begin();
+ if (words) {
+ scan_troff(wordlist[0], 1,NULL);
+ }
+ out_html("<DD>");
+ curpos = 0;
+ break;
+ case V('T','P'):
+ dl_begin();
+ c=skip_till_newline(c);
+ /* somewhere a definition ends with '.TP' */
+ if (!*c) still_dd=1; else {
+ c=scan_troff(c,1,NULL);
+ out_html("<DD>");
+ }
+ curpos=0;
+ break;
+ case V('I','X'):
+ /* general index */
+ sl = fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
+ c = sl+1;
+ j = 4;
+ while (idxlabel[j] == 'Z') idxlabel[j--]='A';
+ idxlabel[j]++;
+#ifdef MAKEINDEX
+ if (idxfile) {
+ fprintf(idxfile, "%s@%s@", fname, idxlabel);
+ for (j=0; j<words; j++) {
+ h=NULL;
+ scan_troff(wordlist[j], 1, &h);
+ fprintf(idxfile, "_\b@%s", h);
+ free(h);
+ }
+ fprintf(idxfile,"\n");
+ }
+#endif
+ out_html("<A NAME=\"");
+ out_html(idxlabel);
+ /* this will not work in mosaic (due to a bug).
+ ** Adding ' ' between '>' and '<' solves it, but creates
+ ** some space. A normal space does not work.
+ */
+ out_html("\"></A>");
+ break;
+ case V('L','P'):
+ case V('P','P'):
+ dl_end();
+ if (fillout) out_html("<P>\n"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ case V('H','P'):
+ dl_begin();
+ still_dd=1;
+ c=skip_till_newline(c);
+ curpos=0;
+ break;
+ case V('P','D'):
+ c=skip_till_newline(c);
+ break;
+ case V('R','s'): /* BSD mandoc */
+ case V('R','S'):
+ sl = fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
+ j = 1;
+ if (words>0) scan_expression(wordlist[0], &j);
+ if (j>=0) {
+ dl_newlevel();
+ c=skip_till_newline(c);
+ curpos=0;
+ break;
+ }
+ case V('R','e'): /* BSD mandoc */
+ case V('R','E'):
+ dl_endlevel();
+ c=skip_till_newline(c);
+ curpos=0;
+ break;
+ case V('S','B'):
+ out_html(change_to_size(-1));
+ out_html(change_to_font('B'));
+ c=scan_troff(c+j, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(change_to_size('0'));
+ break;
+ case V('S','M'):
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html(change_to_size(-1));
+ trans_char(c,'"','\a');
+ c=scan_troff(c,1,NULL);
+ out_html(change_to_size('0'));
+ break;
+ case V('S','s'): /* BSD mandoc */
+ mandoc_command = 1;
+ case V('S','S'):
+ mode=1;
+ goto sh_below;
+ case V('S','h'): /* BSD mandoc */
+ mandoc_command = 1;
+ case V('S','H'):
+ sh_below:
+ c=c+j;
+ if (*c == '\n') c++;
+ dl_down();
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout=1;
+ out_html("</PRE>");
+ }
+ trans_char(c,'"', '\a');
+ add_to_index(mode, c);
+ out_html("<A NAME=\"");
+ out_html(label);
+ /* for mosaic users */
+ if (mode) out_html("\"> </A>\n<H3>");
+ else out_html("\"> </A>\n<H2>");
+ mandoc_synopsis = (strncmp(c, "SYNOPSIS", 8) == 0);
+ c = (mandoc_command ? scan_troff_mandoc : scan_troff)(c,1,NULL);
+ if (mode) out_html("</H3>\n");
+ else out_html("</H2>\n");
+ curpos=0;
+ break;
+ case V('T','S'):
+ c=scan_table(c);
+ break;
+ case V('D','t'): /* BSD mandoc */
+ mandoc_command = 1;
+ case V('T','H'):
+ if (!output_possible) {
+ sl = fill_words(c+j, wordlist, SIZE(wordlist), &words, 0);
+ *sl = 0;
+ if (words > 1) {
+ output_possible=1;
+ out_html("<HTML><HEAD><TITLE>Manpage of ");
+ out_html(wordlist[0]);
+ out_html("</TITLE>\n</HEAD><BODY>\n<H1>");
+ out_html(wordlist[0]);
+ out_html("</H1>\nSection: ");
+ if (words>4)
+ out_html(wordlist[4]);
+ else
+ out_html(section_name(wordlist[1]));
+ out_html(" (");
+ out_html(wordlist[1]);
+ if (words>2) {
+ out_html(")<BR>Updated: ");
+ scan_troff(wordlist[2], 1, NULL);
+ } else out_html(")");
+ out_html("<BR><A HREF=\"#index\">Index</A>\n");
+ man_page_html(0,0); /* Return to Main Contents */
+ *sl='\n';
+ out_html("<HR>\n");
+ if (mandoc_command) out_html("<BR>BSD mandoc<BR>");
+ }
+ c = sl+1;
+ } else
+ c = skip_till_newline(c);
+ curpos=0;
+ break;
+ case V('T','X'):
+ sl=fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
+ *sl=0;
+ out_html(change_to_font('I'));
+ if (words>1) wordlist[1][-1]=0;
+ c=lookup_abbrev(wordlist[0]);
+ curpos+=strlen(c);
+ out_html(c);
+ out_html(change_to_font('R'));
+ if (words>1)
+ out_html(wordlist[1]);
+ *sl='\n';
+ c=sl+1;
+ break;
+ case V('r','m'):
+ /* .rm xx : Remove request, macro or string */
+ case V('r','n'):
+ /* .rn xx yy : Rename request, macro or string xx to yy */
+ {
+ STRDEF *de;
+ c=c+j;
+ i=V(c[0],c[1]);
+ c=c+2;
+ while (isspace(*c) && *c!='\n') c++;
+ j=V(c[0],c[1]);
+ while (*c && *c!='\n') c++;
+ c++;
+ de=strdef;
+ while (de && de->nr!=j) de=de->next;
+ if (de) {
+ if (de->st) free(de->st);
+ de->nr=0;
+ }
+ de=strdef;
+ while (de && de->nr!=i) de=de->next;
+ if (de) de->nr=j;
+ break;
+ }
+ case V('n','x'):
+ /* .nx filename : next file. */
+ case V('i','n'):
+ /* .in +-N : Indent */
+ c=skip_till_newline(c);
+ break;
+ case V('n','r'):
+ /* .nr R +-N M: define and set number register R by +-N;
+ ** auto-increment by M
+ */
+ {
+ INTDEF *intd;
+ c=c+j;
+ i=V(c[0],c[1]);
+ c=c+2;
+ intd=intdef;
+ while (intd && intd->nr!=i) intd=intd->next;
+ if (!intd) {
+ intd = (INTDEF*) xmalloc(sizeof(INTDEF));
+ intd->nr=i;
+ intd->val=0;
+ intd->incr=0;
+ intd->next=intdef;
+ intdef=intd;
+ }
+ while (*c == ' ' || *c == '\t') c++;
+ c=scan_expression(c,&intd->val);
+ if (*c!='\n') {
+ while (*c == ' ' || *c == '\t') c++;
+ c=scan_expression(c,&intd->incr);
+ }
+ c=skip_till_newline(c);
+ break;
+ }
+ case V('a','m'):
+ /* .am xx yy : append to a macro. */
+ /* define or handle as .ig yy */
+ mode=1;
+ case V('d','e'):
+ /* .de xx yy : define or redefine macro xx; end at .yy (..) */
+ /* define or handle as .ig yy */
+ {
+ STRDEF *de;
+ int olen=0;
+ c=c+j;
+ sl=fill_words(c, wordlist, SIZE(wordlist), &words, '\n');
+ i=V(c[0],c[1]);j=2;
+ if (words == 1) wordlist[1]=".."; else {
+ wordlist[1]--;
+ wordlist[1][0]='.';
+ j=3;
+ }
+ c=sl+1;
+ sl=c;
+ while (*c && strncmp(c,wordlist[1],j)) c=skip_till_newline(c);
+ de=defdef;
+ while (de && de->nr!= i) de=de->next;
+ if (mode && de) olen=strlen(de->st);
+ j=olen+c-sl;
+ h= (char*) xmalloc((j*2+4)*sizeof(char));
+ if (h) {
+ for (j=0; j<olen; j++)
+ h[j]=de->st[j];
+ if (!j || h[j-1]!='\n')
+ h[j++]='\n';
+ while (sl!=c) {
+ if (sl[0] == '\\' && sl[1] == '\\') {
+ h[j++]='\\'; sl++;
+ } else
+ h[j++]=*sl;
+ sl++;
+ }
+ h[j]=0;
+ if (de) {
+ if (de->st) free(de->st);
+ de->st=h;
+ } else {
+ de = (STRDEF*) xmalloc(sizeof(STRDEF));
+ de->nr=i;
+ de->next=defdef;
+ de->st=h;
+ defdef=de;
+ }
+ }
+ }
+ c=skip_till_newline(c);
+ break;
+
+ /* ----- BSD mandoc stuff below ----- */
+ case V('U','x'): /* BSD mandoc */
+ c=c+j;
+ out_html("UNIX");
+ c=skip_till_newline(c);
+ break;
+ case V('A','t'): /* BSD mandoc - called with arg V */
+ c=c+j;
+ out_html("AT&T System");
+ break;
+ case V('B','l'): /* BSD mandoc */
+ {
+ char *nl, t=0 /* just for gcc */;
+ c=c+j;
+ nl = strchr(c,'\n');
+ if (nl) {
+ t = *nl;
+ *nl = 0;
+ }
+ if (strstr(c, "-bullet")) /* HTML Unnumbered List */
+ dl_newlevel_type(UL);
+ else if (strstr(c, "-enum")) /* HTML Ordered List */
+ dl_newlevel_type(OL);
+ else /* HTML Descriptive List */
+ dl_newlevel_type(DL);
+ if (nl)
+ *nl = t;
+ if (fillout) out_html("<P>\n"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ }
+ case V('E','l'): /* BSD mandoc */
+ c=c+j;
+ dl_endlevel_type();
+ if (fillout) out_html("<P>\n"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ case V('I','t'): /* BSD mandoc */
+ c=c+j;
+ if (dl_type(DL)) {
+ out_html("<DT>");
+ out_html(change_to_font('B'));
+ if (*c == '\n') {
+ /* Don't allow embedded comms after a newline */
+ c++;
+ c=scan_troff(c,1,NULL);
+ } else {
+ /* Do allow embedded comms on the same line. */
+ c=scan_troff_mandoc(c,1,NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (inXo)
+ still_dd = 1;
+ else
+ out_html("<DD>");
+ } else if (dl_type(UL) || dl_type(OL)) {
+ out_html("<LI>");
+ c=scan_troff_mandoc(c,1,NULL);
+ out_html(NEWLINE);
+ }
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('X','o'): /* BSD mandoc */
+ c=c+j;
+ inXo = 1;
+ break;
+ case V('X','c'): /* BSD mandoc - Xc closes an Xo */
+ c=c+j;
+ if (inXo) {
+ if (still_dd)
+ out_html("<DD>");
+ inXo = 0;
+ }
+ break;
+ case V('S','m'): /* BSD mandoc - called with arg on/off */
+ c=skip_till_newline(c);
+ break;
+ case V('B','k'): /* BSD mandoc */
+ case V('E','k'): /* BSD mandoc */
+ case V('D','d'): /* BSD mandoc */
+ case V('O','s'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('B','t'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ out_html(" is currently in beta test.");
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('B','x'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html("BSD ");
+ c=scan_troff_mandoc(c, 1, NULL);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('D','l'): /* BSD mandoc */
+ c=c+j;
+ out_html(NEWLINE);
+ out_html("<BLOCKQUOTE>");
+ out_html(change_to_font('L'));
+ if (*c == '\n') c++;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("</BLOCKQUOTE>");
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('B','d'): /* BSD mandoc */
+ { /* Seems like a kind of example/literal mode */
+ char *nl, t=0 /* just for gcc */;
+ c=c+j;
+ nl = strchr(c,'\n');
+ if (nl) {
+ t = *nl;
+ *nl = 0;
+ }
+ out_html(NEWLINE);
+ mandoc_bd_options = 0; /* Remember options for terminating Bl */
+ if (strstr(c, "-offset indent")) {
+ mandoc_bd_options |= BD_INDENT;
+ out_html("<BLOCKQUOTE>\n");
+ }
+ if (strstr(c, "-literal") || strstr(c, "-unfilled")) {
+ if (fillout) {
+ mandoc_bd_options |= BD_LITERAL;
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("<PRE>\n");
+ }
+ curpos=0;
+ fillout=0;
+ }
+ if (nl)
+ *nl = t;
+ c=skip_till_newline(c);
+ break;
+ }
+ case V('E','d'): /* BSD mandoc */
+ if (mandoc_bd_options & BD_LITERAL) {
+ if (!fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("</PRE>\n");
+ }
+ }
+ if (mandoc_bd_options & BD_INDENT)
+ out_html("</BLOCKQUOTE>\n");
+ curpos=0;
+ fillout=1;
+ c=skip_till_newline(c);
+ break;
+ case V('B','e'): /* BSD mandoc */
+ c=c+j;
+ if (fillout) out_html("<P>"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ case V('X','r'): /* BSD mandoc */
+ {
+ /* Translate xyz 1 to xyz(1)
+ * Allow for multiple spaces. Allow the section to be missing.
+ */
+ char buff[100];
+ char *bufptr;
+ trans_char(c,'"','\a');
+ bufptr = buff;
+ c = c+j;
+ if (*c == '\n') c++; /* Skip spaces */
+ while (isspace(*c) && *c != '\n') c++;
+ while (isalnum(*c) && bufptr < buff + SIZE(buff)-4) {
+ /* Copy the xyz part */
+ *bufptr++ = *c++;
+ }
+ while (isspace(*c) && *c != '\n') c++; /* Skip spaces */
+ if (isdigit(*c)) { /* Convert the number if there is one */
+ *bufptr++ = '(';
+ while (isalnum(*c) && bufptr < buff + SIZE(buff)-3) {
+ *bufptr++ = *c++;
+ }
+ *bufptr++ = ')';
+ }
+ while (*c != '\n' && bufptr < buff + SIZE(buff)-2) {
+ /* Copy the remainder */
+ if (!isspace(*c)) {
+ *bufptr++ = *c;
+ }
+ c++;
+ }
+ *bufptr++ = '\n';
+ *bufptr = 0;
+ scan_troff_mandoc(buff, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ }
+ break;
+ case V('F','l'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ out_html("-");
+ if (*c!='\n') {
+ out_html(change_to_font('B'));
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ }
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('P','a'): /* BSD mandoc */
+ case V('P','f'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('P','p'): /* BSD mandoc */
+ if (fillout) out_html("<P>\n"); else {
+ out_html(NEWLINE);
+ NEWLINE[0]='\n';
+ }
+ curpos=0;
+ c=skip_till_newline(c);
+ break;
+ case V('D','q'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html("``");
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html("''");
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('O','p'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html(change_to_font('R'));
+ out_html("[");
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("]");
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('O','o'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html(change_to_font('R'));
+ out_html("[");
+ c=scan_troff_mandoc(c, 1, NULL);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('O','c'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("]");
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('P','q'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html("(");
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(")");
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('Q','l'): /* BSD mandoc */
+ { /* Single quote first word in the line */
+ char *sp;
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ sp = c;
+ do { /* Find first whitespace after the
+ * first word that isn't a mandoc macro
+ */
+ while (*sp && isspace(*sp)) sp++;
+ while (*sp && !isspace(*sp)) sp++;
+ } while (*sp && isupper(*(sp-2)) && islower(*(sp-1)));
+
+ /* Use a newline to mark the end of text to
+ * be quoted
+ */
+ if (*sp) *sp = '\n';
+ out_html("`"); /* Quote the text */
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html("'");
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ }
+ case V('S','q'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html("`");
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html("'");
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('A','r'): /* BSD mandoc */
+ /* parse one line in italics */
+ out_html(change_to_font('I'));
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') { /* An empty Ar means "file ..." */
+ out_html("file ...");
+ } else {
+ c=scan_troff_mandoc(c, 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('A','d'): /* BSD mandoc */
+ case V('E','m'): /* BSD mandoc */
+ case V('V','a'): /* BSD mandoc */
+ /* parse one line in italics */
+ out_html(change_to_font('I'));
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('N','d'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html(" - ");
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('N','m'): /* BSD mandoc */
+ {
+ static char *mandoc_name = 0;
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (mandoc_synopsis) {
+ /*
+ * Break lines only in the Synopsis.
+ * The Synopsis section seems to be treated
+ * as a special case - Bummer!
+ */
+ static int count = 0; /* Don't break on the first Nm */
+ if (count) {
+ out_html("<BR>");
+ } else {
+ char *end, t=0 /* just for gcc */;
+ end = strchr(c, '\n');
+ if (end) {
+ t = *end;
+ *end = 0;
+ }
+ if (mandoc_name)
+ free(mandoc_name);
+ mandoc_name = xstrdup(c);
+ if (end)
+ *end = t;
+ }
+ count++;
+ }
+ out_html(change_to_font('B'));
+ while (*c == ' ' || *c == '\t') c++;
+ if (*c == '\n') {
+ /*
+ * If Nm has no argument, use one from an earlier
+ * Nm command that did have one. Hope there aren't
+ * too many commands that do this.
+ */
+ if (mandoc_name)
+ out_html(mandoc_name);
+ } else {
+ c=scan_troff_mandoc(c, 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ }
+ case V('C','d'): /* BSD mandoc */
+ case V('C','m'): /* BSD mandoc */
+ case V('I','c'): /* BSD mandoc */
+ case V('M','s'): /* BSD mandoc */
+ case V('O','r'): /* BSD mandoc */
+ case V('S','y'): /* BSD mandoc */
+ /* parse one line in bold */
+ out_html(change_to_font('B'));
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('D','v'): /* BSD mandoc */
+ case V('E','v'): /* BSD mandoc */
+ case V('F','r'): /* BSD mandoc */
+ case V('L','i'): /* BSD mandoc */
+ case V('N','o'): /* BSD mandoc */
+ case V('N','s'): /* BSD mandoc */
+ case V('T','n'): /* BSD mandoc */
+ case V('n','N'): /* BSD mandoc */
+ trans_char(c,'"','\a');
+ c=c+j;
+ if (*c == '\n') c++;
+ out_html(change_to_font('B'));
+ c=scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('%','A'): /* BSD mandoc biblio stuff */
+ case V('%','D'):
+ case V('%','N'):
+ case V('%','O'):
+ case V('%','P'):
+ case V('%','Q'):
+ case V('%','V'):
+ c=c+j;
+ if (*c == '\n') c++;
+ c=scan_troff(c, 1, NULL); /* Don't allow embedded mandoc coms */
+ if (fillout) curpos++; else curpos=0;
+ break;
+ case V('%','B'):
+ case V('%','J'):
+ case V('%','R'):
+ case V('%','T'):
+ c=c+j;
+ out_html(change_to_font('I'));
+ if (*c == '\n') c++;
+ c=scan_troff(c, 1, NULL); /* Don't allow embedded mandoc coms */
+ out_html(change_to_font('R'));
+ if (fillout) curpos++; else curpos=0;
+ break;
+ /* ----- end of BSD mandoc stuff ----- */
+
+ default:
+ /* search macro database of self-defined macros */
+ owndef = defdef;
+ while (owndef && owndef->nr!=i) owndef=owndef->next;
+ if (owndef) {
+ char **oldargument;
+ int deflen;
+ int onff;
+ sl=fill_words(c+j, wordlist, SIZE(wordlist), &words, '\n');
+ c=sl+1;
+ *sl=0;
+ for (i=1; i<words; i++)
+ wordlist[i][-1]=0;
+ for (i=0; i<words; i++) {
+ char *h=NULL;
+ if (mandoc_command)
+ scan_troff_mandoc(wordlist[i],1,&h);
+ else
+ scan_troff(wordlist[i],1,&h);
+ wordlist[i]=h;
+ }
+ for (i=words; i<SIZE(wordlist); i++)
+ wordlist[i]=NULL;
+ deflen = strlen(owndef->st);
+ owndef->st[deflen+1]='a';
+ for (i=0; (owndef->st[deflen+2+i] = owndef->st[i]); i++);
+ oldargument=argument;
+ argument=wordlist;
+ onff=newline_for_fun;
+ if (mandoc_command)
+ scan_troff_mandoc(owndef->st+deflen+2, 0, NULL);
+ else
+ scan_troff(owndef->st+deflen+2, 0, NULL);
+ newline_for_fun=onff;
+ argument=oldargument;
+ for (i=0; i<words; i++) if (wordlist[i]) free(wordlist[i]);
+ *sl='\n';
+ } else if (mandoc_command &&
+ ((isupper(*c) && islower(c[1]))
+ || (islower(*c) && isupper(c[1])))) {
+ /*
+ * Let through any BSD mandoc commands that haven't
+ * been dealt with.
+ * I don't want to miss anything out of the text.
+ */
+ char buf[4];
+ strncpy(buf,c,2);
+ buf[2] = ' ';
+ buf[3] = 0;
+ out_html(buf); /* Print the command (it might just be text). */
+ c=c+j;
+ trans_char(c,'"','\a');
+ if (*c == '\n') c++; /* really? */
+ out_html(change_to_font('R'));
+ c=scan_troff(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout) curpos++; else curpos=0;
+ } else
+ c=skip_till_newline(c);
+ break;
+ }
+ }
+ if (fillout) { out_html(NEWLINE); curpos++; }
+ NEWLINE[0]='\n';
+ return c;
+}
+
+static int contained_tab=0;
+static int mandoc_line=0;/* Signals whether to look for embedded mandoc cmds */
+
+static char *
+scan_troff(char *c, int san, char **result) { /* san : stop at newline */
+ char *h;
+ char intbuff[500];
+ int ibp=0;
+#define FLUSHIBP if (ibp) { intbuff[ibp]=0; out_html(intbuff); ibp=0; }
+ char *exbuffer;
+ int exbuffpos, exbuffmax, exscaninbuff, exnewline_for_fun;
+ int usenbsp = 0;
+
+ exbuffer = buffer;
+ exbuffpos = buffpos;
+ exbuffmax = buffmax;
+ exnewline_for_fun = newline_for_fun;
+ exscaninbuff = scaninbuff;
+ newline_for_fun = 0;
+ if (result) {
+ if (*result) {
+ buffer = *result;
+ buffpos = strlen(buffer);
+ buffmax = buffpos;
+ } else {
+ buffer = (char *) xmalloc(1000*sizeof(char));
+ buffpos = 0;
+ buffmax = 1000;
+ }
+ scaninbuff = 1;
+ }
+ h = c;
+ /* start scanning */
+ while (*h && (!san || newline_for_fun || *h != '\n')) {
+ if (*h == escapesym) {
+ h++;
+ FLUSHIBP;
+ h = scan_escape(h);
+ } else if (*h == controlsym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n') h--;
+ } else if (mandoc_line
+ && *(h) && isupper(*(h))
+ && *(h+1) && islower(*(h+1))
+ && *(h+2) && isspace(*(h+2))) {
+ /* BSD imbedded command eg ".It Fl Ar arg1 Fl Ar arg2" */
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n') h--;
+ } else if (*h == nobreaksym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n') h--;
+ } else {
+ if (h[-1] == '\n' && still_dd && isalnum(*h)) {
+ /* sometimes a .HP request is not followed by a .br request */
+ FLUSHIBP;
+ out_html("<DD>");
+ curpos=0;
+ still_dd=0;
+ }
+ switch (*h) {
+ case '&':
+ intbuff[ibp++]='&';
+ intbuff[ibp++]='a';
+ intbuff[ibp++]='m';
+ intbuff[ibp++]='p';
+ intbuff[ibp++]=';';
+ curpos++;
+ break;
+ case '<':
+ intbuff[ibp++]='&';
+ intbuff[ibp++]='l';
+ intbuff[ibp++]='t';
+ intbuff[ibp++]=';';
+ curpos++;
+ break;
+ case '>':
+ intbuff[ibp++]='&';
+ intbuff[ibp++]='g';
+ intbuff[ibp++]='t';
+ intbuff[ibp++]=';';
+ curpos++;
+ break;
+ case '"':
+ intbuff[ibp++]='&';
+ intbuff[ibp++]='q';
+ intbuff[ibp++]='u';
+ intbuff[ibp++]='o';
+ intbuff[ibp++]='t';
+ intbuff[ibp++]=';';
+ curpos++;
+ break;
+ case '\n':
+ if (h[-1] == '\n' && fillout) {
+ intbuff[ibp++]='<';
+ intbuff[ibp++]='P';
+ intbuff[ibp++]='>';
+ }
+ if (contained_tab && fillout) {
+ intbuff[ibp++]='<';
+ intbuff[ibp++]='B';
+ intbuff[ibp++]='R';
+ intbuff[ibp++]='>';
+ }
+ contained_tab=0;
+ curpos=0;
+ usenbsp=0;
+ intbuff[ibp++]='\n';
+ break;
+ case '\t':
+ {
+ int curtab=0;
+ contained_tab=1;
+ FLUSHIBP;
+ /* like a typewriter, not like TeX */
+ tabstops[SIZE(tabstops)-1] = curpos+1;
+ while (curtab < maxtstop && tabstops[curtab] <= curpos)
+ curtab++;
+ if (curtab < maxtstop) {
+ if (!fillout) {
+ while (curpos<tabstops[curtab]) {
+ intbuff[ibp++]=' ';
+ if (ibp>480) { FLUSHIBP; }
+ curpos++;
+ }
+ } else {
+ out_html("<TT>");
+ while (curpos < tabstops[curtab]) {
+ out_html(" ");
+ curpos++;
+ }
+ out_html("</TT>");
+ }
+ }
+ }
+ break;
+ default:
+ if (*h == ' ' && (h[-1] == '\n' || usenbsp)) {
+ FLUSHIBP;
+ if (!usenbsp && fillout) {
+ out_html("<BR>");
+ curpos=0;
+ }
+ usenbsp=fillout;
+ if (usenbsp) out_html(" "); else intbuff[ibp++]=' ';
+ } else if (*h > 31 && *h < 127) {
+ intbuff[ibp++]=*h;
+ } else if (((unsigned char)(*h)) > 127) {
+#ifdef NO_8BIT
+ intbuff[ibp++]='&';
+ intbuff[ibp++]='#';
+ intbuff[ibp++]='0'+((unsigned char)(*h))/100;
+ intbuff[ibp++]='0'+(((unsigned char)(*h))%100)/10;
+ intbuff[ibp++]='0'+((unsigned char)(*h))%10;
+ intbuff[ibp++]=';';
+#else
+ intbuff[ibp++]=*h;
+#endif
+ }
+ curpos++;
+ break;
+ }
+ if (ibp>480) FLUSHIBP;
+ h++;
+ }
+ }
+ FLUSHIBP;
+ if (buffer) buffer[buffpos]=0;
+ if (san && *h) h++;
+ newline_for_fun=exnewline_for_fun;
+ if (result) {
+ *result = buffer;
+ buffer=exbuffer;
+ buffpos=exbuffpos;
+ buffmax=exbuffmax;
+ scaninbuff=exscaninbuff;
+ }
+ return h;
+}
+
+static char *scan_troff_mandoc(char *c, int san, char **result) {
+ char *ret, *end = c;
+ int oldval = mandoc_line;
+ mandoc_line = 1;
+ while (*end && *end != '\n') {
+ end++;
+ }
+
+ if (end > c + 2
+ && ispunct(*(end - 1))
+ && isspace(*(end - 2)) && *(end - 2) != '\n') {
+ /*
+ * Don't format lonely punctuation. E.g. in "xyz ," format
+ * the xyz and then append the comma removing the space.
+ */
+ *(end - 2) = '\n';
+ ret = scan_troff(c, san, result);
+ *(end - 2) = *(end - 1);
+ *(end - 1) = ' ';
+ } else {
+ ret = scan_troff(c, san, result);
+ }
+ mandoc_line = oldval;
+ return ret;
+}
+
+STRDEF *foundpages=NULL;
+
+static void
+error_page(char *s, char *t, ...) {
+ va_list p;
+
+ printf("<HTML><HEAD><TITLE>%s</TITLE></HEAD>\n"
+ "<BODY>\n<H1>%s</H1>\n", s, s);
+ va_start(p, t);
+ vfprintf(stdout, t, p);
+ va_end(p);
+ printf("</BODY></HTML>\n");
+ exit(0);
+}
+
+char *
+xstrdup(const char *s) {
+ char *p = strdup(s);
+ if (p == NULL)
+ error_page("Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+void *
+xmalloc(size_t size) {
+ void *p = malloc(size);
+ if (p == NULL)
+ error_page("Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+void *
+xrealloc(void *ptr, size_t size) {
+ void *p = realloc(ptr,size);
+ if (p == NULL)
+ error_page("Out of memory",
+ "Sorry, out of memory, aborting...\n");
+ return p;
+}
+
+static void
+usage(void) {
+ error_page("man2html: bad invocation",
+ "Call: man2html [-l|-h host.domain:port] [-p|-q] [filename]\n"
+ "or: man2html -r [filename]\n");
+}
+
+static void
+goto_dir(char *path, char **dir, char **name) {
+ char *s, *t, *u;
+
+ s = xstrdup(path);
+ t = strrchr(s, '/');
+ if (t) {
+ *t = 0;
+ u = strrchr(s, '/');
+ *t = '/';
+ if (u) {
+ *u = 0;
+ if (chdir(s) == 0) {
+ if (dir)
+ *dir = s;
+ if (name)
+ *name = u+1;
+ }
+#if 0
+ else /* complain or not - this need not be fatal */
+ error_page("Error", "man2html: could not chdir to %s", s);
+#endif
+ }
+ }
+}
+
+/*
+ * Call: man2html [-l] [filename]
+ *
+ * The contents of FILENAME (or STDIN, in case FILENAME is "-" or absent)
+ * are converted from man-style nroff to html, and printed on STDOUT.
+ *
+ * Possible errors are reflected in the output. The return status is 0.
+ */
+int
+main(int argc, char **argv) {
+ FILE *f;
+ struct stat stbuf;
+ int l, c;
+ char *buf, *filename, *fnam = NULL;
+
+#ifdef __CYGWIN__
+ int opterr;
+
+ extern int optind;
+ extern char *optarg;
+#endif
+
+ printf("Content-type: text/html\n\n");
+
+ opterr = 0; /* no stderr error messages */
+ while ((c = getopt (argc, argv, "D:E:hH:lL:M:pqr?vVf")) != -1) {
+ switch(c) {
+ case 'D':
+ goto_dir(optarg, 0, 0); break;
+ case 'E':
+ error_page("Error", "%s", optarg); break;
+ case 'h':
+ set_cgibase("localhost"); break;
+ case 'H':
+ set_cgibase(optarg); break;
+ case 'l':
+ set_lynxcgibase("/home/httpd"); break;
+ case 'L':
+ set_lynxcgibase(optarg); break;
+ case 'M':
+ set_man2htmlpath(optarg); break;
+ case 'p':
+ set_separator('/'); break;
+ case 'q':
+ set_separator('?'); break;
+ case 'r':
+ set_relative_html_links(); break;
+ case 'v':
+ case 'V':
+ error_page("Version", "%s from man-%s", argv[0], version);
+ exit(0);
+ case '?':
+ default:
+ usage();
+ case 'f': /* It is rumoured that some other
+ incarnation of man2html uses this flag;
+ ignore when given for compatibility. */
+ /* case 'F': this will assign a format for man_page_html() */
+ break;
+ }
+ }
+
+ /* Find filename */
+ if (argc == optind+1)
+ fnam = argv[optind];
+ else if (argc != optind)
+ usage();
+
+ filename = fnam;
+ directory = 0;
+
+ /* Open input file */
+ if (!fnam || !strcmp(fnam, "-")) {
+ f = stdin;
+ fname = "(stdin)";
+ } else {
+ /* do a chdir() first, to get .so expansion right */
+ goto_dir(fnam, &directory, &fnam);
+
+ f = fopen(fnam, "r");
+ if (f == NULL)
+ error_page("File not found", "Could not open %s\n", filename);
+ fname = fnam;
+ }
+
+ /* Read entire file into buf[1..l] */
+#define XTRA 5
+ /* buf has 1 extra byte at the start, and XTRA extra bytes at the end */
+ if (f == stdin) {
+ int sz = 1024;
+ int ct = 1, tot = 0;
+ char *p = NULL;
+
+ clearerr(stdin);
+ while (ct > 0) {
+ tot += ct;
+ if (feof(stdin))
+ break;
+ sz = 2*sz+tot;
+ p = xrealloc(p, sz);
+ ct = fread(p+tot,1,sz-tot-XTRA,stdin);
+ }
+
+ buf = p;
+ l = tot-1;
+ } else {
+ int ct;
+
+ l = 0;
+ if (fstat(fileno(f), &stbuf) != -1)
+ l = stbuf.st_size;
+ buf = (char *) xmalloc((l+1+XTRA)*sizeof(char));
+ ct = fread(buf+1,1,l,f);
+ if (ct < l)
+ l = ct;
+ fclose(f);
+ }
+
+ buf[0] = '\n';
+ buf[l+1] = '\n';
+ buf[l+2] = buf[l+3] = 0;
+
+#ifdef MAKEINDEX
+ idxfile = fopen(INDEXFILE, "a");
+#endif
+ stdinit();
+
+ scan_troff(buf+1,0,NULL);
+ dl_down();
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout=1;
+ out_html("</PRE>");
+ }
+ out_html(NEWLINE);
+ if (output_possible) {
+ /* for mosaic users */
+ printf("<HR>\n<A NAME=\"index\"> </A><H2>Index</H2>\n<DL>\n");
+ manidx[mip]=0;
+ printf("%s", manidx);
+ if (subs) printf("</DL>\n");
+ printf("</DL>\n");
+ print_sig();
+ printf("</BODY>\n</HTML>\n");
+ } else {
+ if (!filename)
+ filename = fname;
+ if (*filename == '/')
+ error_page("Invalid Manpage",
+ "The requested file %s is not a valid (unformatted) "
+ "man page.\nIf the file is a formatted manpage, "
+ "you could try to load the\n"
+ "<A HREF=\"file://localhost%s\">plain file</A>.\n",
+ filename, filename);
+ else
+ error_page("Invalid Manpage",
+ "The requested file %s is not a valid (unformatted) "
+ "man page.", filename);
+ }
+ if (idxfile)
+ fclose(idxfile);
+ if (buf)
+ free(buf);
+ return 0;
+}
diff --git a/man2html/scripts/cgi-aux/man/man.aux b/man2html/scripts/cgi-aux/man/man.aux
new file mode 100644
index 0000000..e381b01
--- /dev/null
+++ b/man2html/scripts/cgi-aux/man/man.aux
@@ -0,0 +1,75 @@
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>Manual Pages - Main Contents</TITLE>
+<!-- Note: this is not html, but requires preprocessing -->
+<!-- It is used by /home/httpd/cgi-bin/man/man2html -->
+</HEAD>
+<BODY>
+<H1>Manual Pages - Main Contents</H1>
+<HR>
+
+<H2>Name and Section lookup</H2>
+<ISINDEX>
+
+%lynx <i>Start a query</i> by typing an s.
+You can enter a program name, possibly preceded by the section,
+the directories to search (with -M) or a full name.
+For example:
+<UL>
+ <LI><TT>find</TT>
+ <LI><TT>1 find</TT>
+ <LI><TT>-M /usr/man:/usr/X11R6/man:/usr/lib/perl5/man find</TT>
+ <LI><TT>/local/gcc/man/man1/gperf.1</TT>
+</UL>
+
+<HR>
+
+<H2>Index of pages by name and description</H2>
+Sections:
+ <A HREF="%cg/manwhatis?%cg+1">1. User Commands</A>;
+ <A HREF="%cg/manwhatis?%cg+2">2. System Calls</A>;
+ <A HREF="%cg/manwhatis?%cg+3">3. Library Functions</A>;
+ <A HREF="%cg/manwhatis?%cg+4">4. Special Files</A>;
+ <A HREF="%cg/manwhatis?%cg+5">5. File Formats</A>;
+ <A HREF="%cg/manwhatis?%cg+6">6. Games</A>;
+ <A HREF="%cg/manwhatis?%cg+7">7. Miscellany</A>;
+ <A HREF="%cg/manwhatis?%cg+8">8. Administration and Privileged Commands</A>;
+ <A HREF="%cg/manwhatis?%cg+l">l. Postgresql Commands</A>;
+ <A HREF="%cg/manwhatis?%cg+n">n. Tcl Commands</A>.
+<P>
+<HR>
+<H2>Index of pages by name only</H2>
+ <A HREF="%cg/mansec?%cg+1">1. User Commands</A>;
+ <A HREF="%cg/mansec?%cg+2">2. System Calls</A>;
+ <A HREF="%cg/mansec?%cg+3">3. Library Functions</A>;
+ <A HREF="%cg/mansec?%cg+4">4. Special Files</A>;
+ <A HREF="%cg/mansec?%cg+5">5. File Formats</A>;
+ <A HREF="%cg/mansec?%cg+6">6. Games</A>;
+ <A HREF="%cg/mansec?%cg+7">7. Miscellany</A>;
+ <A HREF="%cg/mansec?%cg+8">8. Administration and Privileged Commands</A>;
+ <A HREF="%cg/mansec?%cg+l">l. Postgresql Commands</A>;
+ <A HREF="%cg/mansec?%cg+n">n. Tcl Commands</A>;
+ <A HREF="%cg/mansec?%cg+all">All Sections</A>.
+<P>
+<hr>
+
+<H2>Manual Pages full text search</H2>
+
+<A HREF="%cg/mansearch">
+Search the full text of the Manual Pages.
+</A>
+
+<P>
+<HR>
+
+The original man2html program and scripts are due to
+<A HREF="http://wsinwp01.win.tue.nl:1234/index.html">
+Richard Verhoeven</A> and
+<A HREF="mailto:michael at actrix.gen.nz">
+Michael Hamilton</A>.
+This version is from man-1.6g maintained by <A HREF="mailto:flucifredi at acm.org">
+Federico Lucifredi</A>.
+</body>
+</HTML>
diff --git a/man2html/scripts/cgi-aux/man/mansearch.aux b/man2html/scripts/cgi-aux/man/mansearch.aux
new file mode 100644
index 0000000..f1d19a2
--- /dev/null
+++ b/man2html/scripts/cgi-aux/man/mansearch.aux
@@ -0,0 +1,49 @@
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>Manual Pages - Text Search</TITLE>
+<!-- Changed by: Michael Hamilton, 6-Apr-1996 -->
+<!-- Note: this is not html, but requires preprocessing -->
+</HEAD>
+<BODY>
+<H1>Manual Pages - Text Search</H1>
+
+<A HREF="%cg/man2html">Return to Main Contents</A>
+<P>
+<ISINDEX>
+
+%lynx <i>Start a query</i> by typing an s.
+
+Examples:
+<UL>
+ <LI><TT>pwd;directory</TT> - Find both in the same man page.
+ <LI><TT>pwd,directory</TT> - Find either.
+ <LI><TT>pwd directory</TT> - Find the exact phrase.
+ <LI><TT>-F 1 pwd</TT> - Look in section 1 only.
+ <LI><TT>-B glipmse</TT> - Find the best match (allow for misspelling).
+ <LI><TT>-L 0:10 pwd</TT> - Only show the first 10 man pages matched.
+</UL>
+
+<HR>
+<P>
+The index uses the <I>Glimpse</I>
+(<A HREF="%cg/man2html?1+glimpse">glimpse(1)</A>)
+text indexing system. Many of the glimpse
+options, regular expressions, and wildcards are valid:
+see the <A HREF="%cg/mansearchhelp">help page</A> for a summary.
+<P>
+<HR>
+
+<P>
+Glimpse
+was developed by Udi Manber and Burra Gopal of the University of
+Arizona, and Sun Wu of the National Chung-Cheng University, Taiwan.
+You may contact the authors at <A HREF="mailto:glimpse at cs.arizona.edu">
+glimpse at cs.arizona.edu</A>
+<P>
+The Manual Page text search interface was created for Linux by
+<A HREF="mailto:michael at actrix.gen.nz">
+Michael Hamilton</A>.
+</BODY>
+</HTML>
diff --git a/man2html/scripts/cgi-aux/man/mansearchhelp.aux b/man2html/scripts/cgi-aux/man/mansearchhelp.aux
new file mode 100644
index 0000000..200b509
--- /dev/null
+++ b/man2html/scripts/cgi-aux/man/mansearchhelp.aux
@@ -0,0 +1,295 @@
+Content-type: text/html
+
+<HTML>
+<HEAD>
+<TITLE>Manual Pages - Search Help</TITLE>
+<!-- Changed by: Michael Hamilton, 6-Apr-1996 -->
+<!-- Note: this is not html, but requires preprocessing -->
+</HEAD>
+<BODY>
+<H1>Manual Pages - Search Help</H1>
+
+<A HREF="%cg/mansearch">Perform another search</A>
+<BR>
+<A HREF="%cg/man2html">Return to Main Contents</A>
+<P>
+<HR>
+<P>
+The full text index uses the <I>Glimpse</I> text indexing system.
+The
+<A HREF="%cg/man2html?1+glimpse">glimpse(1)</A>
+manual page documents glimpse in full. This summary documents those
+features of glimpse that are valid when searching through the manual pages.
+<P>
+<HR>
+
+<H2>Search Options</H2>
+
+The following search options must be at the start of the search string.
+
+<DL COMPACT>
+
+<DT><B>-</B> <I>#</I>
+<DD>
+<I>#</I> is an integer between 1 and 8
+specifying the maximum number of errors
+permitted in finding the approximate matches (the default is zero).
+Generally, each insertion, deletion, or substitution counts as one error.
+Since the index stores only lower case characters, errors of
+substituting upper case with lower case may be missed.
+
+<DT><B>-B</B>
+<DD>
+Best match mode. (Warning: -B sometimes misses matches. It is safer
+to specify the number of errors explicitly.)
+When -B is specified and no exact matches are found, glimpse
+will continue to search until the closest matches (i.e., the ones
+with minimum number of errors)
+are found.
+In general, -B may be slower than -#, but not by very much.
+Since the index stores only lower case characters, errors of
+substituting upper case with lower case may be missed.
+
+<DT><B>-L <I>x</I> | <I>x</I>:<I>y</I> | <I>x</I>:<I>y</I>:<I>z</I></B>
+<DD>
+A non-zero value of <I>x</I> limits the number of matches
+that will be shown.
+A non-zero value of <I>y</I> limits the number of man pages
+that will be shown.
+A non-zero valye of <I>z</I> will only show pages that have
+less that z matches.
+For example, -L 0:10 will output all matches for the first 10 files that
+contain a match.
+
+<DT><B>-F</B> <I>pattern</I>
+<DD>
+The -F option provides a pattern that restricts the search results to
+those filenames that match the pattern.
+or example, <I>-F 8</I> effectively restricts matches to section 8.
+
+<DT><B>-w</B>
+<DD>
+Search for the pattern as a word - i.e., surrounded by non-alphanumeric
+characters. For example,
+<I>-w -1 car</I> will match cars, but not characters and not
+car10.
+The non-alphanumeric <I>must</I>
+surround the match; they cannot be counted as errors.
+This option does not work with regular expressions.
+
+<DT><B>-W</B>
+<DD>
+The default for Boolean AND queries is that they cover one record
+(the default for a record is one line) at a time.
+For example, glimpse 'good;bad' will output all lines containing
+both 'good' and 'bad'.
+The -W option changes the scope of Booleans to be the whole file.
+Within a file glimpse will output all matches to any of the patterns.
+So, glimpse -W 'good;bad' will output all lines containing 'good'
+<I>or</I> 'bad', but only in files that contain both patterns.
+
+<DT><B>-k</B>
+<DD>
+No symbol in the pattern is treated as a meta character.
+For example, <I>-k a(b|c)*d</I> will find
+the occurrences of a(b|c)*d whereas <I>a(b|c)*d</I>
+will find substrings that match the regular expression 'a(b|c)*d'.
+(The only exception is ^ at the beginning of the pattern and $ at the
+end of the pattern, which are still interpreted in the usual way.
+Use \^ or \$ if you need them verbatim.)
+
+</DL>
+
+<P>
+<HR>
+
+<H2>Patterns</H2>
+
+<I>Glimpse</I>
+supports a large variety of patterns, including simple
+strings, strings with classes of characters, sets of strings,
+wild cards, and regular expressions (see <A HREF="#limitations">LIMITATIONS</A>).
+
+<DL COMPACT>
+<DT><B>Strings </B><DD>
+Strings are any sequence of characters, including the special symbols
+`^' for beginning of line and `$' for end of line.
+The following special characters (
+`<B>$</B>',
+
+`^<B>',</B>
+
+`<B>*</B>',
+
+`<B>[</B>'<B>,</B>
+
+`<B>^</B>',
+
+`<B>|</B>',
+
+`<B>(</B>',
+
+`<B>)</B>',
+
+`<B>!</B>',
+
+and
+`<B>\</B>'
+
+)
+as well as the following meta characters special to glimpse (and agrep):
+`<B>;</B>',
+
+`<B>,</B>',
+
+`<B>#</B>',
+
+`<B><</B>',
+
+`<B>></B>',
+
+`<B>-</B>',
+
+and
+`<B>.</B>',
+
+should be preceded by `\' if they are to be matched as regular
+characters. For example, \^abc\\ corresponds to the string ^abc\,
+whereas ^abc corresponds to the string abc at the beginning of a
+line.
+<DT><B>Classes of characters</B><DD>
+a list of characters inside [] (in order) corresponds to any character
+from the list. For example, [a-ho-z] is any character between a and h
+or between o and z. The symbol `^' inside [] complements the list.
+For example, [^i-n] denote any character in the character set except
+character 'i' to 'n'.
+The symbol `^' thus has two meanings, but this is consistent with
+egrep.
+The symbol `.' (don't care) stands for any symbol (except for the
+newline symbol).
+<DT><B>Boolean operations</B><DD>
+<B>Glimpse </B>
+
+supports an `AND' operation denoted by the symbol `;'
+an `OR' operation denoted by the symbol `,',
+or any combination.
+For example,
+<I>glimpse 'pizza;cheeseburger'</I> will output all lines containing
+both patterns.
+<I>glimpse -F 'gnu;\.c$' 'define;DEFAULT'</I>
+will output all lines containing both 'define' and 'DEFAULT'
+(anywhere in the line, not necessarily in order) in
+files whose name contains 'gnu' and ends with .c.
+<I>glimpse '{political,computer};science'</I> will match 'political science'
+or 'science of computers'.
+<DT><B>Wild cards</B><DD>
+The symbol '#' is used to denote a sequence
+of any number (including 0)
+of arbitrary characters (see <A HREF="#limitations">LIMITATIONS</A>).
+The symbol # is equivalent to .* in egrep.
+In fact, .* will work too, because it is a valid regular expression
+(see below), but unless this is part of an actual regular expression,
+# will work faster.
+(Currently glimpse is experiencing some problems with #.)
+<DT><B>Combination of exact and approximate matching</B><DD>
+Any pattern inside angle brackets <> must match the text exactly even
+if the match is with errors. For example, <mathemat>ics matches
+mathematical with one error (replacing the last s with an a), but
+mathe<matics> does not match mathematical no matter how many errors are
+allowed.
+(This option is buggy at the moment.)
+<DT><B>Regular expressions</B><DD>
+Since the index is word based, a regular expression must match
+words that appear in the index for glimpse to find it.
+Glimpse first strips the regular expression from all non-alphabetic
+characters, and searches the index for all remaining words.
+It then applies the regular expression matching algorithm to the
+files found in the index.
+For example, <I>glimpse</I> 'abc.*xyz' will search the index
+for all files that contain both 'abc' and 'xyz', and then
+search directly for 'abc.*xyz' in those files.
+(If you use glimpse -w 'abc.*xyz', then 'abcxyz' will not be found,
+because glimpse
+will think that abc and xyz need to be matches to whole words.)
+The syntax of regular expressions in <B>glimpse</B> is in general the same as
+that for <B>agrep</B>. The union operation `|', Kleene closure `*',
+and parentheses () are all supported.
+Currently '+' is not supported.
+Regular expressions are currently limited to approximately 30
+characters (generally excluding meta characters). Some options
+(-d, -w, -t, -x, -D, -I, -S) do not
+currently work with regular expressions.
+The maximal number of errors for regular expressions that use '*'
+or '|' is 4. (See <A HREF="#limitations">LIMITATIONS</A>.)
+
+</DL>
+
+<HR>
+
+<H2><A NAME="limitations">Limitations</A></H2>
+
+The index of glimpse is word based. A pattern that contains more than
+one word cannot be found in the index. The way glimpse overcomes this
+weakness is by splitting any multi-word pattern into its set of words
+and looking for all of them in the index.
+For example, <B>glimpse 'linear programming'</B> will first consult the index
+to find all files containing both <I>linear</I> and <I>programming</I>,
+and then apply agrep to find the combined pattern.
+This is usually an effective solution, but it can be slow for
+cases where both words are very common, but their combination is not.
+<P>
+
+As was mentioned in the section on PATTERNS above, some characters
+serve as meta characters for glimpse and need to be
+preceded by '\' to search for them. The most common
+examples are the characters '.' (which stands for a wild card),
+and '*' (the Kleene closure).
+So, "glimpse ab.de" will match abcde, but "glimpse ab\.de"
+will not, and "glimpse ab*de" will not match ab*de, but
+"glimpse ab\*de" will.
+The meta character - is translated automatically to a hyphen
+unless it appears between [] (in which case it denotes a range of
+characters).
+<P>
+
+The index of glimpse stores all patterns in lower case.
+When glimpse searches the index it first converts
+all patterns to lower case, finds the appropriate files,
+and then searches the actual files using the original
+patterns.
+So, for example, <I>glimpse ABCXYZ</I> will first find all
+files containing abcxyz in any combination of lower and upper
+cases, and then searches these files directly, so only the
+right cases will be found.
+One problem with this approach is discovering misspellings
+that are caused by wrong cases.
+For example, <I>glimpse -B abcXYZ</I> will first search the
+index for the best match to abcxyz (because the pattern is
+converted to lower case); it will find that there are matches
+with no errors, and will go to those files to search them
+directly, this time with the original upper cases.
+If the closest match is, say AbcXYZ, glimpse may miss it,
+because it doesn't expect an error.
+Another problem is speed. If you search for "ATT", it will look
+at the index for "att". Unless you use -w to match the whole word,
+glimpse may have to search all files containing, for example, "Seattle"
+which has "att" in it.
+<P>
+
+There is no size limit for simple patterns and simple patterns
+within Boolean expressions.
+More complicated patterns, such as regular expressions,
+are currently limited to approximately 30 characters.
+Lines are limited to 1024 characters.
+Records are limited to 48K, and may be truncated if they are larger
+than that.
+The limit of record length can be
+changed by modifying the parameter Max_record in agrep.h.
+<P>
+
+Glimpseindex does not index words of size > 64.
+<A NAME="lbAQ"> </A>
+
+<HR>
+</BODY>
+</HTML>
diff --git a/man2html/scripts/cgi-bin/man/man2html b/man2html/scripts/cgi-bin/man/man2html
new file mode 100755
index 0000000..7c515d1
--- /dev/null
+++ b/man2html/scripts/cgi-bin/man/man2html
@@ -0,0 +1,109 @@
+#!/bin/sh
+# man2html cgi script - uses /usr/bin/man2html to format man pages
+# auxiliary text files in /home/httpd/cgi-aux/man
+# aeb at cwi.nl - 980109
+
+MAN2HTML="/usr/bin/man2html"
+MANX="/home/httpd/cgi-aux/man/man.aux"
+
+# Do we need lynxcgi URLs? For the moment our criterion is
+# 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+AGENT="${HTTP_USER_AGENT-unknown}"
+
+case "$AGENT" in
+ Lynx*|lynx*)
+ HH="${HTTP_HOST-nohh}"
+ SED="s/%lynx //"
+ ;;
+ *)
+ HH=nolynx
+ SED="/%lynx/d"
+ ;;
+esac
+
+SERVER="${SERVER_NAME-localhost}"
+case "$HH" in
+ nohh)
+ LL="-l"
+ CG="lynxcgi:/home/httpd/cgi-bin/man"
+ ;;
+ *)
+ LL="-H$SERVER"
+ CG="http://$SERVER/cgi-bin/man"
+ ;;
+esac
+
+# Find the required page - expect to be called with "man2html [sec] page".
+# There may a prefixed "-M manpath" option.
+if [ $# -ge 2 -a x"$1" = x-M ]; then
+ MANPATH="$2"
+ export MANPATH
+ shift; shift
+ MP=" using the given MANPATH"
+else
+ MP=""
+fi
+
+# If no arguments given, show a start page.
+if [ $# = 0 ]; then
+ if [ -r $MANX ]; then
+ cat $MANX | sed "s#%cg#$CG#g; $SED"
+ else
+ "$MAN2HTML" -E "man2html: cannot open $MANX"
+ fi
+ exit 0
+fi
+
+if [ $# -gt 2 ]; then
+ "$MAN2HTML" -E "man2html: bad invocation: too many arguments"
+ exit 0
+fi
+
+# A single argument may be an explicitly give path name
+# Otherwise, ask man where to find it
+if [ $# = 1 ]; then
+ case "$1" in
+ /*)
+ PAGE="$1"
+ ;;
+ *)
+ PAGE=`man -w -c "$@" 2>/dev/null`
+ ;;
+ esac
+else
+ PAGE=`man -w -c "$@" 2>/dev/null`
+fi
+
+if [ x"$PAGE" = x ]; then
+ complaint="man2html: cannot find a page"
+ if [ $# = 1 ]; then
+ "$MAN2HTML" -E "$complaint for $1$MP"
+ else
+ "$MAN2HTML" -E "$complaint for $2 in section $1$MP"
+ fi
+ exit 0
+fi
+
+if [ -r "$PAGE" ]
+then
+ case "$PAGE" in
+ *.gz)
+ zcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+ ;;
+ *.bz2)
+ bzcat "$PAGE" | "$MAN2HTML" "$LL" -D "$PAGE"
+ ;;
+ *)
+ "$MAN2HTML" "$LL" "$PAGE"
+ ;;
+ esac
+elif [ -r "$PAGE".gz ]
+then
+ zcat "$PAGE".gz | "$MAN2HTML" "$LL" -D "$PAGE"
+elif [ -r "$PAGE".bz2 ]
+then
+ bzcat "$PAGE".bz2 | "$MAN2HTML" "$LL" -D "$PAGE"
+else
+ "$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
+fi
+exit 0
diff --git a/man2html/scripts/cgi-bin/man/mansearch b/man2html/scripts/cgi-bin/man/mansearch
new file mode 100755
index 0000000..2644db6
--- /dev/null
+++ b/man2html/scripts/cgi-bin/man/mansearch
@@ -0,0 +1,192 @@
+#!/bin/sh
+#
+# Interface to a glimpse search of the man pages.
+# Michael Hamilton <michael at actrix.gen.nz>
+# Small changes - aeb, 980109
+#
+
+# Do we need lynxcgi URLs? For the moment our criterion is
+# 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+AGENT="${HTTP_USER_AGENT-unknown}"
+
+case "$AGENT" in
+ Lynx*|lynx*)
+ HH="${HTTP_HOST-nohh}"
+ SED="s/%lynx //"
+ ;;
+ *)
+ HH=nolynx
+ SED="/%lynx/d"
+ ;;
+esac
+
+SERVER="${SERVER_NAME-localhost}"
+case "$HH" in
+ nohh)
+ CG="lynxcgi:/home/httpd/cgi-bin/man"
+ ;;
+ *)
+ CG="http://$SERVER/cgi-bin/man"
+ ;;
+esac
+QUOTE="'"
+export CG QUOTE SED
+
+exec awk '
+function removeopts(string) {
+ gsub(/^[ \t]/, "", string); # Remove leading spaces
+ gsub(/[ \t]$/, "", string); # Remove trailing spaces
+ gsub(/[ \t\\];/, ";", string); # Remove spaces before ;
+ gsub(/[ \t];/, ",", string); # Remove spaces before ,
+ while (match(string, /^-[FLBwk1-8]/)) {
+ if (match(string, /^-[FL]( |.)[^ \t]+[ \t]+/)) { # Option with arg
+ options = options " " substr(string, RSTART, RLENGTH);
+ string = substr(string, RSTART + RLENGTH);
+ }
+ else if (match(string, /^-[Bwk1-8][ \t]+/)) { # Option without arg
+ options = options " " substr(string, RSTART, RLENGTH);
+ string = substr(string, RSTART + RLENGTH);
+ }
+ else if (match(string, /^-[^ \t]/)) { # Remove it
+ string = substr(string, RSTART + RLENGTH);
+ }
+ }
+ return string;
+}
+
+BEGIN {
+
+ searchdocument = "/home/httpd/cgi-aux/man/mansearch.aux";
+ quote = ENVIRON["QUOTE"];
+ cgipath = ENVIRON["CG"];
+ sedcmd = ENVIRON["SED"];
+ truncate_at = 11; # Single page display match limit.
+
+ glimpse_cmd = "glimpse -z -H /var/man2html -y -W -i "
+
+ for (i = 1; i < ARGC; i++) {
+ string = string " " ARGV[i];
+ }
+ # Have to be careful to single quote this
+ # string later.
+ gsub(/[^a-zA-Z0-9-_+ \t\/@%:;,$*|]/, " ", string);
+
+ string = removeopts(string);
+
+ gsub(/[^a-zA-Z0-9-_+ \t\/@%:,]/, " ", options);
+
+ if (!string) {
+ if (system("test -r " searchdocument ) != 0) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>mansearch - file not found</title>";
+ print "</head>\n<body>";
+ print "Sorry - cannot read " searchdocument ".";
+ print "</body>";
+ exit;
+ }
+ system("sed " quote "s#%cg#" cgipath "#g;" sedcmd quote " " searchdocument );
+ exit;
+ }
+
+ print "Content-type: text/html";
+ print "";
+ print "<HTML>";
+ print "<HEAD>";
+ print "<TITLE>Manual Pages - Search Results: " string "</TITLE>";
+ print "</HEAD>";
+ print "<BODY>";
+
+ print "<H1>Manual Pages - Search Results</H1>";
+ print "<H2>Target text: " options " " string "</H2>";
+
+ print "<A HREF=\"" cgipath "/mansearch\">";
+ print "Perform another search";
+ print "</A><BR>";
+ print "<A HREF=\"" cgipath "/man2html\">";
+ print "Return to Main Contents";
+ print "</A>";
+
+ print "<HR>";
+
+ print "<DL>";
+ # Unless you like being hacked, the single
+ # forward quotes are most important.
+ cmd = glimpse_cmd " " options " " quote string quote " 2>/dev/null" ;
+
+ while ((cmd | getline matchline) > 0) {
+ if (split(matchline, part, ": ") == 1) {
+ continue;
+ }
+ else {
+ fullname = part[1];
+ }
+
+ if (fullname == "glimpse") {
+ print "<DT><B>"fullname"</B>:";
+ }
+ else if (fullname != last_fullname) {
+ mcount++;
+ tcount = 0;
+ last_fullname = fullname ;
+ last_text = "";
+
+ if (match(fullname, ".*/")) {
+ dirname = substr(fullname, 1, RLENGTH);
+ filename = substr(fullname, RLENGTH + 1);
+ if (dirname != last_dirname) {
+ last_dirname = dirname;
+ print "</DL>";
+ print "<H3>Location: " dirname "</H3>";
+ print "<DL>";
+ }
+ }
+ else {
+ filename = fullname;
+ }
+
+ if (match(filename, /\.[^.]+$/)) {
+ ref = substr(filename, 1, RSTART - 1) "+" substr(filename, RSTART + 1);
+ }
+ else {
+ ref = filename;
+ }
+ print "<DT> <a href=\"" cgipath "/man2html?" fullname "\">";
+ textname = filename;
+ sub(/\.(gz)|Z|z$/, "", textname);
+ sub(/\./, "(", textname);
+ textname = textname ")";
+ print textname;
+ print "</A>";
+ }
+
+ text = substr(matchline, length(fullname) + 2);
+ tcount++;
+ if (tcount < truncate_at) {
+ sub(/^ *.[^ ]+ /, "", text);
+ sub(/ +$/, "", text);
+ gsub(/\\f./, "", text);
+ gsub(/\\&/, "", text);
+ gsub(/\\/, "", text);
+ print "<DD>" text;
+ }
+ else if (tcount == truncate_at) {
+ print "<DD> <I>...additional matches not shown.</I>";
+ }
+ }
+
+ print "</DL>";
+ if (mcount == 0) {
+ print "No matches found.";
+ }
+ else if (mcount == 1) {
+ print "<HR>\n<P>1 match found."
+ }
+ else {
+ print "<HR>\n<P>" mcount " matches found."
+ }
+ print "</BODY>";
+ print "</HTML>";
+ exit;
+}' "$@"
+
diff --git a/man2html/scripts/cgi-bin/man/mansearchhelp b/man2html/scripts/cgi-bin/man/mansearchhelp
new file mode 100755
index 0000000..a96e796
--- /dev/null
+++ b/man2html/scripts/cgi-bin/man/mansearchhelp
@@ -0,0 +1,32 @@
+#!/bin/sh
+MAN2HTML=/usr/bin/man2html
+MANSH=/home/httpd/cgi-aux/man/mansearchhelp.aux
+
+# Do we need lynxcgi URLs? For the moment our criterion is
+# 1) HTTP_USER_AGENT=Lynx* and 2) HTTP_HOST is unset.
+AGENT="${HTTP_USER_AGENT-unknown}"
+case "$AGENT" in
+ Lynx*|lynx*)
+ HH="${HTTP_HOST-nohh}"
+ ;;
+ *)
+ HH=nolynx
+ ;;
+esac
+
+SERVER="${SERVER_NAME-localhost}"
+case "$HH" in
+ nohh)
+ CG="lynxcgi:/home/httpd/cgi-bin/man"
+ ;;
+ *)
+ CG="http://$SERVER/cgi-bin/man"
+ ;;
+esac
+
+if [ -r $MANSH ]; then
+ sed s#%cg#$CG#g $MANSH
+else
+ $MAN2HTML -E "man2html: cannot open $MANSH"
+fi
+exit 0
diff --git a/man2html/scripts/cgi-bin/man/mansec b/man2html/scripts/cgi-bin/man/mansec
new file mode 100755
index 0000000..24c189e
--- /dev/null
+++ b/man2html/scripts/cgi-bin/man/mansec
@@ -0,0 +1,183 @@
+#!/usr/bin/awk -f
+#
+# Generate an index into a manual section by using find.
+# Michael Hamilton <michael at actrix.gen.nz>
+# Small changes - aeb, 980109
+#
+BEGIN {
+
+ OFS="";
+
+ if (ARGC != 3) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>manwhatis - bad call</title>";
+ print "</head>\n<body>";
+ print "manwhatis: wrong number of arguments";
+ print "</body>";
+ exit;
+ }
+ cgipath = ARGV[1];
+ section = ARGV[2];
+
+ if (section !~ /^[1-8ln]$/ && section != "all") {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>Manual - Illegal section</title>";
+ print "<body>";
+ print "Illegal section number '" section "'." ;
+ print "Must be one of 1,2,3,4,5,6,7,8,l,n or all";
+ print "</body>";
+ exit;
+ }
+
+ "echo $PPID" | getline pid;
+
+ if (cgipath ~ /lynxcgi/) {
+ cache_suffix = "l";
+ }
+ else {
+ cache_suffix = "h";
+ }
+
+ cache_dir = "/var/man2html";
+ cache_file = "manindex" cache_suffix "-" section ".html";
+ cache = cache_dir "/" cache_file;
+ cache_tmp = cache "_" pid;
+ buffer_tmp = cache "_items_" pid;
+
+ # Find out the man path
+ "man -w" | getline man_path
+ man_path = man_path ":";
+ gsub(":", " ", man_path);
+ # See if anything is out of date.
+ # Check all man[1-8] dir dates vs cache date
+ if (section == "all") {
+ if (system("test -f " cache) == 0) {
+ cmd = "find " man_path " -maxdepth 1 -name 'man[1-8]' -newer " cache;
+ cmd | getline need_update;
+ }
+ else {
+ need_update = 1;
+ }
+ }
+ else {
+ if (system("test -f " cache) == 0) {
+ cmd = "find " man_path " -maxdepth 1 -name man" section " -newer " cache;
+ cmd | getline need_update;
+ }
+ else {
+ need_update = 1;
+ }
+ }
+
+ if (need_update != "") {
+ if (system("test -w " cache_dir "/.") != 0) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>mansec - no cache</title>";
+ print "</head>\n<body>";
+ print "Sorry - cannot create index.";
+ print "No writable cache directory " cache_dir " exists.";
+ print "</body>";
+ exit;
+ }
+
+ sec_name[1] = "User Commands";
+ sec_name[2] = "System Calls";
+ sec_name[3] = "Library Functions";
+ sec_name[4] = "Special Files";
+ sec_name[5] = "File Formats";
+ sec_name[6] = "Games";
+ sec_name[7] = "Miscellany";
+ sec_name[8] = "Administration and Privileged Commands";
+ sec_name["all"] = "All available manual pages";
+ num_sections = 8;
+
+ # Print heading
+ print "Content-type: text/html\n\n" > cache_tmp;
+ print "<html>\n<head>" > cache_tmp;
+ print "<title>Manual Pages - Names: " section ". " sec_name[section] "</title>"> cache_tmp;
+ print "</head>\n<body>" > cache_tmp;
+ print "<h1>Manual Pages - Page Names</h1>" > cache_tmp;
+ print "<h2>Section " section ": " sec_name[section] "</h2>" > cache_tmp;
+
+ "hostname" | getline hostname;
+ "date" | getline date;
+ print hostname " (" date ")" > cache_tmp;
+
+ if (section != "all") {
+ sec_sub_dir = "/man" section;
+ }
+ else {
+ sec_sub_dir = "/man*";
+ }
+ gsub(" ", sec_sub_dir " ", man_path);
+
+ print "<p>Manual pages found under " man_path "." > cache_tmp;
+
+ # Find any man[1-8]/filenames
+ while ((("find " man_path " -follow -type f -printf '%f\n' | sort -f ") | getline manpage) > 0) {
+ # Check for new letter of alphabet
+ letter = tolower(substr(manpage,1,1));
+ if (letter != last_letter) {
+ last_letter = letter;
+ letter_index[++num_letters] = letter;
+ # Start a new alphabetic heading
+ print "<h2> <a name=\"", letter, "\">", toupper(letter), "</a></h2>" > buffer_tmp;
+ # Print out alphabetic quick index and other links
+ }
+ # Split page.n into "page" and "n" and generate an entry
+ sub(/[.]([zZ]|(gz))$/, "", manpage);
+ match(manpage, /[.][^.]+$/);
+ title = substr(manpage, 1, RSTART - 1);
+ if (section != "all") {
+ print "<a href=\"" cgipath "/man2html?", section, "+", title, "\">", title, "(", substr(manpage, RSTART + 1), ")</a>" > buffer_tmp;
+ }
+ else {
+ sec = substr(manpage, RSTART + 1)
+ print "<a href=\"" cgipath "/man2html?", sec, "+", title, "\">", title, "(", sec, ")</a>" > buffer_tmp;
+ }
+ }
+
+ close(buffer_tmp);
+
+ print "<p>" > cache_tmp;
+
+ # Print out alphabetic quick index and other links
+ for (i = 1; i <= num_letters; i++) {
+ print "<a href=\"#" letter_index[i] "\">" toupper(letter_index[i]) "</a>" > cache_tmp;
+ }
+
+ print "<p><hr>" > cache_tmp;
+ print "<a href=\"" cgipath "/man2html\">Return to Main Contents</a>" > cache_tmp;
+
+ print "<p>Other sections:" > cache_tmp;
+ for (i=1; i<=num_sections; i++) {
+ if (i != section) { # Dont print an entry for the section we are in
+ print "<a href=\"" cgipath "/mansec?" cgipath "+" i "\">" i ". " sec_name[i] "</a> " > cache_tmp;
+ }
+ }
+ print "<hr><p>" > cache_tmp;
+ # Print out the accumulated index entries
+ while ((getline < buffer_tmp) > 0) print > cache_tmp;
+ print "<hr><p>" > cache_tmp;
+ # Print out alphabetic quick index and other links
+ for (i = 1; i <= num_letters; i++) {
+ print "<a href=\"#" letter_index[i] "\">" toupper(letter_index[i]) "</a>" > cache_tmp;
+ }
+ print "<hr>" > cache_tmp;
+ print "<p><a href=\"" cgipath "/man2html\">Return to Main Contents</a>" > cache_tmp;
+ print "<p>Other sections:" > cache_tmp;
+ for (i=1; i<=num_sections; i++) {
+ if (i != section) { # Dont print an entry for the section we are in
+ print "<a href=\"" cgipath "/mansec?" cgipath "+" i "\">" i ". " sec_name[i] "</a> " > cache_tmp;
+ }
+ }
+ print "</body>\n</html>" > cache_tmp;
+ system("/bin/mv " cache_tmp " " cache);
+ system("/bin/rm -f " buffer_tmp);
+ }
+ system("/bin/cat " cache);
+ exit;
+}
diff --git a/man2html/scripts/cgi-bin/man/manwhatis b/man2html/scripts/cgi-bin/man/manwhatis
new file mode 100755
index 0000000..d14a516
--- /dev/null
+++ b/man2html/scripts/cgi-bin/man/manwhatis
@@ -0,0 +1,208 @@
+#!/usr/bin/awk -f
+#
+# Generate a whatis index into the manual pages by using find to
+# locate all the whatis files.
+# Michael Hamilton <michael at actrix.gen.nz>
+# Small changes - aeb, 980109
+#
+BEGIN {
+
+ OFS="";
+
+ if (ARGC != 3) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>manwhatis - bad call</title>";
+ print "</head>\n<body>";
+ print "manwhatis: wrong number of arguments";
+ print "</body>";
+ exit;
+ }
+ cgipath = ARGV[1];
+ section = ARGV[2];
+
+ if (section !~ /^[1-8ln]$/) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>Manual - Illegal section</title>";
+ print "</head>\n<body>";
+ print "Illegal section number '" section "'." ;
+ print "Must be one of 1,2,3,4,5,6,7,8,l,n";
+ print "</body>";
+ exit;
+ }
+
+ if (cgipath ~ /lynxcgi/) {
+ cache_suffix = "l";
+ }
+ else {
+ cache_suffix = "h";
+ }
+
+ cache_dir = "/var/man2html";
+ cache_file = "whatis" cache_suffix "-" section ".html";
+ cache = cache_dir "/" cache_file;
+
+
+ # Find out the man path
+ "man -w" | getline man_path
+ gsub(":", " ", man_path);
+ # See if anything is out of date.
+ if (system("test -f " cache) == 0) {
+ cmd = "find " man_path " -maxdepth 1 -name whatis -newer " cache;
+ cmd | getline need_update;
+ }
+ else {
+ need_update = 1;
+ }
+
+ if (need_update != "") {
+
+ if (system("test -w " cache_dir "/.") != 0) {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>manwhatis - no cache</title>";
+ print "</head>\n<body>";
+ print "Sorry - cannot create index.";
+ print "No writable cache directory " cache_dir " exists.";
+ print "</body>";
+ exit;
+ }
+
+ "echo $PPID" | getline pid;
+
+ cache_tmp = cache "_" pid;
+ sort_tmp = cache_dir "/manwhatis_tmp_" pid ;
+ buffer_tmp = cache_dir "/manwhatis_tmp2_" pid;
+
+ sec_name[1] = "User Commands";
+ sec_name[2] = "System Calls";
+ sec_name[3] = "Library Functions";
+ sec_name[4] = "Special Files";
+ sec_name[5] = "File Formats";
+ sec_name[6] = "Games";
+ sec_name[7] = "Miscellany";
+ sec_name[8] = "Administration and Privileged Commands";
+ num_sections = 8;
+ # Print heading
+ print "Content-type: text/html\n\n" > cache_tmp;
+ print "<html>\n<head>" > cache_tmp;
+ print "<title>Manual Pages - Names and Descriptions: " section ". " sec_name[section] "</title>" > cache_tmp;
+
+ print "</head>\n<body>" > cache_tmp;
+ print "<h1>Manual Pages - Names and Descriptions</h1>" > cache_tmp;
+ print "<h1>Section " section ": " sec_name[section] "</h1>" > cache_tmp;
+ "hostname" | getline hostname;
+ "date" | getline date;
+ print hostname " (" date ")" > cache_tmp;
+ # Find out the man path
+ "man -w" | getline;
+ $1 = $1 ":";
+ gsub(":", " ", $1);
+
+ find_cmd = "find " man_path " -maxdepth 1 -name whatis -printf '%p '";
+ find_cmd | getline whatis_files;
+ close(find_cmd);
+
+ if (whatis_files == "") {
+ print "Content-type: text/html\n\n";
+ print "<head>";
+ print "<title>Manwhatis - Error updating index</title>";
+ print "</head>\n<body>";
+ print "Unable to find whatis files - Sorry."
+ print "</body>";
+ exit;
+ }
+ # Try to parse valid entries - those that contain ([0-9])
+ # Note that egrep is sometimes in /bin, sometimes in /usr/bin
+ extract_cmd = "egrep -h '\\(" section "[A-Za-z]*\\)' " whatis_files ;
+
+ print "<br>Manual pages referenced in " whatis_files "<p>" > cache_tmp;
+
+ # Note that sort sometimes lives in /bin and sometimes in /usr/bin
+ sort_cmd = "sort -f >> " sort_tmp;
+
+ while ( (extract_cmd | getline) > 0 ) {
+ if (bracket_pos = index($0, "(")) {
+ sec_full_num = substr($0, bracket_pos + 1, index($0, ")") - bracket_pos - 1);
+ names = substr($0, 1, bracket_pos - 2);
+ # Get rid of blanks and commas.
+ n = split(names, name_list, " *, *");
+ description = substr($0, bracket_pos + length(sec_full_num) + 2);
+ # Get rid of AT&T
+ gsub("&", "\&", description);
+ # Generate a entry for each name
+ for (i = 1; i <= n; i++) {
+ print name_list[i] " " sec_full_num " " name_list[1] " / " description | sort_cmd;
+ }
+ }
+ }
+ close(extract_cmd);
+ close(sort_cmd);
+
+ while ((getline < sort_tmp) > 0) {
+
+ letter = tolower(substr($1,1,1));
+ if (letter != last_letter) {
+ if (last_letter) {
+ print "</dl><p>" > buffer_tmp;
+ }
+ last_letter = letter;
+ letter_index[++num_letters] = letter;
+ # Terminate list, start a new one
+
+ print "<h2> <a name=\"", letter, "\">", toupper(letter), "</a></h2>\n<dl>" > buffer_tmp ;
+ }
+ # Generate a <dt> for the name
+ if ($3 != last_file || $1 != last_name) { # Don't repeat the same entry link.
+ print "<dt><a href=\"" cgipath "/man2html?", $2, "+", $3, "\">", $1, "(", $2, ")", "</a>" > buffer_tmp;
+ last_file = $3;
+ last_name = $1;
+ }
+ print "<dd>", substr($0, match($0, "/") + 1) > buffer_tmp;
+ }
+ # Finish off last list
+
+ print "\n</dl><p>" > buffer_tmp;
+ close(buffer_tmp);
+
+ system("/bin/rm " sort_tmp);
+
+ # Print out alphabetic quick index and other links
+ for (i = 1; i <= num_letters; i++) {
+ print "<a href=\"#" letter_index[i] "\">" toupper(letter_index[i]) "</a>" > cache_tmp;
+ }
+ print "<hr>" > cache_tmp;
+ print "<a href=\"" cgipath "/man2html\">Return to Main Contents</a>" > cache_tmp;
+
+ print "<p>Other sections:" > cache_tmp;
+ for (i=1; i<=num_sections; i++) {
+ if (i != section) { # Dont print an entry for the section we are in
+ print "<a href=\"" cgipath "/manwhatis?" cgipath "+" i "\">" i ". " sec_name[i] "</a> " > cache_tmp;
+ }
+ }
+ print "<hr><p>" > cache_tmp;
+ # Print out the accumulated contents entries
+ while ((getline < buffer_tmp) > 0) print > cache_tmp;
+ print "<hr><p>" > cache_tmp;
+
+ for (i = 1; i <= num_letters; i++) {
+ print "<a href=\"#" letter_index[i] "\">" toupper(letter_index[i]) "</a>" > cache_tmp;
+ }
+ print "<hr>" > cache_tmp;
+ print "<p><a href=\"" cgipath "/man2html\">Return to Main Contents</a>" > cache_tmp;
+
+ print "<p>Other sections:" > cache_tmp;
+ for (i=1; i<=num_sections; i++) {
+ if (i != section) { # Dont print an entry for the section we are in
+ print "<a href=\"" cgipath "/manwhatis?" cgipath "+" i "\">" i ". " sec_name[i] "</a> " > cache_tmp;
+ }
+ }
+ print "</body>" > cache_tmp;
+ print "</html>" > cache_tmp;
+ system("/bin/mv " cache_tmp " " cache);
+ system("/bin/rm " buffer_tmp);
+ }
+ system("/bin/cat " cache);
+ exit;
+}
diff --git a/man2html/strdefs.c b/man2html/strdefs.c
new file mode 100644
index 0000000..8515b82
--- /dev/null
+++ b/man2html/strdefs.c
@@ -0,0 +1,176 @@
+#include "defs.h"
+
+#ifndef NULL
+#define NULL ((void *) 0)
+#endif
+
+int nroff = 1;
+
+#define NROFF (-666)
+#define TROFF (-667)
+
+STRDEF *chardef, *strdef, *defdef;
+INTDEF *intdef;
+
+static INTDEF standardint[] = {
+ { V('n',' '), NROFF, 0, NULL },
+ { V('t',' '), TROFF, 0, NULL },
+ { V('o',' '), 1, 0, NULL },
+ { V('e',' '), 0, 0, NULL },
+ { V('.','l'), 70, 0, NULL },
+ { V('.','$'), 0, 0, NULL },
+ { V('.','A'), NROFF, 0, NULL },
+ { V('.','T'), TROFF, 0, NULL },
+ { V('.','V'), 1, 0, NULL }, /* the me package tests for this */
+ { 0, 0, 0, NULL } };
+
+static STRDEF standardstring[] = {
+ { V('R',' '), 1, "®", NULL },
+ { V('l','q'), 2, "``", NULL },
+ { V('r','q'), 2, "''", NULL },
+ { 0, 0, NULL, NULL}
+};
+
+
+static STRDEF standardchar[] = {
+ { V('*','*'), 1, "*", NULL }, /* math star */
+ { V('*','A'), 1, "A", NULL },
+ { V('*','B'), 1, "B", NULL },
+ { V('*','C'), 2, "Xi", NULL },
+ { V('*','D'), 5, "Delta", NULL },
+ { V('*','E'), 1, "E", NULL },
+ { V('*','F'), 3, "Phi", NULL },
+ { V('*','G'), 5, "Gamma", NULL },
+ { V('*','H'), 5, "Theta", NULL },
+ { V('*','I'), 1, "I", NULL },
+ { V('*','K'), 1, "K", NULL },
+ { V('*','L'), 6, "Lambda", NULL },
+ { V('*','M'), 1, "M", NULL },
+ { V('*','N'), 1, "N", NULL },
+ { V('*','O'), 1, "O", NULL },
+ { V('*','P'), 2, "Pi", NULL },
+ { V('*','Q'), 3, "Psi", NULL },
+ { V('*','R'), 1, "P", NULL },
+ { V('*','S'), 5, "Sigma", NULL },
+ { V('*','T'), 1, "T", NULL },
+ { V('*','U'), 1, "Y", NULL },
+ { V('*','W'), 5, "Omega", NULL },
+ { V('*','X'), 1, "X", NULL },
+ { V('*','Y'), 1, "H", NULL },
+ { V('*','Z'), 1, "Z", NULL },
+ { V('*','a'), 5, "alpha", NULL },
+ { V('*','b'), 4, "beta", NULL },
+ { V('*','c'), 2, "xi", NULL },
+ { V('*','d'), 5, "delta", NULL },
+ { V('*','e'), 7, "epsilon", NULL },
+ { V('*','f'), 3, "phi", NULL },
+ { V('*','g'), 5, "gamma", NULL },
+ { V('*','h'), 5, "theta", NULL },
+ { V('*','i'), 4, "iota", NULL },
+ { V('*','k'), 5, "kappa", NULL },
+ { V('*','l'), 6, "lambda", NULL },
+ { V('*','m'), 1, "µ", NULL },
+ { V('*','n'), 2, "nu", NULL },
+ { V('*','o'), 1, "o", NULL },
+ { V('*','p'), 2, "pi", NULL },
+ { V('*','q'), 3, "psi", NULL },
+ { V('*','r'), 3, "rho", NULL },
+ { V('*','s'), 5, "sigma", NULL },
+ { V('*','t'), 3, "tau", NULL },
+ { V('*','u'), 7, "upsilon", NULL },
+ { V('*','w'), 5, "omega", NULL },
+ { V('*','x'), 3, "chi", NULL },
+ { V('*','y'), 3, "eta", NULL },
+ { V('*','z'), 4, "zeta", NULL },
+ { V('+','-'), 1, "±", NULL },
+ { V('1','2'), 1, "½", NULL },
+ { V('1','4'), 1, "¼", NULL },
+ { V('3','4'), 1, "¾", NULL },
+ { V('F','i'), 3, "ffi", NULL },
+ { V('F','l'), 3, "ffl", NULL },
+ { V('a','a'), 1, "´", NULL },
+ { V('a','p'), 1, "~", NULL },
+ { V('b','r'), 1, "|", NULL },
+ { V('b','u'), 1, "*", NULL }, /* bullet */
+ { V('b','v'), 1, "|", NULL },
+ { V('c','i'), 1, "o", NULL }, /* circle */
+ { V('c','o'), 1, "©", NULL },
+ { V('c','t'), 1, "¢", NULL },
+ { V('d','e'), 1, "°", NULL },
+ { V('d','g'), 1, "+", NULL }, /* dagger */
+ { V('d','i'), 1, "÷", NULL },
+ { V('e','m'), 3, "---", NULL }, /* em dash */
+ { V('e','n'), 1, "-", NULL }, /* en dash */
+ { V('e','q'), 1, "=", NULL },
+ { V('e','s'), 1, "Ø", NULL },
+ { V('f','f'), 2, "ff", NULL },
+ { V('f','i'), 2, "fi", NULL },
+ { V('f','l'), 2, "fl", NULL },
+ { V('f','m'), 1, "´", NULL },
+ { V('g','a'), 1, "`", NULL },
+ { V('h','y'), 1, "-", NULL },
+ { V('l','c'), 2, "|¯", NULL },
+ { V('i','f'), 8, "Infinity", NULL }, /* infinity sign */
+ { V('i','s'), 8, "Integral", NULL }, /* integral sign */
+ { V('l','f'), 2, "|_", NULL },
+ { V('l','k'), 1, "<FONT SIZE=\"+2\">{</FONT>", NULL },
+ { V('m','i'), 1, "-", NULL },
+ { V('m','u'), 1, "×", NULL },
+ { V('n','o'), 1, "¬", NULL },
+ { V('o','r'), 1, "|", NULL },
+ { V('p','d'), 1, "d", NULL }, /* partial derivative */
+ { V('p','l'), 1, "+", NULL },
+ { V('r','c'), 2, "¯|", NULL },
+ { V('r','f'), 2, "_|", NULL },
+ { V('r','g'), 1, "®", NULL },
+ { V('r','k'), 1, "<FONT SIZE=\"+2\">}</FONT>", NULL },
+ { V('r','n'), 1, "¯", NULL },
+ { V('r','u'), 1, "_", NULL },
+ { V('s','c'), 1, "§", NULL },
+ { V('s','l'), 1, "/", NULL },
+ { V('s','q'), 2, "[]", NULL },
+ { V('t','s'), 1, "s", NULL }, /* should be terminal sigma */
+ { V('u','l'), 1, "_", NULL },
+ { V('>','='), 1, ">", NULL },
+ { V('<','='), 1, "<", NULL },
+ { 0, 0, NULL, NULL }
+};
+
+void stdinit(void) {
+ STRDEF *stdf;
+ int i;
+
+ stdf = &standardchar[0];
+ i = 0;
+ while (stdf->nr) {
+ if (stdf->st) stdf->st = xstrdup(stdf->st);
+ stdf->next = &standardchar[i];
+ stdf = stdf->next;
+ i++;
+ }
+ chardef=&standardchar[0];
+
+ stdf=&standardstring[0];
+ i=0;
+ while (stdf->nr) {
+ /* waste a little memory, and make a copy, to avoid
+ the segfault when we free non-malloced memory */
+ if (stdf->st) stdf->st = xstrdup(stdf->st);
+ stdf->next = &standardstring[i];
+ stdf = stdf->next;
+ i++;
+ }
+ strdef=&standardstring[0];
+
+ intdef=&standardint[0];
+ i=0;
+ while (intdef->nr) {
+ if (intdef->nr == NROFF) intdef->nr = nroff; else
+ if (intdef->nr == TROFF) intdef->nr = !nroff;
+ intdef->next = &standardint[i];
+ intdef = intdef->next;
+ i++;
+ }
+ intdef = &standardint[0];
+ defdef = NULL;
+}
diff --git a/misc/README b/misc/README
new file mode 100644
index 0000000..5d20cf1
--- /dev/null
+++ b/misc/README
@@ -0,0 +1,4 @@
+Here a contributed program to preformat man pages. Untested.
+Comments, suggestions and patches are welcome.
+
+flc, <flucifredi at acm.org>.
diff --git a/misc/locales/it/manlint.1 b/misc/locales/it/manlint.1
new file mode 100644
index 0000000..11aac7e
--- /dev/null
+++ b/misc/locales/it/manlint.1
@@ -0,0 +1,66 @@
+'\"
+.\" (C) Copyright 1999 David A. Wheeler (dwheeler at ida.org)
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\"
+.\" Modified Wed Jul 14 23:00:00 1999 by David A. Wheeler (dwheeler at ida.org)
+.\"
+.\" Traduzione da man-1.6d di Giulio Daprel� <giulio at pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni at gmail.com>
+.\" giugno 2006
+.\"
+.TH MANLINT 1 "14 luglio 1999" "Linux" "Linux Programmer's Manual"
+.SH NOME
+manlint \- programma per identificare errori di formattazione in pagine man o mdoc
+.SH SINTASSI
+.BR manlint " [ " options " ] [ " "list of files" " ] "
+.SH DESCRIZIONE
+manlint
+� un programma che identifica lint (errori) nella formattazione di pagine
+man o mdoc page, in modo simile a quello di un controllo ortografico per un testo
+ordinario. Manlint ha un elenco di macro e sequenze di escape ammesse,
+e segnala l'uso di qualunque macro o sequenza di escape che non sia
+nell'elenco di riferimento.
+Questo elenco di riferimento include tutte le macro definite in
+.BR man (7),
+.BR mdoc (7),
+e un sottoinsieme sicuro di troff definito in
+.BR man (7).
+manlint inoltre verifica la conformit� alle varie regole.
+.PP
+Se una man page supera la verifica di manlint, dovrebbe risultare
+ampiamente portabile, anche con strumenti come
+.BR man2html (1)
+che non implementano completamente troff.
+.PP
+Se non viene indicato un elenco di file, viene letto lo standard input.
+Un file con il nome "-" viene interpretato come standard input.
+.SH BUG
+Attualmente il programma � alquanto incompleto.
+Non ha nessuna opzione, non verifica le sequenze di escape,
+e non � in grado di gestire il formato mdoc.
+Inoltre, � chiaro cosa deve fare, e anche nella sua forma attuale
+pu� trovare tantissimi problemi nei file man esistenti.
+.SH AUTORE
+David A. Wheeler (dwheeler at ida.org)
+.SH "VEDERE ANCHE"
+.BR man (7),
+.BR mdoc (7).
diff --git a/misc/man-preformat.c b/misc/man-preformat.c
new file mode 100644
index 0000000..79f4d45
--- /dev/null
+++ b/misc/man-preformat.c
@@ -0,0 +1,332 @@
+From bryanh at giraffe.giraffe.netgate.net Sat Nov 16 09:32:59 1996
+Received: from giraffe.giraffe.netgate.net by hera.cwi.nl with SMTP
+ id <AA24735 at cwi.nl>; Sat, 16 Nov 1996 09:32:53 +0100
+Received: (from bryanh at localhost) by giraffe.giraffe.netgate.net (8.6.11/8.6.9) id AAA00639; Sat, 16 Nov 1996 00:32:46 -0800
+Date: Sat, 16 Nov 1996 00:32:46 -0800
+Message-Id: <199611160832.AAA00639 at giraffe.giraffe.netgate.net>
+From: bryanh at giraffe.netgate.net (Bryan Henderson)
+To: Andries.Brouwer at cwi.nl
+In-Reply-To: <9611151043.AA01606=aeb at zeus.cwi.nl> (Andries.Brouwer at cwi.nl)
+Subject: Re: cross references for Linux man page package
+Status: RO
+
+>I hope a shell script or perl script?
+
+Well, no. Shell scripts are too hard and I don't know perl. So it's in
+tortured C. It also needs the shhopt package (from sunsite), which
+effortlessly parses a command line, but not many people know about it.
+So maybe this isn't up to distributions standards.
+
+
+Here it is anyway. You invoke it just like this:
+
+ preformat ls.1
+
+Or for a whole directory,
+
+ preformat *
+
+Or if you keep preformatted man pages elsewhere than /usr/man/preformat/catN,
+
+ preformat --mandir=/usr/local/doc/package_xyz/man *
+
+It makes the target directories where necessary and groffs and gzips the
+man pages into them. If it finds a man page that looks like ".so whatever",
+it just does a symbolic link to the base file instead.
+
+--------------------------------------------------------------------------
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <shhopt.h>
+
+#define TRUE 1
+#define FALSE 0
+
+
+
+void
+compute_mkdir_command(const char *installed_path,
+ char *mkdir_cmd, const int mkdir_cmd_l) {
+/*----------------------------------------------------------------------------
+ Figure out what, if any, mkdir command we need to create the directories
+ in which to put the file whose full pathname is <installed_path>.
+----------------------------------------------------------------------------*/
+ char *slash_p; /* pointer to last slash in installed_path. */
+ char need_dir[strlen(installed_path)+1];
+ /* pathname of directory which must exist so we can install the man
+ page into it. If we're just defaulting to the current directory,
+ then this is a null string.
+ */
+
+ slash_p = strrchr(installed_path, '/');
+ if (slash_p == NULL) need_dir[0] = '\0';
+ else {
+ int need_dir_l; /* length for need_dir */
+ need_dir_l = slash_p - installed_path + 1; /* includes slash */
+ strncpy(need_dir, installed_path, need_dir_l);
+ need_dir[need_dir_l] = '\0'; /* need that string terminator */
+ }
+
+ if (need_dir[0] == '\0')
+ mkdir_cmd[0] = '\0';
+ else {
+ struct stat stat_buf; /* results of a stat system call */
+ int rc; /* return code from stat() */
+
+ rc = stat(need_dir, &stat_buf);
+ if (rc == 0)
+ mkdir_cmd[0] = '\0';
+ else
+ sprintf(mkdir_cmd, "umask 002;mkdir --parents %s; ", need_dir);
+ }
+}
+
+
+
+void
+extract_dot_so_stmt(const char *man_page_source_path,
+ char *dot_so_stmt, const int dot_so_stmt_l) {
+
+ FILE *source_file;
+
+ source_file = fopen(man_page_source_path, "r");
+ if (source_file != NULL) {
+ char buffer[200]; /* First line of file */
+
+ fgets(buffer, sizeof(buffer), source_file);
+ fclose(source_file);
+
+ if (strncmp(buffer, ".so ", 4) == 0)
+ snprintf(dot_so_stmt, dot_so_stmt_l, "%s", buffer);
+ else dot_so_stmt[0] = '\0';
+ } else dot_so_stmt[0] = '\0';
+}
+
+
+
+void
+format_page(const char *installed_path, const char *man_page_source_path,
+ const char *mkdir_cmd, int *rc_p) {
+/*----------------------------------------------------------------------------
+ Format and compress the groff source in file <man_page_source_path>
+ and put the output in <installed_path>. Execute the possible mkdir
+ command <mkdir_cmd> too.
+-----------------------------------------------------------------------------*/
+ char shell_command[100+strlen(installed_path)
+ + strlen(man_page_source_path)
+ + strlen(mkdir_cmd)];
+ /* A pipeline we have the shell execute */
+ int rc; /* local return code */
+
+ snprintf(shell_command, sizeof(shell_command),
+ "%sgroff -Tlatin1 -mandoc %s | gzip >%s",
+ mkdir_cmd, man_page_source_path, installed_path);
+
+ printf("%s\n", shell_command);
+ rc = system(shell_command);
+ if (rc != 0) {
+ fprintf(stderr, "groff pipeline failed, rc = %d\n", rc);
+ *rc_p = 10;
+ } else {
+ *rc_p = 0;
+ chmod(installed_path,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+ );
+ }
+}
+
+
+
+void
+create_symlink(const char *installed_path, const char *dot_so_stmt,
+ const char *mkdir_cmd, int *rc_p) {
+/*----------------------------------------------------------------------------
+ Create a symlink from <installed_path> to the installed name of the man
+ page identified by <dot_so_stmt>.
+
+ We make some large assumptions about the .so statement, so this may return
+ gibberish.
+
+ Execute the possible mkdir command <mkdir_cmd> too.
+-----------------------------------------------------------------------------*/
+ char shell_command[100+strlen(mkdir_cmd) +
+ strlen(installed_path) +
+ strlen(dot_so_stmt)];
+ /* A pipeline we have the shell execute */
+ int rc; /* local return code */
+ char *slash_p; /* pointer to last slash in .so statement, or NULL */
+
+ slash_p = strrchr(dot_so_stmt, '/');
+ if (slash_p == NULL) {
+ fprintf(stderr, "Cannot find the base filename "
+ "in the .so statement '%s'. There is no slash ('/').\n",
+ dot_so_stmt);
+ *rc_p = 15;
+ } else if (*(slash_p+1) == '\0') {
+ fprintf(stderr, "Cannot find the base filename "
+ "in the .so statement '%s'. There is nothing after the "
+ "last slash ('/').",
+ dot_so_stmt);
+ *rc_p = 13;
+ } else {
+ char link_contents[200];
+
+ strncpy(link_contents, slash_p+1, sizeof(link_contents)-10);
+ if (link_contents[strlen(link_contents)-1] == '\n')
+ link_contents[strlen(link_contents)-1] = '\0';
+ strcat(link_contents, ".gz");
+
+ sprintf(shell_command, "%sln --symbolic %s %s",
+ mkdir_cmd, link_contents, installed_path);
+
+ printf("%s\n", shell_command);
+ rc = system(shell_command);
+ if (rc != 0) {
+ fprintf(stderr, "ln pipeline failed, rc = %d\n", rc);
+ *rc_p = 10;
+ } else *rc_p = 0;
+ }
+}
+
+
+
+void
+install_it(char *installed_path, char *man_page_source_path, int *rc_p){
+/*----------------------------------------------------------------------------
+ Take the man page groff source in file <man_page_source_path>, format
+ it, compress it, and place it in file <installed_path>.
+
+ Special case: If the file appears to be just a groff .so statement,
+ don't format it; instead, create a symbolic link that will do the same
+ thing as formatting the .so. A .so statement looks like:
+
+ .so man3/basepage.3
+
+ and means to include all the groff source from the file man3/basepage.3.
+ So we just create a symbolic link to cat3/basepage.3.gz and save some
+ redundancy.
+
+
+ Make any directories necessary to create file <installed_path>.
+
+-----------------------------------------------------------------------------*/
+ char mkdir_cmd[30 + strlen(installed_path)];
+ /* A mkdir shell command to create the necessary directories. Null
+ string if no directory needs creating.
+ */
+ char dot_so_stmt[200];
+ /* The .so statement from the man page source, if the man page appears
+ to be one that consists solely of a .so statement. If it doesn't
+ appear so, this is an empty string.
+ */
+
+ /* We have to remove the file first, because it may be a symbolic link
+ for the purposes of having the same man page come up for multiple
+ commands. If we just overwrite, we will be replacing the base file,
+ which we don't want to do.
+ */
+ unlink(installed_path);
+
+ compute_mkdir_command(installed_path, mkdir_cmd, sizeof(mkdir_cmd));
+
+ extract_dot_so_stmt(man_page_source_path, dot_so_stmt, sizeof(dot_so_stmt));
+
+ if (*dot_so_stmt != '\0')
+ create_symlink(installed_path, dot_so_stmt, mkdir_cmd, rc_p);
+ else
+ format_page(installed_path, man_page_source_path, mkdir_cmd, rc_p);
+}
+
+
+
+char *
+just_filename(const char *full_path) {
+/*----------------------------------------------------------------------------
+ Return pointer into <full_path> of start of filename part.
+ Return NULL if pathname ends with a slash (i.e. it's a directory).
+-----------------------------------------------------------------------------*/
+ char *slash_p; /* Pointer to last slash in <full_path> */
+ char *filename; /* Our eventual result */
+
+ slash_p = strrchr(full_path, '/');
+ if (slash_p == NULL) filename = (char *) full_path;
+ else if (*(slash_p+1) == '\0') {
+ filename = NULL;
+ } else filename = slash_p+1;
+ return(filename);
+}
+
+
+
+int main(int argc, char *argv[]) {
+ char *mandir;
+ /* The directory in which the formatted man pages are to go. This is
+ the parent directory of the cat1, cat2, etc. directories.
+ */
+ char default_mandir[] = "/usr/man/preformat";
+ /* default value for mandir, if user doesn't give --mandir option */
+ int error; /* boolean: we've encountered an error */
+ int i; /* local for loop index */
+
+ const optStruct option_def[] = {
+ { 0, (char *) "mandir", OPT_STRING, &mandir, 0},
+ { 0, 0, OPT_END, 0, 0}
+ };
+ int argc_parse; /* argc, except we modify it as we parse */
+ char **argv_parse; /* argv, except we modify it as we parse */
+
+ mandir = default_mandir; /* initial assumption - default */
+ argc_parse = argc; argv_parse = argv;
+ optParseOptions(&argc_parse, argv_parse, option_def, 0);
+ /* uses and sets argc_parse, argv_parse. */
+ /* sets mandir (via option_def) */
+
+ error = FALSE; /* no error yet */
+
+ for (i=1;i <= argc_parse-1 && !error; i++) {
+ /* Do one of the man pages specified in the program arguments */
+ char *man_page_source_path;
+ /* string: pathname of man page source file we're supposed to install
+ */
+ char *man_page_source_fn; /* pointer within pathname to filename */
+ char *dot_p; /* pointer within filename to last dot */
+
+ char man_section; /* man section number to which this page belongs */
+ char installed_path[100]; /* full pathname for installed man page file */
+
+ man_page_source_path = argv_parse[i];
+
+ man_page_source_fn = just_filename(man_page_source_path);
+ if (man_page_source_fn == NULL)
+ fprintf(stderr, "Need filename at the end of pathname: %s\n",
+ man_page_source_path);
+ else {
+ dot_p = strrchr(man_page_source_fn, '.');
+ if (dot_p == NULL) {
+ fprintf(stderr, "Invalid source file -- contains no period: %s\n",
+ man_page_source_fn);
+ } else if (*(dot_p+1) == '\0') {
+ fprintf(stderr, "Invalid source file -- need at least one character "
+ "after the last period: %s\n", man_page_source_fn);
+ } else {
+ int rc; /* local return code */
+ /* Filename has a dot with at least one character after it.
+ Manual section number is the character right after that dot.
+ */
+ man_section = *(dot_p+1);
+
+ sprintf(installed_path, "%s/cat%c/%s.gz",
+ mandir, man_section, man_page_source_fn);
+
+ install_it(installed_path, man_page_source_path, &rc);
+ if (rc != 0) error = TRUE;
+ }
+ }
+ }
+ return(error);
+}
+
diff --git a/misc/manlint b/misc/manlint
new file mode 100644
index 0000000..c919a94
--- /dev/null
+++ b/misc/manlint
@@ -0,0 +1,225 @@
+#!/usr/bin/perl -w
+
+# manlint - report "errors" in man page(s).
+
+# USAGE:
+# manlint [list of files to check]
+#
+# EXAMPLE:
+# manlint /usr/man/man*/*.* | less
+
+# An error is anything not known to be a safe construct in a man page;
+# see man(7) for more information.
+# Currently it's excessively paranoid, but that's the point -- this
+# program assumes there's a problem, and if it isn't we can add that to the
+# ruleset so that what's safe is explicitly spelled out.
+# Currently this program only examines tmac.an based pages, the normal
+# kind encountered in Linux. This is different than the BSD manddoc format,
+# which is used by a number of man pages.
+
+# (C) 1999 David A. Wheeler (dwheeler at ida.org)
+
+# This program is free software; 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.
+#
+# This program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+require 5.002; # Requires Perl 5.002 because functions are prototyped.
+
+# First, set up configuration.
+
+$debug = 0;
+$errs = $totalerrs = 0;
+$goodfiles = $badfiles = $skipfiles = 0;
+$filename = '';
+
+# Allow options for small or large safe set; just printing if a file fails
+# instead of detail; auto-skip BSD files.
+
+# This is a list of "safe" macros, with their value being the
+# maximum number of allowed parameters (-1 = any, 0=no parameters allowed)
+%safemacros = (
+ 'TH' => 5,
+ # Font Control:
+ 'B' => -1, 'BI' => -1, 'BR' => -1,
+ 'I' => -1, 'IB' => -1, 'IR' => -1,
+ 'RB' => -1, 'RI' => -1, 'SB' => -1, 'SM' => -1,
+ # tmac.an other macros:
+ 'SH' => 1,
+ 'LP' => 0, 'P' => 0,
+ 'PP' => 0,
+ 'RS' => 1, 'RE' => 0,
+ 'HP' => 1, 'IP' => 2, 'TP' => 1,
+ 'DT' => 0, 'PD' => 1, 'SS' => 1,
+ # We'll allow IX (indexing).
+ 'IX' => -1,
+ # I'm adding the UR, UN, and UE macros that will permit embedded URIs.
+ 'UR' => 1,
+ 'UN' => 1,
+ 'UE' => 0,
+ # allowed troff macros
+ '\\"' => -1, # troff comments
+ 'ps' => 1, # Point size
+ 'ft' => 1, # Font commands (not recommended, may be ignored in some cases)
+ 'hy' => 1, # Hyphenation (probably ignored in translation)
+ 'bp' => 0, # Force page break; optional parameter forbidden.
+ 'ne' => 1, # Need lines (likely to be ignored in translation)
+ 'br' => 0,
+ 'nf' => 0, # No-fill; insert breaks at end of each line.
+ 'fi' => 0,
+ 'ig' => 1,
+ '.' => 0, # standard end-of-ignore/end-of-definition.
+ 'ce' => 1, # Center next N lines
+ 'ad' => 1,
+ 'na' => 0,
+ # Will probably need to handle some if.
+ 'if' => -1, # LIMITED VERSION.
+ 'ie' => -1, # LIMITED VERSION.
+ 'el' => -1,
+ 'so' => 1, # Handle 'so' for shared man pages
+ 'sp' => 1, # Vertical Space - only permit positive values.
+ 'de' => 1, # Handling 'macro define' is a pain, but many pages require it.
+ 'ds' => -1, # Allow string defines.
+ 'in' => 1, # Require that every indent be paired with a negative indent.
+ 'ti' => 1, # Temporary indent may be ignored
+ 'hy' => 1, # Hypenation almost certainly ignored by anyone else.
+ 'nh' => 1, # Again, hyphenation likely ignored.
+ 'tr' => 1, # Translations limited, see below.
+);
+
+# Allowed parameters for the ft (font) troff command.
+%allowed_ft_parameter = (
+ '1' => 1,
+ '2' => 1,
+ '3' => 1,
+ '4' => 1,
+ 'R' => 1,
+ 'I' => 1,
+ 'B' => 1,
+ 'P' => 1,
+ 'CW' => 1,
+ '' => 1,
+);
+
+%allowed_tr = (
+ '\\(ts"' => 1,
+ '\\(is\'' => 1,
+ '\\(if`' => 1,
+ '\\(pd"' => 1,
+ '\\(*W-|\(bv\*(Tr' => 1,
+ '\\*(Tr' => 1,
+);
+
+sub problem($) {
+ # Report a problem, if you should.
+ my $message = shift;
+ print "${ARGV}: $message\n";
+ $errs++;
+}
+
+sub clean_state {
+ %defined_macros = ();
+ $is_skipped = 0;
+}
+
+sub process_line {
+ # Process line already read in $_ (default input line).
+ my $macro;
+ my $parameters;
+ if (m/^[.']\s*([^\s]+)\s*(.*)?/) {
+ $macro=$1;
+ $parameters=$2;
+ $macro =~ s/\s//g;
+ print "Found macro: #${macro}#\n" if $debug;
+ if ($macro =~ m/Dd/) { # Is this the BSD macro set and not a tmac.an set?
+ problem("Uses BSD mandoc conventions instead of tmac.an");
+ $errs--; # Patch up error count.
+ # print "${ARGV}: Uses BSD mandoc conventions instead of tmac.an.\n";
+ close(ARGV); # Skip the rest of this file.
+ $is_skipped = 1;
+ return;
+ }
+ if ($macro =~ m/\\"/) {return;} # Skip troff comments.
+ if (exists($defined_macros{$macro})) {
+ return; # ??? Should examine the macro parameters.
+ }
+ if (exists($safemacros{$macro}) ) {
+ # ??? Check parameter count.
+ # ??? Check that .TH is the first macro (note: bash.1, etc., break this)
+ if ( ($macro eq 'if') || ($macro eq 'ie' )) {
+ # Only permit checking 't' or 'n' for now.
+ if ($parameters =~ m/^[tn]\s/) {
+ $_ = $parameters;
+ s/^[tn]\s+//;
+ process_line(); # Re-examine line without the if statement.
+ } else {
+ problem("unsafe use of if/ie");
+ }
+ # ??? sp: only no-parameter or positive values.
+ } elsif ($macro eq 'de') {
+ $parameters =~ m/^([^\s]+)/;
+ $is_defining = $1;
+ $defined_macros{$is_defining} = 1;
+ } elsif ($macro eq 'so') {
+ $parameters =~ m/^([^\s]+)/;
+ $new_file = $1;
+ while (<$new_file>) { process_line(); }
+ } elsif (($macro eq 'ft') && (defined($parameters))
+ && (! exists($allowed_ft_parameter{$parameters}))) {
+ problem("forbidden ft parameter $parameters");
+ } elsif (($macro eq 'tr') && (defined($parameters))
+ && (! exists($allowed_tr{$parameters}))) {
+ problem("forbidden tr parameter $parameters");
+ }
+ # ??? 'in': Require that every indent be paired with a negative indent.
+ # ??? For macros with text after them, check their text's escapes.
+ } else {
+ problem("unsafe macro $macro");
+ }
+ } else {
+ # ??? Regular text; check escape clauses.
+ }
+}
+
+
+# Main loop: Process files, looking for errors.
+
+clean_state();
+
+while (<>) {
+ if ($ARGV ne $filename) {
+ print "Processing $ARGV; up to now good=$goodfiles bad=$badfiles skip=$skipfiles\n";
+ $filename=$ARGV;
+ }
+ process_line();
+} continue {
+ if (eof) { # End of processing this file.
+ close ARGV; # Perl magic to get line #s to be accurate.
+ $totalerrs += $errs;
+ if ($errs) { $badfiles++ } else {
+ if ($is_skipped) {$skipfiles++} else {$goodfiles++};
+ }
+ $errs = 0;
+ clean_state();
+ }
+}
+
+print "Number of good files = $goodfiles\n";
+print "Number of bad files = $badfiles\n";
+print "Number of skipped files = $skipfiles\n";
+exit $errs;
+
+# ??? Handle .so better (esp. the error messages)
+# currently error messages don't report the traceback & they should.
+
+
diff --git a/misc/manlint.1 b/misc/manlint.1
new file mode 100644
index 0000000..ab76009
--- /dev/null
+++ b/misc/manlint.1
@@ -0,0 +1,63 @@
+'\"
+.\" (C) Copyright 1999 David A. Wheeler (dwheeler at ida.org)
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\"
+.\" Modified Wed Jul 14 23:00:00 1999 by David A. Wheeler (dwheeler at ida.org)
+.TH MANLINT 1 "14 July 1999" "Linux" "Linux Programmer's Manual"
+.SH NAME
+manlint \- program to report errors in man or mdoc pages
+.SH SYNOPSIS
+.BR manlint " [ " options " ] [ " "list of files" " ] "
+.SH DESCRIPTION
+manlint
+is a program that identifies lint (errors) in man or mdoc page formatting,
+similar to a spelling checker for ordinary text.
+Manlint has a list of permitted macros and escape sequences,
+and reports the use of any macro or escape sequence not in the
+permitted list.
+This permitted list includes all the macros defined in
+.BR man (7),
+.BR mdoc (7),
+and the safe subset of troff defined in
+.BR man (7).
+manlint also checks for conformance to various rules.
+.PP
+If a man page passes manlint, it should be widely portable, even
+to tools such as
+.BR man2html (1)
+which don't implement all of troff.
+.PP
+If a list of files is omitted, the standard input is used.
+A file by the name "-" is interpreted as the standard input.
+.SH BUGS
+Currently the program is very incomplete.
+It doesn't have any options, it doesn't actually check escape sequences,
+and it can't handle mdoc format.
+Still, it's clear what it should do, and even in its current form
+it can find lots of problems in existing man files.
+.SH AUTHOR
+David A. Wheeler (dwheeler at ida.org) was the original author of
+.BR "manlint" .
+Federico Lucifredi <flucifredi at acm.org> is the current maintainer.
+.SH "SEE ALSO"
+.BR man (7),
+.BR mdoc (7).
diff --git a/msgs/Makefile.in b/msgs/Makefile.in
new file mode 100644
index 0000000..fdfb457
--- /dev/null
+++ b/msgs/Makefile.in
@@ -0,0 +1,34 @@
+
+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 "@languages@" "$(DESTDIR)@locale@"
+
+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
+
diff --git a/msgs/README b/msgs/README
new file mode 100644
index 0000000..1422044
--- /dev/null
+++ b/msgs/README
@@ -0,0 +1,25 @@
+The English messages are compiled into man, and are used
+when it cannot find a message catalog.
+
+Before printing a message, man does a catopen("man_messages", 0);
+which means that it tries to open the file obtained from the environment
+variable NLSPATH by substituting "man_messages" for %N, and $LC_MESSAGES
+for %L (older implementations use $LANG instead)
+When NLSPATH is not set, the value
+ "/usr/lib/locale/%L/%N.cat:/usr/lib/locale/%N/%L"
+is used. If no information about the language is available, "C" is used.
+
+Because the catalog routines are not generally available, I have enclosed
+a copy of the gencat source.
+
+If you add a new message catalog, say for language da, then verify that
+the labels are used correctly by doing
+ ../src/makemsg mess.en x.en.h x.en.c
+ ../src/makemsg mess.da x.da.h x.da.c
+ diff x.en.h x.da.h
+ rm x*
+The files x.en.h and x.da.h should be identical.
+
+
+Recent gencat wants to know what codeset the messages are in.
+Please report incorrect codesets to flucifredi at acm.org.
diff --git a/msgs/gencat.in b/msgs/gencat.in
new file mode 100644
index 0000000..640363e
--- /dev/null
+++ b/msgs/gencat.in
@@ -0,0 +1,3 @@
+$quote "
+$set 1
+1 "test for gencat\n"
diff --git a/msgs/gencat207fix.sh b/msgs/gencat207fix.sh
new file mode 100755
index 0000000..ae38f8b
--- /dev/null
+++ b/msgs/gencat207fix.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/gencat --new $1 $2
diff --git a/msgs/inst.sh b/msgs/inst.sh
new file mode 100755
index 0000000..cea72d2
--- /dev/null
+++ b/msgs/inst.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# install message catalogs - very primitive
+
+lgs=$1
+locdir=$2
+M=
+
+# if no locale then do nothing
+if [ "$locdir" = "" ]; then
+ exit 0
+fi
+
+if [ "$lgs" = "??" ]; then
+ M=mess.*.cat
+else
+ for i in $lgs
+ do
+ if [ -f mess.$i.cat ]; then
+ M="$M mess.$i.cat"
+ else
+ echo "==== No mess.$i.cat found. ===="
+ fi
+ done
+fi
+
+for j in $M; do
+ if [ -f $j ]; then
+ i=`echo $j | sed -e 's/mess.//; s/.cat//'`
+ dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
+ dest=${PREFIX}$dest
+ echo "mkdir -p `dirname $dest`"
+ mkdir -p `dirname $dest`;
+ echo "install -c -m 644 $j $dest"
+ install -c -m 644 $j $dest
+ fi
+done
+
diff --git a/msgs/mess.bg b/msgs/mess.bg
new file mode 100644
index 0000000..42dc574
--- /dev/null
+++ b/msgs/mess.bg
@@ -0,0 +1,191 @@
+BAD_CONFIG_FILE
+ "������ %s �� ���� �� ���� ����������.\n"
+CONFIG_OPEN_ERROR
+ "��������������: ����������������� ���� %s �� ���� �� ���� �������.\n"
+PARSE_ERROR_IN_CONFIG
+ "������ ��� ������������ ������ �� ���������������� ����.\n"
+INCOMPAT
+ "������������ ����� - %s � %s\n"
+NO_ALTERNATE
+ "����������� �� �������� ������� �� � �������� ��� ������������ �� ������ �� �������������.\n"
+NO_COMPRESS
+ "Man � ���������� � ����������� ��������� �� �������� ��������, \n\
+�� ����������������� ���� �� �������� COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "��� �������� �� ������ %s �� ������������� �������?\n"
+NO_NAME_NO_SECTION
+ "��� �������� �� ������������� �������?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "� ������ %s �� ������������� ���� �������� �� %s\n"
+NO_SUCH_ENTRY
+ "� ������������� ���� �������� �� %s\n"
+PAGER_IS
+ "\n�� ��������� �� ���������� �� �������� %s\n"
+SYSTEM_FAILED
+ "������ ��� ���������� �� ������� �� ����������� ��� ���������.\n\
+���������� ������� %s �������� � �������� %d.\n"
+VERSION
+ "%s, ������ %s\n\n"
+OUT_OF_MEMORY
+ "���� ���������� ����� - �� ����� �� �� ������� %d �����\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "������ ��� ������������ ������ �� ������� �� *roff �� ����� %s\n"
+MANROFFSEQ_ERROR
+ "������ ��� ������������ ������ �� MANROFFSEQ.\n\
+�� �� ��������� �������������� �� ���������.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "������ ��� ������������ ������ �� ������� �� *roff �� ��������� ���.\n"
+UNRECOGNIZED_LINE
+ "����������� (� ���������) ��� � ���������������� ����\n%s\n"
+GETVAL_ERROR
+ "�������� ������ � man-config.c: ����� %s �� � ������\n"
+FOUND_MANDIR
+ "�������� � ���������� �� ������������� %s\n"
+FOUND_MAP
+ "�������� � ������������ �� ���� �� ������� �� ������� %s --> %s\n"
+FOUND_CATDIR
+ "����������� ���������� �� ������ �������� � %s\n"
+LINE_TOO_LONG
+ "��������� ����� ��� � ���������������� ����\n"
+SECTION
+ "\n������ %s\n"
+UNLINKED
+ "������ %s � ������\n"
+GLOBBING
+ "������� �� ������ �� %s\n"
+EXPANSION_FAILED
+ "��������� ���� [%s] �� �������������� �� �������� �� �������������\n"
+OPEN_ERROR
+ "���������� %s �� ������������� �� ���� �� ���� ��������\n"
+READ_ERROR
+ "������ ��� ������ �� �������� %s �� �������������\n"
+FOUND_EQN
+ "������� � ��������� eqn(1)\n"
+FOUND_GRAP
+ "������� � ��������� grap(1)\n"
+FOUND_PIC
+ "������� � ��������� pic(1)\n"
+FOUND_TBL
+ "������� � ��������� tbl(1)\n"
+FOUND_VGRIND
+ "������� � ��������� vgrind(1)\n"
+FOUND_REFER
+ "������� � ��������� refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "��� ����������� ������ �� ��������� �� ��������� ���\n"
+ROFF_FROM_FILE
+ "��� ����������� ������ �� ��������� �� ����� %s\n"
+ROFF_FROM_ENV
+ "��� ����������� ������ �� ��������� �� ������������\n"
+USING_DEFAULT
+ "�������� �� �������������� �� ���������������� �� ������������� ���������\n"
+PLEASE_WAIT
+ "����������� �� ����������, ���������...\n"
+CHANGED_MODE
+ "������� �� ������ �� %s �� ��������� �� %o\n"
+CAT_OPEN_ERROR
+ "��������� ���� �� �������� �� %s �� �����.\n"
+PROPOSED_CATFILE
+ "��� � ����������, �� �� ������ ����� �� %s\n"
+IS_NEWER_RESULT
+ "���������� �� is_newer() = %d\n"
+TRYING_SECTION
+ "������ �� � ������ %s\n"
+SEARCHING
+ "\n������� � %s\n"
+ALREADY_IN_MANPATH
+ "�� %s ���� � � ���� �� ������� �� �������� �� �������������\n"
+CANNOT_STAT
+ "��������������: �� ���� �� �� ������� stat() ����� ����� %s!\n"
+IS_NO_DIR
+ "��������������: %s �� � ����������!\n"
+ADDING_TO_MANPATH
+ "%s �� ������ ��� ���� �� ������� �� �������� �� �������������\n"
+PATH_DIR
+ "\n������������ �� ���� %s "
+IS_IN_CONFIG
+ "� � ���������������� ����\n"
+IS_NOT_IN_CONFIG
+ "�� � � ���������������� ����\n"
+MAN_NEARBY
+ "�� ������� ��� ���������� �� �������������\n"
+NO_MAN_NEARBY
+ "� ������� ���� ���������� �� �������������\n"
+ADDING_MANDIRS
+ "\n�������������� ���������� �� ������������� �� ��������\n\n"
+CATNAME_IS
+ "cat_name � convert_to_cat () �: %s\n"
+NO_EXEC
+ "\n�������� ������� �� �� ���������:\n %s\n"
+USAGE1
+ "���������: %s [-adfhktwW] [������] [-M ���] [-P ��������] [-S ������]\n\t"
+USAGE2
+ "[-m �������] "
+USAGE3
+ "[-p ���] ��� ...\n\n"
+USAGE4
+ " a : ������� �� ������ �������� ���������� �� ��������\n\
+ c : �� �� �� ������� ������ �������\n\
+ d : ��������� �� ����� ������������ ����������\n\
+ D : ���� -d, �� �� �������� � ����������\n\
+ f : ���� whatis(1)\n\
+ h : ��������� �� ���� ������� ���������\n\
+ k : ���� apropos(1)\n\
+ K : ������� �� ��� ��� ������ �������� �� �������������\n"
+USAGE5
+ " t : �������� �� troff ��� ����������� �� ���������� �� �����\n"
+USAGE6
+ "\
+ w : ��������� �� ���������� �� ����������������� �� ����������\n\
+ �� �������������, ����� ���� ���� �������� (��� ���� ��� -\n\
+ ��������� �� ������������, ����� ���� ���� ����������)\n\
+ W : ���� -w, �� �� �������� ���� ������� �� ���������\n\n\
+ C ���� : ������������ ��������������� ����\n\
+ M ��� : ��� �� ������� �� �������� �� �������������\n\
+ P �������� : �������� �� ��������� �� ����������\n\
+ S ������ : ������ �� �������, � ����� �� �� �����, ��������� � ���������\n"
+USAGE7
+ " m �������: ������� � ������������� �� ����� �������\n"
+USAGE8
+ " p ��� : �������� �� ���������� �� ������������� ���������\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "� �������� ���������� �� ���� �� ������ ������� ����\n"
+USER_CAN_OPEN_CAT
+ "�� �������� ���������� ���� �� ������ ������� ����\n"
+CANNOT_FORK
+ "�� ���� �� �� ������ ���������� _%s_\n"
+WAIT_FAILED
+ "������ �� ������ ��� ��������� �� �������� ������ _%s_\n"
+GOT_WRONG_PID
+ "����� ������� ..., ������� � ������ �������������\n\
+�� ������ ��� ��������� �� ���� ������� ������\n"
+CHILD_TERMINATED_ABNORMALLY
+ "�������� ������: ��������� _%s_ �� �������� ��������\n"
+IDENTICAL
+ "���������� %s �� ������������� � ��������� � %s\n"
+MAN_FOUND
+ "�������� �������� (��������) �� �������������:\n"
+NO_TROFF
+ "������: � %s �� � ������� ������� �� TROFF\n"
+NO_CAT_FOR_NONSTD_LL
+ "�������� �������� �� � �������� ������ ������������ ������� �� ����\n"
+BROWSER_IS
+ "\n �� ����������� �� ������������� ��� ������ HTML �� �������� %s\n"
+HTMLPAGER_IS
+ "\n�� ��������������� �� HTML ��� ����� �� �������� %s\n"
+FOUND_FILE
+ "manfile_from_sec_and_dir() ����� %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(���.=%s, ������=%s, ���=%s, �������=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(���.=%s, ������=%s, ���=%s, ���=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file �� ����� ����������.\n"
+GLOB_FOR_FILE
+ "glob_for_file ����� %s.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(���.=%s, ������=%s, ���=%s, ext=%s, hpx=%s, ������=%d, ���=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob �� ������� %s\n"
diff --git a/msgs/mess.bg.codeset b/msgs/mess.bg.codeset
new file mode 100644
index 0000000..c9dc4dd
--- /dev/null
+++ b/msgs/mess.bg.codeset
@@ -0,0 +1 @@
+$ codeset=cp1251
diff --git a/msgs/mess.cs b/msgs/mess.cs
new file mode 100644
index 0000000..6025461
--- /dev/null
+++ b/msgs/mess.cs
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "nemohu pochopit obsah souboru %s\n"
+CONFIG_OPEN_ERROR
+ "Varov�n�: nemohu otev��t konfigura�n� soubor %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Chyba v anal�ze konfigura�n�ho souboru\n"
+INCOMPAT
+ "nekompatibiln� volby %s a %s\n"
+NO_ALTERNATE
+ "Promi�te, ale podpora pro jin� syst�my nebyla zkompilov�na\n"
+NO_COMPRESS
+ "Man byl konfigurov�n pro automatickou kompresi form�tovan�ch str�nek,\n\
+ale konfigura�n� soubor nedefinuje COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Kterou manu�lovou str�nku ze sekce %s chcete?\n"
+NO_NAME_NO_SECTION
+ "Kterou manu�lovou str�nku chcete?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "��dn� z�znam o str�nce %s v sekci %s manu�lu\n"
+NO_SUCH_ENTRY
+ "��dn� z�znam pro %s\n"
+PAGER_IS
+ "\npou��v�m %s jako str�nkova�\n"
+SYSTEM_FAILED
+ "Nastala chyba p�i spu�t�n� form�tovac�ho nebo zobrazovac�ho p��kazu.\n\
+P��kaz %s skon�il a vr�til chybovou hodnotu %d.\n"
+VERSION
+ "%s, verze %s\n\n"
+OUT_OF_MEMORY
+ "Nedostatek pam�ti - nemohu alokovat %d byt�\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Chyba p�i anal�ze *roff p��kazu v souboru %s\n"
+MANROFFSEQ_ERROR
+ "Chybn� anal�za MANROFFSEQ. Pou�iji syst�mov� standard.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Chyba p�i anal�ze *roff p��kazu z p��kazov� ��dky.\n"
+UNRECOGNIZED_LINE
+ "Nerozpoznal jsem ��dek v konfigura�n�m souboru (ignoruji jej)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: vnit�n� chyba: �et�zec %s nebyl nalezen\n"
+FOUND_MANDIR
+ "na�el jsem manu�lov� adres�� %s\n"
+FOUND_MAP
+ "nalezen� manu�lov� cesta je mapov�na jako %s --> %s\n"
+FOUND_CATDIR
+ "odpov�daj�c� adres�� zform�tovan�ch str�nek je %s\n"
+LINE_TOO_LONG
+ "P��li� dlouh� ��dek v konfigura�n�m souboru\n"
+SECTION
+ "\nsekce: %s\n"
+UNLINKED
+ "nespojeno %s\n"
+GLOBBING
+ "prov�d�m nahrazov�n� %s\n"
+EXPANSION_FAILED
+ "Pokus [%s] o form�tov�n� manu�lov� str�nky selhal\n"
+OPEN_ERROR
+ "Nemohu otev��t manu�lovou str�nku %s\n"
+READ_ERROR
+ "Chyba p�i �ten� manu�lov� str�nky %s\n"
+FOUND_EQN
+ "nalezen p��kaz pro eqn(1)\n"
+FOUND_GRAP
+ "nalezen p��kaz pro grap(1)\n"
+FOUND_PIC
+ "nalezen p��kaz pro pic(1)\n"
+FOUND_TBL
+ "nalezen p��kaz pro tbl(1)\n"
+FOUND_VGRIND
+ "nalezen p��kaz pro vgrind(1)\n"
+FOUND_REFER
+ "nalezen p��kaz pro refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "analyzuji p��kazy z p��kazov� ��dky\n"
+ROFF_FROM_FILE
+ "analyzuji p��kazy ze souboru %s\n"
+ROFF_FROM_ENV
+ "analyzuji p��kazy z prost�ed�\n"
+USING_DEFAULT
+ "pou��v�m standardn� vol�n� preprocesoru\n"
+PLEASE_WAIT
+ "Form�tuji str�nku, pros�m po�kejte...\n"
+CHANGED_MODE
+ "zm�n�n m�d z %s na %o\n"
+CAT_OPEN_ERROR
+ "Nemohu otev��t %s pro z�pis.\n"
+PROPOSED_CATFILE
+ "bude-li t�eba zkus�m zapisovat do %s\n"
+IS_NEWER_RESULT
+ "n�vratov� hodnota z is_newer() = %d\n"
+TRYING_SECTION
+ "zkou��m sekci %s\n"
+SEARCHING
+ "\nhled�m v %s\n"
+ALREADY_IN_MANPATH
+ "ale %s u� je v manu�lov� cest�\n"
+CANNOT_STAT
+ "Varov�n�: nemohu nal�zt soubor %s!\n"
+IS_NO_DIR
+ "Varov�n�: %s nen� adres��!\n"
+ADDING_TO_MANPATH
+ "p�id�v�m %s do manu�lov� cesty\n"
+PATH_DIR
+ "\nadres�� cesty %s "
+IS_IN_CONFIG
+ "je v konfigura�n�m souboru\n"
+IS_NOT_IN_CONFIG
+ "nen� v konfigura�n�m souboru\n"
+MAN_NEARBY
+ "ale pobl� je manu�lov� adres��\n"
+NO_MAN_NEARBY
+ "a pobl� jsem nenalezl ��dn� manu�lov� adres��\n"
+ADDING_MANDIRS
+ "\np�id�v�m povinn� manu�lov� adres��\n\n"
+CATNAME_IS
+ "cat_name v convert_to_cat () je: %s\n"
+NO_EXEC
+ "\nnespou�t�m p��kaz:\n %s\n"
+USAGE1
+ "pou�it�: %s [-adfhktwW] [sekce] [-M cesta] [-P str�nkova�] [-S seznam]\n\t"
+USAGE2
+ "[-m syst�m] "
+USAGE3
+ "[-p �et�zec] jm�no ...\n\n"
+USAGE4
+ " a : najdi v�echny odpov�daj�c� str�nky\n\
+ c : nepou��vej ji� zform�tovanou str�nku\n\
+ d : tiskni lad�c� informace\n\
+ D : jako -d, ale zobraz tak� manu�lovou str�nku\n\
+ f : tot� jako whatis(1)\n\
+ h : vytiskni tuto pomocnou zpr�vu\n\
+ k : tot� jako apropos(1)\n\
+ K : hledej �et�zec ve v�ech str�nk�ch\n"
+USAGE5
+ " t : ke zform�tov�n� pou�ij program troff\n"
+USAGE6
+ "\
+ w : vytiskni um�st�n� manu�lov�ch str�nek, kter� by byly zobrazeny\n\
+ (nen�-li uvedeno ��dn� jm�no, zobraz prohled�van� adres��e)\n\
+ W : jako -w, ale zobraz pouze jm�na soubor;\n\n\
+ C soubor : pou�ij `soubor' jako konfigura�n� soubor\n\
+ M cesta : nastav manu�lov� cesty na `cesta'\n\
+ P str�nkova� : pou�ij program `str�nkova�' k zobrazen� str�nek\n\
+ S seznam : ��rkou odd�len� seznam manu�lov�ch sekc�\n"
+USAGE7
+ " m syst�m : hledej manu�lov� str�nky jin�ho syst�mu\n"
+USAGE8
+ " p �et�zec : �et�zec ur�uje preprocesor, kter� bude spu�t�n\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "a skute�n� u�ivatel tak� nem��e otev��t ji� zform�tovanou str�nku\n"
+USER_CAN_OPEN_CAT
+ "ale skute�n� u�ivatel m��e otev��t ji� zform�tovanou str�nku\n"
+CANNOT_FORK
+ "nemohu vytvo�it dal�� proces pro _%s_\n"
+WAIT_FAILED
+ "chyba p�i �ek�n� na potomka _%s_\n"
+GOT_WRONG_PID
+ "velmi podivn� ..., dostal jsem �patn� PID p�i �ek�n� na potomka\n"
+CHILD_TERMINATED_ABNORMALLY
+ "fat�l� chyba: p��kaz _%s_ byl abnorm�ln� ukon�en\n"
+IDENTICAL
+ "Manu�lov� str�nka %s je shodn� s %s\n"
+MAN_FOUND
+ "Nalezen�(�) manu�lov�(�) str�nky:\n"
+NO_TROFF
+ "chyba: p��kaz TROFF nebyl specifikov�n v %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "��dn� zform�tovan� str�nka nebyla ulo�ena (nestandardn� d�lka ��dku)\n"
diff --git a/msgs/mess.cs.codeset b/msgs/mess.cs.codeset
new file mode 100644
index 0000000..6d0d028
--- /dev/null
+++ b/msgs/mess.cs.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-2
diff --git a/msgs/mess.da b/msgs/mess.da
new file mode 100644
index 0000000..7b97974
--- /dev/null
+++ b/msgs/mess.da
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "Konfigurationsfilen er uforst�elig\n"
+CONFIG_OPEN_ERROR
+ "Advarsel: kan ikke �bne konfigurationsfilen %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Fejl ved analyse af konfigurationsfilen\n"
+INCOMPAT
+ "Inkompatible parametre %s og %s\n"
+NO_ALTERNATE
+ "Desv�rre er der ingen underst�ttelse af alternative systemer\n"
+NO_COMPRESS
+ "Man var oversat med automatisk komprimering af preformaterede sider,\n\
+men konfigurationsfilen definerer ikke COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Hvilken manualside �nskes fra kapitel %s?\n"
+NO_NAME_NO_SECTION
+ "Hvilken manualside �nskes?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Intet opslag for %s i kapitel %s af manualen\n"
+NO_SUCH_ENTRY
+ "Intet opslag for %s\n"
+PAGER_IS
+ "\nbruger %s til visning af sider\n"
+SYSTEM_FAILED
+ "Fejl ved udf�rsel af formaterings- eller udskriftskommando.\n\
+System kommandoen %s returnerede med status %d.\n"
+VERSION
+ "%s, version %s\n\n"
+OUT_OF_MEMORY
+ "Ingen ledig hukommelse - kan ikke allokere %d bytes\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Fejl ved analyse af *roff kommando fra filen %s\n"
+MANROFFSEQ_ERROR
+ "Fejl ved analyse af MANROFFSEQ. Bruger derfor systemets normalv�rdier.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Fejl ved analyse af *roff kommando fra kommandolinien.\n"
+UNRECOGNIZED_LINE
+ "Uforst�elig linie i konfigurationsfilen (ignoreret)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: intern fejl: strengen %s er ikke fundet\n"
+FOUND_MANDIR
+ "har fundet manual katalog %s\n"
+FOUND_MAP
+ "har fundet mansti map %s --> %s\n"
+FOUND_CATDIR
+ "korresponderende katalog til preformaterede sider er %s\n"
+LINE_TOO_LONG
+ "Linien i konfigurationsfilen er for lang\n"
+SECTION
+ "\nkapitel: %s\n"
+UNLINKED
+ "unlinked %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Fors�g [%s] p� at udpakke manualsiden fejlede\n"
+OPEN_ERROR
+ "Kan ikke �bne manualsiden %s\n"
+READ_ERROR
+ "Fejl ved l�sning af manualsiden %s\n"
+FOUND_EQN
+ "eqn(1) direktiv fundet\n"
+FOUND_GRAP
+ "grap(1) direktiv fundet\n"
+FOUND_PIC
+ "pic(1) direktiv fundet\n"
+FOUND_TBL
+ "tbl(1) direktiv fundet\n"
+FOUND_VGRIND
+ "vgrind(1) direktiv fundet\n"
+FOUND_REFER
+ "refer(1) direktiv fundet\n"
+ROFF_FROM_COMMAND_LINE
+ "analyserer direktiv fra kommandolinien\n"
+ROFF_FROM_FILE
+ "analyserer direktiv fra filen %s\n"
+ROFF_FROM_ENV
+ "analyserer direktiv fra parameterblokken\n"
+USING_DEFAULT
+ "anvender standard preprocessor sekvens\n"
+PLEASE_WAIT
+ "et �jeblik, siden formateres...\n"
+CHANGED_MODE
+ "fil status for %s �ndret til %o\n"
+CAT_OPEN_ERROR
+ "filen %s kan ikke �bnes for skrivning.\n"
+PROPOSED_CATFILE
+ "vil om n�dvendigt skrive filen %s\n"
+IS_NEWER_RESULT
+ "status fra is_newer() = %d\n"
+TRYING_SECTION
+ "pr�ver kapitel %s\n"
+SEARCHING
+ "\ns�ger i %s\n"
+ALREADY_IN_MANPATH
+ "men %s er allerede i manualstien\n"
+CANNOT_STAT
+ "Advarsel: stat() af fil %s er sl�et fejl!\n"
+IS_NO_DIR
+ "Advarsel: %s er ikke et katalog!\n"
+ADDING_TO_MANPATH
+ "tilf�jer %s til manualstien\n"
+PATH_DIR
+ "\nsti katalog %s "
+IS_IN_CONFIG
+ "findes i konfigurationsfilen\n"
+IS_NOT_IN_CONFIG
+ "findes ikke i konfigurationsfilen\n"
+MAN_NEARBY
+ "men der findes et manual katalog i n�rheden\n"
+NO_MAN_NEARBY
+ "intet manual katalog fundet i n�rheden\n"
+ADDING_MANDIRS
+ "\ntilf�jer obligatoriske manual kataloger\n\n"
+CATNAME_IS
+ "cat_name i convert_to_cat () er: %s\n"
+NO_EXEC
+ "\nudf�rer ikke kommando:\n %s\n"
+USAGE1
+ "syntaks: %s [-adfhktwW] [kapitel] [-M sti] [-P pager] [-S liste]\n\t"
+USAGE2
+ "[-m system] "
+USAGE3
+ "[-p streng] opslagsord ...\n\n"
+USAGE4
+ " a : find alle matchende opslag\n\
+ c : brug ikke preformateret side\n\
+ d : udskriver fejls�gningsinformation\n\
+ D : som -d, men udskriver ogs� siden\n\
+ f : �kvivalent med whatis(1)\n\
+ h : udskriv denne hj�lpetekst\n\
+ k : �kvivalent med apropos(1)\n\
+ K : s�g efter en tekststreng i alle siderne\n"
+USAGE5
+ " t : brug troff til formatering af siderne for printer udskrift\n"
+USAGE6
+ "\
+ w : udskriv lokaliteten p� manualsiden eller siderne som ville blive vist\n\
+ (hvis intet navn er givet: udskriv katalogerne der ville blive gennems�gt)\n\
+ W : som -w, men kun filnavn vises\n\
+ C fil : anvend `fil' som konfigurationsfil\n\
+ M sti : set s�gestien for manualsiderne til `sti'\n\
+ P pager : brug programmet `pager' til at vise siderne med\n\
+ S liste : kolon separeret kapitel liste\n"
+USAGE7
+ " m system : gennems�g et alternativt manualside system\n"
+USAGE8
+ " p streng : streng angiver hvilken preprocessore som skal udf�res\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "og den rigtige bruger kan heller ikke �bne den preformaterede side\n"
+USER_CAN_OPEN_CAT
+ "men den rigtige bruger kan �bne den preformaterede side\n"
+CANNOT_FORK
+ "Afgrening af kommandoen _%s_ er sl�et fejl\n"
+WAIT_FAILED
+ "Fejl mens der afventes afslutning af barneproces _%s_\n"
+GOT_WRONG_PID
+ "Forkert pid returneret mens der afventes afslutning af barneproces\n"
+CHILD_TERMINATED_ABNORMALLY
+ "fatal fejl: kommandoen _%s_ er afsluttet unormalt\n"
+IDENTICAL
+ "Manualside %s er identisk med %s\n"
+MAN_FOUND
+ "Har fundet manualsiden:\n"
+NO_TROFF
+ "Fejl: ingen TROFF kommando specificeret i %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "ingen preformateret side er gemt p� grund af unormal liniel�ngde\n"
diff --git a/msgs/mess.da.codeset b/msgs/mess.da.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.da.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.de b/msgs/mess.de
new file mode 100644
index 0000000..984de0d
--- /dev/null
+++ b/msgs/mess.de
@@ -0,0 +1,186 @@
+BAD_CONFIG_FILE
+ "Die Konfigurationsdatei %s ist fehlerhaft\n"
+CONFIG_OPEN_ERROR
+ "Warnung: Die Konfigurationsdatei %s kann nicht geöffnet werden\n"
+PARSE_ERROR_IN_CONFIG
+ "Fehler beim Parsen der Konfigurationsdatei\n"
+INCOMPAT
+ "Unverträgliche Optionen %s und %s\n"
+NO_ALTERNATE
+ "Sorry - Kein Support für alternative Systeme möglich\n"
+NO_COMPRESS
+ "Das man-Programm ist mit automatischer Kompression der cat-Seiten\n\
+übersetzt worden, aber in der Konfigurationsdatei fehlt die Definition\n\
+von COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Welche Handbuchseite aus der Sektion %s soll angezeigt werden?\n"
+NO_NAME_NO_SECTION
+ "Welche Handbuchseite soll angezeigt werden?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Keine Handbuchseite %s in der Sektion %s\n"
+NO_SUCH_ENTRY
+ "Keine Handbuchseite für %s\n"
+PAGER_IS
+ "\nAls Anzeigeprogramm wird %s benutzt\n"
+SYSTEM_FAILED
+ "Fehler bei der Ausführung des Formatierungs- oder Anzeigeprogramms.\n\
+Das Programm %s lieferte den Rückgabe-Wert %d.\n"
+VERSION
+ "%s, Version %s\n\n"
+OUT_OF_MEMORY
+ "Nicht genügend Speicher verfügbar - %d Bytes können nicht bereitgestellt werden\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Fehler beim Parsen des *roff Kommandos der Datei %s\n"
+MANROFFSEQ_ERROR
+ "Fehler beim Parsen von MANROFFSEQ. Die System-Vorgabewerte werden benutzt.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Fehler beim Parsen des *roff Kommandos aus der Kommando-Zeile.\n"
+UNRECOGNIZED_LINE
+ "Unbekannte Zeile in der Konfigurationsdatei (ignoriert)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: Interner Fehler: String %s nicht gefunden\n"
+FOUND_MANDIR
+ "man Verzeichnis %s gefunden\n"
+FOUND_MAP
+ "manpath Zuordnung %s --> %s gefunden\n"
+FOUND_CATDIR
+ "Zugehöriges cat-Verzeichnis ist %s\n"
+LINE_TOO_LONG
+ "Zeile zu lang in der Konfigurationsdatei\n"
+SECTION
+ "\nSektion: %s\n"
+UNLINKED
+ "unlinked %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Versuch [%s] die Handbuchseite zu expandieren schlug fehl.\n"
+OPEN_ERROR
+ "Die Handbuchseite %s kann nicht gelesen werden\n"
+READ_ERROR
+ "Fehler beim Lesen der Handbuchseite %s\n"
+FOUND_EQN
+ "eqn(1) Anweisung gefunden\n"
+FOUND_GRAP
+ "grap(1) Anweisung gefunden\n"
+FOUND_PIC
+ "pic(1) Anweisung gefunden\n"
+FOUND_TBL
+ "tbl(1) Anweisung gefunden\n"
+FOUND_VGRIND
+ "vgrind(1) Anweisung gefunden\n"
+FOUND_REFER
+ "refer(1) Anweisung gefunden\n"
+ROFF_FROM_COMMAND_LINE
+ "Parsen der Anweisungen aus der Kommandozeile\n"
+ROFF_FROM_FILE
+ "Parsen der Anweisungen aus der Datei %s\n"
+ROFF_FROM_ENV
+ "Parsen der Anweisung aus den Umgebungsvariablen\n"
+USING_DEFAULT
+ "Es wird die Standard-Abfolge der Präprozessoren benutzt\n"
+PLEASE_WAIT
+ "Die Handbuchseite wird formatiert, bitte warten Sie...\n"
+CHANGED_MODE
+ "Zugriffsschutz der Datei %s geändert zu %o\n"
+CAT_OPEN_ERROR
+ "Die Datei %s kann nicht für Ausgaben geöffnet werden.\n"
+PROPOSED_CATFILE
+ "Wenn nötig wird die Datei %s geschrieben\n"
+IS_NEWER_RESULT
+ "Status der Funktion is_newer() = %d\n"
+TRYING_SECTION
+ "Versuche Sektion %s\n"
+SEARCHING
+ "\nSuche in %s\n"
+ALREADY_IN_MANPATH
+ "%s ist bereits im man-Suchpfad\n"
+CANNOT_STAT
+ "Warnung: stat() der Datei %s fehlgeschlagen!\n"
+IS_NO_DIR
+ "Warnung: %s ist kein Verzeichnis!\n"
+ADDING_TO_MANPATH
+ "Aufnehmen von %s in den man-Suchpfad\n"
+PATH_DIR
+ "\nPfad-Verzeichnis %s "
+IS_IN_CONFIG
+ "ist in der Konfigurationsdatei\n"
+IS_NOT_IN_CONFIG
+ "ist nicht in der Konfigurationsdatei\n"
+MAN_NEARBY
+ "Aber da ist ein man-Verzeichnis ganz in der Nähe\n"
+NO_MAN_NEARBY
+ "und kein man-Verzeichnis in der Nähe gefunden\n"
+ADDING_MANDIRS
+ "\nHinzufügen von notwendigen man-Verzeichnissen\n\n"
+CATNAME_IS
+ "cat_name in convert_to_cat () ist: %s\n"
+NO_EXEC
+ "\nFolgendes Kommando wird nicht ausgeführt:\n %s\n"
+USAGE1
+ "Aufruf: %s [-adfhktwW] [Sektion] [-M Pfad] [-P Pager] [-S Liste]\n\t"
+USAGE2
+ "[-m System] "
+USAGE3
+ "[-p String] Name ...\n\n"
+USAGE4
+ " a : findet alle passenden Handbucheinträge\n\
+ d : Ausgabe von Meldungen zur Fehlersuche\n\
+ f : Ersatz für whatis(1)\n\
+ h : Ausgabe dieser Hilfe\n\
+ k : Ersatz für apropos(1)\n"
+USAGE5
+ " t : Verwende troff zum Formatieren der Seiten vor der Ausgabe\n"
+USAGE6
+ "\
+ w : Ausgabe der Fundorte der Handbuchseite(n), die angezeigt würde(n)\n\
+ (Wenn kein Name angegeben wurde: die Verzeichnisse ausgeben, die\n\
+ durchsucht würden)\n\n\
+ M Pfad : Verwende `Pfad' als Suchpfad nach Handbuchseiten\n\
+ P Pager : Verwende das Programm `Pager' um Handbuchseiten anzuzeigen\n\
+ S List : Durch Doppelpunkte getrennte Liste von Sektionen\n"
+USAGE7
+ " m System : Suche nach alternativen Handbuchseiten\n"
+USAGE8
+ " p String : Zeichenkette, die angibt welche Präprozessoren\n\
+ verwendet werden sollen\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "und auch der reale User kann das cat File nicht öffnen\n"
+USER_CAN_OPEN_CAT
+ "aber der reale User kann das cat File öffnen\n"
+CANNOT_FORK
+ "Kann das Kommando _%s_ nicht starten\n"
+WAIT_FAILED
+ "Fehler während des Wartens auf Kindprozeß _%s_\n"
+GOT_WRONG_PID
+ "Sehr seltsam ..., habe während des Wartens auf meinen Kindprozeß die falsche pid bekommen\n"
+CHILD_TERMINATED_ABNORMALLY
+ "Fataler Fehler: Das Kommando _%s_ terminierte abnormal\n"
+IDENTICAL
+ "man Seite %s ist identisch zu %s\n"
+MAN_FOUND
+ "man Seite(n) gefunden:\n"
+NO_TROFF
+ "Fehler: Kein TROFF Kommando in %s spezifiziert\n"
+NO_CAT_FOR_NONSTD_LL
+ "Wegen nicht Standardzeilenlänge keine cat Seite gespeichert\n"
+BROWSER_IS
+ "\Benutze %s als Browser\n"
+HTMLPAGER_IS
+ "\Benutze %s um HTML-Seiten als Text auszugeben"
+FOUND_FILE
+ "manfile_from_sec_and_dir() gefunden %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file fand keine Übereinstimmungen.\n"
+GLOB_FOR_FILE
+ "glob_for_file gibt %s zurück.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob will %s expandieren\n"
diff --git a/msgs/mess.de.codeset b/msgs/mess.de.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.de.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.el b/msgs/mess.el
new file mode 100644
index 0000000..77c84de
--- /dev/null
+++ b/msgs/mess.el
@@ -0,0 +1,171 @@
+BAD_CONFIG_FILE
+ "�������� �� ����� ����� ��� �� ������ %s\n"
+CONFIG_OPEN_ERROR
+ "�������������: �������� �' ������ �� ������ ����������� %s\n"
+PARSE_ERROR_IN_CONFIG
+ "������ ���� ��� ������� ��� ������� �����������\n"
+INCOMPAT
+ "�� �������� %s ��� %s ����� ��������� ������ ����\n"
+NO_ALTERNATE
+ "�������� - ��� ��������� ���������� ��� ����������� ������� �������\n"
+NO_COMPRESS
+ "�� ��������� man ���� �������������� ���� �� ����� �������� ��������,\n\
+���� �� ������ ����������� ��� ������������ �� ���������\n\
+��������� COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "���� ������ ����������� ������ ��� ��� ������� %s;\n"
+NO_NAME_NO_SECTION
+ "���� ������ ����������� ������;\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "��� ������� ����� ��� %s ���� ������� %s ��� �����������\n"
+NO_SUCH_ENTRY
+ "��� ������� ������ ����������� ��� %s\n"
+PAGER_IS
+ "\n����� ��� %s �� �����������\n"
+SYSTEM_FAILED
+ "������ ���� �� ����������� � ���� ��� ��������.\n\
+� ������ ���������� %s ���������� �� ������ %d.\n"
+VERSION
+ "%s, ������ %s\n\n"
+OUT_OF_MEMORY
+ "��� ������ ����� - �������� �� �������� %d �����������\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "������ ����������� *roff ��� �� ������ %s\n"
+MANROFFSEQ_ERROR
+ "������ ��� MANROFFSEQ. ����� ��� ����������� ����������.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "������ ����������� *roff ��� �� ������ ��������.\n"
+UNRECOGNIZED_LINE
+ "� ������ %s ��� ������ ����������� ��� ������������� (���������).\n"
+GETVAL_ERROR
+ "man-config.c: ��������� ������: � ������������ %s ��� �������\n"
+FOUND_MANDIR
+ "������� � ��������� man %s\n"
+FOUND_MAP
+ "������� � ����������� %s --> %s\n"
+FOUND_CATDIR
+ "� ����������� ��������� cat ����� %s\n"
+LINE_TOO_LONG
+ "������ ���� ������ ��� ������ �����������\n"
+SECTION
+ "\n�������: %s\n"
+UNLINKED
+ "���������� %s\n"
+GLOBBING
+ "��������� �������� ������� �� ��� ������� %s\n"
+EXPANSION_FAILED
+ "� �������� [%s] ������������ �������� ���� ����� ����������\n"
+OPEN_ERROR
+ "��� ����� �' ������ �� ������ ����������� %s\n"
+READ_ERROR
+ "������ ���� ��� �������� ��� ������� ����������� %s\n"
+FOUND_EQN
+ "������� � ��������������� eqn(1)\n"
+FOUND_GRAP
+ "������� � ��������������� grap(1)\n"
+FOUND_PIC
+ "������� � ��������������� pic(1)\n"
+FOUND_TBL
+ "������� � ��������������� tbl(1)\n"
+FOUND_VGRIND
+ "������� � ��������������� vgrind(1)\n"
+FOUND_REFER
+ "������� � ��������������� refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "������� ������� ��� �� ������ ��������\n"
+ROFF_FROM_FILE
+ "������� ������� ��� �� ������ %s\n"
+ROFF_FROM_ENV
+ "������� ������� ��� �� ����������\n"
+USING_DEFAULT
+ "����� ���������� �������������� ��������������\n"
+PLEASE_WAIT
+ "����������� �������, �������� ����������...\n"
+CHANGED_MODE
+ "������ ���������� ��� %s �� %o\n"
+CAT_OPEN_ERROR
+ "�������� �� ������� ��� %s ��� �������.\n"
+PROPOSED_CATFILE
+ "�� ������������� �� �������� ��� %s �� ������� ������\n"
+IS_NEWER_RESULT
+ "��������� ��� is_newer() = %d\n"
+TRYING_SECTION
+ "������ ���� �������� %s\n"
+SEARCHING
+ "\n������ ��� %s\n"
+ALREADY_IN_MANPATH
+ "��� ���� �� %s ��������� ��� ��� ��������\n"
+CANNOT_STAT
+ "�������������: �������� �� �������� �� ������ %s!\n"
+IS_NO_DIR
+ "�������������: �� %s ��� ����� ���������!\n"
+ADDING_TO_MANPATH
+ "�������� ��� %s ��� �������� ����������\n"
+PATH_DIR
+ "\n��������� ��������� %s "
+IS_IN_CONFIG
+ "��������� ��� ������ �����������\n"
+IS_NOT_IN_CONFIG
+ "��� ��������� ��� ������ �����������\n"
+MAN_NEARBY
+ "���� ������� ���� ��������� man ��� �����\n"
+NO_MAN_NEARBY
+ "��� ��� ��������� �������� man ��� �����\n"
+ADDING_MANDIRS
+ "\n�������� ������������ ��������� man\n\n"
+CATNAME_IS
+ "��� convert_to_cat (), �� cat_name �����: %s\n"
+NO_EXEC
+ "\n��� ���������� � ������:\n %s\n"
+USAGE1
+ "�������: %s [-adfhktwW] [�������] [-M ��������] [-P �����������] [-S �����]\n\t"
+USAGE2
+ "[-m �������] "
+USAGE3
+ "[-p ������������] ����� ...\n\n"
+USAGE4
+ " a : �� ������� ��� �� ������� ��� ����������\n\
+ c : �� ����� ��� ������� cat\n\
+ d : ��������� ����������� ��������������\n\
+ D : ���� � -d, ���� �������� �������� ��� �������\n\
+ f : ��������� �� whatis(1)\n\
+ h : �������� ����� ��� ��� ��������� ��������\n\
+ k : ��������� �� apropos(1)\n\
+ K : ������ ��� �� ������������ �' ���� ��� �������\n"
+USAGE5
+ " t : ����� troff ��� �� ����������� ������� ���� ��������\n"
+USAGE6
+ "\
+ w : ����������� ��� ��������� ��� ������� ��� �� �����������\n\
+ (�� ��� ����� �����: �������� ��� ��������� ��� �� ����������)\n\
+ W : ���� � -w, ���� �������� ���� ��� �������� ��� �������\n\n\
+ C ������ : ������������ �� ������� �� ������ �����������\n\
+ M �������� : ��������� �� �������� ���������� ������� �� ��������\n\
+ P ����������� : ����� ��� ������������ ������������ ��� ��� �������� ��� �������\n\
+ S ����� : ����� �������� ��� ���������� �� ��� ��� ���� �������\n"
+USAGE7
+ " m ������� : ��������� ��� ������������ ������� ����������� ��� �������\n"
+USAGE8
+ " p ������������ : � ������������ ��������� ����� ��������������� �� ������\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "����� ��� � ����������� ������� ��� ������ �' ������� �� ������ cat\n"
+USER_CAN_OPEN_CAT
+ "���� � ����������� ������� ������ �' ������� �� ������ cat\n"
+CANNOT_FORK
+ "������ ���� ��� ����������� ��� ������� _%s_\n"
+WAIT_FAILED
+ "������ ���� ��� ������� ��� ������� _%s_\n"
+GOT_WRONG_PID
+ "���� �������� ..., ����� ����� pid ��� ������� �� ����� ���\n"
+CHILD_TERMINATED_ABNORMALLY
+ "������� ������ : � ������ _%s_ ��� ������������ �����\n"
+IDENTICAL
+ "� ������ ����������� %s ����� ������������ �� ��� %s\n"
+MAN_FOUND
+ "����� ���(���) ������(��):\n"
+NO_TROFF
+ "������: ��� �������� ������ TROFF ��� %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "������� ������ cat ������������ �� ������ �� ������������� ������ �������\n"
diff --git a/msgs/mess.el.codeset b/msgs/mess.el.codeset
new file mode 100644
index 0000000..c7f7f08
--- /dev/null
+++ b/msgs/mess.el.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-7
diff --git a/msgs/mess.en b/msgs/mess.en
new file mode 100644
index 0000000..e92369c
--- /dev/null
+++ b/msgs/mess.en
@@ -0,0 +1,188 @@
+BAD_CONFIG_FILE
+ "unable to make sense of the file %s\n"
+CONFIG_OPEN_ERROR
+ "Warning: cannot open configuration file %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Error parsing config file\n"
+INCOMPAT
+ "incompatible options %s and %s\n"
+NO_ALTERNATE
+ "Sorry - no support for alternate systems compiled in\n"
+NO_COMPRESS
+ "Man was compiled with automatic cat page compression,\n\
+but the configuration file does not define COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "What manual page do you want from section %s?\n"
+NO_NAME_NO_SECTION
+ "What manual page do you want?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "No entry for %s in section %s of the manual\n"
+NO_SUCH_ENTRY
+ "No manual entry for %s\n"
+PAGER_IS
+ "\nusing %s as pager\n"
+SYSTEM_FAILED
+ "Error executing formatting or display command.\n\
+System command %s exited with status %d.\n"
+VERSION
+ "%s, version %s\n\n"
+OUT_OF_MEMORY
+ "Out of memory - can't malloc %d bytes\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Error parsing *roff command from file %s\n"
+MANROFFSEQ_ERROR
+ "Error parsing MANROFFSEQ. Using system defaults.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Error parsing *roff command from command line.\n"
+UNRECOGNIZED_LINE
+ "Unrecognized line in config file (ignored)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: internal error: string %s not found\n"
+FOUND_MANDIR
+ "found man directory %s\n"
+FOUND_MAP
+ "found manpath map %s --> %s\n"
+FOUND_CATDIR
+ "corresponding catdir is %s\n"
+LINE_TOO_LONG
+ "Line too long in config file\n"
+SECTION
+ "\nsection: %s\n"
+UNLINKED
+ "unlinked %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Attempt [%s] to expand man page failed\n"
+OPEN_ERROR
+ "Cannot open man page %s\n"
+READ_ERROR
+ "Error reading man page %s\n"
+FOUND_EQN
+ "found eqn(1) directive\n"
+FOUND_GRAP
+ "found grap(1) directive\n"
+FOUND_PIC
+ "found pic(1) directive\n"
+FOUND_TBL
+ "found tbl(1) directive\n"
+FOUND_VGRIND
+ "found vgrind(1) directive\n"
+FOUND_REFER
+ "found refer(1) directive\n"
+ROFF_FROM_COMMAND_LINE
+ "parsing directive from command line\n"
+ROFF_FROM_FILE
+ "parsing directive from file %s\n"
+ROFF_FROM_ENV
+ "parsing directive from environment\n"
+USING_DEFAULT
+ "using default preprocessor sequence\n"
+PLEASE_WAIT
+ "Formatting page, please wait...\n"
+CHANGED_MODE
+ "changed mode of %s to %o\n"
+CAT_OPEN_ERROR
+ "Couldn't open %s for writing.\n"
+PROPOSED_CATFILE
+ "will try to write %s if needed\n"
+IS_NEWER_RESULT
+ "status from is_newer() = %d\n"
+TRYING_SECTION
+ "trying section %s\n"
+SEARCHING
+ "\nsearching in %s\n"
+ALREADY_IN_MANPATH
+ "but %s is already in the manpath\n"
+CANNOT_STAT
+ "Warning: cannot stat file %s!\n"
+IS_NO_DIR
+ "Warning: %s isn't a directory!\n"
+ADDING_TO_MANPATH
+ "adding %s to manpath\n"
+PATH_DIR
+ "\npath directory %s "
+IS_IN_CONFIG
+ "is in the config file\n"
+IS_NOT_IN_CONFIG
+ "is not in the config file\n"
+MAN_NEARBY
+ "but there is a man directory nearby\n"
+NO_MAN_NEARBY
+ "and we found no man directory nearby\n"
+ADDING_MANDIRS
+ "\nadding mandatory man directories\n\n"
+CATNAME_IS
+ "cat_name in convert_to_cat () is: %s\n"
+NO_EXEC
+ "\nnot executing command:\n %s\n"
+USAGE1
+ "usage: %s [-adfhktwW] [section] [-M path] [-P pager] [-S list]\n\t"
+USAGE2
+ "[-m system] "
+USAGE3
+ "[-p string] name ...\n\n"
+USAGE4
+ " 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"
+USAGE5
+ " t : use troff to format pages for printing\n"
+USAGE6
+ "\
+ 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"
+USAGE7
+ " m system : search for alternate system's man pages\n"
+USAGE8
+ " 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"
+USER_CANNOT_OPEN_CAT
+ "and the real user cannot open the cat file either\n"
+USER_CAN_OPEN_CAT
+ "but the real user can open the cat file\n"
+CANNOT_FORK
+ "failed to fork off the command _%s_\n"
+WAIT_FAILED
+ "error while waiting for child _%s_\n"
+GOT_WRONG_PID
+ "very strange ..., got wrong pid while waiting for my child\n"
+CHILD_TERMINATED_ABNORMALLY
+ "fatal error: the command _%s_ terminated abnormally\n"
+IDENTICAL
+ "Man page %s is identical to %s\n"
+MAN_FOUND
+ "Found the man page(s):\n"
+NO_TROFF
+ "error: no TROFF command specified in %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "no cat page stored because of nonstandard line length\n"
+BROWSER_IS
+ "\nusing %s as browser\n"
+HTMLPAGER_IS
+ "\nusing %s to dump HTML pages as text\n"
+FOUND_FILE
+ "manfile_from_sec_and_dir() found %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file found no matches.\n"
+GLOB_FOR_FILE
+ "glob_for_file returns %s.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob will expand %s\n"
diff --git a/msgs/mess.en.codeset b/msgs/mess.en.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.en.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.es b/msgs/mess.es
new file mode 100644
index 0000000..f179718
--- /dev/null
+++ b/msgs/mess.es
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "imposible entender el fichero %s\n"
+CONFIG_OPEN_ERROR
+ "Aviso: imposible abrir el fichero de configuraci�n %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Error en el fichero de configuraci�n\n"
+INCOMPAT
+ "opciones %s y %s incompatibles\n"
+NO_ALTERNATE
+ "Perd�n - el programa no soporta sistemas alternativos\n"
+NO_COMPRESS
+ "Man autom�ticamente trata de comprimir las p�ginas, pero\n\
+en el fichero de configuraci�n no se define COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "�Qu� p�gina de manual de la secci�n %s desea?\n"
+NO_NAME_NO_SECTION
+ "�Qu� p�gina de manual desea?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "No hay ninguna p�gina sobre %s en la secci�n %s\n"
+NO_SUCH_ENTRY
+ "No hay ninguna p�gina sobre %s\n"
+PAGER_IS
+ "\nusando %s como paginador\n"
+SYSTEM_FAILED
+ "Error de preparaci�n o visualizaci�n del manual.\n\
+El comando %s termin� con el error %d.\n"
+VERSION
+ "%s, versi�n %s\n\n"
+OUT_OF_MEMORY
+ "Memoria agotada - imposible obtener %d bytes\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Error en el procesamiento *roff del fichero %s\n"
+MANROFFSEQ_ERROR
+ "Error procesano MANROFFSEQ. Usando opciones por omisi�n.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Error en el procesamiento *roff de la l�nea de comandos.\n"
+UNRECOGNIZED_LINE
+ "L�nea desconocida en el fichero de configuraci�n (ignorada)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: error interno: no se encuentra la cadena %s\n"
+FOUND_MANDIR
+ "encontrado el directorio del manual %s\n"
+FOUND_MAP
+ "encontrada la correspondencia %s --> %s\n"
+FOUND_CATDIR
+ "el catdir correspondiente es %s\n"
+LINE_TOO_LONG
+ "L�nea demasiado larga en el fichero de configuraci�n\n"
+SECTION
+ "\nsecci�n: %s\n"
+UNLINKED
+ "%s eliminado\n"
+GLOBBING
+ "expandiendo %s\n"
+EXPANSION_FAILED
+ "Tentativa [%s] de descomprimir el manual fallida\n"
+OPEN_ERROR
+ "Imposible abrir la p�gina sobre %s\n"
+READ_ERROR
+ "Error durante la lectura de la p�gina sobre %s\n"
+FOUND_EQN
+ "encontrada la directiva eqn(1)\n"
+FOUND_GRAP
+ "encontrada la directiva grap(1)\n"
+FOUND_PIC
+ "encontrada la directiva pic(1)\n"
+FOUND_TBL
+ "encontrada la directiva tbl(1)\n"
+FOUND_VGRIND
+ "encontrada la directiva vgrind(1)\n"
+FOUND_REFER
+ "encontrada la directiva refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "procesando directiva en la l�nea de comandos\n"
+ROFF_FROM_FILE
+ "procesando directiva en el fichero %s\n"
+ROFF_FROM_ENV
+ "procesando directiva en el entorno\n"
+USING_DEFAULT
+ "usando la secuencia de preprocesadores por omisi�n\n"
+PLEASE_WAIT
+ "Dando formato a la p�gina, espere por favor...\n"
+CHANGED_MODE
+ "cambio del modo %s a %o\n"
+CAT_OPEN_ERROR
+ "Imposible escribir en %s.\n"
+PROPOSED_CATFILE
+ "si es necesario se intentar� escribir en %s\n"
+IS_NEWER_RESULT
+ "resultado de is_newer() = %d\n"
+TRYING_SECTION
+ "probando en la secci�n %s\n"
+SEARCHING
+ "\nbuscando en %s\n"
+ALREADY_IN_MANPATH
+ "pero %s ya est� en la ruta de b�squeda del manual\n"
+CANNOT_STAT
+ "�Aviso: no vale el fichero %s!\n"
+IS_NO_DIR
+ "�Aviso: %s no es un directorio!\n"
+ADDING_TO_MANPATH
+ "a�adiendo %s a la ruta de b�squeda del manual\n"
+PATH_DIR
+ "\ndirectorio %s de la ruta"
+IS_IN_CONFIG
+ "est� en el fichero de configuraci�n\n"
+IS_NOT_IN_CONFIG
+ "no est� en el fichero de configuraci�n\n"
+MAN_NEARBY
+ "pero existe un directorio del manual cercano\n"
+NO_MAN_NEARBY
+ "y no se encontr� cerca ning�n directorio del manual\n"
+ADDING_MANDIRS
+ "\na�adiendo los directorios de man obligatorios\n\n"
+CATNAME_IS
+ "cat_name de convert_to_cat () vale: %s\n"
+NO_EXEC
+ "\nomitiendo el comando:\n %s\n"
+USAGE1
+ "uso: %s [-adfhktwW] [secci�n] [-M ruta] [-P paginador] [-S lista]\n\t"
+USAGE2
+ "[-m sistema] "
+USAGE3
+ "[-p cadena] nombre ...\n\n"
+USAGE4
+ " a : buscar todas las entradas coincidentes\n\
+ c : no usar las p�ginas preprocesadas\n\
+ d : mostrar informaci�n adicional para depuraci�n de fallos\n\
+ D : igual que -d, pero mostrando tambi�n las p�ginas\n\
+ f : iqual que whatis(1)\n\
+ h : mostrar estos mensajes de ayuda\n\
+ k : igual que apropos(1)\n\
+ K : buscar una cadena en todas las p�ginas del manual\n"
+USAGE5
+ " t : usar troff para preparar las p�ginas solicitadas\n"
+USAGE6
+ "\
+ w : mostrar la ubicaci�n de las p�ginas solicitadas\n\
+ (sin argumento: mostar todos los directorios utilizados)\n\
+ W : igual que -w, pero mostrando s�lo nombres de ficheros\n\n\
+ C fichero : usar fichero de configuraci�n alternativo\n\
+ M ruta : establecer la ruta de busqueda de p�ginas\n\
+ P paginador : usar paginador para ver las p�ginas\n\
+ S lista : lista de secciones (separadas por dos puntos)\n"
+USAGE7
+ " m sistema : buscar manuales para el sistema indicado\n"
+USAGE8
+ " p cadena : preprocesamiento a efectuar\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "y el usuario real tampoco puede abrir el fichero preprocesado\n"
+USER_CAN_OPEN_CAT
+ "pero el usuario real s� puede abrir el fichero preprocesado\n"
+CANNOT_FORK
+ "error al lanzar el comando _%s_\n"
+WAIT_FAILED
+ "error durante la espera del proceso hijo _%s_\n"
+GOT_WRONG_PID
+ "extra�o... pid incorrecto mientras esperaba un proceso hijo\n"
+CHILD_TERMINATED_ABNORMALLY
+ "error fatal: _%s_ termin� anormalmente\n"
+IDENTICAL
+ "La p�gina de manual sobre %s es id�ntica a la de %s\n"
+MAN_FOUND
+ "Encontrada la(s) p�gina(s):\n"
+NO_TROFF
+ "error: no se especifica ning�n comando TROFF en %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "eliminada p�gina preformateada con l�neas de dimensi�n no est�ndar\n"
diff --git a/msgs/mess.es.codeset b/msgs/mess.es.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.es.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.fi b/msgs/mess.fi
new file mode 100644
index 0000000..ca39755
--- /dev/null
+++ b/msgs/mess.fi
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "en ymm�rr� tiedoston %s formaattia\n"
+CONFIG_OPEN_ERROR
+ "Varoitus: en voi avata konfigurointitiedostoa %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Virhe tulkittaessa konfigurointitiedostoa\n"
+INCOMPAT
+ "ep�yhteensopivat optiot %s ja %s\n"
+NO_ALTERNATE
+ "Valitan - vaihtoehtoisille j�rjestelmille ei ole k��nnetty tukea\n"
+NO_COMPRESS
+ "Man on k��nnetty automaattisella cat-sivujen pakkauksella,\n\
+mutta konfigurointitiedostossa ei ole COMPRESS-m��rittely�.\n"
+NO_NAME_FROM_SECTION
+ "Mink� man-sivun haluat sektiosta %s?\n"
+NO_NAME_NO_SECTION
+ "Mink� man-sivun haluat?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Ei sivua %s sektiossa %s\n"
+NO_SUCH_ENTRY
+ "Man-sivua %s ei l�ydy\n"
+PAGER_IS
+ "\nk�yt�n ohjelmaa %s selaajana\n"
+SYSTEM_FAILED
+ "Virhe muotoilu- tai n�ytt�komentoa suorittaessa.\n\
+J�rjestelm�n komento %s antoi paluuarvon %d.\n"
+VERSION
+ "%s, versio %s\n\n"
+OUT_OF_MEMORY
+ "Muisti loppu - malloc %d tavua ep�onnistui\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Virhe tulkitessa *roff-komentoa tiedostossa %s\n"
+MANROFFSEQ_ERROR
+ "Virhe tulkittaessa MANROFFSEQ:a. K�yt�n j�rjestelm�n oletuksia.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Virhe tulkitessa *roff-komentoa komentorivilt�.\n"
+UNRECOGNIZED_LINE
+ "Tunetematon rivi konfigurointitiedostossa (ohitan)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: sis�inen virhe: merkkijonoa %s ei l�ydy\n"
+FOUND_MANDIR
+ "l�ysin man-hakemiston %s\n"
+FOUND_MAP
+ "l�ysin manpath linkin %s --> %s\n"
+FOUND_CATDIR
+ "vastaava catdir on %s\n"
+LINE_TOO_LONG
+ "Rivi liian pitk� konfigurointitiedostossa\n"
+SECTION
+ "\nsektio: %s\n"
+UNLINKED
+ "linkitt�m�t�n %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Yritys [%s] purkaa man-sivua ep�onnistui\n"
+OPEN_ERROR
+ "En voi avata man-sivua %s\n"
+READ_ERROR
+ "Virhe luettaessa man-sivua %s\n"
+FOUND_EQN
+ "l�ysin eqn(1) direktiivin\n"
+FOUND_GRAP
+ "l�ysin grap(1) direktiivin\n"
+FOUND_PIC
+ "l�ysin pic(1) direktiivin\n"
+FOUND_TBL
+ "l�ysin tbl(1) direktiivin\n"
+FOUND_VGRIND
+ "l�ysin vgrind(1) direktiivin\n"
+FOUND_REFER
+ "l�ysin refer(1) direktiivin\n"
+ROFF_FROM_COMMAND_LINE
+ "tulkitessa direktiivi� komentorivilt�\n"
+ROFF_FROM_FILE
+ "tulkitessa direktiivi� tiedostosta %s\n"
+ROFF_FROM_ENV
+ "tulkitessa direktiivi� ymp�rist�muuttujasta\n"
+USING_DEFAULT
+ "k�yt�n oletusesik�sittelij�n vaihetta\n"
+PLEASE_WAIT
+ "Muotoilen sivua, odota...\n"
+CHANGED_MODE
+ "muutin %s:n moodia %o:ksi\n"
+CAT_OPEN_ERROR
+ "En voinut avata %s:a kirjoitusta varten.\n"
+PROPOSED_CATFILE
+ "yrit�n kirjoittaa %s tarvittaessa\n"
+IS_NEWER_RESULT
+ "tila funktiosta is_newer() = %d\n"
+TRYING_SECTION
+ "yrit�n sektiota %s\n"
+SEARCHING
+ "\nhaen %s:sta\n"
+ALREADY_IN_MANPATH
+ "mutta %s on jo manpath:ssa\n"
+CANNOT_STAT
+ "Varoitus: cannot stat file %s!\n"
+IS_NO_DIR
+ "Varoitus: %s ei ole hakemisto!\n"
+ADDING_TO_MANPATH
+ "lis��n %s:n manpath:iin\n"
+PATH_DIR
+ "\npolku hakemisto %s "
+IS_IN_CONFIG
+ "on konfigurointitiedostossa\n"
+IS_NOT_IN_CONFIG
+ "ei ole konfigurointitiedostossa\n"
+MAN_NEARBY
+ "mutta man-hakemisto on l�hell�\n"
+NO_MAN_NEARBY
+ "ja man-hakemistoa ei l�ytynut l�helt�\n"
+ADDING_MANDIRS
+ "\nlis��n pakolliset man-hakemistot\n\n"
+CATNAME_IS
+ "cat_name funktiossa convert_to_cat () on: %s\n"
+NO_EXEC
+ "\nen suorita komentoa:\n %s\n"
+USAGE1
+ "k�ytt�: %s [-adfhktwW] [sektio] [-M polku] [-P selaaja] [-S lista]\n\t"
+USAGE2
+ "[-m j�rjestelm�] "
+USAGE3
+ "[-p merkkijono] nimi ...\n\n"
+USAGE4
+ " a : etsi kaikki soveltuvat kohdat\n\
+ c : �l� k�yt� cat-tiedostoa\n\
+ d : tulosta paljon virheenetsint�tietoja\n\
+ D : sama kuin -d, mutta n�yt� my�s sivut\n\
+ f : sama kuin whatis(1)\n\
+ h : tulosta t�m� ohjeteksti\n\
+ k : sama kuin apropos(1)\n\
+ K : etsi merkkijonoa kaikilta sivuilta\n"
+USAGE5
+ " t : k�yt� troff-ohjelmaa paperitulostuksen muotoiluun\n"
+USAGE6
+ "\
+ w : tulosta man-sivujen sijainto, jotka n�ytett�isiin\n\
+ (jos ei anneta nime�: tulosta hakemistot, joista etsitt�isiin)\n\
+ W : sama kuin -w, mutta tulosta vain tiedostonimet\n\n\
+ C tiedosto : k�yt� `tiedosto' konfigurointitiedostona\n\
+ M polku : k�yt� man-sivujen hakupolkuna `polku'\n\
+ P selaaja : k�yt� ohjelmaa `selaaja' sivujen n�ytt��n\n\
+ S lista : puolipistein erotettu sektioiden lista\n"
+USAGE7
+ " m j�rjestelm� : etsi vaihtoehtoisen j�rjestelm�n man-sivuja\n"
+USAGE8
+ " p merkkijono : merkkijono kertoo, mit� esik�sittelij�� k�ytet��n\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "ja oikea k�ytt�j�k��n ei voi avata cat-tiedostoa\n"
+USER_CAN_OPEN_CAT
+ "mutta oikea k�ytt�j� voi avata cat-tiedoston\n"
+CANNOT_FORK
+ "komennon _%s_ k�ynnistys fork-kutsulla ep�onnistui\n"
+WAIT_FAILED
+ "virhe odottaessa lapsiprosessia _%s_\n"
+GOT_WRONG_PID
+ "hyvin outoa ..., sain v��r�n pid:n odottaessa lapsiprosessia\n"
+CHILD_TERMINATED_ABNORMALLY
+ "vakava virhe: komento _%s_ p��ttyi virheeseen\n"
+IDENTICAL
+ "man-sivu %s on sama kuin %s\n"
+MAN_FOUND
+ "L�ysin man-sivuja:\n"
+NO_TROFF
+ "virhe: TROFF-komentoa ei m��ritelty %s:ssa\n"
+NO_CAT_FOR_NONSTD_LL
+ "cat-sivua ei talletettu ep�tavallisen rivipituuden takia\n"
diff --git a/msgs/mess.fi.codeset b/msgs/mess.fi.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.fi.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.fr b/msgs/mess.fr
new file mode 100644
index 0000000..712ef0a
--- /dev/null
+++ b/msgs/mess.fr
@@ -0,0 +1,190 @@
+BAD_CONFIG_FILE
+ "impossible d'interpr�ter le fichier %s\n"
+CONFIG_OPEN_ERROR
+ "Attention: impossible d'ouvrir le fichier de configuration %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Erreur pendant l'analyse du fichier de configuration\n"
+INCOMPAT
+ "options %s et %s incompatibles\n"
+NO_ALTERNATE
+ "D�sol� - pas de support pour d'autre syst�mes de pages\n"
+NO_COMPRESS
+ "Man a �t� compil� de sorte qu'il r�alise la compression automatique\n\
+des pages format�es, mais le fichier de configuration ne contient pas\n\
+la d�finition du compacteur (COMPRESS).\n"
+NO_NAME_FROM_SECTION
+ "Quelle page de manuel de la section %s d�sirez-vous consulter ?\n"
+NO_NAME_NO_SECTION
+ "Quelle page de manuel d�sirez-vous consulter ?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Il n'y a pas d'entr�e %s dans la section %s du manuel.\n"
+NO_SUCH_ENTRY
+ "Il n'y a pas de page de manuel pour %s.\n"
+PAGER_IS
+ "\nutilisation de %s pour la consultation\n"
+SYSTEM_FAILED
+ "Erreur pendant l'ex�cution du formatage ou de l'affichage.\n\
+Le syst�me retourne pour %s l'erreur %d.\n"
+VERSION
+ "%s, version %s\n\n"
+OUT_OF_MEMORY
+ "Plus assez de m�moire - impossible d'allouer %d octets\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Erreur pendant l'interpr�tation *roff du fichier %s\n"
+MANROFFSEQ_ERROR
+ "Erreur dans MANROFFSEQ. Utilisation du choix par d�faut.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Erreur pendant l'interpr�tation *roff sur la ligne de commandes.\n"
+UNRECOGNIZED_LINE
+ "Ligne %s non reconnue dans le fichier de configuration (ignor�e).\n"
+GETVAL_ERROR
+ "man-config.c : erreur interne : cha�ne %s non trouv�e\n"
+FOUND_MANDIR
+ "trouv� le r�pertoire man %s\n"
+FOUND_MAP
+ "trouv� la correspondance %s --> %s\n"
+FOUND_CATDIR
+ "le r�pertoire cat correspondant est %s\n"
+LINE_TOO_LONG
+ "Ligne trop longue dans le fichier de configuration\n"
+SECTION
+ "\nsection: %s\n"
+UNLINKED
+ "supprim� %s\n"
+GLOBBING
+ "expansion de %s\n"
+EXPANSION_FAILED
+ "Tentative [%s] d'expansion de la page de manuel infructueuse"
+OPEN_ERROR
+ "Impossible d'ouvrir la page de manuel %s\n"
+READ_ERROR
+ "Erreur de lecture de la page de manuel %s\n"
+FOUND_EQN
+ "directive eqn(1) rencontr�e\n"
+FOUND_GRAP
+ "directive grap(1) rencontr�e\n"
+FOUND_PIC
+ "directive pic(1) rencontr�e\n"
+FOUND_TBL
+ "directive tbl(1) rencontr�e\n"
+FOUND_VGRIND
+ "directive vgrind(1) rencontr�e\n"
+FOUND_REFER
+ "directive refer(1) rencontr�e\n"
+ROFF_FROM_COMMAND_LINE
+ "analyse des directives depuis la ligne de commandes\n"
+ROFF_FROM_FILE
+ "analyse des directives depuis le fichier %s\n"
+ROFF_FROM_ENV
+ "analyse des directives depuis l'environnement\n"
+USING_DEFAULT
+ "utilisation s�quence pr�processeur par d�faut\n"
+PLEASE_WAIT
+ "Formatage de la page en cours, patientez...\n"
+CHANGED_MODE
+ "changement du mode %s � %o\n"
+CAT_OPEN_ERROR
+ "Impossible d'ouvrir %s en �criture.\n"
+PROPOSED_CATFILE
+ "nous tenterons d'�crire %s si besoin est\n"
+IS_NEWER_RESULT
+ "statut de is_newer() = %d\n"
+TRYING_SECTION
+ "essai section %s\n"
+SEARCHING
+ "\nrecherche dans %s\n"
+ALREADY_IN_MANPATH
+ "mais %s est d�j� dans le chemin de recherche\n"
+CANNOT_STAT
+ "Attention: impossible de tester le fichier %s !\n"
+IS_NO_DIR
+ "Attention: %s n'est pas un r�pertoire !\n"
+ADDING_TO_MANPATH
+ "ajout de %s au chemin de recherche\n"
+PATH_DIR
+ "\npath directory %s "
+IS_IN_CONFIG
+ "est dans le fichier de configuration\n"
+IS_NOT_IN_CONFIG
+ "n'est pas dans le fichier de configuration\n"
+MAN_NEARBY
+ "mais il y a un r�pertoire de manuel pas loin\n"
+NO_MAN_NEARBY
+ "et nous ne trouvons pas de r�pertoire de manuel dans le coin\n"
+ADDING_MANDIRS
+ "\najout des r�pertoires de manuel obligatoires\n\n"
+CATNAME_IS
+ "dans convert_to_cat (), cat_name vaut: %s\n"
+NO_EXEC
+ "\nn'ex�cute pas la commande:\n %s\n"
+USAGE1
+ "syntaxe: %s [-adfhktwW] [section] [-M chemin] [-P visu] [-S liste]\n\t"
+USAGE2
+ " [-m syst�me] "
+USAGE3
+ "[-p cha�ne] nom ...\n\n"
+USAGE4
+ " a : rechercher toutes les entr�es correspondantes\n\
+ c : ne pas utiliser de fichier cat\n\
+ d : afficher une flopp�e d'informations de d�bogage\n\
+ D : comme -d, mais afficher aussi les pages\n\
+ f : �quivalent � whatis(1)\n\
+ h : afficher ce message d'aide\n\
+ k : �quivalent � apropos(1)\n"
+ K : rechercher une cha�ne dans toutes les pages\n"
+USAGE5
+ " t : utilise troff pour le formatage des pages\n"
+USAGE6
+ "\
+ w : indiquer l'emplacement des pages de manuel qui seraient affich�es\n\
+ (si aucun nom n'est donn�, afficher les r�pertoires qui seraient scrut�s)\n\
+ W : comme -w, mais n'afficher que les noms de fichiers\n\n\
+ C fichier : prendre � fichier � comme fichier de configuration\n\
+ M chemin : positionner le chemin de recherche des pages � � chemin �\n\
+ P visu : utiliser le programme � visu � pour afficher les pages\n\
+ S liste : liste de sections s�par�es par des deux points\n"
+USAGE7
+ " m syst�me : rechercher d'autres syst�mes de pages de manuel\n"
+USAGE8
+ " p cha�ne : la cha�ne d�termine les pr�processeurs � employer\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "et l'utilisateur r�el ne peut pas non plus ouvrir le fichier format�\n"
+USER_CAN_OPEN_CAT
+ "mais l'utilisateur r�el peut ouvrir le fichier format�\n"
+CANNOT_FORK
+ "erreur lors du fork() de la commande _%s_\n"
+WAIT_FAILED
+ "erreur lors de l'attente du fils _%s_\n"
+GOT_WRONG_PID
+ "tr�s bizarre... r�cup�r� le mauvais pid lors de l'attente de mon fils\n"
+CHILD_TERMINATED_ABNORMALLY
+ "erreur fatale: la commande _%s_ s'est termin�e anormalement\n"
+IDENTICAL
+ "La page de manuel %s est identique � %s\n"
+MAN_FOUND
+ "Trouv� la (les) page(s):\n"
+NO_TROFF
+ "erreur: aucune commande TROFF sp�cifi�e dans %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "pas de page cat enregistr�e en raison d'une taille de ligne non standard\n"
+BROWSER_IS
+ "\nutilisation de %s comme navigateur\n"
+HTMLPAGER_IS
+ "\nutilisation de %s pour transformer les pages HTML en texte\n"
+FOUND_FILE
+ "manfile_from_sec_and_dir() a trouv� %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(r�p=%s, sec=%s, nom=%s, flags=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(r�p=%s, sec=%s, nom=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file n'a pas trouv� de correspondance.\n"
+GLOB_FOR_FILE
+ "glob_for_file renvoie %s.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(r�p=%s, sec=%s, nom=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob d�veloppera %s\n"
+
diff --git a/msgs/mess.fr.codeset b/msgs/mess.fr.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.fr.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.hr b/msgs/mess.hr
new file mode 100644
index 0000000..c423d71
--- /dev/null
+++ b/msgs/mess.hr
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "datoteka %s nema smisla\n"
+CONFIG_OPEN_ERROR
+ "Upozorenje: konfiguracijska datoteka %s se ne mo�e otvoriti\n"
+PARSE_ERROR_IN_CONFIG
+ "Gre�ka pri obradi konfiguracijske datoteke\n"
+INCOMPAT
+ "opcije %s i %s nekompatibilne\n"
+NO_ALTERNATE
+ "Na�alost, podr�ka za druge sustave nije ugra�ena\n"
+NO_COMPRESS
+ "Man je kompajliran za automatsko sa�imanje cat stranica,\n\
+no konfiguracijska datoteka ne navodi COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Koju man stranicu iz dijela %s �elite?\n"
+NO_NAME_NO_SECTION
+ "Koju man stranicu �elite?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Stranice %s nema u dijelu %s\n"
+NO_SUCH_ENTRY
+ "Stranice %s nema\n"
+PAGER_IS
+ "\nkao preglednik se koristi %s\n"
+SYSTEM_FAILED
+ "Gre�ka pri izvr�avanju naredbe za formatiranje ili prikaz.\n\
+Naredba sustava %s zavr�ila uz stanje %d.\n"
+VERSION
+ "%s, verzija %s\n\n"
+OUT_OF_MEMORY
+ "Bez memorije -- malloc %d bajtova nije mogu�\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Gre�ka pri obradi *roff naredbe iz datoteke %s\n"
+MANROFFSEQ_ERROR
+ "Gre�ka pri obradi MANROFFSEQ. Koriste se predodre�ene vrijednosti sustava.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Gre�ka pri obradi *roff naredbe s naredbenog reda.\n"
+UNRECOGNIZED_LINE
+ "Neprepoznat red u konfiguracijskoj datoteci (zanemaren)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: interna gre�ka: niz %s nije na�en\n"
+FOUND_MANDIR
+ "na�en man direktorij %s\n"
+FOUND_MAP
+ "na�eno mapiranje man staze %s u %s\n"
+FOUND_CATDIR
+ "odgovaraju�i catdir je %s\n"
+LINE_TOO_LONG
+ "Red predug u konfiguracijskoj datoteci\n"
+SECTION
+ "\ndio: %s\n"
+UNLINKED
+ "%s je obrisan\n"
+GLOBBING
+ "%s se pro�iruje\n"
+EXPANSION_FAILED
+ "Poku�aj [%s] pro�irivanja man stranice nije uspio\n"
+OPEN_ERROR
+ "Man stranica %s se ne mo�e otvoriti\n"
+READ_ERROR
+ "Gre�ka pri �itanju man stranice %s\n"
+FOUND_EQN
+ "na�ena eqn(1) odrednica\n"
+FOUND_GRAP
+ "na�ena grap(1) odrednica\n"
+FOUND_PIC
+ "na�ena pic(1) odrednica\n"
+FOUND_TBL
+ "na�ena tbl(1) odrednica\n"
+FOUND_VGRIND
+ "na�ena vgrind(1) odrednica\n"
+FOUND_REFER
+ "na�ena refer(1) odrednica\n"
+ROFF_FROM_COMMAND_LINE
+ "obra�uje se odrednica s naredbenog reda\n"
+ROFF_FROM_FILE
+ "obra�uje se odrednica iz datoteke %s\n"
+ROFF_FROM_ENV
+ "obra�uje se odrednica iz okru�ja\n"
+USING_DEFAULT
+ "koristi se predodre�eni niz preprocesora\n"
+PLEASE_WAIT
+ "Stranica se formatira, molim pri�ekajte...\n"
+CHANGED_MODE
+ "dozvole %s promijenjene u %o\n"
+CAT_OPEN_ERROR
+ "%s se nije mogla otvoriti za pisanje.\n"
+PROPOSED_CATFILE
+ "ako bude potrebno, poku�at �e se pisati u %s\n"
+IS_NEWER_RESULT
+ "stanje is_newer() = %d\n"
+TRYING_SECTION
+ "poku�ava se u dijelu %s\n"
+SEARCHING
+ "\npretraga u %s\n"
+ALREADY_IN_MANPATH
+ "no %s se ve� nalazi u man stazi\n"
+CANNOT_STAT
+ "Upozorenje: stat datoteke %s nije mogu�!\n"
+IS_NO_DIR
+ "Upozorenje: %s nije direktorij!\n"
+ADDING_TO_MANPATH
+ "%s se dodaje man stazi\n"
+PATH_DIR
+ "\ndirektorij staze %s "
+IS_IN_CONFIG
+ "je u konfiguracijskoj datoteci\n"
+IS_NOT_IN_CONFIG
+ "nije u konfiguracijskoj datoteci\n"
+MAN_NEARBY
+ "ali u blizini postoji man direktorij\n"
+NO_MAN_NEARBY
+ "a u blizini nije prona�en nijedan man direktorij\n"
+ADDING_MANDIRS
+ "\ndodaju se obvezni man direktoriji\n\n"
+CATNAME_IS
+ "cat_name u convert_to_cat () je: %s\n"
+NO_EXEC
+ "\nnaredba se ne izvr�ava:\n %s\n"
+USAGE1
+ "kori�tenje: %s [-adfhktwW] [dio] [-M staza] [-P preglednik] [-S popis]\n\t"
+USAGE2
+ "[-m sustav] "
+USAGE3
+ "[-p niz] ime ...\n\n"
+USAGE4
+ " a: pronalazi sve odgovaraju�e man stranice\n\
+ c: ne koristi cat datoteku\n\
+ d: ispisuje gomilu informacija za otklanjanje gre�aka\n\
+ D: kao i za -d, ali tako�er prikazuje stranice\n\
+ f: isto �to i whatis(1)\n\
+ h: ispisuje ovu poruku o kori�tenju\n\
+ k: isto �to i apropos(1)\n\
+ K: tra�i niz u svim stranicama\n"
+USAGE5
+ " t: koristi troff za formatiranje stranica za tiskanje\n"
+USAGE6
+ "\
+ w: ispisuje lokacije man stranica koje bi se prikazale\n\
+ (ako ime nije dano, ispisuje direktorije koji bi se pretra�ili)\n\
+ W: kao i za -w, no prikazuje samo imena datoteka\n\n\
+ C datoteka: kao konfiguracijsku datoteku koristi `datoteka'\n\
+ M staza: stazu tra�enja man stranica postavlja na `staza'\n\
+ P preglednik: za prikaz stranica koristi program `preglednik'\n\
+ S popis: popis dvoto�kama razdvojenih dijelova\n"
+USAGE7
+ " m sustav: pretra�uje man stranice drugog sustava\n"
+USAGE8
+ " p niz: niz govori koje preprocesore treba pokrenuti\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "a ni pravi korisnik ne mo�e otvoriti cat datoteku\n"
+USER_CAN_OPEN_CAT
+ "no pravi korisnik mo�e otvoriti cat datoteku\n"
+CANNOT_FORK
+ "fork naredbom _%s_ nije uspio\n"
+WAIT_FAILED
+ "gre�ka pri �ekanju na dijete _%s_\n"
+GOT_WRONG_PID
+ "vrlo �udno...; pri �ekanju na moje dijete dobijen krivi PID\n"
+CHILD_TERMINATED_ABNORMALLY
+ "kobna gre�ka: naredba _%s_ zavr�ila abnormalno\n"
+IDENTICAL
+ "Man stranica %s je istovjetna stranici %s\n"
+MAN_FOUND
+ "Na�ene man stranice:\n"
+NO_TROFF
+ "gre�ka: u %s nema TROFF naredbi\n"
+NO_CAT_FOR_NONSTD_LL
+ "zbog nestandardne duljine reda cat stranica nije pohranjena\n"
diff --git a/msgs/mess.hr.codeset b/msgs/mess.hr.codeset
new file mode 100644
index 0000000..6d0d028
--- /dev/null
+++ b/msgs/mess.hr.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-2
diff --git a/msgs/mess.it b/msgs/mess.it
new file mode 100644
index 0000000..d7fe013
--- /dev/null
+++ b/msgs/mess.it
@@ -0,0 +1,190 @@
+BAD_CONFIG_FILE
+ "incapace di comprendere il file %s\n"
+CONFIG_OPEN_ERROR
+ "Attenzione: impossibile aprire il file di configurazione %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Errore nell'analisi del file di configurazione\n"
+INCOMPAT
+ "opzioni incompatibili %s e %s\n"
+NO_ALTERNATE
+ "Spiacente - supporto per sistemi alternativi compilato mancante\n"
+NO_COMPRESS
+ "Man � stato compilato con la compressione automatica delle pagine \
+cat,\nma il file di configurazione non definisce COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Quale pagina di guida vuoi dalla sezione %s?\n"
+NO_NAME_NO_SECTION
+ "Quale pagina di guida vuoi?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Non c'� la voce %s nella sezione %s del manuale\n"
+NO_SUCH_ENTRY
+ "Non c'� una voce per %s\n"
+PAGER_IS
+ "\nuso %s come visualizzatore\n"
+SYSTEM_FAILED
+ "Errore nell'esecuzione del comando di formattazione o visualizzazione.\n\
+Il comando &s � uscito con lo stato %d.\n"
+VERSION
+ "%s, versione %s\n\n"
+OUT_OF_MEMORY
+ "Memoria insufficiente - impossibile allocare %d byte\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Errore analizzando comandi *roff dal file %s\n"
+MANROFFSEQ_ERROR
+ "Errore analizzando MANROFFSEQ. Uso le impostazioni di default del sistema.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Errore analizzando comandi *roff dalla linea di comando.\n"
+UNRECOGNIZED_LINE
+ "Linea non riconosciuta nel file di configurazione (ignorata)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: errore interno: stringa %s non trovata\n"
+FOUND_MANDIR
+ "trovata la directory man %s\n"
+FOUND_MAP
+ "trovata la mappa manpath %s --> %s\n"
+FOUND_CATDIR
+ "la catdir corrispondente � %s\n"
+LINE_TOO_LONG
+ "Linea troppo lunga nel file di configurazione\n"
+SECTION
+ "\nsezione: %s\n"
+UNLINKED
+ "%s non collegata\n"
+GLOBBING
+ "espandendo %s\n"
+EXPANSION_FAILED
+ "Tentativo [%s] di espansione della pagina di guida fallito\n"
+OPEN_ERROR
+ "Impossibile aprire la pagina di guida %s\n"
+READ_ERROR
+ "Errore leggendo la pagina di guida %s\n"
+FOUND_EQN
+ "trovata la direttiva eqn(1)\n"
+FOUND_GRAP
+ "trovata la direttiva grap(1)\n"
+FOUND_PIC
+ "trovata la direttiva pic(1)\n"
+FOUND_TBL
+ "trovata la direttiva tbl(1)\n"
+FOUND_VGRIND
+ "trovata la direttiva vgrind(1)\n"
+FOUND_REFER
+ "trovata la direttiva refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "analisi della direttiva da linea di comando\n"
+ROFF_FROM_FILE
+ "analisi della direttiva dal file %s\n"
+ROFF_FROM_ENV
+ "analisi della direttiva dall'ambiente\n"
+USING_DEFAULT
+ "uso della sequenza di default dei preprocessori\n"
+PLEASE_WAIT
+ "Formattazione pagina, attendere prego...\n"
+CHANGED_MODE
+ "impostazioni dei permessi di %s a %o\n"
+CAT_OPEN_ERROR
+ "Impossibile aprire %s in scrittura.\n"
+PROPOSED_CATFILE
+ "tenter� di scrivere %s se necessario\n"
+IS_NEWER_RESULT
+ "situazione da is_newer() = %d\n"
+TRYING_SECTION
+ "provando la sezione %s\n"
+SEARCHING
+ "\nricerca in %s\n"
+ALREADY_IN_MANPATH
+ "ma %s � gi� in manpath\n"
+CANNOT_STAT
+ "Attenzione: impossibile controllare il file %s!\n"
+IS_NO_DIR
+ "Attenzione: %s non � una directory!\n"
+ADDING_TO_MANPATH
+ "aggiunto %s a manpath\n"
+PATH_DIR
+ "\npercorso directory %s "
+IS_IN_CONFIG
+ "� nel file di configurazione\n"
+IS_NOT_IN_CONFIG
+ "non � nel file di configurazione\n"
+MAN_NEARBY
+ "ma c'� una directory man vicina\n"
+NO_MAN_NEARBY
+ "e non sono state trovate directory man vicine\n"
+ADDING_MANDIRS
+ "\naggiunte directory man\n\n"
+CATNAME_IS
+ "cat_name in convert_to_cat () �: %s\n"
+NO_EXEC
+ "\ncomando non in esecuzione:\n %s\n"
+USAGE1
+ "uso: %s [-adfhktwW] [sezione] [-M percorso] [-P paginatore] [-S list]\n\t"
+USAGE2
+ "[-m sistema] "
+USAGE3
+ "[-p stringa] nome ...\n\n"
+USAGE4
+ " a : trova tutte le voci corrispondenti\n\
+ c : non usa il file cat (formattato)\n\
+ d : stampa informazioni di debug\n\
+ D : come -d, ma mostra anche la pagina\n\
+ f : come whatis(1)\n\
+ h : stampa questo messaggio di aiuto\n\
+ k : come apropos(1)\n\
+ K : cerca una stringa in tutte le pagine di guida\n"
+USAGE5
+ " t : usa troff per formattare le pagine per la stampa\n"
+USAGE6
+ "\
+ w : stampa la posizione delle pagine di guida che saranno mostrate\n\
+ (se non � dato nessun nome: stampa le directory di ricerca)\n\
+ W : come -w, ma mostra solo i filename\n\n\
+ C file : usa `file' come file di configurazione\n\
+ M percorso : imposta il percorso di ricerca per le pagine a `percorso'\n\
+ P paginatore : usa il programma `paginatore' per mostrare le pagine\n\
+ S lista : lista di sezioni separate dal carattere due punti\n"
+USAGE7
+ " m sistema : cerca pagine di guida per sistemi alternativi\n"
+USAGE8
+ " p stringa : la stringa comunica quale preprocessore eseguire\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "e l'utente reale non pu� aprire neanche il file formattato\n"
+USER_CAN_OPEN_CAT
+ "ma l'utente reale pu� aprire il file formattato\n"
+CANNOT_FORK
+ "fallito il fork del comando _%s_\n"
+WAIT_FAILED
+ "errore nell'attesa del processo figlio _%s_\n"
+GOT_WRONG_PID
+ "molto strano..., ottenuto un pid errato nell'attesa di un mio\n\
+processo figlio\n"
+CHILD_TERMINATED_ABNORMALLY
+ "errore fatale: il comando _%s_ � terminato in modo non normale\n"
+IDENTICAL
+ "La pagina di guida %s � identica a %s\n"
+MAN_FOUND
+ "Trovate la(le) pagina(e) di guida:\n"
+NO_TROFF
+ "errore: nessun comando TROFF specificato in %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "nessuna pagina formattata registrata a causa di una lunghezza di\n\
+linea non standard\n"
+BROWSER_IS
+ "\nutilizzando %s come browser\n"
+HTMLPAGER_IS
+ "\nimpiegando %s per convertire pagine HTML in puro testo\n"
+FOUND_FILE
+ "manfile_from_sec_and_dir() ha trovato %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file non ha trovato alcuna corrispondenza.\n"
+GLOB_FOR_FILE
+ "glob_for_file ha restituito %s.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob espander� %s\n"
diff --git a/msgs/mess.it.codeset b/msgs/mess.it.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.it.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.ja b/msgs/mess.ja
new file mode 100644
index 0000000..14774ef
--- /dev/null
+++ b/msgs/mess.ja
@@ -0,0 +1,171 @@
+BAD_CONFIG_FILE
+ "����ե����� %s �˸�꤬����ޤ���\n"
+CONFIG_OPEN_ERROR
+ "�ٹ�: ����ե����� %s �Υ����ץǤ��ޤ���Ǥ�����\n"
+PARSE_ERROR_IN_CONFIG
+ "����ե�����β�����˥��顼�����Ĥ���ޤ�����\n"
+INCOMPAT
+ "%s ���ץ����� %s ���ץ�����Ʊ���˻��ѤǤ��ޤ���\n"
+NO_ALTERNATE
+ "¾�Υ����ƥ�ǥ���ѥ��뤵�줿��Τϥ��ݡ��Ȥ��Ƥ��ޤ���\n"
+NO_COMPRESS
+ "man ���ޥ�ɤϥե����ޥåȤ��� cat �ڡ�����ưŪ�˰��̤���褦��\n\
+����ѥ��뤵��Ƥ��ޤ���������ե������ COMPRESS �����������ޤ���\n"
+NO_NAME_FROM_SECTION
+ "��������� %s �ΤɤΥޥ˥奢���ɽ�����ޤ���?\n"
+NO_NAME_NO_SECTION
+ "�ɤΥޥ˥奢���ɽ�����ޤ���?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "��������� %2$s �ˤ� %1$s �Υޥ˥奢��Ϥ���ޤ���\n"
+NO_SUCH_ENTRY
+ "%s �Υޥ˥奢��Ϥ���ޤ���\n"
+PAGER_IS
+ "\n%s ��ڡ����㡼�Ȥ��ƻ��Ѥ��ޤ���\n"
+SYSTEM_FAILED
+ "�ե����ޥåȡ����ޥ�ɤ�ɽ�����ޥ�ɤμ¹ԥ��顼�������ޤ�����\n\
+���ޥ�� %s ����λ���ơ����� %d �ǽ�λ���ޤ�����\n"
+VERSION
+ "%s, ������� %s\n\n"
+OUT_OF_MEMORY
+ "���꤬��ޤ���- %d �Х��Ȥ����ݤǤ��ޤ���\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "�ե����� %s �Υץ�ץȥ��å��ؼ��β�����˥��顼��ȯ�����ޤ�����\n"
+MANROFFSEQ_ERROR
+ "MANROFFSEQ �Υץ�ץ�å��ؼ��β�����˥��顼��ȯ�����ޤ�����\n\
+�����˥����ƥࡦ�ǥե���Ȥ���Ѥ��ޤ���\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "���ޥ�ɥ饤��Υץ�ץ�å��ؼ��β�����˥��顼��ȯ�����ޤ�����\n"
+UNRECOGNIZED_LINE
+ "����ե����������Ǥ��ʤ��Ԥ�����ޤ���(̵�뤷�ޤ�)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: �����顼: ʸ���� %s �����Ĥ���ޤ���\n"
+FOUND_MANDIR
+ "man �ǥ��쥯�ȥ� %s �Ĥ��ޤ�����\n"
+FOUND_MAP
+ "manpath map %s --> %s �Ĥ��ޤ�����\n"
+FOUND_CATDIR
+ "�б����� catdir �� %s �Ǥ���\n"
+LINE_TOO_LONG
+ "����ե�����ιԤ�Ĺ��ޤ���\n"
+SECTION
+ "\n���������: %s\n"
+UNLINKED
+ "%s �������ޤ���\n"
+GLOBBING
+ "%s ��Ÿ�����ޤ���\n"
+EXPANSION_FAILED
+ "[%s] ��ޥ˥奢�롦�ڡ�����Ÿ���Ǥ��ޤ���Ǥ�����\n"
+OPEN_ERROR
+ "�ޥ˥奢�롦�ڡ��� %s �������ץ�Ǥ��ޤ���Ǥ�����\n"
+READ_ERROR
+ "�ޥ˥奢�롦�ڡ��� %s ���ɤ�ޤ���Ǥ�����\n"
+FOUND_EQN
+ "eqn(1) ̿��Ĥ��ޤ�����\n"
+FOUND_GRAP
+ "grap(1) ̿��Ĥ��ޤ�����\n"
+FOUND_PIC
+ "pic(1) ̿��Ĥ��ޤ�����\n"
+FOUND_TBL
+ "tbl(1) ̿��Ĥ��ޤ�����\n"
+FOUND_VGRIND
+ "vgrind(1) ̿��Ĥ��ޤ�����\n"
+FOUND_REFER
+ "refer(1) ̿��Ĥ��ޤ�����\n"
+ROFF_FROM_COMMAND_LINE
+ "���ޥ�ɡ��饤���̿��������Ǥ���\n"
+ROFF_FROM_FILE
+ "�ե����� %s �����̿��β�����Ǥ���\n"
+ROFF_FROM_ENV
+ "�Ķ��ѿ����̿��β�����Ǥ���\n"
+USING_DEFAULT
+ "�ǥե���Ȥ�����������������Ѥ��ޤ���\n"
+PLEASE_WAIT
+ "�ڡ����Υե����ޥå���Ǥ����������Ԥ���������...\n"
+CHANGED_MODE
+ "�⡼�ɤ� %s ���� %o ���ѹ����ޤ���\n"
+CAT_OPEN_ERROR
+ "%s ����ߤΤ���˥����ץ�Ǥ��ޤ���Ǥ�����\n"
+PROPOSED_CATFILE
+ "ɬ�פʤ�С�%s �˽��ߤ��ߤޤ���\n"
+IS_NEWER_RESULT
+ "is_newer() = %d\n"
+TRYING_SECTION
+ "��������� %s ���ߤޤ���\n"
+SEARCHING
+ "\n%s ����Ǥ���\n"
+ALREADY_IN_MANPATH
+ "��������%s �Ϥ��Ǥ� manpath �˴ޤޤ�Ƥ��ޤ���\n"
+CANNOT_STAT
+ "�ٹ�: �ե����� %s �ξ���(stat)�������Ǥ��ޤ���\n"
+IS_NO_DIR
+ "�ٹ�: %s �ϥǥ��쥯�ȥ�ǤϤ���ޤ���\n"
+ADDING_TO_MANPATH
+ "%s �� manpath �˲ä��ޤ���\n"
+PATH_DIR
+ "\n�ѥ��Υǥ��쥯�ȥ� %s "
+IS_IN_CONFIG
+ "������ե�����ˤ���ޤ���\n"
+IS_NOT_IN_CONFIG
+ "������ե�����ˤ���ޤ���\n"
+MAN_NEARBY
+ "����������˥ޥ˥奢�롦�ǥ��쥯�ȥ꤬����ޤ���\n"
+NO_MAN_NEARBY
+ "����ˡ���ˤ�ޥ˥奢�롦�ǥ��쥯�ȥ꤬����ޤ���\n"
+ADDING_MANDIRS
+ "\n�ޥ˥奢�롦�ǥ��쥯�ȥ����Ū���ɲä��ޤ���\n\n"
+CATNAME_IS
+ "convert_to_cat() �ˤ����� cat_name �� %s �Ǥ���\n"
+NO_EXEC
+ "\n���ޥ�ɤ�¹Ԥ��ޤ���:\n %s\n"
+USAGE1
+ "usage: %s [-adfhktwW] [section] [-M path] [-P pager] [-S list]\n\t"
+USAGE2
+ "[-m system] "
+USAGE3
+ "[-p string] name ...\n\n"
+USAGE4
+ " a : ���Ƥΰ��פ����Ĥ���\n\
+ c : cat �ե��������Ѥ��ʤ�\n\
+ d : �ǥХå������ɽ������\n\
+ D : -d �˲ä����ޥ˥奢�롦�ڡ�����ɽ������\n\
+ f : whatis(1) ��Ʊ��\n\
+ h : ���Υإ�ס���å�������ɽ������\n\
+ k : apropos(1) ��Ʊ��\n\
+ K : ���ƤΥڡ������ʸ���������\n"
+USAGE5
+ " t : �ڡ����Υե����ޥå� troff ����Ѥ���\n"
+USAGE6
+ "\
+ w : �ޥ˥奢�롦�ڡ����ΰ��֤�ɽ������\n\
+ (̾������ꤷ�ʤ��ä����: ��������ǥ��쥯�ȥ��ɽ������)\n\
+ W : -w ��Ʊ��, �������ե�����̾����ɽ�����ʤ�\n\n\
+ C file : ����ե�����Ȥ��� `file' ����Ѥ���\n\
+ M path : `path' ��ޥ˥奢�롦�ڡ����θ����ѥ������ꤹ��\n\
+ P pager : `pager' ��ڡ���ɽ���ץ���Ȥ��ƻ��Ѥ���\n\
+ S list : ���������̾�Υꥹ��(�����Ƕ��ڤ�)\n"
+USAGE7
+ " m system : ¾�Υ����ƥ��ѤΥޥ˥奢�롦�ڡ���������\n"
+USAGE8
+ " p string : �ɤ���������¹Ԥ���ꤹ��ʸ����\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "�����ơ����μ¥桼�����Ǥ� cat �ե�������ץ�Ǥ��ޤ���\n"
+USER_CAN_OPEN_CAT
+ "�����������μ¥桼������ cat �ե����뤬�����ץ�Ǥ��ޤ���\n"
+CANNOT_FORK
+ "���ޥ�� _%s_ �Τ���� fork ���Ǥ��ޤ���Ǥ�����\n"
+WAIT_FAILED
+ "�ҥץ�� _%s_ �� wait ���Ƥ���֤˥��顼��ȯ�����ޤ�����\n"
+GOT_WRONG_PID
+ "�۾�Ǥ�???, wait ���Ƥ���ҥץ���Ȥϰ㤦 PID ��������ޤ�����\n"
+CHILD_TERMINATED_ABNORMALLY
+ "��̿Ū���顼: ���ޥ�� _%s_ ���۾ェλ���ޤ�����\n"
+IDENTICAL
+ "�ޥ˥奢�롦�ڡ��� %s �� %s ������Ʊ���Ǥ���\n"
+MAN_FOUND
+ "�ޥ˥奢�롦�ڡ����Ĥ��ޤ���:\n"
+NO_TROFF
+ "���顼: %s �˻��ꤵ��Ƥ��� TROFF ���ޥ�ɤ����Ĥ���ޤ���\n"
+NO_CAT_FOR_NONSTD_LL
+ "�Ԥ�Ĺ����ɸ��Ū�Ǥʤ����� cat �ڡ�������¸����ޤ���Ǥ�����\n"
diff --git a/msgs/mess.ja.codeset b/msgs/mess.ja.codeset
new file mode 100644
index 0000000..7d83d8d
--- /dev/null
+++ b/msgs/mess.ja.codeset
@@ -0,0 +1 @@
+$ codeset=euc-jp
diff --git a/msgs/mess.ko b/msgs/mess.ko
new file mode 100644
index 0000000..8935787
--- /dev/null
+++ b/msgs/mess.ko
@@ -0,0 +1,171 @@
+BAD_CONFIG_FILE
+ "���� ���� %s�� �߸��� �ֽ��ϴ�.\n"
+CONFIG_OPEN_ERROR
+ "���: ���� ���� %s�� ���� �����ϴ�.\n"
+PARSE_ERROR_IN_CONFIG
+ "���� ������ �ؼ��߿� ������ �߰ߵǾ����ϴ�.\n"
+INCOMPAT
+ "%s �ɼǰ� %s �ɼ��� ���ÿ� ����� �� �����ϴ�.\n"
+NO_ALTERNATE
+ "�ٸ� �ý������� ������ �� ���� �������� �ʽ��ϴ�.\n"
+NO_COMPRESS
+ "man ��ɴ� ���� �� cat �������� �ڵ������� �����ϵ��� \n\
+������ �Ǿ� ������, ���� ���Ͽ� COMPRESS ���ǰ� �����ϴ�.\n"
+NO_NAME_FROM_SECTION
+ "���� %s�� ������ ǥ���մϱ�?\n"
+NO_NAME_NO_SECTION
+ "��� ������ ǥ���մϱ�?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "���� %2$s���� %1$s�� ������ �����ϴ�.\n"
+NO_SUCH_ENTRY
+ "%s�� ������ �����ϴ�.\n"
+PAGER_IS
+ "\n%s�� pager�μ� ����մϴ�.\n"
+SYSTEM_FAILED
+ "���ˡ�����̳� ǥ�� ����� ���� ������ ���߽��ϴ�.\n\
+Ŀ��� %s �� ���� �������ͽ� %d �� �����߽��ϴ�.\n"
+VERSION
+ "%s, ���� %s\n\n"
+OUT_OF_MEMORY
+ "�� ������� �ʽ��ϴ�.- %d ����Ʈ�� Ȯ���� �� �����ϴ�.\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "���� %s�� �������μ��� ������ �ؼ��߿� ������ ���߽��ϴ�.\n"
+MANROFFSEQ_ERROR
+ "MANROFFSEQ �� �������μ��� ������ �ؼ��߿� ������ ���߽��ϴ�.\n\
+��ſ� �ý��ۡ�����Ʈ�� ����մϴ�.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "��� ������ �������μ��� ������ �ؼ��߿� ������ ���߽��ϴ�.\n"
+UNRECOGNIZED_LINE
+ "���� ���Ͽ� ������ �� ���� ���� �ֽ��ϴ�.\n%s\n"
+GETVAL_ERROR
+ "man-config.c: ���� ����: ���� ���� %s�� �߰ߵ��� �ʽ��ϴ�.\n"
+FOUND_MANDIR
+ "man ���丮 %s�� ã�Ƴ½��ϴ�.\n"
+FOUND_MAP
+ "manpath map %s --> %s�� ã�Ƴ½��ϴ�.\n"
+FOUND_CATDIR
+ "�����ϴ� catdir�� %s�Դϴ�.\n"
+LINE_TOO_LONG
+ "���� ������ ���� �ʹ� ��ϴ�.\n"
+SECTION
+ "\n����: %s\n"
+UNLINKED
+ "%s �� �����մϴ�.\n"
+GLOBBING
+ "%s �� ���ϴ�.\n"
+EXPANSION_FAILED
+ "[%s] �� ������������ ���� �����ϴ�.\n"
+OPEN_ERROR
+ "���������� %s �� �� �� �����ϴ�.\n"
+READ_ERROR
+ "���������� %s �� ���� �� �����ϴ�.\n"
+FOUND_EQN
+ "eqn(1) ����� ã�Ƴ½��ϴ�.\n"
+FOUND_GRAP
+ "grap(1) ����� ã�Ƴ½��ϴ�.\n"
+FOUND_PIC
+ "pic(1) ����� ã�Ƴ½��ϴ�.\n"
+FOUND_TBL
+ "tbl(1) ����� ã�Ƴ½��ϴ�.\n"
+FOUND_VGRIND
+ "vgrind(1) ����� ã�Ƴ½��ϴ�.\n"
+FOUND_REFER
+ "refer(1) ����� ã�Ƴ½��ϴ�.\n"
+ROFF_FROM_COMMAND_LINE
+ "��ɡ��������κ����� ����� �ؼ����Դϴ�.\n"
+ROFF_FROM_FILE
+ "���� %s �κ����� ����� �ؼ����Դϴ�.\n"
+ROFF_FROM_ENV
+ "ȯ�� �����κ����� ����� �ؼ����Դϴ�.\n"
+USING_DEFAULT
+ "����Ʈ�� ���� ó�� ������ ����մϴ�.\n"
+PLEASE_WAIT
+ "�������� �������Դϴ�.���� ��ٷ� �ּ���...\n"
+CHANGED_MODE
+ "��带 %s �κ��� %o �� �����մϴ�.\n"
+CAT_OPEN_ERROR
+ "%s �� ������ ���ؼ� ������ �� �������ϴ�.\n"
+PROPOSED_CATFILE
+ "�ʿ��ϸ�, %s �� ������ �õ��մϴ�.\n"
+IS_NEWER_RESULT
+ "is_newer() = %d\n"
+TRYING_SECTION
+ "���� %s�� �õ��մϴ�.\n"
+SEARCHING
+ "\n%s�� �˻����Դϴ�.\n"
+ALREADY_IN_MANPATH
+ "����, %s �� �̹� manpath �� ���ԵǾ� �ֽ��ϴ�.\n"
+CANNOT_STAT
+ "���: ���� %s ����(stat)�� ���� �� �����ϴ�.\n"
+IS_NO_DIR
+ "���: %s �� ���丮�� �ƴմϴ�.\n"
+ADDING_TO_MANPATH
+ "%s�� manpath�� ���մϴ�.\n"
+PATH_DIR
+ "\n�н��� ���丮 %s "
+IS_IN_CONFIG
+ "(��)�� ���� ���Ͽ� �ֽ��ϴ�.\n"
+IS_NOT_IN_CONFIG
+ "(��)�� ���� ���Ͽ� �����ϴ�.\n"
+MAN_NEARBY
+ "����, ��ó�� �����丮�� �ֽ��ϴ�.\n"
+NO_MAN_NEARBY
+ "����� ������ �����丮�� �����ϴ�.\n"
+ADDING_MANDIRS
+ "\n�����丮�� ���������� �߰��մϴ�.\n\n"
+CATNAME_IS
+ "convert_to_cat()�� �־�� cat_name �� %s �Դϴ�.\n"
+NO_EXEC
+ "\nĿ��带 �������� �ʽ��ϴ� :\n %s\n"
+USAGE1
+ "usage: %s [-adfhktwW] [section] [-M path] [-P pager] [-S list]\n\t"
+USAGE2
+ "[-m system] "
+USAGE3
+ "[-p string] name ...\n\n"
+USAGE4
+ " a : ��� ��ġ�ϴ� ���� ã�Ƴ��� \n\
+ c : cat ������ ������� �ʴ� \n\
+ d : ����� ������ ǥ���ϴ� \n\
+ D : -d �� ������ ������������ ǥ���ϴ� \n\
+ f : whatis(1)�� ���� \n\
+ h : �� ��������� ǥ���ϴ� \n\
+ k : apropos(1)�� ���� \n\
+ K : ��� ���������� ij���� ������ �˻��ϴ� \n"
+USAGE5
+ " t : �������� ���� troff �� ����ϴ� \n"
+USAGE6
+ "\
+ w : ������������ ��ġ�� ǥ���ϴ� \n\
+ (�̸��� �������� �ʾҴ� ���: �˻��ϴ� ���丮�� ǥ���Ѵ�) \n\
+ W : -w �� ����, ���� ���ϸ� �ۿ� ǥ������ �ʴ� \n\n\
+ C file : ���� ���Ϸμ� `file'�� ����ϴ� \n\
+ M path : `path'�� ������������ �˻� �н��� �����ϴ� \n\
+ P pager : `pager'�� ������ ǥ�� ���α����μ� ����ϴ� \n\
+ S list : ���Ǹ��� ����Ʈ(�ڷ����� �ܶ����´�) \n"
+USAGE7
+ " m system : �ٸ� �ý��ۿ��� ������������ �˻��ϴ� \n"
+USAGE8
+ " p string : ��� ���� ó���� ������ �����ϴ� ij���� ���� \n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1) \n\
+ g - grap(1) r - refer(1) v - vgrind(1) \n"
+USER_CANNOT_OPEN_CAT
+ "����, �� ���� ���������� cat ������ ������ �� �����ϴ�.\n"
+USER_CAN_OPEN_CAT
+ "����, �� ���� ������ cat ������ ������ �� �ֽ��ϴ�.\n"
+CANNOT_FORK
+ "Ŀ��� _%s_ �� ���� fork �� �� �� �������ϴ�.\n"
+WAIT_FAILED
+ "child process _%s_ �� wait �ϰ� �ִ� ���ȿ� ������ ���߽��ϴ�.\n"
+GOT_WRONG_PID
+ "�������Դϴ�???, wait �ϰ� �ִ� child process�ʹ� �ٸ� PID �� �ҽ��ϴ�.\n"
+CHILD_TERMINATED_ABNORMALLY
+ "ġ���� ����: Ŀ��� _%s_ �� �̻�����(ABEND) �߽��ϴ�.\n"
+IDENTICAL
+ "���� ������ %s�� %s�� ������ �����ϴ�.\n"
+MAN_FOUND
+ "���� �������� ã�ҽ��ϴ� :\n"
+NO_TROFF
+ "����: %s �� �����Ǿ� �ִ� TROFF ����� �߰ߵ��� �ʽ��ϴ�.\n"
+NO_CAT_FOR_NONSTD_LL
+ "���� ���̰� ǥ���� �ƴϱ� ������ cat �������� �������� �ʾҽ��ϴ�.\n"
diff --git a/msgs/mess.ko.codeset b/msgs/mess.ko.codeset
new file mode 100644
index 0000000..ee4ff3a
--- /dev/null
+++ b/msgs/mess.ko.codeset
@@ -0,0 +1 @@
+$ codeset=euc-kr
diff --git a/msgs/mess.nl b/msgs/mess.nl
new file mode 100644
index 0000000..b47f4be
--- /dev/null
+++ b/msgs/mess.nl
@@ -0,0 +1,189 @@
+BAD_CONFIG_FILE
+ "De inhoud van bestand %s is onbegrijpelijk.\n"
+CONFIG_OPEN_ERROR
+ "Waarschuwing: kan configuratiebestand %s niet openen.\n"
+PARSE_ERROR_IN_CONFIG
+ "Syntaxfout in configuratiebestand.\n"
+INCOMPAT
+ "Opties %s en %s gaan niet samen.\n"
+NO_ALTERNATE
+ "Sorry, ondersteuning voor andere systemen is niet meegecompileerd.\n"
+NO_COMPRESS
+ "Deze 'man' is gecompileerd met automatische compressie van cat-pagina's,\n\
+maar het configuratiebestand definieert COMPRESS niet.\n"
+NO_NAME_FROM_SECTION
+ "Welke man-pagina wilt u zien uit sectie %s?\n"
+NO_NAME_NO_SECTION
+ "Welke man-pagina wilt u zien?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Er is geen pagina over '%s' in sectie %s.\n"
+NO_SUCH_ENTRY
+ "Er is geen pagina over '%s'.\n"
+PAGER_IS
+ "\n'%s' wordt gebruikt als om de uitvoer te tonen\n"
+SYSTEM_FAILED
+ "Fout tijdens opmaak- of uitvoeropdracht.\n\
+De afsluitwaarde van '%s' was %d.\n"
+VERSION
+ "Dit is '%s', versie %s.\n\n\
+Toont de handleiding ('man-pagina') van de gegeven opdrachtnaam.\n\n"
+OUT_OF_MEMORY
+ "Onvoldoende geheugen beschikbaar -- kan geen %d bytes reserveren\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Fout tijdens ontleden van een '*roff'-opdracht uit bestand '%s'.\n"
+MANROFFSEQ_ERROR
+ "Fout tijdens ontleden van MANROFFSEQ -- standaardvolgorde wordt gebruikt.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Fout tijdens ontleden van '*roff'-opdracht van de opdrachtregel.\n"
+UNRECOGNIZED_LINE
+ "Onbegrepen regel in het configuratiebestand -- wordt genegeerd\n%s\n"
+GETVAL_ERROR
+ "man-config.c: **interne fout**: kan tekenreeks '%s' niet vinden\n"
+FOUND_MANDIR
+ "man-map %s gevonden\n"
+FOUND_MAP
+ "man-pad-afbeelding %s --> %s gevonden\n"
+FOUND_CATDIR
+ "de overeenkomstige cat-map is %s\n"
+LINE_TOO_LONG
+ "Te lange regel in het configuratiebestand.\n"
+SECTION
+ "\nsectie: %s\n"
+UNLINKED
+ "%s is verwijderd\n"
+GLOBBING
+ "globben van %s\n"
+EXPANSION_FAILED
+ "Poging [%s] om de man-pagina te decomprimeren is mislukt.\n"
+OPEN_ERROR
+ "Kan man-pagina %s niet openen.\n"
+READ_ERROR
+ "Fout tijdens lezen van man-pagina %s.\n"
+FOUND_EQN
+ "eqn(1)-aanwijzing gevonden\n"
+FOUND_GRAP
+ "grap(1)-aanwijzing gevonden\n"
+FOUND_PIC
+ "pic(1)-aanwijzing gevonden\n"
+FOUND_TBL
+ "tbl(1)-aanwijzing gevonden\n"
+FOUND_VGRIND
+ "vgrind(1)-aanwijzing gevonden\n"
+FOUND_REFER
+ "refer(1)-aanwijzing gevonden\n"
+ROFF_FROM_COMMAND_LINE
+ "ontleden van aanwijzingen van de opdrachtregel\n"
+ROFF_FROM_FILE
+ "ontleden van aanwijzingen uit bestand %s\n"
+ROFF_FROM_ENV
+ "ontleden van aanwijzingen uit de omgeving\n"
+USING_DEFAULT
+ "de standaard preprocessor-volgorde wordt gebruikt\n"
+PLEASE_WAIT
+ "Opmaken van de pagina...\n"
+CHANGED_MODE
+ "De modus van %s is gewijzigd in %o.\n"
+CAT_OPEN_ERROR
+ "Kan niet schrijven naar %s.\n"
+PROPOSED_CATFILE
+ "indien nodig wordt bestand %s geschreven\n"
+IS_NEWER_RESULT
+ "afsluitwaarde van is_newer() = %d\n"
+TRYING_SECTION
+ "sectie %s wordt bekeken\n"
+SEARCHING
+ "\nzoeken in %s\n"
+ALREADY_IN_MANPATH
+ "maar %s zit al in het zoekpad\n"
+CANNOT_STAT
+ "Waarschuwing: kan status van bestand '%s' niet opvragen!\n"
+IS_NO_DIR
+ "Waarschuwing: '%s' is geen map!\n"
+ADDING_TO_MANPATH
+ "%s is toegevoegd aan het zoekpad\n"
+PATH_DIR
+ "\nzoekpad-map %s "
+IS_IN_CONFIG
+ "staat in het configuratiebestand\n"
+IS_NOT_IN_CONFIG
+ "staat niet in het configuratiebestand\n"
+MAN_NEARBY
+ "maar er is een man-map in de buurt\n"
+NO_MAN_NEARBY
+ "en er is geen man-map in de buurt\n"
+ADDING_MANDIRS
+ "\nstandaard man-mappen worden toegevoegd\n\n"
+CATNAME_IS
+ "cat_name in convert_to_cat() is: %s\n"
+NO_EXEC
+ "\nNiet-uitgevoerde opdracht:\n %s\n"
+USAGE1
+ "Gebruik: %s [-adfhktwW] [-M zoekpad] [-P viewer] [-S secties]\n\t "
+USAGE2
+ " [-m systeem]"
+USAGE3
+ " [-p tekenreeks] [sectie] naam...\n\n"
+USAGE4
+ " -a alle overeenkomende pagina's tonen, niet slechts de eerste\n\
+ -c geen cat-bestanden gebruiken\n\
+ -d uitgebreide debug-informatie produceren\n\
+ -D als '-d', maar ook de pagina's tonen\n\
+ -f als 'whatis' fungeren\n\
+ -h deze hulptekst tonen\n\
+ -k als 'apropos' fungeren\n\
+ -K in alle man-pagina's naar een tekenreeks zoeken\n"
+USAGE5
+ " -t 'troff' gebruiken om pagina's op te maken (om ze af te drukken)\n"
+USAGE6
+ "\
+ -w het volledige pad weergeven van de pagina die getoond zou worden\n\
+ (als geen naam gegeven is, dan tonen welke mappen doorzocht worden)\n\
+ -W als '-w', maar alleen de bestandsnamen tonen, niet het volledige pad\n\n\
+ -C bestand te gebruiken configuratiebestand\n\
+ -M pad pad waarin naar man-pagina's gezocht moet worden\n\
+ -P viewer dit programma gebruiken om de uitvoer te tonen\n\
+ -S secties te doorzoeken secties (scheiden met dubbele punten)\n"
+USAGE7
+ " -m systeem naar man-pagina's van dit Unix-systeem zoeken\n"
+USAGE8
+ " -p letters uit te voeren voorverwerkingsprogramma's:\n\
+ e - [n]eqn p - pic t - tbl\n\
+ g - grap r - refer v - vgrind\n"
+USER_CANNOT_OPEN_CAT
+ "en de werkelijke gebruiker kan het cat-bestand ook niet openen\n"
+USER_CAN_OPEN_CAT
+ "maar de werkelijke gebruiker kan het cat-bestand wel openen\n"
+CANNOT_FORK
+ "Kan geen nieuw proces starten voor opdracht '%s'\n"
+WAIT_FAILED
+ "Fout tijdens wachten op dochterproces '%s'\n"
+GOT_WRONG_PID
+ "Vreemd..., kreeg een verkeerd PID tijdens wachten op dochterproces\n"
+CHILD_TERMINATED_ABNORMALLY
+ "Fatale fout: opdracht '%s' werd abnormaal be�indigd\n"
+IDENTICAL
+ "Man-pagina %s is identiek aan %s\n"
+MAN_FOUND
+ "Gevonden man-pagina('s):\n"
+NO_TROFF
+ "Fout: er is in %s geen TROFF-commando gegeven\n"
+NO_CAT_FOR_NONSTD_LL
+ "Geen cat-pagina aangemaakt vanwege de afwijkende regellengte.\n"
+BROWSER_IS
+ "\n'%s' wordt gebruikt als browser\n"
+HTMLPAGER_IS
+ "\n'%s' wordt gebruikt voor het omzetten van HTML-pagina's naar tekst\n"
+FOUND_FILE
+ "manfile_from_sec_and_dir() vond %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(map=%s, sectie=%s, naam=%s, vlaggen=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(map=%s, sectie=%s, naam=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file() heeft geen overeenkomsten gevonden\n"
+GLOB_FOR_FILE
+ "glob_for_file() geeft %s terug\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(map=%s, sectie=%s, naam=%s, extensie=%s, hpx=%s, glob=%d, type=0x%0x)\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob() zal %s expanderen\n"
diff --git a/msgs/mess.nl.codeset b/msgs/mess.nl.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.nl.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.pl b/msgs/mess.pl
new file mode 100644
index 0000000..12e7507
--- /dev/null
+++ b/msgs/mess.pl
@@ -0,0 +1,188 @@
+BAD_CONFIG_FILE
+ "nie mo�na zrozumie� zawarto�ci pliku %s\n"
+CONFIG_OPEN_ERROR
+ "Ostrze�enie: nie mo�na otworzy� pliku konfiguracyjnego %s\n"
+PARSE_ERROR_IN_CONFIG
+ "B��d podczas interpretacji pliku konfiguracyjnego\n"
+INCOMPAT
+ "niepasuj�ce wzajemnie opcje %s i %s\n"
+NO_ALTERNATE
+ "Niestety - brak wkompilowanej obs�ugi alternatywnych system�w\n"
+NO_COMPRESS
+ "Man zosta� skompilowany z automatyczn� kompresj� stron cat,\n\
+ale plik konfiguracyjny nie definiuje COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Kt�r� stron� podr�cznika z sekcji %s chcesz przeczyta�?\n"
+NO_NAME_NO_SECTION
+ "Kt�r� stron� podr�cznika chcesz przeczyta�?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Nie ma strony %s w sekcji %s podr�cznika\n"
+NO_SUCH_ENTRY
+ "Nie ma strony podr�cznika dla %s\n"
+PAGER_IS
+ "\nu�ywanie %s jako pagera\n"
+SYSTEM_FAILED
+ "B��d podczas wykonywania polecenia formatowania lub wy�wietlania.\n\
+Polecenie systemowe %s zwr�ci�o status %d.\n"
+VERSION
+ "%s, wersja %s\n\n"
+OUT_OF_MEMORY
+ "Brak pami�ci - nie mo�na przydzieli� %d bajt�w pami�ci\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "B��d podczas przetwarzania polecenia *roff z pliku %s\n"
+MANROFFSEQ_ERROR
+ "B��d podczas przetwarzania MANROFFSEQ. U�ywanie ustawie� domy�lnych systemu.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "B��d podczas przetwarzania polecenia *roff podanego w linii polece�.\n"
+UNRECOGNIZED_LINE
+ "Nierozpoznana linia w pliku konfiguracyjnym (zignorowana)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: b��d wewn�trzny: nie znaleziono �a�cucha znak�w %s\n"
+FOUND_MANDIR
+ "znaleziono katalog man %s\n"
+FOUND_MAP
+ "znaleziono map� manpath %s --> %s\n"
+FOUND_CATDIR
+ "odpowiadaj�cy katalog cat to %s\n"
+LINE_TOO_LONG
+ "Za d�uga linia w pliku konfiguracyjnym\n"
+SECTION
+ "\nsekcja: %s\n"
+UNLINKED
+ "skasowany %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Pr�ba [%s] rozwini�cia strony podr�cznika nie powiod�a si�\n"
+OPEN_ERROR
+ "Nie mo�na otworzy� strony podr�cznika %s\n"
+READ_ERROR
+ "B��d podczas odczytu strony podr�cznika %s\n"
+FOUND_EQN
+ "znaleziono dyrektyw� eqn(1)\n"
+FOUND_GRAP
+ "znaleziono dyrektyw� grap(1)\n"
+FOUND_PIC
+ "znaleziono dyrektyw� pic(1)\n"
+FOUND_TBL
+ "znaleziono dyrektyw� tbl(1)\n"
+FOUND_VGRIND
+ "znaleziono dyrektyw� vgrind(1)\n"
+FOUND_REFER
+ "znaleziono dyrektyw� refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "przetwarzanie dyrektywy podanej w linii polece�\n"
+ROFF_FROM_FILE
+ "przetwarzanie dyrektywy z pliku %s\n"
+ROFF_FROM_ENV
+ "przetwarzanie dyrektywy ze zmiennej �rodowiskowej\n"
+USING_DEFAULT
+ "u�ywanie domy�lnej sekwencji preprocesora\n"
+PLEASE_WAIT
+ "Formatowanie strony, prosz� czeka�...\n"
+CHANGED_MODE
+ "zmieniono uprawnienia %s na %o\n"
+CAT_OPEN_ERROR
+ "Nie mo�na otworzy� %s do zapisu.\n"
+PROPOSED_CATFILE
+ "w razie potrzeby man b�dzie pr�bowa� zapisa� %s\n"
+IS_NEWER_RESULT
+ "status z is_newer() = %d\n"
+TRYING_SECTION
+ "pr�bowanie sekcji %s\n"
+SEARCHING
+ "\nwyszukiwanie w %s\n"
+ALREADY_IN_MANPATH
+ "ale %s jest ju� w manpath\n"
+CANNOT_STAT
+ "Ostrze�enie: nie mo�na u�y� stat na pliku %s!\n"
+IS_NO_DIR
+ "Ostrze�enie: %s nie jest katalogiem!\n"
+ADDING_TO_MANPATH
+ "dodawanie %s do manpath\n"
+PATH_DIR
+ "\n�cie�ka katalogu %s "
+IS_IN_CONFIG
+ "jest w pliku konfiguracyjnym\n"
+IS_NOT_IN_CONFIG
+ "nie jest obecna w pliku konfiguracyjnym\n"
+MAN_NEARBY
+ "ale jest katalog man niedaleko\n"
+NO_MAN_NEARBY
+ "i nie ma katalogu man niedaleko\n"
+ADDING_MANDIRS
+ "\ndodawanie obowi�zkowych katalog�w man\n\n"
+CATNAME_IS
+ "cat_name w convert_to_cat () jest: %s\n"
+NO_EXEC
+ "\nniewykonywanie polecenia:\n %s\n"
+USAGE1
+ "u�ycie: %s [-adfhktwW] [sekcja] [-M �cie�ka] [-P pager] [-S lista]\n\t"
+USAGE2
+ "[-m system] "
+USAGE3
+ "[-p �a�cuch_znak�w] nazwa ...\n\n"
+USAGE4
+ " a : znajduje wszystkie pasuj�ce strony\n\
+ c : nie u�ywa pliku cat\n\
+ d : wy�wietla mn�stwo informacji debugowania\n\
+ D : jak -d, ale wy�wietla te� strony\n\
+ f : to samo co whatis(1)\n\
+ h : wy�wietla ten komunikat pomocy\n\
+ k : to samo co apropos(1)\n\
+ K : wyszukuje �a�cuch znak�w na wszystkich stronach\n"
+USAGE5
+ " t : u�ywa troff do formatowania stron do wydrukowania\n"
+USAGE6
+ "\
+ w : wy�wietla po�o�enie stron(y) podr�cznika, kt�ra by�aby wy�wietlona\n\
+ (je�eli nie podano �adnej nazwy: wy�wietla przeszukiwane katalogi)\n\
+ W : tak jak -w, ale wy�wietla tylko nazwy plik�w\n\n\
+ C plik : u�ywa `plik' jako plik konfiguracyjny\n\
+ M �cie�ka: ustawia �cie�k� wyszukiwania stron podr�cznika jako `�cie�ka'\n\
+ P pager : u�ywa programu `pager' do wy�wietlania stron\n\
+ S lista : lista sekcji oddzielona dwukropkami\n"
+USAGE7
+ " m system : wyszukuje strony podr�cznika dla alternatywnego systemu\n"
+USAGE8
+ " p �a�cuch znak�w: �a�cuch znak�w okre�laj�cy, kt�re preprocesory u�y�\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "a rzeczywisty u�ytkownik te� nie mo�e otworzy� pliku\n"
+USER_CAN_OPEN_CAT
+ "ale rzeczywisty u�ytkownik mo�e otworzy� plik\n"
+CANNOT_FORK
+ "nieudana pr�ba fork polecenia _%s_\n"
+WAIT_FAILED
+ "b��d podczas oczekiwania na proces potomny _%s_\n"
+GOT_WRONG_PID
+ "bardzo dziwne..., otrzymano z�y pid podczas oczekiwania na proces potomny\n"
+CHILD_TERMINATED_ABNORMALLY
+ "b��d krytyczny: polecenie _%s_ zako�czone nieprawid�owo\n"
+IDENTICAL
+ "Strona podr�cznika %s jest identyczna jak %s\n"
+MAN_FOUND
+ "Znaleziono stron�(y) podr�cznika:\n"
+NO_TROFF
+ "b��d: nie podano polecenia TROFF w %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "strona cat nie zosta�a zapisana z powodu niestandardowej d�ugo�ci linii\n"
+BROWSER_IS
+ "\nu�ywanie %s jako przegl�darki\n"
+HTMLPAGER_IS
+ "\nu�ywanie %s do zrzucania stron HTML jako tekst"
+FOUND_FILE
+ "manfile_from_sec_and_dir() znalaz�a %s\n"
+CALLTRACE1
+ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n"
+CALLTRACE2
+ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n"
+NO_MATCH
+ "glob_for_file nie znalaz�a �adnych dopasowa�.\n"
+GLOB_FOR_FILE
+ "glob_for_file zwr�ci�a %s.\n"
+CALLTRACE3
+ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n"
+ABOUT_TO_GLOB
+ "glob_for_file_ext_glob rozwinie %s\n"
diff --git a/msgs/mess.pl.codeset b/msgs/mess.pl.codeset
new file mode 100644
index 0000000..6d0d028
--- /dev/null
+++ b/msgs/mess.pl.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-2
diff --git a/msgs/mess.pt b/msgs/mess.pt
new file mode 100644
index 0000000..873e319
--- /dev/null
+++ b/msgs/mess.pt
@@ -0,0 +1,165 @@
+BAD_CONFIG_FILE
+ "n�o compreendi o ficheiro %s\n"
+CONFIG_OPEN_ERROR
+ "Aviso: n�o consigo usar o ficheiro de configura��o %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Erro no ficheiro de configura��o\n"
+INCOMPAT
+ "op��es %s e %s incompat�veis\n"
+NO_ALTERNATE
+ "Desculpe - n�o disp�e de suporte para sistemas alternativos\n"
+NO_COMPRESS
+ "Man compilado com compress�o autom�tica mas\n\
+o ficheiro de configura��o n�o define COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Que manual pretende da sec��o %s?\n"
+NO_NAME_NO_SECTION
+ "Que manual pretende?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "N�o existe a entrada %s na sec��o %s\n"
+NO_SUCH_ENTRY
+ "N�o existe a entrada %s\n"
+PAGER_IS
+ "\nusando %s como paginador\n"
+SYSTEM_FAILED
+ "Erro num comando de processamento do manual.\n\
+O comando %s terminou com o erro %d.\n"
+VERSION
+ "%s, vers�o %s\n\n"
+OUT_OF_MEMORY
+ "Mem�ria esgotada - n�o obtive %d bytes\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Erro no processamento de um comando *roff no ficheiro %s\n"
+MANROFFSEQ_ERROR
+ "Erro no processamento de MANROFFSEQ. Usando defaults.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Erro no processamento de um comando *roff na linha de comando.\n"
+UNRECOGNIZED_LINE
+ "Linha desconhecida no ficheiro de configura��o (ignorada)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: erro interno: n�o se encontra a string %s\n"
+FOUND_MANDIR
+ "directoria de man %s encontrada\n"
+FOUND_MAP
+ "encontrado o manpath para %s --> %s\n"
+FOUND_CATDIR
+ "catdir correspondente � %s\n"
+LINE_TOO_LONG
+ "Linha demasiado longa no ficheiro de configura��o\n"
+SECTION
+ "\nsec��o: %s\n"
+UNLINKED
+ "%s removido\n"
+GLOBBING
+ "expandindo %s\n"
+EXPANSION_FAILED
+ "Tentativa [%s] para descomprimir o manual falhada\n"
+OPEN_ERROR
+ "N�o posso ler o manual %s\n"
+READ_ERROR
+ "Erro na leitura do manual %s\n"
+FOUND_EQN
+ "directiva eqn(1) encontrada\n"
+FOUND_GRAP
+ "directiva grap(1) encontrada\n"
+FOUND_PIC
+ "directiva pic(1) encontrada\n"
+FOUND_TBL
+ "directiva tbl(1) encontrada\n"
+FOUND_VGRIND
+ "directiva vgrind(1) encontrada\n"
+FOUND_REFER
+ "directiva refer(1) encontrada\n"
+ROFF_FROM_COMMAND_LINE
+ "processando directiva da linha de comando\n"
+ROFF_FROM_FILE
+ "processando directiva do ficheiro %s\n"
+ROFF_FROM_ENV
+ "processando directiva do environment\n"
+USING_DEFAULT
+ "usando o preprocessamento por omiss�o\n"
+PLEASE_WAIT
+ "Formatando manual, aguarde por favor ...\n"
+CHANGED_MODE
+ "altere as protec��es de %s para %o\n"
+CAT_OPEN_ERROR
+ "N�o consegui escrever em %s.\n"
+PROPOSED_CATFILE
+ "tentarei escrever %s se necess�rio\n"
+IS_NEWER_RESULT
+ "estado de is_newer() = %d\n"
+TRYING_SECTION
+ "tentando a sec��o %s\n"
+SEARCHING
+ "\nprocurando em %s\n"
+ALREADY_IN_MANPATH
+ "mas %s j� est� no manpath\n"
+CANNOT_STAT
+ "Aviso: n�o consigo o ficheiro %s!\n"
+IS_NO_DIR
+ "Aviso: %s n�o � uma directoria!\n"
+ADDING_TO_MANPATH
+ "acrescentando %s ao manpath\n"
+PATH_DIR
+ "\ndirectoria %s "
+IS_IN_CONFIG
+ "est� no ficheiro de configura��o\n"
+IS_NOT_IN_CONFIG
+ "n�o est� no ficheiro de configura��o\n"
+MAN_NEARBY
+ "mas existe uma directoria de man perto\n"
+NO_MAN_NEARBY
+ "e n�o foi encontrada directoria de man perto\n"
+ADDING_MANDIRS
+ "\nacrescentando directorias de man obrigat�rias\n\n"
+CATNAME_IS
+ "cat_name de convert_to_cat () �: %s\n"
+NO_EXEC
+ "\nn�o executando o comando:\n %s\n"
+USAGE1
+ "uso: %s [-adfhktwW] [sec��o] [-M path] [-P paginador] [-S lista]\n\t"
+USAGE2
+ "[-m sistema] "
+USAGE3
+ "[-p string] nome ...\n\n"
+USAGE4
+ " a : encontrar todas as entradas\n\
+ d : imprimir informa��o de debug\n\
+ f : o mesmo que whatis(1)\n\
+ h : imprimir esta ajuda\n\
+ k : o mesmo que apropos(1)\n"
+USAGE5
+ " t : usar troff para formatar o manual para imprimir\n"
+USAGE6
+ "\
+ w : imprimir a localiza��o do manual a v�r\n\
+ (se n�o indicar o nome: imprime as directorias dos manuais)\n\n\
+ M path : indica `path' como as directorias dos manuais\n\
+ P paginador : use o programa `paginador' para v�r os manuais\n\
+ S lista : indicar lista de sec��es (separadas por ,)\n"
+USAGE7
+ " m sistema : procura manual para o sistema indicado\n"
+USAGE8
+ " p string : string indica o preprocessamento a efectuar\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ ""
+USER_CAN_OPEN_CAT
+ ""
+CANNOT_FORK
+ ""
+WAIT_FAILED
+ ""
+GOT_WRONG_PID
+ ""
+CHILD_TERMINATED_ABNORMALLY
+ ""
+IDENTICAL
+ ""
+MAN_FOUND
+ ""
+NO_TROFF
+ ""
+NO_CAT_FOR_NONSTD_LL
+ ""
diff --git a/msgs/mess.pt.codeset b/msgs/mess.pt.codeset
new file mode 100644
index 0000000..f5baf26
--- /dev/null
+++ b/msgs/mess.pt.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-1
diff --git a/msgs/mess.ro b/msgs/mess.ro
new file mode 100644
index 0000000..481a26f
--- /dev/null
+++ b/msgs/mess.ro
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "imposibil de �n�eles fi�ierul %s\n"
+CONFIG_OPEN_ERROR
+ "Aten�ie: nu pot deschide fi�ierul de configurare %s\n"
+PARSE_ERROR_IN_CONFIG
+ "Eroare parcurg�nd fi�ierul de configurare\n"
+INCOMPAT
+ "op�iuni incompatibile %s �i %s\n"
+NO_ALTERNATE
+ "�mi pare r�u - nu exist� suport inclus pentru sisteme alternative\n"
+NO_COMPRESS
+ "Man a fost compilat cu comprimare automat� a paginilor cat,\n\
+dar fi�ierul de configurare nu define�te COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Ce pagin� de manual vre�i din sec�iunea %s?\n"
+NO_NAME_NO_SECTION
+ "Ce pagin� de manual dori�i?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Nici o intrare pentru %s �n sec�iunea %s a manualului\n"
+NO_SUCH_ENTRY
+ "Nici o intrare �n manual pentru %s\n"
+PAGER_IS
+ "\nfolosesc %s ca paginator\n"
+SYSTEM_FAILED
+ "Eroare la execu�ia comenzii de formatare sau afi�are.\n\
+Comanda sistem %s s-a terminat cu codul de ie�ire %d.\n"
+VERSION
+ "%s, versiunea %s\n\n"
+OUT_OF_MEMORY
+ "Lips� de memorie - nu pot aloca %d bytes\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Eroare la parcurgerea comenzii *roff din fi�ierul %s\n"
+MANROFFSEQ_ERROR
+ "Eroare la parcurgerea MANROFFSEQ. Folosesc valorile implicite ale sistemului.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Eroare la parcurgerea comenzii *roff din linia de comand�.\n"
+UNRECOGNIZED_LINE
+ "Linie nerecunoscut� �n fi�ierul de configurare (ignorat�)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: eroare intern�: �irul %s nu a fost g�sit\n"
+FOUND_MANDIR
+ "am g�sit directorul man %s\n"
+FOUND_MAP
+ "am g�sit harta manpath %s --> %s\n"
+FOUND_CATDIR
+ "directorul cat corespunz�tor este %s\n"
+LINE_TOO_LONG
+ "Linie prea lung� �n fi�ierul de configurare\n"
+SECTION
+ "\nsec�iune: %s\n"
+UNLINKED
+ "nelegat %s\n"
+GLOBBING
+ "se expandeaz� %s\n"
+EXPANSION_FAILED
+ "�ncercarea [%s] de a decomprima pagina man a e�uat\n"
+OPEN_ERROR
+ "Nu pot deschide pagina man %s\n"
+READ_ERROR
+ "Eroare la citirea paginii man %s\n"
+FOUND_EQN
+ "am g�sit o directiv� eqn(1)\n"
+FOUND_GRAP
+ "am g�sit o directiv� grap(1)\n"
+FOUND_PIC
+ "am g�sit o directiv� pic(1)\n"
+FOUND_TBL
+ "am g�sit o directiv� tbl(1)\n"
+FOUND_VGRIND
+ "am g�sit o directiv� vgrind(1)\n"
+FOUND_REFER
+ "am g�sit o directiv� refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "parcurg directiva din linia de comand�\n"
+ROFF_FROM_FILE
+ "parcurg directiva din fi�ierul %s\n"
+ROFF_FROM_ENV
+ "parcurg directiva din variabilele de mediu\n"
+USING_DEFAULT
+ "folosesc secven�a de preprocesare implicit�\n"
+PLEASE_WAIT
+ "Formatez pagina, v� rog a�tepta�i...\n"
+CHANGED_MODE
+ "am schimbat modul lui %s �n %o\n"
+CAT_OPEN_ERROR
+ "Nu am putut deschide %s pentru scriere.\n"
+PROPOSED_CATFILE
+ "voi �ncerca s� scriu %s dac� este necesar\n"
+IS_NEWER_RESULT
+ "rezultatul de la is_newer() = %d\n"
+TRYING_SECTION
+ "�ncerc sec�iunea %s\n"
+SEARCHING
+ "\ncaut �n %s\n"
+ALREADY_IN_MANPATH
+ "dar %s este deja �n manpath\n"
+CANNOT_STAT
+ "Aten�ie: nu pot verifica fi�ierul %s!\n"
+IS_NO_DIR
+ "Aten�ie: %s nu este un director!\n"
+ADDING_TO_MANPATH
+ "adaug %s la manpath\n"
+PATH_DIR
+ "\ncalea la directorul %s "
+IS_IN_CONFIG
+ "este �n fi�ierul de configurare\n"
+IS_NOT_IN_CONFIG
+ "nu este �n fi�ierul de configurare\n"
+MAN_NEARBY
+ "dar este un director man aproape\n"
+NO_MAN_NEARBY
+ "dar nu am g�sit nici un director man aproape\n"
+ADDING_MANDIRS
+ "\nadaug directoarele man obligatorii\n\n"
+CATNAME_IS
+ "cat_name �n convert_to_cat () este: %s\n"
+NO_EXEC
+ "\nnu execut comanda:\n %s\n"
+USAGE1
+ "folosire: %s [-adfhktwW] [sec�iune] [-M cale] [-P paginator] [-S list�]\n\t"
+USAGE2
+ "[-m sistem] "
+USAGE3
+ "[-p �ir] nume ...\n\n"
+USAGE4
+ " a : caut� toate intr�rile care se potrivesc\n\
+ c : nu folose�te fi�ierele cat\n\
+ d : afi�eaz� multe informa�ii de depanare\n\
+ D : ca �i -d, dar afi�eaz� �i paginile\n\
+ f : ca �i whatis(1)\n\
+ h : afi�eaz� acest mesaj de ajutor\n\
+ k : ca �i apropos(1)\n\
+ K : caut� un �ir �n toate paginile\n"
+USAGE5
+ " t : folose�te troff pentru a formata paginile pentru tip�rire\n"
+USAGE6
+ "\
+ w : afi�eaz� loca�ia(ile) paginii(lor) man care ar fi afi�ate\n\
+ (dac� nu este dat nici un nume: afi�eaz� directoarele care ar fi c�utate)\n\
+ W : ca �i -w, dar afi�eaz� doar numele de fi�iere\n\n\
+ C fi�ier : folose�te `fi�ier' ca fi�ier de configurare\n\
+ M cale : seteaz� calea de c�utare pentru paginile de manual ca `cale'\n\
+ P paginator : folose�te programul `paginator' pentru a afi�a paginile\n\
+ S list� : list� de sec�iuni separate prin dou� puncte (:)\n"
+USAGE7
+ " m sistem : caut� paginile de man pentru un sistem alternativ\n"
+USAGE8
+ " p �ir : �irul specific� ce preprocesoare se ruleaz�\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "�i nici utilizatorul real nu poate deschide fi�ierul cat\n"
+USER_CAN_OPEN_CAT
+ "dar utilizatorul real poate deschide fi�ierul cat\n"
+CANNOT_FORK
+ "crearea procesului fiu pentru comanda _%s_ a e�uat\n"
+WAIT_FAILED
+ "eroare a�tept�nd procesul fiu _%s_\n"
+GOT_WRONG_PID
+ "foarte straniu ..., am primit pid eronat a�tept�nd procesul fiu\n"
+CHILD_TERMINATED_ABNORMALLY
+ "eroare fatal�: comanda _%s_ s-a terminat anormal\n"
+IDENTICAL
+ "Pagina man %s este identic� cu %s\n"
+MAN_FOUND
+ "Am g�sit pagina(ile) man:\n"
+NO_TROFF
+ "eroare: nici o comand� TROFF specificat� �n %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "nici o pagin� cat salvat� din cauza lungimii nestandard a liniilor\n"
diff --git a/msgs/mess.ro.codeset b/msgs/mess.ro.codeset
new file mode 100644
index 0000000..6d0d028
--- /dev/null
+++ b/msgs/mess.ro.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-2
diff --git a/msgs/mess.ru b/msgs/mess.ru
new file mode 100644
index 0000000..dd7190f
--- /dev/null
+++ b/msgs/mess.ru
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "���������� ���������� ���� %s\n"
+CONFIG_OPEN_ERROR
+ "��������������: ���������� ������� ���������������� ���� %s\n"
+PARSE_ERROR_IN_CONFIG
+ "������ ������� ����������������� �����\n"
+INCOMPAT
+ "����� %s � %s ������������\n"
+NO_ALTERNATE
+ "�������������� ������� �� ��������������\n"
+NO_COMPRESS
+ "��������� man ���� �������������� � �������������� ������� cat-�������,\n\
+�� ������ COMPRESS �� ���������� � ���������������� �����.\n"
+NO_NAME_FROM_SECTION
+ "����� �������� ����������� ���������� ������� � ������� %s?\n"
+NO_NAME_NO_SECTION
+ "����� �������� ����������� ���������� �������?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "������ ��� ��� %s � ������� %s �����������\n"
+NO_SUCH_ENTRY
+ "������ ��� %s � ����������� ���\n"
+PAGER_IS
+ "\n������������ %s ��� ������������ �����������\n"
+SYSTEM_FAILED
+ "������ ���������� ������� �������������� ��� ���������.\n\
+��������� ������� %s ����������� � ����� %d.\n"
+VERSION
+ "%s, ������ %s\n"
+OUT_OF_MEMORY
+ "������������ ������ - ���������� ��������������� %d ����\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "������ ������� ������� *roff �� ����� %s\n"
+MANROFFSEQ_ERROR
+ "������ ������� MANROFFSEQ. ������������ �������� �� ���������.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "������ ������� ������� *roff �� ��������� ������.\n"
+UNRECOGNIZED_LINE
+ "�������������� ������ � ���������������� ����� (������������)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: ���������� ������: ������ %s �� �������\n"
+FOUND_MANDIR
+ "������ ������� ����������� %s\n"
+FOUND_MAP
+ "������� ����������� manpath %s --> %s\n"
+FOUND_CATDIR
+ "��������������� catdir %s\n"
+LINE_TOO_LONG
+ "������� ������� ������ � ���������������� �����\n"
+SECTION
+ "\n������: %s\n"
+UNLINKED
+ "unlinked %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "������� [%s] ���������� �������� ����������� ���������� ��������\n"
+OPEN_ERROR
+ "���������� ������� �������� %s �����������\n"
+READ_ERROR
+ "������ ������ �������� %s �����������\n"
+FOUND_EQN
+ "���������� ��������� eqn(1)\n"
+FOUND_GRAP
+ "���������� ��������� grap(1)\n"
+FOUND_PIC
+ "���������� ��������� pic(1)\n"
+FOUND_TBL
+ "���������� ��������� tbl(1)\n"
+FOUND_VGRIND
+ "���������� ��������� vgrind(1)\n"
+FOUND_REFER
+ "���������� ��������� refer(1)\n"
+ROFF_FROM_COMMAND_LINE
+ "������ ��������� �� ��������� ������\n"
+ROFF_FROM_FILE
+ "������ ��������� �� ����� %s\n"
+ROFF_FROM_ENV
+ "������ ��������� �� ���������� ���������\n"
+USING_DEFAULT
+ "������������ ������������������ ������������� �� ���������\n"
+PLEASE_WAIT
+ "������������� ��������, ���������� ���������...\n"
+CHANGED_MODE
+ "������� ����� ������� � %s �� %o\n"
+CAT_OPEN_ERROR
+ "���������� ������� %s ��� ������.\n"
+PROPOSED_CATFILE
+ "����� ����������� ������� ������ %s, ���� �����������\n"
+IS_NEWER_RESULT
+ "��� �������� is_newer() = %d\n"
+TRYING_SECTION
+ "����� ������� %s\n"
+SEARCHING
+ "\n����� � %s\n"
+ALREADY_IN_MANPATH
+ "%s ��� ���������� � ����� ������ �������\n"
+CANNOT_STAT
+ "��������������: ���������� �������� ������ ����� %s!\n"
+IS_NO_DIR
+ "��������������: %s �� �������� ���������!\n"
+ADDING_TO_MANPATH
+ "���������� %s � ����� ������ �������\n"
+PATH_DIR
+ "\n���� �������� %s "
+IS_IN_CONFIG
+ "������������ � ���������������� �����\n"
+IS_NOT_IN_CONFIG
+ "����������� � ���������������� �����\n"
+MAN_NEARBY
+ "����� ���������� ������� �����������\n"
+NO_MAN_NEARBY
+ "����� �� ���������� �������� �������� �����������\n"
+ADDING_MANDIRS
+ "\n����������� ������������ �������� �����������\n\n"
+CATNAME_IS
+ "cat_name � convert_to_cat(): %s\n"
+NO_EXEC
+ "\������� �� ���������:\n %s\n"
+USAGE1
+ "�������������: %s [-adfhktwW] [������] [-M ����] [-P �����������] [-S ������]\n\t"
+USAGE2
+ "[-m �������] "
+USAGE3
+ "[-p ������] �������� ...\n\n"
+USAGE4
+ " a : ����� ��� �����������\n\
+ c : �� ������������ cat-����\n\
+ d : �������� ���������� ����������\n\
+ D : �� ��, ��� � -d, �� � ������������ ������� �����������\n\
+ f : �� �� �����, ��� � whatis(1)\n\
+ h : ������� ��� ������\n\
+ k : �� �� �����, ��� � apropos(1)\n\
+ K : ����� ������� �� ���� ���������\n"
+USAGE5
+ " t : ������������ troff, ����� ������������� �������� ��� ������\n"
+USAGE6
+ "\
+ w : ������� ������������ ������� �����������, ������� ����� ����������\n\
+ (���� �������� �� �������, �� ����� �������� ��� �������� ������)\n\
+ W : ��� ��� -w, �� ���������� ������ ����� ������\n\n\
+ C ���� : ������������ `����' � �������� ����������������� �����\n\
+ M ���� : ���������� ���� ������ ������� ����������� � `����'\n\
+ P ����������� : ������������ ��������� `�����������' ��� ����������� �������\n\
+ S ������ : ����������� ����������� ������ ��������\n"
+USAGE7
+ " m ������� : ����� ������� ����������� �������������� �������\n"
+USAGE8
+ " p ������ : ������, ����������� ����� ������������ ����������\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "� ���� �������� ������������ �� ����� ������� cat-����\n"
+USER_CAN_OPEN_CAT
+ "�� �������� ������������ ����� ������� cat-����\n"
+CANNOT_FORK
+ "������ ��������������� ���������� ������� _%s_\n"
+WAIT_FAILED
+ "������ �� ����� �������� ��������� �������� _%s_\n"
+GOT_WRONG_PID
+ "����� ������� ..., ������� ������ pid �� ����� �������� ��������� ��������\n"
+CHILD_TERMINATED_ABNORMALLY
+ "��������� ����: ������� _%s_ ����������� �����������\n"
+IDENTICAL
+ "�������� ����������� %s ��������� %s\n"
+MAN_FOUND
+ "���������� �������� �����������:\n"
+NO_TROFF
+ "������: ������� TROFF �� ���������� � %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "cat-���� �� �������� ��-�� ������������� ����� ������\n"
diff --git a/msgs/mess.ru.codeset b/msgs/mess.ru.codeset
new file mode 100644
index 0000000..10bc315
--- /dev/null
+++ b/msgs/mess.ru.codeset
@@ -0,0 +1 @@
+$ codeset=koi8-r
diff --git a/msgs/mess.sl b/msgs/mess.sl
new file mode 100644
index 0000000..97fa6f7
--- /dev/null
+++ b/msgs/mess.sl
@@ -0,0 +1,171 @@
+BAD_CONFIG_FILE
+ "Napake v nastavitveni datoteki %s\n"
+CONFIG_OPEN_ERROR
+ "Pozor: nastavitveni datoteke %s ni mo� odpreti\n"
+PARSE_ERROR_IN_CONFIG
+ "Napake pri raz�lembi nastavitvene datoteke\n"
+INCOMPAT
+ "Izbiri %s in %s sta nezdru�ljivi\n"
+NO_ALTERNATE
+ "Sorry - Podpora za alternativne sisteme ni vgrajena\n"
+NO_COMPRESS
+ "Man je bil preveden z izbiro za avtomati�no stiskanje oblikovanih\n\
+strani priro�nika, nastavitvena datoteka pa ne definira\n\
+spremenljivke COMPRESS.\n"
+NO_NAME_FROM_SECTION
+ "Katero stran priro�nika iz poglavja %s �elite?\n"
+NO_NAME_NO_SECTION
+ "Katero stran priro�nika �elite?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "Strani za %s ni v poglavju %s\n"
+NO_SUCH_ENTRY
+ "Strani za %s ni\n"
+PAGER_IS
+ "\nuporabljano %s za prikaz\n"
+SYSTEM_FAILED
+ "Napaka pri izvajanju ukaza za oblikovanje ali prikaz.\n\
+Ukaz %s se je kon�al s statusom %d.\n"
+VERSION
+ "%s, verzija %s\n\n"
+OUT_OF_MEMORY
+ "Zmanjkalo pomnilnika - ni mogo�e alocirati %d bytov\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "Napaka pri raz�lembi ukazov *roff iz datoteke %s\n"
+MANROFFSEQ_ERROR
+ "Napaka pri raz�lembi MANROFFSEQ. Uporabili bomo privzete vrednosti.\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "Napaka pri raz�lembi ukazov *roff iz ukazne vrstice.\n"
+UNRECOGNIZED_LINE
+ "Neprepoznana vrstica v nastavitveni datoteki (ignorirano)\n%s\n"
+GETVAL_ERROR
+ "man-config.c: interna napaka: niza %s ni\n"
+FOUND_MANDIR
+ "najden imenik s priro�niki %s\n"
+FOUND_MAP
+ "najdena pot do imenika s priro�niki %s --> %s\n"
+FOUND_CATDIR
+ "pripadajo�i imenik z oblikovanimi dokumenti je %s\n"
+LINE_TOO_LONG
+ "Predolga vrstica v nastavitveni datoteki\n"
+SECTION
+ "\npoglavje : %s\n"
+UNLINKED
+ "unlinked %s\n"
+GLOBBING
+ "globbing %s\n"
+EXPANSION_FAILED
+ "Poskus [%s] ekspandiranja strani priro�nika ni uspel\n"
+OPEN_ERROR
+ "Ni mo�no odpreti strani %s\n"
+READ_ERROR
+ "Napaka pri branju strani %s\n"
+FOUND_EQN
+ "Najdena eqn(1) direktiva\n"
+FOUND_GRAP
+ "Najdena grap(1) direktiva\n"
+FOUND_PIC
+ "Najdena pic(1) direktiva\n"
+FOUND_TBL
+ "Najdena tbl(1) direktiva\n"
+FOUND_VGRIND
+ "Najdena vgrind(1) direktiva\n"
+FOUND_REFER
+ "Najdena refer(1) direktiva\n"
+ROFF_FROM_COMMAND_LINE
+ "Raz�lenjujemo direktive iz ukazne vrstice\n"
+ROFF_FROM_FILE
+ "Raz�lenjujemo direktive iz datoteke %s\n"
+ROFF_FROM_ENV
+ "Raz�lenjujemo direktive iz okolja\n"
+USING_DEFAULT
+ "Uporabljamo privzeto zaporedje predprocesiranja\n"
+PLEASE_WAIT
+ "Oblikujem stran, prosim po�akajte...\n"
+CHANGED_MODE
+ "Za��ita %s spremenjena na %o\n"
+CAT_OPEN_ERROR
+ "Ni mo�no odpreti %s za pisanje.\n"
+PROPOSED_CATFILE
+ "poskusili bomo pisati na %s, �e bo potrebno\n"
+IS_NEWER_RESULT
+ "status iz is_newer() = %d\n"
+TRYING_SECTION
+ "Posku�amo poglavje %s\n"
+SEARCHING
+ "\ni��emo v %s\n"
+ALREADY_IN_MANPATH
+ "%s je �e v MANPATH\n"
+CANNOT_STAT
+ "Pozor: stat() na datoteki %s ni mo�en!\n"
+IS_NO_DIR
+ "Pozor: %s ni imenik!\n"
+ADDING_TO_MANPATH
+ "%s dodan v manpath\n"
+PATH_DIR
+ "\npot(-i) do imenika %s "
+IS_IN_CONFIG
+ "je v nastavitveni datoteki\n"
+IS_NOT_IN_CONFIG
+ "ni v nastavitveni datoteki,\n"
+MAN_NEARBY
+ "pa� pa je blizu imenik s priro�niki\n"
+NO_MAN_NEARBY
+ "niti ni blizu imenika s priro�niki\n"
+ADDING_MANDIRS
+ "\ndodamo obvezne imenike s priro�niki\n\n"
+CATNAME_IS
+ "cat_name v convert_to_cat () je: %s\n"
+NO_EXEC
+ "\nneizvedeni ukaz:\n %s\n"
+USAGE1
+ "uporaba: %s [-adfhktwW] [poglavje] [-M pot] [-P paginator] [-S seznam_poglavij]\n\t"
+USAGE2
+ "[-m sistem] "
+USAGE3
+ "[-p niz] ime ...\n\n"
+USAGE4
+ " a : strani s tem imenom v vseh poglavjih\n\
+ c : ponovno oblikovanje strani\n\
+ d : \"debugging\" informacije\n\
+ D : kot -d, zraven prika�i �e oblikovane strani\n\
+ f : isto kot whatis(1)\n\
+ h : ta navodila\n\
+ k : isto kot apropos(1)\n\
+ K : i��i niz po vseh straneh\n"
+USAGE5
+ " t : s troff pripravi stran za tisk\n"
+USAGE6
+ "\
+ w : pot do strani priro�nika, ki bi bila prikazana\n\
+ (brez podanega imena: imeniki, v katerih se i��ejo strani priro�nika)\n\
+ W : kot -w, a samo izpis imen datotek\n\n\
+ C datoteka : uporabi ,datoteko' kot nastavitveno datoteko\n\
+ M pot : strani priro�nika naj se i��ejo v ,poti'\n\
+ P paginator : uporabi program ,paginator' za prikaz oblikovanih strani\n\
+ S seznam_poglavij : seznam poglavij, kjer se i��ejo strani, lo�en z dvopi�ji\n"
+USAGE7
+ " m sistem : i��i strani priro�nika na drugem sistemu\n"
+USAGE8
+ " p niz : niz, ki dolo�a predprocesorje\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "in dejanski uporabnik tudi ne more odpreti oblikovane datoteke\n"
+USER_CAN_OPEN_CAT
+ "toda dejanski uporabnik lahko odpre oblikovano datoteko\n"
+CANNOT_FORK
+ "neuspela vejitev ukaza _%s_\n"
+WAIT_FAILED
+ "napaka pri �akanju na proces potomec _%s_\n"
+GOT_WRONG_PID
+ "zelo nenavadno..., napa�en PID med �akanjem na potomca\n"
+CHILD_TERMINATED_ABNORMALLY
+ "kriti�na napaka: ukaz _%s_ se ze nenormalno zaklju�il\n"
+IDENTICAL
+ "Stran %s je enaka strani %s\n"
+MAN_FOUND
+ "Najdene stran(i):\n"
+NO_TROFF
+ "napaka: ukaz TROFF ni dolo�en v %s\n"
+NO_CAT_FOR_NONSTD_LL
+ "oblikovana ni shranjena zaradi nestandardne �irine vrstice\n"
diff --git a/msgs/mess.sl.codeset b/msgs/mess.sl.codeset
new file mode 100644
index 0000000..6d0d028
--- /dev/null
+++ b/msgs/mess.sl.codeset
@@ -0,0 +1 @@
+$ codeset=iso-8859-2
diff --git a/msgs/mess.zh_TW.UTF-8 b/msgs/mess.zh_TW.UTF-8
new file mode 100644
index 0000000..33f72ab
--- /dev/null
+++ b/msgs/mess.zh_TW.UTF-8
@@ -0,0 +1,170 @@
+BAD_CONFIG_FILE
+ "無法讀出檔案 %s 的意義\n"
+CONFIG_OPEN_ERROR
+ "警告:無法開啟設定檔 %s\n"
+PARSE_ERROR_IN_CONFIG
+ "解析設定檔時發生錯誤\n"
+INCOMPAT
+ "選項 %s 與 %s 不相容\n"
+NO_ALTERNATE
+ "抱歉 - 不支援在其他系統中編譯者\n"
+NO_COMPRESS
+ "Man 於編譯時已加入 cat page 壓縮功能,\n\
+但是設定檔中未定義 COMPRESS。\n"
+NO_NAME_FROM_SECTION
+ "你要從區段 %s 中讀取什麼使用手冊?\n"
+NO_NAME_NO_SECTION
+ "\你要讀取什麼使用手冊?\n"
+NO_SUCH_ENTRY_IN_SECTION
+ "%s 的使用手冊並不在區段 %s 之中\n"
+NO_SUCH_ENTRY
+ "不存在 %s 的使用手冊\n"
+PAGER_IS
+ "\n使用 %s 做為分頁程式\n"
+SYSTEM_FAILED
+ "執行排列或顯示命令時發生錯誤。\n\
+系統命令 %s 以 %d 狀態結束。\n"
+VERSION
+ "%s,版本 %s\n\n"
+OUT_OF_MEMORY
+ "記憶體耗盡 - 無法取得 %d 位元組\n"
+ROFF_CMD_FROM_FILE_ERROR
+ "從檔案 %s 解析 *roff 命令時發生錯誤\n"
+MANROFFSEQ_ERROR
+ "解析 MANROFFSEQ 時發生錯誤。使用系統預設值。\n"
+ROFF_CMD_FROM_COMMANDLINE_ERROR
+ "從命令列解析 *roff 命令時發生錯誤\n"
+UNRECOGNIZED_LINE
+ "設定檔中無法辨識此列 (忽略)\n%s\n"
+GETVAL_ERROR
+ "man-config.c:內部錯誤:字串 %s 找不到\n"
+FOUND_MANDIR
+ "找到 man 目錄 %s\n"
+FOUND_MAP
+ "找到 manpath 的對應 %s --> %s\n"
+FOUND_CATDIR
+ "相對應的 catdir 是 %s\n"
+LINE_TOO_LONG
+ "設定檔中單列過長\n"
+SECTION
+ "\n區段:%s\n"
+UNLINKED
+ "未連結的 %s\n"
+GLOBBING
+ "展開萬用字元 %s\n"
+EXPANSION_FAILED
+ "嘗試以 [%s] 擴展使用手冊失敗\n"
+OPEN_ERROR
+ "無法開啟使用手冊 %s\n"
+READ_ERROR
+ "讀取使用手冊 %s 時發生錯誤\n"
+FOUND_EQN
+ "找到 eqn(1) 指令\n"
+FOUND_GRAP
+ "找到 grap(1) 指令\n"
+FOUND_PIC
+ "找到 pic(1) 指令\n"
+FOUND_TBL
+ "找到 tbl(1) 指令\n"
+FOUND_VGRIND
+ "找到 vgrind(1) 指令\n"
+FOUND_REFER
+ "找到 refer(1) 指令\n"
+ROFF_FROM_COMMAND_LINE
+ "從命令列解析指令\n"
+ROFF_FROM_FILE
+ "從檔案 %s 解析指令\n"
+ROFF_FROM_ENV
+ "從執行環境解析指令\n"
+USING_DEFAULT
+ "使用預設的前置處理序列\n"
+PLEASE_WAIT
+ "排列頁面中,請稍待...\n"
+CHANGED_MODE
+ "將 %s 模式改為 %o\n"
+CAT_OPEN_ERROR
+ "寫入時無法開啟 %s\n"
+PROPOSED_CATFILE
+ "需要時將會寫入 %s\n"
+IS_NEWER_RESULT
+ "is_newer() 的狀態是 %d\n"
+TRYING_SECTION
+ "嘗試讀取區段 %s\n"
+SEARCHING
+ "\n在區段 %s 中搜尋\n"
+ALREADY_IN_MANPATH
+ "在 manpath 中已含有 %s\n"
+CANNOT_STAT
+ "警告:無法取得檔案 %s 的狀態!\n"
+IS_NO_DIR
+ "警告:%s 不是一個目錄!\n"
+ADDING_TO_MANPATH
+ "將 %s 加入 manpath\n"
+PATH_DIR
+ "\n目錄 %s 的路徑"
+IS_IN_CONFIG
+ "存在於設定檔之中\n"
+IS_NOT_IN_CONFIG
+ "不存在於設定檔之中\n"
+MAN_NEARBY
+ "但是附近有使用手冊的目錄\n"
+NO_MAN_NEARBY
+ "而附近找不到使用手冊的目錄\n"
+ADDING_MANDIRS
+ "\n正在加入指定的使用手冊目錄\n\n"
+CATNAME_IS
+ "在 convert_to_cat() 中的 cat_name 是:%s\n"
+NO_EXEC
+ "\n並未執行命令:\n %s\n"
+USAGE1
+ "用法:%s [-adfhktwW] [區段] [-M 路徑] [-P 分頁程式] [-S 清單]\n\t"
+USAGE2
+ "[-m 系統] "
+USAGE3
+ "[-p 字串] 名稱 ...\n\n"
+USAGE4
+ " a:找出所有符合的項目\n\
+ c:不要使用 cat 檔案\n\
+ d:列出除錯資訊\n\
+ D:與 -d 類似,但是也列出各頁\n\
+ f:與 whatis(1) 相同\n\
+ h:列出本輔助訊息\n\
+ k:與 apropos(1) 相同\n\
+ K:在所有頁中搜尋字串\n"
+USAGE5
+ " t:列印時使用 troff 來排列頁面\n"
+USAGE6
+ "\
+ w:列出將要顯示的使用手冊位置\n\
+ (如果未提供名稱,就列出將要搜尋的目錄\n\
+ W:與 -w 類似,但是只顯示檔名\n\
+ C file :以 `file' 做為設定檔\n\
+ M path :設定使用手冊的搜尋路徑為 `path'\n\
+ P pager :使用程式 `pager' 來顯示各頁\n\
+ S list :`list' 表示以冒號分隔的區段串列\n"
+USAGE7
+ " m system:搜尋其他系統的使用手冊\n"
+USAGE8
+ " p string:`string' 指示要執行何種前置處理程式\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n"
+USER_CANNOT_OPEN_CAT
+ "而真實使用者也無法開啟 cat 檔案\n"
+USER_CAN_OPEN_CAT
+ "而真實使用者可以開啟 cat 檔案\n"
+CANNOT_FORK
+ "分叉執行命令 _%s_ 時失敗\n"
+WAIT_FAILED
+ "等待子命令 _%s_ 時發生錯誤\n"
+GOT_WRONG_PID
+ "非常奇怪...,在等待自己的子命令時得到錯誤的 pid\n"
+CHILD_TERMINATED_ABNORMALLY
+ "嚴重錯誤:命令 _%s_ 不正常結束\n"
+IDENTICAL
+ "使用手冊 %s 與 %s 完全相同\n"
+MAN_FOUND
+ "找到使用手冊:\n"
+NO_TROFF
+ "錯誤:在 %s 中未指定 TROFF 命令\n"
+NO_CAT_FOR_NONSTD_LL
+ "由於非標準列寬使得 cat 頁面未儲存\n"
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..0b08305
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,120 @@
+#
+# 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 = @CC@
+BUILD_CC = @BUILD_CC@
+INSTALL = @INSTALL@
+EXEEXT = @EXEEXT@
+
+pager = @pager@
+
+DEFS = @DEFS@
+CWARN = -Wall -Wstrict-prototypes -Wmissing-prototypes
+CWARNNP = -Wall
+
+.c.o:
+ $(CC) -c $(CWARN) $(CFLAGS) -I. $(DEFS) $<
+
+# LDFLAGS = -g
+LDFLAGS ?= -s
+
+LIBOBJS = @LIBOBJS@
+
+all: man$(EXEEXT) man.conf apropos whatis makewhatis
+
+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) -I. $(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%, at version@,' \
+ -e 's,%manpathoption%, at manpathoption@,' \
+ apropos.sh > apropos
+ chmod +x apropos
+
+whatis: apropos.sh Makefile
+ rm -f whatis
+ sed -e 's,%apropos_or_whatis%,whatis,' \
+ -e 's,%version%, at version@,' \
+ -e 's,%manpathoption%, at manpathoption@,' \
+ 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)@man_config_file@
+
+install: all apropos whatis makewhatis
+ mkdir -p $(DESTDIR)$(PREFIX)@bindir@
+ $(INSTALL) -c @man_install_flags@ man$(EXEEXT) $(DESTDIR)$(PREFIX)@man@
+ $(INSTALL) -c -m 755 apropos $(DESTDIR)$(PREFIX)@apropos@
+ $(INSTALL) -c -m 755 whatis $(DESTDIR)$(PREFIX)@whatis@
+ $(INSTALL) -c -m 755 man2dvi $(DESTDIR)$(PREFIX)@man2dvi@
+ mkdir -p $(DESTDIR)$(PREFIX)@sbindir@
+ $(INSTALL) -c -m 754 makewhatis $(DESTDIR)$(PREFIX)@makewhatis@
+ mkdir -p $(DESTDIR)$(PREFIX)@man_config_dir@
+ 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
diff --git a/src/apropos.sh b/src/apropos.sh
new file mode 100644
index 0000000..f4b88ea
--- /dev/null
+++ b/src/apropos.sh
@@ -0,0 +1,88 @@
+#!/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 %version%)
+#
+# 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=$%apropos_or_whatis%grepopt1
+grepopt2=$%apropos_or_whatis%grepopt2
+
+if [ $# = 0 ]
+then
+ echo "usage: $program keyword ..."
+ exit 1
+fi
+
+manpath=`man %manpathoption% | 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 %version%"
+ 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
+ fi
+ done
+
+ if [ $found = 0 ]
+ then
+ echo "$1: nothing appropriate"
+ fi
+
+ shift
+done
+
+exit
diff --git a/src/defs.h b/src/defs.h
new file mode 100644
index 0000000..f33c05d
--- /dev/null
+++ b/src/defs.h
@@ -0,0 +1,26 @@
+/* defs.h */
+#undef MAXPATHLEN /* make sure struct dirs has a
+ well-defined size (thanks to
+ Pierre.Humblet at eurecom.fr) */
+#include <sys/param.h>
+
+#define MAN 0
+#define CAT 1
+#define SCAT 2
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+struct dir {
+ struct dir *nxt;
+ char *dir;
+};
+
+struct dirs {
+ struct dirs *nxt;
+ char mandir[MAXPATHLEN];
+ char catdir[MAXPATHLEN];
+ char bindir[MAXPATHLEN];
+ int mandatory;
+};
diff --git a/src/different.c b/src/different.c
new file mode 100644
index 0000000..cfce5fb
--- /dev/null
+++ b/src/different.c
@@ -0,0 +1,72 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "different.h"
+#include "gripes.h"
+#include "man-config.h"
+#include "util.h"
+
+static struct filelist {
+ char *pathname;
+ struct filelist *next;
+} cat_list, man_list;
+
+static int
+is_different(const char *file, struct filelist *p) {
+ char *command;
+ const char *cmp = getval("CMP");
+ int ret;
+
+ if (cmp) {
+ while (p->next) {
+ command = my_xsprintf("%s %S %S\n", cmp, file, p->pathname);
+ ret = do_system_command (command, 1);
+ if (ret == 0) {
+ gripe(IDENTICAL, file, p->pathname);
+ return 0;
+ }
+ p = p->next;
+ }
+ p->next = (struct filelist *) my_malloc(sizeof(struct filelist));
+ p->pathname = my_strdup(file);
+ p->next->next = 0;
+ }
+ return 1;
+}
+
+static int
+free_filelist (struct filelist *list){
+struct filelist *current, *next;
+
+ current = list;
+ if (current != list)
+ do {
+ next = current->next;
+ if (current != list)
+ free(current);
+ current = next;
+ } while (current->next != NULL);
+
+ list->next = NULL;
+
+ return 0;
+}
+
+int
+different_cat_file (const char *file) {
+ return is_different (file, &cat_list);
+}
+
+int
+different_man_file (const char *file) {
+ return is_different (file, &man_list);
+}
+
+int
+free_catman_filelists (void){
+
+ free_filelist(&man_list);
+ free_filelist(&cat_list);
+return 0;
+}
diff --git a/src/different.h b/src/different.h
new file mode 100644
index 0000000..e952500
--- /dev/null
+++ b/src/different.h
@@ -0,0 +1,3 @@
+int different_cat_file (const char *file);
+int different_man_file (const char *file);
+int free_catman_filelists (void);
diff --git a/src/glob.c b/src/glob.c
new file mode 100644
index 0000000..71b93d7
--- /dev/null
+++ b/src/glob.c
@@ -0,0 +1,682 @@
+/* File-name wildcard pattern matching for GNU.
+ Copyright (C) 1985, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
+
+ This program is free software; 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 1, or (at your option)
+ any later version.
+
+ This program 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 program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* To whomever it may concern: I have never seen the code which most
+ Unix programs use to perform this function. I wrote this from scratch
+ based on specifications for the pattern matching. --RMS. */
+
+#ifdef SHELL
+#include "config.h"
+#endif /* SHELL */
+
+#include <sys/types.h>
+
+#if defined (USGr3) && !defined (DIRENT)
+#define DIRENT
+#endif /* USGr3 */
+#if defined (Xenix) && !defined (SYSNDIR)
+#define SYSNDIR
+#endif /* Xenix */
+
+#if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)
+#include <dirent.h>
+#define direct dirent
+#define D_NAMLEN(d) strlen((d)->d_name)
+#else /* not POSIX or DIRENT or __GNU_LIBRARY__ */
+#define D_NAMLEN(d) ((d)->d_namlen)
+#ifdef USG
+#if defined (SYSNDIR)
+#include <sys/ndir.h>
+#else /* SYSNDIR */
+#include "ndir.h"
+#endif /* not SYSNDIR */
+#else /* not USG */
+#include <sys/dir.h>
+#endif /* USG */
+#endif /* POSIX or DIRENT or __GNU_LIBRARY__ */
+
+#ifdef __QNX__
+#define REAL_DIR_ENTRY(dp) (dp->d_stat.st_ino != 0)
+#elif defined (_POSIX_SOURCE)
+/* Posix does not require that the d_ino field be present, and some
+ systems do not provide it. */
+#define REAL_DIR_ENTRY(dp) 1
+#else
+#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
+#endif /* _POSIX_SOURCE */
+
+#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
+#include <stdlib.h>
+#include <string.h>
+#define STDC_STRINGS
+#else /* STDC_HEADERS or __GNU_LIBRARY__ */
+
+#if defined (USG)
+#include <string.h>
+#ifndef POSIX
+#include <memory.h>
+#endif /* POSIX */
+#define STDC_STRINGS
+#else /* not USG */
+#ifdef NeXT
+#include <string.h>
+#else /* NeXT */
+#include <strings.h>
+#endif /* NeXT */
+/* Declaring bcopy causes errors on systems whose declarations are different.
+ If the declaration is omitted, everything works fine. */
+#endif /* not USG */
+
+extern char *malloc ();
+extern char *realloc ();
+extern void free ();
+
+#ifndef NULL
+#define NULL 0
+#endif
+#endif /* Not STDC_HEADERS or __GNU_LIBRARY__. */
+
+#ifdef STDC_STRINGS
+#define bcopy(s, d, n) memcpy ((d), (s), (n))
+#define index strchr
+#define rindex strrchr
+#endif /* STDC_STRINGS */
+
+#ifndef alloca
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* Not GCC. */
+#ifdef sparc
+#include <alloca.h>
+#else /* Not sparc. */
+extern char *alloca ();
+#endif /* sparc. */
+#endif /* GCC. */
+#endif
+
+/* Nonzero if '*' and '?' do not match an initial '.' for glob_filename. */
+int noglob_dot_filenames = 1;
+
+static int glob_match_after_star ();
+
+/* Return nonzero if PATTERN has any special globbing chars in it. */
+
+int
+glob_pattern_p (pattern)
+ char *pattern;
+{
+ register char *p = pattern;
+ register char c;
+ int open = 0;
+
+ while ((c = *p++) != '\0')
+ switch (c)
+ {
+ case '?':
+ case '*':
+ return 1;
+
+ case '[': /* Only accept an open brace if there is a close */
+ open++; /* brace to match it. Bracket expressions must be */
+ continue; /* complete, according to Posix.2 */
+ case ']':
+ if (open)
+ return 1;
+ continue;
+
+ case '\\':
+ if (*p++ == '\0')
+ return 0;
+ }
+
+ return 0;
+}
+
+
+/* Match the pattern PATTERN against the string TEXT;
+ return 1 if it matches, 0 otherwise.
+
+ A match means the entire string TEXT is used up in matching.
+
+ In the pattern string, `*' matches any sequence of characters,
+ `?' matches any character, [SET] matches any character in the specified set,
+ [!SET] matches any character not in the specified set.
+
+ A set is composed of characters or ranges; a range looks like
+ character hyphen character (as in 0-9 or A-Z).
+ [0-9a-zA-Z_] is the set of characters allowed in C identifiers.
+ Any other character in the pattern must be matched exactly.
+
+ To suppress the special syntactic significance of any of `[]*?!-\',
+ and match the character exactly, precede it with a `\'.
+
+ If DOT_SPECIAL is nonzero,
+ `*' and `?' do not match `.' at the beginning of TEXT. */
+
+int
+glob_match (pattern, text, dot_special)
+ char *pattern, *text;
+ int dot_special;
+{
+ register char *p = pattern, *t = text;
+ register char c;
+
+ while ((c = *p++) != '\0')
+ switch (c)
+ {
+ case '?':
+ if (*t == '\0' || (dot_special && t == text && *t == '.'))
+ return 0;
+ else
+ ++t;
+ break;
+
+ case '\\':
+ if (*p++ != *t++)
+ return 0;
+ break;
+
+ case '*':
+ if (dot_special && t == text && *t == '.')
+ return 0;
+ return glob_match_after_star (p, t);
+
+ case '[':
+ {
+ register char c1 = *t++;
+ int invert;
+
+ if (c1 == '\0')
+ return 0;
+
+ invert = (*p == '!');
+
+ if (invert)
+ p++;
+
+ c = *p++;
+ while (1)
+ {
+ register char cstart = c, cend = c;
+
+ if (c == '\\')
+ {
+ cstart = *p++;
+ cend = cstart;
+ }
+
+ if (cstart == '\0')
+ return 0; /* Missing ']'. */
+
+ c = *p++;
+
+ if (c == '-')
+ {
+ cend = *p++;
+ if (cend == '\\')
+ cend = *p++;
+ if (cend == '\0')
+ return 0;
+ c = *p++;
+ }
+ if (c1 >= cstart && c1 <= cend)
+ goto match;
+ if (c == ']')
+ break;
+ }
+ if (!invert)
+ return 0;
+ break;
+
+ match:
+ /* Skip the rest of the [...] construct that already matched. */
+ while (c != ']')
+ {
+ if (c == '\0')
+ return 0;
+ c = *p++;
+ if (c == '\0')
+ return 0;
+ if (c == '\\')
+ p++;
+ }
+ if (invert)
+ return 0;
+ break;
+ }
+
+ default:
+ if (c != *t++)
+ return 0;
+ }
+
+ return *t == '\0';
+}
+
+/* Like glob_match, but match PATTERN against any final segment of TEXT. */
+
+static int
+glob_match_after_star (pattern, text)
+ char *pattern, *text;
+{
+ register char *p = pattern, *t = text;
+ register char c, c1;
+
+ while ((c = *p++) == '?' || c == '*')
+ if (c == '?' && *t++ == '\0')
+ return 0;
+
+ if (c == '\0')
+ return 1;
+
+ if (c == '\\')
+ c1 = *p;
+ else
+ c1 = c;
+
+ --p;
+ while (1)
+ {
+ if ((c == '[' || *t == c1) && glob_match (p, t, 0))
+ return 1;
+ if (*t++ == '\0')
+ return 0;
+ }
+}
+
+/* Return a vector of names of files in directory DIR
+ whose names match glob pattern PAT.
+ The names are not in any particular order.
+ Wildcards at the beginning of PAT do not match an initial period
+ if noglob_dot_filenames is nonzero.
+
+ The vector is terminated by an element that is a null pointer.
+
+ To free the space allocated, first free the vector's elements,
+ then free the vector.
+
+ Return NULL if cannot get enough memory to hold the pointer
+ and the names.
+
+ Return -1 if cannot access directory DIR.
+ Look in errno for more information. */
+
+char **
+glob_vector (pat, dir)
+ char *pat;
+ char *dir;
+{
+ struct globval
+ {
+ struct globval *next;
+ char *name;
+ };
+
+ DIR *d;
+ register struct direct *dp;
+ struct globval *lastlink;
+ register struct globval *nextlink;
+ register char *nextname;
+ unsigned int count;
+ int lose;
+ register char **name_vector = 0;
+ register unsigned int i;
+#ifdef ALLOCA_MISSING
+ struct globval *templink;
+#endif
+
+ d = opendir (dir);
+ if (d == NULL)
+ return (char **) -1;
+
+ lastlink = NULL;
+ count = 0;
+ lose = 0;
+
+ /* Scan the directory, finding all names that match.
+ For each name that matches, allocate a struct globval
+ on the stack and store the name in it.
+ Chain those structs together; lastlink is the front of the chain. */
+ while (1)
+ {
+#if defined (SHELL)
+ /* Make globbing interruptible in the bash shell. */
+ extern int interrupt_state;
+
+ if (interrupt_state)
+ {
+ closedir (d);
+ lose = 1;
+ goto lost;
+ }
+#endif /* SHELL */
+
+ dp = readdir (d);
+ if (dp == NULL)
+ break;
+ if (REAL_DIR_ENTRY (dp)
+ && glob_match (pat, dp->d_name, noglob_dot_filenames))
+ {
+#ifdef ALLOCA_MISSING
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+#else
+ nextlink = (struct globval *) alloca (sizeof (struct globval));
+#endif
+ nextlink->next = lastlink;
+ i = D_NAMLEN (dp) + 1;
+ nextname = (char *) malloc (i);
+ if (nextname == NULL)
+ {
+ lose = 1;
+ break;
+ }
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ bcopy (dp->d_name, nextname, i);
+ count++;
+ }
+ }
+ closedir (d);
+
+ if (!lose)
+ {
+ name_vector = (char **) malloc ((count + 1) * sizeof (char *));
+ lose |= name_vector == NULL;
+ }
+
+ /* Have we run out of memory? */
+#ifdef SHELL
+ lost:
+#endif
+ if (lose)
+ {
+ /* Here free the strings we have got. */
+ while (lastlink)
+ {
+ free (lastlink->name);
+#ifdef ALLOCA_MISSING
+ templink = lastlink->next;
+ free ((char *) lastlink);
+ lastlink = templink;
+#else
+ lastlink = lastlink->next;
+#endif
+ }
+ return NULL;
+ }
+
+ /* Copy the name pointers from the linked list into the vector. */
+ for (i = 0; i < count; ++i)
+ {
+ name_vector[i] = lastlink->name;
+#ifdef ALLOCA_MISSING
+ templink = lastlink->next;
+ free ((char *) lastlink);
+ lastlink = templink;
+#else
+ lastlink = lastlink->next;
+#endif
+ }
+
+ name_vector[count] = NULL;
+ return name_vector;
+}
+
+/* Return a new array, replacing ARRAY, which is the concatenation
+ of each string in ARRAY to DIR.
+ Return NULL if out of memory. */
+
+static char **
+glob_dir_to_array (dir, array)
+ char *dir, **array;
+{
+ register unsigned int i, l;
+ int add_slash = 0;
+ char **result;
+
+ l = strlen (dir);
+ if (l == 0)
+ return array;
+
+ if (dir[l - 1] != '/')
+ add_slash++;
+
+ for (i = 0; array[i] != NULL; i++)
+ ;
+
+ result = (char **) malloc ((i + 1) * sizeof (char *));
+ if (result == NULL)
+ return NULL;
+
+ for (i = 0; array[i] != NULL; i++)
+ {
+ result[i] = (char *) malloc (1 + l + add_slash + strlen (array[i]));
+ if (result[i] == NULL)
+ return NULL;
+ strcpy (result[i], dir);
+ if (add_slash)
+ result[i][l] = '/';
+ strcpy (result[i] + l + add_slash, array[i]);
+ }
+ result[i] = NULL;
+
+ /* Free the input array. */
+ for (i = 0; array[i] != NULL; i++)
+ free (array[i]);
+ free ((char *) array);
+ return result;
+}
+
+/* Do globbing on PATHNAME. Return an array of pathnames that match,
+ marking the end of the array with a null-pointer as an element.
+ If no pathnames match, then the array is empty (first element is null).
+ If there isn't enough memory, then return NULL.
+ If a file system error occurs, return -1; `errno' has the error code.
+
+ Wildcards at the beginning of PAT, or following a slash,
+ do not match an initial period if noglob_dot_filenames is nonzero. */
+
+char **
+glob_filename (const char *pathname)
+{
+ char **result;
+ unsigned int result_size;
+ char *directory_name;
+ const char *filename;
+ unsigned int directory_len;
+
+ result = (char **) malloc (sizeof (char *));
+ result_size = 1;
+ if (result == NULL)
+ return NULL;
+
+ result[0] = NULL;
+
+ /* Find the filename. */
+ filename = rindex (pathname, '/');
+ if (filename == NULL)
+ {
+ filename = pathname;
+ directory_name = "";
+ directory_len = 0;
+ }
+ else
+ {
+ directory_len = (filename - pathname) + 1;
+#ifdef ALLOCA_MISSING
+ directory_name = (char *) malloc (directory_len + 1);
+#else
+ directory_name = (char *) alloca (directory_len + 1);
+#endif
+ bcopy (pathname, directory_name, directory_len);
+ directory_name[directory_len] = '\0';
+ ++filename;
+ }
+
+ /* If directory_name contains globbing characters, then we
+ have to expand the previous levels. Just recurse. */
+ if (glob_pattern_p (directory_name))
+ {
+ char **directories;
+ register unsigned int i;
+
+ if (directory_name[directory_len - 1] == '/')
+ directory_name[directory_len - 1] = '\0';
+
+ directories = glob_filename (directory_name);
+#ifdef ALLOCA_MISSING
+ free ((char *) directory_name);
+#endif
+ if (directories == NULL)
+ goto memory_error;
+ else if (directories == (char **) -1)
+ return (char **) -1;
+ else if (*directories == NULL)
+ {
+ free ((char *) directories);
+ return (char **) -1;
+ }
+
+ /* We have successfully globbed the preceding directory name.
+ For each name in DIRECTORIES, call glob_vector on it and
+ FILENAME. Concatenate the results together. */
+ for (i = 0; directories[i] != NULL; i++)
+ {
+ char **temp_results = glob_vector (filename, directories[i]);
+ if (temp_results == NULL)
+ goto memory_error;
+ else if (temp_results == (char **) -1)
+ /* This filename is probably not a directory. Ignore it. */
+ ;
+ else
+ {
+ char **array = glob_dir_to_array (directories[i], temp_results);
+ register unsigned int l;
+
+ l = 0;
+ while (array[l] != NULL)
+ ++l;
+
+ result = (char **) realloc (result,
+ (result_size + l) * sizeof (char *));
+ if (result == NULL)
+ goto memory_error;
+
+ for (l = 0; array[l] != NULL; ++l)
+ result[result_size++ - 1] = array[l];
+ result[result_size - 1] = NULL;
+ free ((char *) array);
+ }
+ }
+ /* Free the directories. */
+ for (i = 0; directories[i] != NULL; i++)
+ free (directories[i]);
+ free ((char *) directories);
+
+ return result;
+ }
+
+ /* If there is only a directory name, return it. */
+ if (*filename == '\0')
+ {
+ result = (char **) realloc ((char *) result, 2 * sizeof (char *));
+ if (result != NULL)
+ {
+ result[0] = (char *) malloc (directory_len + 1);
+ if (result[0] == NULL)
+ {
+#ifdef ALLOCA_MISSING
+ free ((char *) directory_name);
+#endif
+ goto memory_error;
+ }
+ bcopy (directory_name, result[0], directory_len + 1);
+ result[1] = NULL;
+ }
+#ifdef ALLOCA_MISSING
+ free ((char *) directory_name);
+#endif
+ return result;
+ }
+ else
+ {
+ /* Otherwise, just return what glob_vector
+ returns appended to the directory name. */
+ char **temp_results = glob_vector (filename,
+ (directory_len == 0
+ ? "." : directory_name));
+
+ if (temp_results == NULL || temp_results == (char **) -1)
+ {
+#ifdef NO_ALLOCA
+ free ((char *) directory_name);
+#endif
+ return temp_results;
+ }
+
+ temp_results = glob_dir_to_array (directory_name, temp_results);
+#ifdef NO_ALLOCA
+ free ((char *) directory_name);
+#endif
+ return temp_results;
+ }
+
+ /* We get to memory error if the program has run out of memory, or
+ if this is the shell, and we have been interrupted. */
+ memory_error:
+ if (result != NULL)
+ {
+ register unsigned int i;
+ for (i = 0; result[i] != NULL; ++i)
+ free (result[i]);
+ free ((char *) result);
+ }
+#if defined (SHELL)
+ {
+ extern int interrupt_state;
+
+ if (interrupt_state)
+ throw_to_top_level ();
+ }
+#endif /* SHELL */
+ return NULL;
+}
+
+#ifdef TEST
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char **value;
+ int i, optind;
+
+ for (optind = 1; optind < argc; optind++)
+ {
+ value = glob_filename (argv[optind]);
+ if (value == NULL)
+ puts ("virtual memory exhausted");
+ else if (value == (char **) -1)
+ perror (argv[optind]);
+ else
+ for (i = 0; value[i] != NULL; i++)
+ puts (value[i]);
+ }
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/src/glob.h b/src/glob.h
new file mode 100644
index 0000000..fd6e07c
--- /dev/null
+++ b/src/glob.h
@@ -0,0 +1 @@
+char **glob_filename (const char *);
diff --git a/src/gripes.c b/src/gripes.c
new file mode 100644
index 0000000..505f8b8
--- /dev/null
+++ b/src/gripes.c
@@ -0,0 +1,139 @@
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include "gripes.h"
+#include "man.h" /* for progname */
+
+extern char *msg[];
+
+static char *mantexts = "man"; /* e.g. /usr/lib/locale/%L/man.cat */
+
+#ifdef NONLS
+
+static char *
+getmsg (int n) {
+ char *s;
+
+ if (0 < n && n <= MAXMSG)
+ s = msg[n];
+ else {
+ fprintf (stderr, "man: internal error - cannot find message %d\n", n);
+ exit (1);
+ }
+ return s;
+}
+
+#else /* NONLS */
+
+#include <string.h>
+#include <nl_types.h>
+#include "../catopen/catopen.c"
+
+nl_catd catfd = (nl_catd) -1;
+int cat_is_open = 0;
+
+static void
+catinit (void) {
+ if (!cat_is_open) {
+#ifdef NL_CAT_LOCALE
+ catfd = my_catopen(mantexts,NL_CAT_LOCALE);
+#else
+ catfd = my_catopen(mantexts,0);
+#endif
+ if (catfd == (nl_catd) -1) {
+ /*
+ * Only complain if LANG exists, and LANG != "en"
+ * (or when debugging). Also accept en_ZA etc.
+ * No messages for C locale.
+ */
+ char *s, *lg;
+ s = getenv("NLSPATH");
+ lg = getenv("LANG");
+ if (!lg)
+ lg = getenv("LC_MESSAGES");
+ if (!lg)
+ lg = getenv("LC_ALL");
+ if (lg && strncmp(lg, "en", 2) && strcmp(lg, "C") && strcmp(lg, "POSIX")) {
+ fprintf(stderr,
+ "Cannot open the message catalog \"%s\" for locale \"%s\"\n"
+ "(NLSPATH=\"%s\")\n\n",
+ mantexts, lg, s ? s : "<none>");
+ } else if (debug) {
+ fprintf(stderr,
+"Looked whether there exists a message catalog %s, but there is none\n"
+"(and for English messages none is needed)\n\n",
+ mantexts);
+ }
+ }
+ }
+ cat_is_open = 1;
+}
+
+/*
+ * This routine is unnecessary, but people ask for such things.
+ *
+ * Maybe man is suid or sgid to some user that owns the cat directories.
+ * Maybe NLSPATH can be manipulated by the user - even though
+ * modern glibc avoids using environment variables when the
+ * program is suid or sgid.
+ * So, maybe the string s that we are returning was user invented
+ * and we have to avoid %n and the like.
+ *
+ * As a random hack, only allow %s,%d,%o, and only two %-signs.
+ */
+static int
+is_suspect (char *s) {
+ int ct = 0;
+
+ while (*s) {
+ if (*s++ == '%') {
+ ct++;
+ if (*s != 's' && *s != 'd' && *s != 'o')
+ return 1;
+ }
+ }
+ return (ct > 2);
+}
+
+static char *
+getmsg (int n) {
+ char *s = "";
+
+ catinit ();
+ if (catfd != (nl_catd) -1) {
+ s = catgets(catfd, 1, n, "");
+ if (*s && is_suspect(s))
+ s = "";
+ }
+ if (*s == 0 && 0 < n && n <= MAXMSG)
+ s = msg[n];
+ if (*s == 0) {
+ fprintf(stderr,
+ "man: internal error - cannot find message %d\n", n);
+ exit (1);
+ }
+ return s;
+}
+
+#endif /* NONLS */
+
+void
+gripe (int n, ...) {
+ va_list p;
+
+ va_start(p, n);
+ vfprintf (stderr, getmsg(n), p);
+ va_end(p);
+ fflush (stderr);
+}
+
+void
+fatal (int n, ...) {
+ va_list p;
+ fprintf (stderr, "%s: ", progname);
+ va_start(p, n);
+ vfprintf (stderr, getmsg(n), p);
+ va_end(p);
+ exit (1);
+}
diff --git a/src/gripes.h b/src/gripes.h
new file mode 100644
index 0000000..8699eca
--- /dev/null
+++ b/src/gripes.h
@@ -0,0 +1,5 @@
+#include "gripedefs.h"
+
+void gripe (int n, ...);
+void fatal (int n, ...);
+
diff --git a/src/join.c b/src/join.c
new file mode 100644
index 0000000..1461ace
--- /dev/null
+++ b/src/join.c
@@ -0,0 +1,28 @@
+
+/* note: this routine frees its arguments! */
+char **
+my_join (char **np1, char **np2) {
+ int lth1, lth2;
+ char **p, **q, **np;
+
+ if (np1 == NULL)
+ return np2;
+ if (np2 == NULL)
+ return np1;
+ lth1 = lth2 = 0;
+ for (p = np1; *p; p++)
+ lth1++;
+ for (p = np2; *p; p++)
+ lth2++;
+ p = np = (char **) my_malloc((lth1+lth2+1)*sizeof(*np));
+ q = np1;
+ while(*q)
+ *p++ = *q++;
+ q = np2;
+ while(*q)
+ *p++ = *q++;
+ *p = 0;
+ free(np1);
+ free(np2);
+ return np;
+}
diff --git a/src/makemsg.c b/src/makemsg.c
new file mode 100644
index 0000000..34b3846
--- /dev/null
+++ b/src/makemsg.c
@@ -0,0 +1,175 @@
+/* makemsg.c - aeb - 940605 */
+/*
+ * Read a file input with lines
+ * LABEL "text"
+ * and either output two files:
+ * a file msgout.c with content char *msg[] = { "text", ... };
+ * and a file msgout.h with content #define LABEL 1
+ * or output a single file:
+ * a message catalog with lines 1 "text"
+ *
+ * The former two are used during compilation of the main program
+ * and give default (English) messages. The latter output file is
+ * input for gencat, and used in non-English locales.
+ *
+ * Call:
+ * makemsg input msgout.h msgout.c
+ * or
+ * makemsg -c input message_catalog
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#ifdef __QNX__
+#include <unix.h>
+#endif
+extern char *index(const char *, int);
+extern char *rindex(const char *, int);
+
+#define BUFSIZE 4096
+
+#define whitespace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
+
+static void
+usage(void){
+ fprintf (stderr, "call is: makemsg input msgout.h msgout.c\n");
+ fprintf (stderr, "or: makemsg -c input catalog\n");
+ exit (1);
+}
+
+int
+main(int argc, char **argv) {
+ FILE *fin, *foh, *foc;
+ char *s, *t;
+ char *infile, *outcfile, *outhfile;
+ char buf[BUFSIZE];
+ int defct = 0;
+ int makecat = 0;
+
+#define getbuf if (fgets (buf, sizeof(buf), fin) == NULL) {\
+ fprintf (stderr, "makemsg: unexpected end of input\n");\
+ fprintf (stderr, "[output file(s) removed]\n");\
+ unlink (outcfile);\
+ if (!makecat) unlink (outhfile);\
+ exit (1);\
+ }
+
+ if (argc != 4)
+ usage ();
+
+ outhfile = 0; foh = 0; /* just to keep gcc happy */
+
+ if (!strcmp(argv[1], "-c")) {
+ makecat = 1;
+ infile = argv[2];
+ outcfile = argv[3];
+ } else {
+ infile = argv[1];
+ outhfile = argv[2];
+ outcfile = argv[3];
+ }
+
+ fin = fopen (infile, "r");
+ if (!fin) {
+ perror (infile);
+ fprintf (stderr, "makemsg: cannot open input file %s\n", infile);
+ usage ();
+ }
+
+ /* help people not to confuse the order of these args */
+ if (!makecat) {
+ s = rindex(outhfile, '.');
+ if (!s || s[1] != 'h') {
+ fprintf (stderr, "defines output file should have name ending in .h\n");
+ usage ();
+ }
+ s = rindex(outcfile, '.');
+ if (!s || s[1] != 'c') {
+ fprintf (stderr, "string output file should have name ending in .c\n");
+ usage ();
+ }
+ }
+
+ if (!makecat) {
+ foh = fopen (outhfile, "w");
+ if (!foh) {
+ perror (argv[1]);
+ fprintf (stderr, "makemsg: cannot open output file %s\n", outhfile);
+ usage ();
+ }
+ }
+ foc = fopen (outcfile, "w");
+ if (!foc) {
+ perror (argv[2]);
+ fprintf (stderr, "makemsg: cannot open output file %s\n", outcfile);
+ usage ();
+ }
+
+ if (makecat)
+ fputs ("$quote \"\n$set 1\n", foc);
+ else
+ fputs ("char *msg[] = {\n \"\",\n", foc);
+
+ while (fgets (buf, sizeof(buf), fin) != NULL) {
+ char ss;
+
+ /* skip leading blanks and blank lines */
+ s = buf;
+ while (whitespace(*s))
+ s++;
+ if (*s == 0)
+ continue;
+
+ /* extract label part */
+ t = s;
+ while (*s && !whitespace(*s))
+ s++;
+ ss = *s;
+ *s = 0;
+ if (makecat) {
+ /* the format here used to be "%d ", but that breaks
+ glibc-2.1.2 gencat */
+ fprintf (foc, "%d ", ++defct); /* gencat cannot handle %2d */
+ } else {
+ fprintf (foh, "#define %s %d\n", t, ++defct);
+ fprintf (foc, "/* %2d */ ", defct);
+ }
+ *s = ss;
+
+ /* skip blanks and newlines until string found */
+ while (whitespace(*s) || *s == 0) {
+ if (*s == 0) {
+ getbuf;
+ s = buf;
+ } else
+ s++;
+ }
+
+ /* output string - it may extend over several lines */
+ while ((t = index(s, '\n')) == NULL || (t > buf && t[-1] == '\\')) {
+ fputs (s, foc);
+ getbuf;
+ s = buf;
+ }
+ *t = 0;
+ fputs (s, foc);
+ if (makecat)
+ fputs ("\n", foc);
+ else
+ fputs (",\n", foc);
+ }
+
+ if (!makecat) {
+ fputs ("};\n", foc);
+ fprintf (foh, "\n#define MAXMSG %d\n", defct);
+ }
+
+ if (!makecat) {
+ fclose (foh);
+ }
+
+ fclose (foc);
+ fclose (fin);
+
+ return 0;
+}
diff --git a/src/makewhatis.sh b/src/makewhatis.sh
new file mode 100644
index 0000000..5665feb
--- /dev/null
+++ b/src/makewhatis.sh
@@ -0,0 +1,456 @@
+#!/bin/sh
+# makewhatis: create the whatis database
+# Created: Sun Jun 14 10:49:37 1992
+# Revised: Sat Jan 8 14:12:37 1994 by faith at cs.unc.edu
+# Revised: Sat Mar 23 17:56:18 1996 by micheal at actrix.gen.nz
+# Copyright 1992, 1993, 1994 Rickard E. Faith (faith at cs.unc.edu)
+# May be freely distributed and modified as long as copyright is retained.
+#
+# Wed Dec 23 13:27:50 1992: Rik Faith (faith at cs.unc.edu) applied changes
+# based on Mitchum DSouza (mitchum.dsouza at mrc-apu.cam.ac.uk) cat patches.
+# Also, cleaned up code and make it work with NET-2 doc pages.
+#
+# makewhatis-1.4: aeb 940802, 941007, 950417
+# Fixed so that the -c option works correctly for the cat pages
+# on my machine. Fix for -u by Nan Zou (nan at ksu.ksu.edu).
+# Many minor changes.
+# The -s option is undocumented, and may well disappear again.
+#
+# Sat Mar 23 1996: Michael Hamilton (michael at actrix.gen.nz).
+# I changed the script to invoke gawk only once for each directory tree.
+# This speeds things up considerably (from 30 minutes down to 1.5 minutes
+# on my 486DX66).
+# 960401 - aeb: slight adaptation to work correctly with cat pages.
+# 960510 - added fixes by brennan at raven.ca.boeing.com, author of mawk.
+# 971012 - replaced "test -z" - it doesnt work on SunOS 4.1.3_U1.
+# 980710 - be more careful with TMPFILE.
+# 000323 - do not change PATH, better treatment of catpages - Bryan Henderson.
+# 011117 - avoid suspicious filenames.
+# 030310 - find files only; fix LAPACK cruft; no /usr/man default;
+# use /dev/stderr instead of /dev/tty; handle files with strange names;
+# add support for chinese, hungarian, indonesian, japanese, korean,
+# polish, russian (Thierry Vignaud).
+#
+# makewhatis 1.6: Federico Lucifredi
+# 060608 - Corrected traps.
+# 060719 - section choosing behavior to match man's (Mike frysinger).
+#
+# Note for Slackware users: "makewhatis -v -w -c" will work.
+#
+# makewhatis flc 060719 (from @version@)
+
+program=`basename $0`
+
+# In case both /usr/man and /usr/share/man exist, the former is local
+# and should be first.
+# It is a bug to add /var/cache/man to DEFCATPATH.
+dm=
+for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
+do
+ if [ -d $d ]; then
+ if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
+ fi
+done
+DEFMANPATH=$dm
+dc=
+for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
+do
+ if [ -d $d ]; then
+ if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
+ fi
+done
+DEFCATPATH=$dc
+
+# In case /usr is read-only, make /usr/foo/whatis (etc) a symlink to
+# something like /var/cache/man/foo-whatis.
+# Some distributions make a single big /var/cache/man/whatis file,
+# but that leads to problems and bugs.
+
+# AWK=/usr/bin/gawk
+AWK=@awk@
+
+# Find a place for our temporary files. If security is not a concern, use
+# TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
+# Of course makewhatis should only have the required permissions
+# (for reading and writing directories like /usr/man).
+# We try here to be careful (and avoid preconstructed symlinks)
+# in case makewhatis is run as root, by creating a subdirectory of /tmp.
+
+TMPFILEDIR=/tmp/whatis.tmp.dir.$$
+rm -rf $TMPFILEDIR
+if ! mkdir -m 0700 $TMPFILEDIR; then
+ echo Could not create $TMPFILEDIR
+ exit 1;
+fi
+TMPFILE=$TMPFILEDIR/w
+
+# make sure TMPFILEDIR is deleted if program is killed or terminates
+# (just delete this line if your shell doesnt know about trap)
+trap "rm -rf $TMPFILEDIR" 0
+trap "rm -rf $TMPFILEDIR; exit 255" 1 2 3 15
+
+# default find arg: no directories, no empty files
+findarg0="-type f -size +0"
+
+topath=manpath
+
+defmanpath=$DEFMANPATH
+defcatpath=
+
+if [ -n "$MANSECT" ]; then
+ sections=$MANSECT
+else
+ sections=`$AWK '($1 == "MANSECT") { print $2 }' @man_config_file@`
+ if [ x"$sections" = x ]; then
+ sections="@sections@"
+ fi
+fi
+sections=`echo $sections | sed -e 's/:/ /g'`
+
+for name in "$@"
+do
+if [ -n "$setsections" ]; then
+ setsections=
+ sections=$name
+ continue
+fi
+case $name in
+ --version|-V)
+ echo "$program from @version@"
+ exit 0;;
+ -c) topath=catpath
+ defmanpath=
+ defcatpath=$DEFCATPATH
+ continue;;
+ -s) setsections=1
+ continue;;
+ -u) findarg="-ctime 0"
+ update=1
+ continue;;
+ -v) verbose=1
+ continue;;
+ -w) manpath=`man --path`
+ catpath=$manpath
+ continue;;
+ -*) echo "Usage: makewhatis [-s sections] [-u] [-v] [-w] [manpath] [-c [catpath]]"
+ echo " This will build the whatis database for the man pages"
+ echo " found in manpath and the cat pages found in catpath."
+ echo " -s: sections (default: $sections)"
+ echo " -u: update database with new pages"
+ echo " -v: verbose"
+ echo " -w: use manpath obtained from \`man --path\`"
+ echo " [manpath]: man directories (default: $DEFMANPATH)"
+ echo " [catpath]: cat directories (default: the first existing"
+ echo " directory in $DEFCATPATH)"
+ exit;;
+ *) if [ -d $name ]
+ then
+ eval $topath="\$$topath":$name
+ else
+ echo "No such directory $name"
+ exit
+ fi;;
+esac
+done
+
+manpath=`echo ${manpath-$defmanpath} | tr : ' '`
+if [ x"$catpath" = x ]; then
+ for d in `echo $defcatpath | tr : ' '`
+ do
+ if [ -d $d ]; then catpath=$d; break; fi
+ done
+fi
+catpath=`echo ${catpath} | tr : ' '`
+
+# first truncate all the whatis files that will be created new,
+# then only update - we might visit the same directory twice
+if [ x$update = x ]; then
+ for pages in man cat
+ do
+ eval path="\$$pages"path
+ for mandir in $path
+ do
+ cp /dev/null $mandir/whatis
+ done
+ done
+fi
+
+for pages in man cat
+do
+ export pages
+ eval path="\$$pages"path
+ for mandir in $path
+ do
+ if [ x$verbose != x ]; then
+ echo "about to enter $mandir" > /dev/stderr
+ fi
+
+ # kludge for Slackware's /usr/man/preformat
+ if [ $mandir = /usr/man/preformat ]
+ then
+ mandir1=/usr/man
+ else
+ mandir1=$mandir
+ fi
+
+ # if $mandir is on a readonly partition, and the whatis file
+ # is not a symlink, then let's skip trying to update it
+ if [ ! -L ${mandir1}/whatis ]
+ then
+ if [ -e ${mandir1}/whatis ] && [ ! -w ${mandir1}/whatis ]
+ then
+ if [ x$verbose != x ]; then
+ echo skipping $mandir - whatis file is readonly > /dev/stderr
+ fi
+ continue
+ elif [ ! -e ${mandir1}/whatis ] && [ ! -w ${mandir1} ]
+ then
+ if [ x$verbose != x ]; then
+ echo skipping $mandir - directory is readonly > /dev/stderr
+ fi
+ continue
+ fi
+ fi
+
+ if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
+ if [ x$verbose != x ]; then
+ echo skipping $mandir - we did it already > /dev/stderr
+ fi
+ else
+ here=`pwd`
+ cd $mandir
+ for i in $sections
+ do
+ if [ -d ${pages}$i ]
+ then
+ cd ${pages}$i
+ section=$i
+ curdir=$mandir/${pages}$i
+ export section verbose curdir
+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
+
+ function readline() {
+ if (use_zcat || use_bzcat || use_lzcat) {
+ result = (pipe_cmd | getline);
+ if (result < 0) {
+ print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
+ }
+ } else {
+ result = (getline < filename);
+ if (result < 0) {
+ print "Read file error: " filename " " ERRNO > "/dev/stderr";
+ }
+ }
+ return result;
+ }
+
+ function closeline() {
+ if (use_zcat || use_bzcat || use_lzcat) {
+ return close(pipe_cmd);
+ } else {
+ return close(filename);
+ }
+ }
+
+ function do_one() {
+ insh = 0; thisjoin = 1; done = 0;
+ entire_line = "";
+
+ if (verbose) {
+ print "adding " filename > "/dev/stderr"
+ }
+
+ use_zcat = match(filename,"\\.Z$") ||
+ match(filename,"\\.z$") || match(filename,"\\.gz$");
+ if (!use_zcat)
+ use_bzcat = match(filename,"\\.bz2");
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+ if (use_zcat || use_bzcat || use_lzcat ) {
+ filename_no_gz = substr(filename, 0, RSTART - 1);
+ } else {
+ filename_no_gz = filename;
+ }
+ match(filename_no_gz, "/[^/]+$");
+ progname = substr(filename, RSTART + 1, RLENGTH - 1);
+ if (match(progname, "\\." section "[A-Za-z]+")) {
+ actual_section = substr(progname, RSTART + 1, RLENGTH - 1);
+ } else {
+ actual_section = section;
+ }
+ sub(/\..*/, "", progname);
+ if (use_zcat || use_bzcat || use_lzcat) {
+ if (use_zcat) {
+ pipe_cmd = "zcat \"" filename "\"";
+ } else if (use_bzcat) {
+ pipe_cmd = "bzcat \"" filename "\"";
+ } else {
+ pipe_cmd = "lzcat \"" filename "\"";
+ }
+ # try to avoid suspicious stuff
+ if (filename ~ /[;&|`$(]/) {
+ print "ignored strange file name " filename " in " curdir > "/dev/stderr";
+ return;
+ }
+ }
+
+ while (!done && readline() > 0) {
+ gsub(/.\b/, "");
+ if (($1 ~ /^\.[Ss][Hh]/ &&
+ ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
+ $2 ~ /^JM�NO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
+ $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
+ $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
+ $2 ~ /^N[�E]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾��/ ||
+ $2 ~ /^̾��/ || $2 ~ /^�̸�/ || $2 ~ /^NAZWA/ ||
+ $2 ~ /^��������/ || $2 ~ /^����/ || $2 ~ /^�W��/ ||
+ $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^���/)) ||
+ (pages == "cat" && $1 ~ /^NAME/)) {
+ if (!insh) {
+ insh = 1;
+ } else {
+ done = 1;
+ }
+ } else if (insh) {
+ if ($1 ~ /^\.[Ss][HhYS]/ ||
+ (pages == "cat" &&
+ ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
+ $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
+ $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
+ $0 ~ /^[^ ]/))) {
+ # end insh for Synopsis, Syntax, but also for
+ # DESCRIPTION (e.g., XFree86.1x),
+ # COMMAND (e.g., xspread.1)
+ # OVERVIEW (e.g., TclCommandWriting.3)
+ # STRUCTURES (e.g., XEvent.3x)
+ # INTRODUCTION (e.g., TclX.n)
+ # and anything at all that begins in Column 1, so
+ # is probably a section header.
+ done = 1;
+ } else {
+ if ($0 ~ progname"-") { # Fix old cat pages
+ sub(progname"-", progname" - ");
+ }
+ if ($0 ~ /[^ \\]-$/) {
+ sub(/-$/, ""); # Handle Hyphenations
+ nextjoin = 1;
+ } else if ($0 ~ /\\c$/) {
+ sub(/\\c$/, ""); # Handle Continuations
+ nextjoin = 1;
+ } else
+ nextjoin = 0;
+
+ sub(/^.[IB] /, ""); # Kill bold and italics
+ sub(/^.BI /, ""); #
+ sub(/^.SM /, ""); # Kill small
+ sub(/^.Nm /, ""); # Kill bold
+ sub(/^.Tn /, ""); # Kill normal
+ sub(/^.Li /, ""); # Kill .Li
+ sub(/^.Dq /, ""); # Kill .Dq
+ sub(/^.Nd */, "- "); # Convert .Nd to dash
+ sub(/\\\".*/, ""); # Trim pending comments
+ sub(/ *$/, ""); # Trim pending spaces
+ sub(/^\.$/, ""); # Kill blank comments
+ sub(/^'"'"'.*/, ""); # Kill comment/troff lines
+ sub(/^.in .*/, ""); # Kill various macros
+ sub(/^.ti .*/, "");
+ sub(/^.ta .*/, "");
+ sub(/^.Vb .*/, "");
+ sub(/^.[PLTH]P$/, ""); # .PP/.LP/.TP/.HP
+ sub(/^.Pp$/, "");
+ sub(/^.[iI]X .*$/, "");
+ sub(/^.nolinks$/, "");
+ sub(/^.B$/, "");
+ sub(/^.nf$/, "");
+
+ if (($1 ~ /^\.../ || $1 == "") &&
+ (entire_line ~ / - / || entire_line ~ / \\- /)) {
+ # Assume that this ends the description of one line
+ # Sometimes there are several descriptions in one page,
+ # as in outb(2).
+ handle_entire_line();
+ entire_line = "";
+ thisjoin = 1;
+ } else {
+ if (thisjoin) {
+ entire_line = entire_line $0;
+ } else {
+ entire_line = entire_line " " $0;
+ }
+ thisjoin = nextjoin;
+ }
+ }
+ }
+ }
+ handle_entire_line();
+ closeline();
+ }
+
+ function handle_entire_line() {
+ x = entire_line; # Keep it short
+
+ gsub(/\015/, "", x); # Kill DOS remains
+ gsub(/ /, " ", x); # Translate tabs to spaces
+ gsub(/ +/, " ", x); # Collapse spaces
+ gsub(/ *, */, ", ", x); # Fix comma spacings
+ sub(/^ /, "", x); # Kill initial spaces
+ sub(/ $/, "", x); # Kill trailing spaces
+ sub(/__+/, "_", x); # Collapse underscores
+
+ gsub(/\\f\(../, "", x); # Kill font changes
+ gsub(/\\f[PRIB0123]/, "", x); # Kill font changes
+ gsub(/\\s[-+0-9]*/, "", x); # Kill size changes
+ gsub(/\\&/, "", x); # Kill \&
+ gsub(/\\\|/, "", x); # Kill \|
+ gsub(/\\\((ru|ul)/, "_", x); # Translate
+ gsub(/\\\((mi|hy|em)/, "-", x); # Translate
+ gsub(/\\\*\(../, "", x); # Kill troff strings
+ gsub(/\\/, "", x); # Kill all backslashes
+ gsub(/"/, "", x); # Kill quotes (from .Nd "foo bar")
+ sub(/<h1 align=center>/, "", x);# Yuk! HTML cruft
+ gsub(/\000.*/, "X", x); # Binary cruft in LAPACK pages
+ gsub(/ +/, " ", x); # Collapse spaces (again)
+ sub(/^ /, "", x); # Kill initial spaces (again)
+ sub(/ $/, "", x); # Kill trailing spaces (again)
+ sub(/\.$/, "", x); # Kill trailing period
+
+ if (!match(x, / - /))
+ return;
+
+ after_dash = substr(x, RSTART);
+ head = substr(x, 1, RSTART-1) ", ";
+ while (match(head, /, /)) {
+ prog = substr(head, 1, RSTART-1);
+ head = substr(head, RSTART+2);
+ if (prog != progname)
+ prog = prog " [" progname "]";
+ printf "%-*s (%s) %s\n", 20, prog, actual_section, after_dash;
+ }
+ }
+
+ { # Main action - process each filename read in.
+ filename = $0;
+ do_one();
+ }
+ ' pages=$pages section=$section verbose=$verbose curdir=$curdir
+ cd ..
+ fi
+ done > $TMPFILE
+
+ cd "$here"
+
+ if [ -f ${mandir1}/whatis ]
+ then
+ cat ${mandir1}/whatis >> $TMPFILE
+ fi
+ tr -s '\n' < $TMPFILE | sort -u > ${mandir1}/whatis
+
+ chmod 644 ${mandir1}/whatis
+ rm $TMPFILE
+ fi
+ done
+done
+
+# remove tempdir
+rm -rf $TMPFILEDIR
+
diff --git a/src/man-config.c b/src/man-config.c
new file mode 100644
index 0000000..d66cef6
--- /dev/null
+++ b/src/man-config.c
@@ -0,0 +1,297 @@
+/*
+ * man-config.c
+ *
+ * Read the man.conf file
+ *
+ * Input line types:
+ * MANBIN /usr/bin/man
+ * MANPATH /usr/X386/man [/var/catman/X386]
+ * MANPATH_MAP /usr/bin /usr/man
+ * FHS
+ * FSSTND
+ * NOAUTOPATH
+ * NROFF /usr/bin/groff -Tascii -mandoc
+ * BROWSER /usr/bin/lynx
+ * HTMLPAGER /usr/bin/lynx -dump
+ * .gz /usr/bin/gunzip -c
+ * # Comment
+ *
+ * Allow globbing in MANPATH elements.
+ * This is useful e.g. for having MANPATH /opt/ * /man
+ * (avoid comment within comment).
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "defs.h"
+#include "glob.h"
+#include "man-config.h"
+#include "man.h"
+#include "paths.h"
+#include "gripes.h"
+#include "util.h"
+
+#define BUFSIZE 4096
+
+extern char *rindex (const char *, int); /* not always in <string.h> */
+
+#define whitespace(x) ((x) == ' ' || (x) == '\t')
+
+/* directories listed in config file */
+struct dirs cfdirlist; /* linked list, 1st entry unused */
+
+static void
+addval (char *buf) {
+ int i, len;
+ char *bp;
+
+ for (i = 0; i < sizeof(paths)/sizeof(paths[0]); i++) {
+ len = strlen (paths[i].name);
+ bp = buf + len;
+ if(!strncmp (buf, paths[i].name, len) && (!*bp || whitespace(*bp))) {
+ while(whitespace(*bp))
+ bp++;
+ paths[i].path = my_strdup(bp);
+ return;
+ }
+ }
+ gripe (UNRECOGNIZED_LINE, buf);
+}
+
+const char *
+getval (const char *cmd) {
+ int i;
+
+ for (i = 0; i < sizeof(paths)/sizeof(paths[0]); i++)
+ if (!strcmp (cmd, paths[i].name))
+ return paths[i].path; /* never NULL */
+ gripe (GETVAL_ERROR, cmd);
+ return ""; /* impossible */
+}
+
+static void
+adddir (const char *bp, int mandatory) {
+ int i;
+ struct dirs *dlp;
+
+ while (whitespace(*bp))
+ bp++;
+ if (*bp == 0)
+ gripe (PARSE_ERROR_IN_CONFIG);
+
+ dlp = &cfdirlist;
+ while (dlp->nxt)
+ dlp = dlp->nxt;
+ dlp->nxt = (struct dirs *) my_malloc (sizeof(struct dirs));
+ dlp = dlp->nxt;
+ dlp->mandatory = mandatory;
+ dlp->nxt = 0;
+
+ if (!mandatory) {
+ i = 0;
+ while (*bp && !whitespace(*bp)) {
+ if (i < MAXPATHLEN - 1)
+ dlp->bindir[i++] = *bp;
+ bp++;
+ }
+ dlp->bindir[i] = 0;
+
+ while (whitespace(*bp))
+ bp++;
+ } else {
+ dlp->bindir[0] = 0;
+ }
+
+ i = 0;
+ while (*bp && !whitespace(*bp)) {
+ if (i < MAXPATHLEN - 1)
+ dlp->mandir[i++] = *bp;
+ bp++;
+ }
+ dlp->mandir[i] = 0;
+
+ while (whitespace(*bp))
+ bp++;
+
+ i = 0;
+ while (*bp && !whitespace(*bp)) {
+ if (i < MAXPATHLEN - 1)
+ dlp->catdir[i++] = *bp;
+ bp++;
+ }
+ dlp->catdir[i] = 0;
+
+ if (debug) {
+ if (dlp->mandatory)
+ gripe (FOUND_MANDIR, dlp->mandir);
+ else
+ gripe (FOUND_MAP, dlp->bindir, dlp->mandir);
+ if (dlp->catdir[0])
+ gripe (FOUND_CATDIR, dlp->catdir);
+ }
+}
+
+static void
+addglobdir (const char *bp, int mandatory) {
+ const char *dir;
+
+ while (whitespace(*bp))
+ bp++;
+
+ dir = bp;
+ if (index(dir, '*') || index(dir, '?') || index(dir, '[')) {
+ char **dp = glob_filename (dir);
+
+ if (dp && dp != (char **) -1) {
+ while (*dp)
+ adddir(*dp++, mandatory);
+ return;
+ }
+ }
+ adddir(dir, mandatory);
+}
+
+static struct xp {
+ char *extension; /* non-null, including initial . */
+ char *expander;
+ struct xp *nxt;
+} uncompressors; /* linked list, 1st entry unused */
+
+static void
+addext (char *bp) {
+ char *p, csv;
+ struct xp *xpp;
+
+ xpp = &uncompressors;
+ while (xpp->nxt)
+ xpp = xpp->nxt;
+ xpp->nxt = (struct xp *) my_malloc (sizeof(struct xp));
+ xpp = xpp->nxt;
+ xpp->nxt = 0;
+
+ p = bp;
+ while(*p && !whitespace(*p))
+ p++;
+ csv = *p;
+ *p = 0;
+ xpp->extension = my_strdup(bp);
+
+ *p = csv;
+ while(whitespace(*p))
+ p++;
+ xpp->expander = my_strdup(p);
+}
+
+const char *
+get_expander (const char *file) {
+ struct xp *xp;
+ char *extp = NULL;
+
+ if (dohp) {
+ /* Some HP systems have both man1 and man1.Z */
+ /* For man1.Z/file.1 let extp=".Z" */
+ /* For .1 return NULL */
+ int len = strlen (dohp);
+ char *dirname_end = rindex (file, '/');
+ if (dirname_end && !strncmp (dirname_end-len, dohp, len))
+ extp = dohp;
+ } else
+ extp = rindex (file, '.');
+ if (extp != NULL) {
+ if (uncompressors.nxt) {
+ for (xp = uncompressors.nxt; xp; xp = xp->nxt)
+ if (!strcmp (extp, xp->extension))
+ return (xp->expander);
+ } else if (!strcmp (extp, getval("COMPRESS_EXT"))) {
+ return getval("DECOMPRESS");
+ }
+ }
+ return NULL;
+}
+
+const char *configuration_file = "[no configuration file]";
+
+char *default_config_files[] = {
+ CONFIG_FILE, /* compiled-in default */
+ "/etc/man.conf", "/etc/man.config",
+ "/usr/lib/man.conf", "/usr/lib/man.config",
+ "/usr/share/misc/man.conf", "/usr/share/misc/man.config"
+};
+
+#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
+void
+read_config_file (const char *cf) {
+ char *bp;
+ char *p;
+ char buf[BUFSIZE];
+ FILE *config = NULL;
+
+ if (cf) {
+ /* User explicitly specified a config file */
+ if ((config = fopen (cf, "r")) == NULL) {
+ perror (cf);
+ gripe (CONFIG_OPEN_ERROR, cf);
+ return;
+ }
+ } else {
+ /* Try some things - unfortunately we cannot lookup
+ the config file to use in the config file :-). */
+ int i;
+
+ for(i=0; i < SIZE(default_config_files); i++) {
+ cf = default_config_files[i];
+ if ((config = fopen (cf, "r")) != NULL)
+ break;
+ }
+
+ if (config == NULL) {
+ gripe (CONFIG_OPEN_ERROR, CONFIG_FILE);
+ return;
+ }
+ }
+
+ if (debug)
+ fprintf(stderr, "Reading config file %s\n", cf);
+ configuration_file = cf;
+
+ while ((bp = fgets (buf, BUFSIZE, config)) != NULL) {
+ while (whitespace(*bp))
+ bp++;
+
+ for (p = bp; *p && *p != '#' && *p != '\n'; p++) ;
+ if (!*p) {
+ gripe (LINE_TOO_LONG);
+ gripe (BAD_CONFIG_FILE, cf);
+ return;
+ }
+ while (p > bp && whitespace(p[-1]))
+ p--;
+ *p = 0;
+
+ if (*bp == 0)
+ continue;
+
+ if (!strncmp ("MANPATH_MAP", bp, 11))
+ adddir (bp+11, 0);
+ else if (!strncmp ("MANPATH", bp, 7))
+ addglobdir (bp+7, 1);
+ else if(!strncmp ("MANDATORY_MANPATH", bp, 17))/* backwards compatible */
+ adddir (bp+17, 1);
+ else if (!strncmp ("FHS", bp, 3))
+ fhs = 1;
+ else if (!strncmp ("FSSTND", bp, 6))
+ fsstnd = 1;
+ else if (!strncmp ("NOAUTOPATH", bp, 10))
+ noautopath = 1;
+ else if (!strncmp ("NOCACHE", bp, 7))
+ nocache = 1;
+ else if (*bp == '.')
+ addext (bp);
+ else
+ addval (bp);
+ }
+}
+
diff --git a/src/man-config.h b/src/man-config.h
new file mode 100644
index 0000000..b364ffd
--- /dev/null
+++ b/src/man-config.h
@@ -0,0 +1,6 @@
+const char *getval (const char *);
+const char *get_expander (const char *);
+void read_config_file (const char *cf);
+
+extern struct dirs cfdirlist;
+extern const char *configuration_file;
diff --git a/src/man-getopt.c b/src/man-getopt.c
new file mode 100644
index 0000000..07aecdb
--- /dev/null
+++ b/src/man-getopt.c
@@ -0,0 +1,322 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "defs.h"
+#include "gripes.h"
+#include "man.h"
+#include "man-config.h"
+#include "man-getopt.h"
+#include "util.h"
+#include "version.h"
+
+int alt_system;
+char *alt_system_name;
+char *opt_manpath;
+int global_apropos = 0;
+
+static void
+print_version (void) {
+ gripe (VERSION, progname, version);
+}
+
+static void
+usage (void) {
+ print_version();
+ gripe (USAGE1, progname);
+
+ gripe (USAGE2); /* only for alt_systems */
+
+ gripe (USAGE3);
+ gripe (USAGE4);
+ gripe (USAGE5); /* maybe only if troff found? */
+ gripe (USAGE6);
+
+ gripe (USAGE7); /* only for alt_systems */
+
+ gripe (USAGE8);
+ exit(1);
+}
+
+static char short_opts[] = "B:C:H:xM:P:S:acdDfFhkKm:p:s:tvVwW?";
+
+#ifndef NOGETOPT
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+#include <getopt.h>
+
+static const struct option long_opts[] = {
+ { "help", no_argument, NULL, 'h' },
+ { "version", no_argument, NULL, 'v' },
+ { "path", no_argument, NULL, 'w' },
+ { "preformat", no_argument, NULL, 'F' },
+ { NULL, 0, NULL, 0 }
+};
+#endif
+
+/*
+ * Read options, return count.
+ */
+static int
+get_options_from_argvec(int argc, char **argv, char **config_file,
+ char **manpath) {
+ char *s;
+ int c;
+ int optct = 0;
+
+#ifndef NOGETOPT
+ while ((c = getopt_long (argc, argv, short_opts, long_opts, NULL)) != -1){
+#else
+ while ((c = getopt (argc, argv, short_opts)) != -1) {
+#endif
+ switch (c) {
+ case 'C':
+ no_privileges ();
+ if (config_file)
+ *config_file = my_strdup (optarg);
+ break;
+ case'F':
+ preformat = 1;
+ break;
+ case 'M':
+ if (manpath)
+ *manpath = my_strdup (optarg);
+ break;
+ case 'P':
+ pager = my_strdup (optarg);
+ break;
+ case 'B':
+ browser = my_strdup (optarg);
+ break;
+ case 'H':
+ htmlpager = my_strdup (optarg);
+ break;
+ case 'S':
+ colon_sep_section_list = my_strdup (optarg);
+ break;
+ case 's':
+ /* undocumented; compatibility with Sun */
+ s = colon_sep_section_list = my_strdup (optarg);
+ while (*s) {
+ if (*s == ',')
+ *s = ':';
+ s++;
+ }
+ break;
+ case 'a':
+ findall++;
+ break;
+ case 'c':
+ nocats++;
+ break;
+ case 'D':
+ debug++;
+ case 'd':
+ debug++;
+ break;
+ case 'f':
+ if (do_troff)
+ fatal (INCOMPAT, "-f", "-t");
+ if (apropos)
+ fatal (INCOMPAT, "-f", "-k");
+ if (print_where)
+ fatal (INCOMPAT, "-f", "-w");
+ whatis++;
+ break;
+ case 'k':
+ if (do_troff)
+ fatal (INCOMPAT, "-k", "-t");
+ if (whatis)
+ fatal (INCOMPAT, "-k", "-f");
+ if (print_where)
+ fatal (INCOMPAT, "-k", "-w");
+ apropos++;
+ break;
+ case 'K':
+ global_apropos++;
+ break;
+ case 'm':
+ alt_system++;
+ alt_system_name = my_strdup (optarg);
+ break;
+ /* or: gripe (NO_ALTERNATE); exit(1); */
+ case 'p':
+ roff_directive = my_strdup (optarg);
+ break;
+ case 't':
+ if (apropos)
+ fatal (INCOMPAT, "-t", "-k");
+ if (whatis)
+ fatal (INCOMPAT, "-t", "-f");
+ if (print_where)
+ fatal (INCOMPAT, "-t", "-w");
+ do_troff++;
+ break;
+ case 'v':
+ case 'V':
+ print_version();
+ exit(0);
+ case 'W':
+ one_per_line++;
+ /* fall through */
+ case 'w':
+ if (apropos)
+ fatal (INCOMPAT, "-w", "-k");
+ if (whatis)
+ fatal (INCOMPAT, "-w", "-f");
+ if (do_troff)
+ fatal (INCOMPAT, "-w", "-t");
+ print_where++;
+ break;
+ case 'h':
+ case '?':
+ default:
+ usage();
+ break;
+ }
+ optct++;
+ }
+
+ return optct;
+}
+
+static void
+get_options_from_string(const char *s) {
+ char *s0, *ss;
+ int argct;
+ char **argvec;
+ int optindsv;
+
+ if (!s || *s == 0)
+ return;
+
+ /* In order to avoid having a list of options in two places,
+ massage the string so that it can be fed to getopt() */
+
+ s0 = my_strdup(s);
+
+ /* count arguments */
+ argct = 0;
+ ss = s0;
+ while (*ss) {
+ while (*ss == ' ')
+ ss++;
+ if (*ss) {
+ argct++;
+ while (*ss && *ss != ' ')
+ ss++;
+ }
+ }
+
+ /* allocate argvec */
+ argvec = (char **) my_malloc((argct+2)*sizeof(char *));
+ argct = 0;
+ argvec[argct++] = "dummy";
+ ss = s0;
+ while (*ss) {
+ while (*ss == ' ')
+ *ss++ = 0;
+ if (*ss) {
+ argvec[argct++] = ss;
+ while (*ss && *ss != ' ')
+ ss++;
+ }
+ }
+ argvec[argct] = 0;
+
+ optindsv = optind;
+ optind = 1;
+ get_options_from_argvec(argct, argvec, NULL, NULL);
+ optind = optindsv;
+}
+
+static void
+mysetenv(const char *name, const char *value) {
+#if defined(__sgi__) || defined(__sun__) || defined(sun)
+ int len = strlen(value)+1+strlen(value)+1;
+ char *str = my_malloc(len);
+ sprintf(str, "%s=%s", name, value);
+ putenv(str);
+#else
+ setenv(name, value, 1);
+#endif
+}
+
+/*
+ * Get options from the command line and user environment.
+ * Also reads the configuration file.
+ */
+
+void
+man_getopt (int argc, char **argv) {
+ char *config_file = NULL;
+ char *manp = NULL;
+ int optct = 0;
+
+ optct = get_options_from_argvec(argc, argv, &config_file, &manp);
+
+ read_config_file (config_file);
+
+ /* If no options were given and MANDEFOPTIONS is set, use that */
+ if (optct == 0) {
+ const char *defopts = getval ("MANDEFOPTIONS");
+ get_options_from_string(defopts);
+ }
+
+ /* In case an explicit -P option was given, put it in the
+ environment for possible use with -k or -K.
+ Ignore errors (out of memory?) */
+
+ if (pager && (global_apropos || apropos || whatis))
+ mysetenv("PAGER", pager);
+
+ if (pager == NULL || *pager == '\0')
+ if (((pager = getenv ("MANPAGER")) == NULL) || (*pager == '\0'))
+ if (((pager = getenv ("PAGER")) == NULL) || (*pager == '\0'))
+ pager = getval ("PAGER");
+
+ if (debug)
+ gripe (PAGER_IS, pager);
+
+ /* Ditto for BROWSER and -B */
+ if (browser && (global_apropos || apropos || whatis))
+ mysetenv("BROWSER", browser);
+
+ if (browser == NULL || *browser == '\0')
+ if ((browser = getenv ("BROWSER")) == NULL)
+ browser = getval ("BROWSER");
+
+ if (debug)
+ gripe (BROWSER_IS, browser);
+
+ /* Ditto for HTMLHTMLPAGER and -H */
+ if (htmlpager && (global_apropos || apropos || whatis))
+ mysetenv("HTMLPAGER", htmlpager);
+
+ if (htmlpager == NULL || *htmlpager == '\0')
+ if ((htmlpager = getenv ("HTMLPAGER")) == NULL)
+ htmlpager = getval ("HTMLPAGER");
+
+ if (debug)
+ gripe (HTMLPAGER_IS, htmlpager);
+
+ if (do_compress && !*getval ("COMPRESS")) {
+ if (debug)
+ gripe (NO_COMPRESS);
+ do_compress = 0;
+ }
+
+ if (do_troff && !*getval ("TROFF")) {
+ gripe (NO_TROFF, configuration_file);
+ exit (1);
+ }
+
+ opt_manpath = manp; /* do not yet expand manpath -
+ maybe it is not needed */
+
+ if (alt_system_name == NULL || *alt_system_name == '\0')
+ if ((alt_system_name = getenv ("SYSTEM")) != NULL)
+ alt_system_name = my_strdup (alt_system_name);
+
+}
diff --git a/src/man-getopt.h b/src/man-getopt.h
new file mode 100644
index 0000000..35ad35b
--- /dev/null
+++ b/src/man-getopt.h
@@ -0,0 +1,6 @@
+extern void man_getopt (int argc, char **argv);
+
+extern int global_apropos;
+extern int alt_system;
+extern char *alt_system_name;
+extern char *opt_manpath;
diff --git a/src/man-iconv.c b/src/man-iconv.c
new file mode 100644
index 0000000..9ce1236
--- /dev/null
+++ b/src/man-iconv.c
@@ -0,0 +1,163 @@
+/*
+ * From andy at pylesos.asp-linux.com.ua Tue Dec 3 14:17:38 2002
+ * (polished, aeb)
+ *
+ * Manpages for a given language have a traditional character set.
+ * E.g., for Russian this is koi8r.
+ * If the user uses a different locale, throw in an invocation of iconv.
+ *
+ * Exports:
+ * const char *get_converter (const char *path);
+ * Conversion is to the users locale. Conversion is from the
+ * manpage charset, found in environment variables, or in
+ * PATH/.charset, where PATH is the directory (below that) containing
+ * the man page.
+ *
+ * TODO: adapt this to man.conf way
+ */
+
+/*
+ * By default iconv is not used - this is the wrong interface.
+ * But if you want it, define USE_ICONV.
+ */
+#undef USE_ICONV
+
+#include <stdio.h> /* NULL */
+
+#if defined __GLIBC__ && __GLIBC__ >= 2 && defined USE_ICONV
+#include <stdlib.h> /* getenv */
+#include <unistd.h> /* access */
+#include <string.h> /* strcmp */
+#include <locale.h> /* setlocale */
+#include <langinfo.h> /* nl_langinfo */
+#include <iconv.h> /* iconv_open */
+#include "man-iconv.h" /* get_converter */
+#include "util.h" /* my_strdup */
+#include "man.h" /* debug */
+
+static char *
+find_iconv(void) {
+ static char *iconv_path = NULL;
+ static int inited = 0;
+
+ if (!inited) {
+ char *file = getenv("MAN_ICONV_PATH");
+ if (!file)
+ file = "/usr/bin/iconv";
+ if (access(file, X_OK) == 0)
+ iconv_path = my_strdup(file);
+ inited = 1;
+ }
+ return iconv_path;
+}
+
+static char *
+iconv_extra_flags(void) {
+ static char *iconv_flags = "-cs";
+ static int inited = 0;
+
+ if (!inited) {
+ char *opt = getenv("MAN_ICONV_OPT");
+ if (opt)
+ iconv_flags = my_strdup(opt);
+ inited = 1;
+ }
+ return iconv_flags;
+}
+
+static char *
+get_locale_charset (void) {
+ char *old_lc_ctype, *charset;
+
+ if ((charset = getenv("MAN_ICONV_OUTPUT_CHARSET")) == NULL) {
+ old_lc_ctype = setlocale(LC_CTYPE, "");
+ charset = nl_langinfo(CODESET);
+ setlocale(LC_CTYPE, old_lc_ctype);
+ }
+ return charset;
+}
+
+static char *
+get_man_charset (const char *path) {
+ char *charset_env, *file, *path2, *p;
+ FILE *f = NULL;
+
+ charset_env = getenv("MAN_ICONV_INPUT_CHARSET");
+ if (charset_env)
+ return charset_env;
+
+ if (!path || !*path)
+ return NULL;
+
+ if (debug)
+ fprintf(stderr, "get_man_charset: path=%s\n", path);
+
+ /* strip trailing "/.." and try that directory first */
+ path2 = my_strdup(path);
+ p = strrchr(path2, '/');
+ if (p && !strcmp(p, "/..")) {
+ *p = 0;
+ file = my_xsprintf("%s/.charset", path2);
+ f = fopen(file, "r");
+ free(file);
+ }
+ free(path2);
+
+ /* if that fails, try path itself */
+ if (f == NULL) {
+ file = my_xsprintf("%s/.charset", path);
+ f = fopen(file, "r");
+ free(file);
+ }
+
+ if (f) {
+ char charset[100], *p;
+
+ fgets(charset, sizeof(charset), f);
+ fclose(f);
+ fprintf(stderr, "read %s\n", charset);
+ p = strchr(charset, '\n');
+ if (p) {
+ *p = 0;
+ return my_strdup(charset);
+ }
+ }
+ return NULL;
+}
+
+static int
+is_conversion_supported (char *from, char *to) {
+ iconv_t cd;
+
+ if (!from || !*from || !to || !*to || !strcmp(from,to))
+ return 0;
+ if ((cd = iconv_open(to, from)) != (iconv_t) -1) {
+ iconv_close(cd);
+ return 1;
+ }
+ return 0;
+}
+
+const char *
+get_converter (const char *path) {
+ char *from, *to, *iconv_path;
+
+ iconv_path = find_iconv();
+ from = get_man_charset(path);
+ to = get_locale_charset();
+ if (debug)
+ fprintf(stderr, "get_converter: iconv_path=%s from=%s to=%s\n",
+ iconv_path, from, to);
+ if (iconv_path && is_conversion_supported(from, to))
+ return my_xsprintf("%s %s -f %s -t %s",
+ iconv_path, iconv_extra_flags(), from, to);
+ return NULL;
+}
+#else
+#include "man-iconv.h"
+
+const char *
+get_converter (const char *path) {
+ return NULL;
+}
+#endif /* __GLIBC__ && __GLIBC__ >= 2 */
diff --git a/src/man-iconv.h b/src/man-iconv.h
new file mode 100644
index 0000000..40c9ad8
--- /dev/null
+++ b/src/man-iconv.h
@@ -0,0 +1 @@
+extern const char *get_converter (const char *path);
diff --git a/src/man.c b/src/man.c
new file mode 100644
index 0000000..62eaee4
--- /dev/null
+++ b/src/man.c
@@ -0,0 +1,1366 @@
+/*
+ * man.c
+ *
+ * Copyright (c) 1990, 1991, John W. Eaton.
+ *
+ * You may distribute under the terms of the GNU General Public
+ * License as specified in the file COPYING that comes with the man
+ * distribution.
+ *
+ * John W. Eaton
+ * jwe at che.utexas.edu
+ * Department of Chemical Engineering
+ * The University of Texas at Austin
+ * Austin, Texas 78712
+ *
+ * Some manpath, compression and locale related changes - aeb - 940320
+ * Some suid related changes - aeb - 941008
+ * Some more fixes, Pauline Middelink & aeb, Oct 1994
+ * man -K: aeb, Jul 1995
+ * Split off of manfile for man2html, aeb, New Year's Eve 1997
+ */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/file.h>
+#include <sys/stat.h> /* for chmod */
+#include <signal.h>
+#include <errno.h>
+#include <unistd.h>
+#include <locale.h>
+#ifdef TERMIOS_HEADER
+#include <sys/termios.h>
+#endif
+
+#ifndef R_OK
+#define R_OK 4
+#endif
+
+extern char *index (const char *, int); /* not always in <string.h> */
+extern char *rindex (const char *, int); /* not always in <string.h> */
+
+#include "defs.h"
+#include "gripes.h"
+#include "man.h"
+#include "manfile.h"
+#include "manpath.h"
+#include "man-config.h"
+#include "man-getopt.h"
+#include "man-iconv.h"
+#include "to_cat.h"
+#include "util.h"
+#include "glob.h"
+#include "different.h"
+#include "man-iconv.h"
+
+#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
+const char *progname;
+const char *pager, *browser, *htmlpager;
+char *colon_sep_section_list;
+char *roff_directive;
+char *dohp = 0;
+int do_irix;
+int do_win32;
+int apropos;
+int whatis;
+int nocats; /* set by -c option: do not use cat page */
+ /* this means that cat pages must not be used,
+ perhaps because the user knows they are
+ old or corrupt or so */
+int can_use_cache; /* output device is a tty, width 80 */
+ /* this means that the result may be written
+ in /var/cache, and may be read from there */
+int findall;
+int print_where;
+int one_per_line;
+int do_troff;
+int preformat;
+int debug;
+int fhs;
+int fsstnd;
+int noautopath;
+int nocache;
+static int is_japanese;
+static char *language;
+static char **section_list;
+
+#ifdef DO_COMPRESS
+int do_compress = 1;
+#else
+int do_compress = 0;
+#endif
+
+#define BUFSIZE 8192
+
+/*
+ * Try to determine the line length to use.
+ * Preferences: 1. MANWIDTH, 2. ioctl, 3. COLUMNS, 4. 80
+ *
+ * joey, 950902
+ */
+
+#include <sys/ioctl.h>
+
+int line_length = 80;
+int ll = 0;
+
+static void
+get_line_length(void){
+ char *cp;
+ int width;
+
+ if (preformat) {
+ line_length = 80;
+ return;
+ }
+ if ((cp = getenv ("MANWIDTH")) != NULL && (width = atoi(cp)) > 0) {
+ line_length = width;
+ return;
+ }
+#ifdef TIOCGWINSZ
+ if (isatty(0) && isatty(1)) { /* Jon Tombs */
+ struct winsize wsz;
+
+ if(ioctl(0, TIOCGWINSZ, &wsz))
+ perror("TIOCGWINSZ failed\n");
+ else if(wsz.ws_col) {
+ line_length = wsz.ws_col;
+ return;
+ }
+ }
+#endif
+ if ((cp = getenv ("COLUMNS")) != NULL && (width = atoi(cp)) > 0)
+ line_length = width;
+ else
+ line_length = 80;
+}
+
+static int
+setll(void) {
+ return
+ (!do_troff && (line_length < 66 || line_length > 80)) ?
+ line_length*9/10 : 0;
+}
+
+/* People prefer no page headings in their man screen output;
+ now ".pl 0" has a bad effect on .SH etc, so we need ".pl N"
+ for some large number N, like 1100i (a hundred pages). */
+#define VERY_LONG_PAGE "1100i"
+
+static char *
+setpl(void) {
+ char *pl;
+ if (do_troff)
+ return NULL;
+ if (preformat)
+ pl = VERY_LONG_PAGE;
+ else
+ if ((pl = getenv("MANPL")) == 0) {
+ if (isatty(0) && isatty(1))
+ pl = VERY_LONG_PAGE;
+ else
+ pl = "11i"; /* old troff default */
+ }
+ return pl;
+}
+
+/*
+ * Check to see if the argument is a valid section number. If the
+ * first character of name is a numeral, or the name matches one of
+ * the sections listed in section_list, we'll assume that it's a section.
+ * The list of sections in config.h simply allows us to specify oddly
+ * named directories like .../man3f. Yuk.
+ */
+static char *
+is_section (char *name) {
+ char **vs;
+
+ /* 3Xt may be a section, but 3DBorder is a man page */
+ if (isdigit (name[0]) && !isdigit (name[1]) && strlen(name) < 5)
+ return my_strdup (name);
+
+ for (vs = section_list; *vs != NULL; vs++)
+ if (strcmp (*vs, name) == 0)
+ return my_strdup (name);
+
+ return NULL;
+}
+
+
+static void
+remove_file (char *file) {
+ int i;
+
+ i = unlink (file);
+
+ if (debug) {
+ if (i)
+ perror(file);
+ else
+ gripe (UNLINKED, file);
+ }
+}
+
+static void
+remove_other_catfiles (const char *catfile) {
+ char *pathname;
+ char *t;
+ char **gf;
+ int offset;
+
+ pathname = my_strdup(catfile);
+ t = rindex(pathname, '.');
+ if (t == NULL || strcmp(t, getval("COMPRESS_EXT")))
+ return;
+ offset = t - pathname;
+ strcpy(t, "*");
+ gf = glob_filename (pathname);
+
+ if (gf != (char **) -1 && gf != NULL) {
+ for ( ; *gf; gf++) {
+ /*
+ * Only remove files with a known extension, like .Z
+ * (otherwise we might kill a lot when called with
+ * catfile = ".gz" ...)
+ */
+ if (strlen (*gf) <= offset) {
+ if (strlen (*gf) == offset) /* uncompressed version */
+ remove_file (*gf);
+ continue;
+ }
+
+ if (!strcmp (*gf + offset, getval("COMPRESS_EXT")))
+ continue;
+
+ if (get_expander (*gf) != NULL)
+ remove_file (*gf);
+ }
+ }
+}
+
+/*
+ * Simply display the preformatted page.
+ */
+static int
+display_cat_file (const char *file) {
+ int found;
+
+ if (preformat)
+ return 1; /* nothing to do - preformat only */
+
+ found = 0;
+
+ if (access (file, R_OK) == 0 && different_cat_file(file)) {
+ char *command = NULL;
+ const char *expander = get_expander (file);
+
+ if (expander != NULL && expander[0] != 0) {
+ if (isatty(1))
+ command = my_xsprintf("%s %S | %s", expander, file, pager);
+ else
+ command = my_xsprintf("%s %S", expander, file);
+ } else {
+ if (isatty(1)) {
+ command = my_xsprintf("%s %S", pager, file);
+ } else {
+ const char *cat = getval("CAT");
+ command = my_xsprintf("%s %S", cat[0] ? cat : "cat", file);
+ }
+ }
+ found = !do_system_command (command, 0);
+ }
+ return found;
+}
+
+/*
+ * Simply display the preformatted page.
+ */
+static int
+display_html_file (const char *file) {
+ int found;
+
+ found = 0;
+
+ if (access (file, R_OK) == 0 && different_cat_file(file)) {
+ char *command = NULL;
+
+ if (isatty(1)) {
+ command = my_xsprintf("%s %S", browser, file);
+ } else {
+ command = my_xsprintf("%s %S", htmlpager, file);
+ }
+ found = !do_system_command (command, 0);
+ }
+ return found;
+
+ return 1;
+}
+
+/*
+ * Try to find the ultimate source file. If the first line of the
+ * current file is not of the form
+ *
+ * .so man3/printf.3s
+ *
+ * the input file name is returned.
+ *
+ * For /cd/usr/src/usr.bin/util-linux-1.5/mount/umount.8.gz
+ * (which contains `.so man8/mount.8')
+ * we return /cd/usr/src/usr.bin/util-linux-1.5/mount/mount.8.gz .
+ *
+ * For /usr/man/man3/TIFFScanlineSize.3t
+ * (which contains `.so TIFFsize.3t')
+ * we return /usr/man/man3/TIFFsize.3t .
+ */
+static const char *
+ultimate_source (const char *name0) {
+ FILE *fp;
+ char *name;
+ const char *expander;
+ int expfl = 0;
+ char *fgr;
+ char *beg;
+ char *end;
+ char *cp;
+ char buf[BUFSIZE];
+ static char ultname[BUFSIZE];
+
+ if (strlen(name0) >= sizeof(ultname))
+ return name0;
+ strcpy(ultname, name0);
+ name = ultname;
+
+again:
+ expander = get_expander (name);
+ if (expander && *expander) {
+ char *command;
+
+ command = my_xsprintf ("%s %S", expander, name);
+ fp = my_popen (command, "r");
+ if (fp == NULL) {
+ perror("popen");
+ gripe (EXPANSION_FAILED, command);
+ return (NULL);
+ }
+ fgr = fgets (buf, sizeof(buf), fp);
+
+ #ifdef __APPLE__
+ /* Man 1.5x randomly freezes under Mac OS X 10.4.7 when the
+ man page is compressed (with either gzip or bzip2), and
+ only with large pages.
+ The freeze occurs at the pclose function, and a ps shows
+ that gunzip is still running.
+
+ The problem is the specification of pclose(): The pclose()
+ function waits for the associated process to terminate
+ and returns the exit status of the command as returned by
+ wait4().
+
+ So, if gunzip is started to look at the start of a file and
+ the file is larger than the buffer used by stdio then the
+ first read does not read everything, and the pclose hangs. */
+
+ /* Reading loop insures lockup cannot occur */
+ char dummy[BUFSIZE];
+ while (fgets (dummy,sizeof(dummy),fp) );
+ #endif // __APPLE__
+
+ pclose (fp);
+ expfl = 1;
+ } else {
+ fp = fopen (name, "r");
+ if (fp == NULL && expfl) {
+ char *extp = rindex (name0, '.');
+ if (extp && *extp && strlen(name)+strlen(extp) < BUFSIZE) {
+ strcat(name, extp);
+ fp = fopen (name, "r");
+ }
+ }
+ /*
+ * Some people have compressed man pages, but uncompressed
+ * .so files - we could glob for all possible extensions,
+ * for now: only try .gz
+ */
+ else if (fp == NULL && get_expander(".gz") &&
+ strlen(name)+strlen(".gz") < BUFSIZE) {
+ strcat(name, ".gz");
+ fp = fopen (name, "r");
+ }
+
+ if (fp == NULL) {
+ perror("fopen");
+ gripe (OPEN_ERROR, name);
+ return (NULL);
+ }
+ fgr = fgets (buf, sizeof(buf), fp);
+ fclose (fp);
+ }
+
+ if (fgr == NULL) {
+ perror("fgets");
+ gripe (READ_ERROR, name);
+ return (NULL);
+ }
+
+ if (strncmp(buf, ".so", 3))
+ return (my_strdup(name));
+
+ beg = buf+3;
+ while (*beg == ' ' || *beg == '\t')
+ beg++;
+
+ end = beg;
+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
+ end++; /* note that buf is NUL-terminated */
+ *end = '\0';
+
+ /* If name ends in path/manx/foo.9x then use path, otherwise
+ try same directory. */
+ if ((cp = rindex(name, '/')) == NULL) /* very strange ... */
+ return 0;
+ *cp = 0;
+
+ /* allow "man ./foo.3" where foo.3 contains ".so man2/bar.2" */
+ if ((cp = rindex(name, '/')) != NULL && !strcmp(cp+1, "."))
+ *cp = 0;
+
+ /* In all cases, the new name will be something from name
+ followed by something from beg. */
+ if (strlen(name) + strlen(beg) + 1 >= BUFSIZ)
+ return 0; /* very long names, ignore */
+
+ if (!index(beg, '/')) {
+ /* strange.. try same directory as the .so file */
+ strcat(name, "/");
+ strcat(name, beg);
+ } else if((cp = rindex(name, '/')) != NULL && !strncmp(cp+1, "man", 3)) {
+ strcpy(cp+1, beg);
+ } else if((cp = rindex(beg, '/')) != NULL) {
+ strcat(name, cp);
+ } else {
+ strcat(name, "/");
+ strcat(name, beg);
+ }
+
+ goto again;
+}
+
+static void
+add_directive (const char *d, const char *file, char *buf, int buflen) {
+ if ((d = getval(d)) != 0 && *d) {
+ if (*buf == 0) {
+ if (strlen(d) + strlen(file) + 2 > buflen)
+ return;
+ strcpy (buf, d);
+ strcat (buf, " ");
+ strcat (buf, file);
+ } else {
+ if (strlen(d) + strlen(buf) + 4 > buflen)
+ return;
+ strcat (buf, " | ");
+ strcat (buf, d);
+ }
+ }
+}
+
+static int
+is_lang_page (char *lang, const char *file) {
+ char lang_path[16] = "";
+
+ snprintf(lang_path, sizeof(lang_path), "/%s/", lang);
+ if (strstr(file, lang_path))
+ return 1;
+ if (strlen(lang) > 2) {
+ lang_path[3] = '/';
+ lang_path[4] = 0;
+ if (strstr(file, lang_path))
+ return 1;
+ }
+ return 0;
+}
+
+static int
+parse_roff_directive (char *cp, const char *file, char *buf, int buflen) {
+ char c;
+ int tbl_found = 0;
+ int use_jroff;
+
+ use_jroff = (is_japanese &&
+ (strstr(file, "/jman/") || is_lang_page(language, file)));
+
+ while ((c = *cp++) != '\0') {
+ switch (c) {
+ case 'e':
+ if (debug)
+ gripe (FOUND_EQN);
+ add_directive((do_troff ? "EQN" : use_jroff ? "JNEQN": "NEQN"),
+ file, buf, buflen);
+ break;
+
+ case 'g':
+ if (debug)
+ gripe (FOUND_GRAP);
+ add_directive ("GRAP", file, buf, buflen);
+ break;
+
+ case 'p':
+ if (debug)
+ gripe (FOUND_PIC);
+ add_directive ("PIC", file, buf, buflen);
+ break;
+
+ case 't':
+ if (debug)
+ gripe (FOUND_TBL);
+ tbl_found++;
+ add_directive ("TBL", file, buf, buflen);
+ break;
+
+ case 'v':
+ if (debug)
+ gripe (FOUND_VGRIND);
+ add_directive ("VGRIND", file, buf, buflen);
+ break;
+
+ case 'r':
+ if (debug)
+ gripe (FOUND_REFER);
+ add_directive ("REFER", file, buf, buflen);
+ break;
+
+ case ' ':
+ case '\t':
+ case '\n':
+ goto done;
+
+ default:
+ return -1;
+ }
+ }
+
+done:
+ if (*buf == 0)
+ return 1;
+
+ add_directive (do_troff ? "TROFF" : use_jroff ? "JNROFF" : "NROFF",
+ "", buf, buflen);
+
+ if (tbl_found && !do_troff && *getval("COL"))
+ add_directive ("COL", "", buf, buflen);
+
+ return 0;
+}
+
+static char *
+eos(char *s) {
+ while(*s) s++;
+ return s;
+}
+
+/*
+ * Create command to format FILE, in the directory PATH/manX
+ */
+static char *
+make_roff_command (const char *path, const char *file) {
+ FILE *fp;
+ static char buf [BUFSIZE];
+ char line [BUFSIZE], bufh [BUFSIZE], buft [BUFSIZE];
+ int status, ll;
+ char *cp, *fgr, *pl;
+ char *command = "";
+ const char *expander;
+ const char *converter;
+
+ /* if window size differs much from 80, try to adapt */
+ /* (but write only standard formatted files to the cat directory,
+ see can_use_cache) */
+ ll = setll();
+ pl = setpl();
+ if (ll && debug)
+ gripe (NO_CAT_FOR_NONSTD_LL);
+
+ expander = get_expander (file);
+ converter = get_converter (path);
+
+ /* head */
+ bufh[0] = 0;
+ if (ll || pl) {
+ /* some versions of echo do not accept the -e flag,
+ so we just use two echo calls when needed */
+ strcat(bufh, "(");
+ if (ll) {
+ /*
+ * We should set line length and title line length.
+ * However, a .lt command here fails, only
+ * .ev 1; .lt ...; .ev helps for my version of groff.
+ * The LL assignment is needed by the mandoc macros.
+ */
+ sprintf(eos(bufh), "echo \".ll %d.%di\"; ", ll/10, ll%10);
+ sprintf(eos(bufh), "echo \".nr LL %d.%di\"; ", ll/10, ll%10);
+#if 0
+ sprintf(eos(bufh), "echo \".lt %d.%di\"; ", ll/10, ll%10);
+#endif
+ }
+ if (pl)
+ sprintf(eos(bufh), "echo \".pl %.128s\"; ", pl);
+ }
+
+ /* tail */
+ buft[0] = 0;
+ if (ll || pl) {
+ if (pl && !strcmp(pl, VERY_LONG_PAGE))
+ /* At end of the nroff source, set the page length to
+ the current position plus 10 lines. This plus setpl()
+ gives us a single page that just contains the whole
+ man page. (William Webber, wew at cs.rmit.edu.au) */
+ strcat(buft, "; echo \".\\\\\\\"\"; echo \".pl \\n(nlu+10\"");
+#if 0
+ /* In case this doesnt work for some reason,
+ michaelkjohnson suggests: I've got a simple
+ awk invocation that I throw into the pipeline: */
+
+ awk 'BEGIN {RS="\n\n\n\n*"} /.*/ {print}'
+#endif
+ strcat(buft, ")");
+ }
+
+ if (expander && *expander) {
+ if (converter && *converter)
+ command = my_xsprintf("%s%s '%S' | %s%s",
+ bufh, expander, file, converter, buft);
+ else
+ command = my_xsprintf("%s%s '%S'%s",
+ bufh, expander, file, buft);
+ } else if (ll || pl) {
+ const char *cat = getval("CAT");
+ if (!cat || !*cat)
+ cat = "cat";
+
+ if (converter && *converter)
+ command = my_xsprintf("%s%s '%S' | %s%s",
+ bufh, cat, file, converter, buft);
+ else
+ command = my_xsprintf("%s%s '%S'%s",
+ bufh, cat, file, buft);
+ }
+
+ if (strlen(command) >= sizeof(buf))
+ exit(1);
+ strcpy(buf, command);
+
+ if (roff_directive != NULL) {
+ if (debug)
+ gripe (ROFF_FROM_COMMAND_LINE);
+
+ status = parse_roff_directive (roff_directive, file,
+ buf, sizeof(buf));
+
+ if (status == 0)
+ return buf;
+
+ if (status == -1)
+ gripe (ROFF_CMD_FROM_COMMANDLINE_ERROR);
+ }
+
+ if (expander && *expander) {
+ char *cmd = my_xsprintf ("%s %S", expander, file);
+ fp = my_popen (cmd, "r");
+ if (fp == NULL) {
+ perror("popen");
+ gripe (EXPANSION_FAILED, cmd);
+ return (NULL);
+ }
+ fgr = fgets (line, sizeof(line), fp);
+ pclose (fp);
+ } else {
+ fp = fopen (file, "r");
+ if (fp == NULL) {
+ perror("fopen");
+ gripe (OPEN_ERROR, file);
+ return (NULL);
+ }
+ fgr = fgets (line, sizeof(line), fp);
+ fclose (fp);
+ }
+
+ if (fgr == NULL) {
+ perror("fgets");
+ gripe (READ_ERROR, file);
+ return (NULL);
+ }
+
+ cp = &line[0];
+ if (*cp++ == '\'' && *cp++ == '\\' && *cp++ == '"' && *cp++ == ' ') {
+ if (debug)
+ gripe (ROFF_FROM_FILE, file);
+
+ status = parse_roff_directive (cp, file, buf, sizeof(buf));
+
+ if (status == 0)
+ return buf;
+
+ if (status == -1)
+ gripe (ROFF_CMD_FROM_FILE_ERROR, file);
+ }
+
+ if ((cp = getenv ("MANROFFSEQ")) != NULL) {
+ if (debug)
+ gripe (ROFF_FROM_ENV);
+
+ status = parse_roff_directive (cp, file, buf, sizeof(buf));
+
+ if (status == 0)
+ return buf;
+
+ if (status == -1)
+ gripe (MANROFFSEQ_ERROR);
+ }
+
+ if (debug)
+ gripe (USING_DEFAULT);
+
+ (void) parse_roff_directive ("t", file, buf, sizeof(buf));
+
+ return buf;
+}
+
+/*
+ * Try to format the man page and create a new formatted file. Return
+ * 1 for success and 0 for failure.
+ */
+static int
+make_cat_file (const char *path, const char *man_file, const char *cat_file) {
+ int mode;
+ FILE *fp;
+ char *roff_command;
+ char *command = NULL;
+ struct stat statbuf;
+
+ /* _Before_ first, make sure we will write to a regular file. */
+ if (stat(cat_file, &statbuf) == 0) {
+ if(!S_ISREG(statbuf.st_mode)) {
+ if (debug)
+ gripe (CAT_OPEN_ERROR, cat_file);
+ return 0;
+ }
+ }
+
+ /* First make sure we can write the file; create an empty file. */
+ /* If we are suid it must get mode 0666. */
+ if ((fp = fopen (cat_file, "w")) == NULL) {
+ if (errno == ENOENT) /* directory does not exist */
+ return 0;
+
+ /* If we cannot write the file, maybe we can delete it */
+ if(unlink (cat_file) != 0 || (fp = fopen (cat_file, "w")) == NULL) {
+ if (errno == EROFS) /* possibly a CDROM */
+ return 0;
+ if (debug)
+ gripe (CAT_OPEN_ERROR, cat_file);
+ if (!suid)
+ return 0;
+
+ /* maybe the real user can write it */
+ /* note: just doing "> %s" gives the wrong exit status */
+ command = my_xsprintf("cp /dev/null %S 2>/dev/null", cat_file);
+ if (do_system_command(command, 1)) {
+ if (debug)
+ gripe (USER_CANNOT_OPEN_CAT);
+ return 0;
+ }
+ if (debug)
+ gripe (USER_CAN_OPEN_CAT);
+ }
+ } else {
+ /* we can write it - good */
+ fclose (fp);
+
+ /* but maybe the real user cannot - let's allow everybody */
+ /* the mode is reset below */
+ if (suid) {
+ if (chmod (cat_file, 0666)) {
+ /* probably we are sgid but not owner;
+ just delete the file and create it again */
+ if(unlink(cat_file) != 0) {
+ command = my_xsprintf("rm %S", cat_file);
+ (void) do_system_command (command, 1);
+ }
+ if ((fp = fopen (cat_file, "w")) != NULL)
+ fclose (fp);
+ }
+ }
+ }
+
+ roff_command = make_roff_command (path, man_file);
+ if (roff_command == NULL)
+ return 0;
+ if (do_compress)
+ /* The cd is necessary, because of .so commands,
+ like .so man1/bash.1 in bash_builtins.1.
+ But it changes the meaning of man_file and cat_file,
+ if these are not absolute. */
+
+ command = my_xsprintf("(cd %S && %s | %S > %S)", path,
+ roff_command, getval("COMPRESS"), cat_file);
+ else
+ command = my_xsprintf ("(cd %S && %s > %S)", path,
+ roff_command, cat_file);
+
+ /*
+ * Don't let the user interrupt the system () call and screw up
+ * the formatted man page if we're not done yet.
+ */
+ signal (SIGINT, SIG_IGN);
+
+ gripe (PLEASE_WAIT);
+
+ if (!do_system_command (command, 0)) {
+ /* success */
+ mode = ((ruid != euid) ? 0644 : (rgid != egid) ? 0464 : 0444);
+ if(chmod (cat_file, mode) != 0 && suid) {
+ command = my_xsprintf ("chmod 0%o %S", mode, cat_file);
+ (void) do_system_command (command, 1);
+ }
+ /* be silent about the success of chmod - it is not important */
+ if (debug)
+ gripe (CHANGED_MODE, cat_file, mode);
+ } else {
+ /* something went wrong - remove garbage */
+ if(unlink(cat_file) != 0 && suid) {
+ command = my_xsprintf ("rm %S", cat_file);
+ (void) do_system_command (command, 1);
+ }
+ }
+
+ signal (SIGINT, SIG_DFL);
+
+ return 1;
+}
+
+static int
+display_man_file(const char *path, const char *man_file) {
+ char *roff_command;
+ char *command;
+
+ if (!different_man_file (man_file))
+ return 0;
+ roff_command = make_roff_command (path, man_file);
+ if (roff_command == NULL)
+ return 0;
+ if (do_troff)
+ command = my_xsprintf ("(cd \"%S\" && %s)", path, roff_command);
+ else
+ command = my_xsprintf ("(cd \"%S\" && %s | %s)", path,
+ roff_command, pager);
+
+ return !do_system_command (command, 0);
+}
+
+/*
+ * make and display the cat file - return 0 if something went wrong
+ */
+static int
+make_and_display_cat_file (const char *path, const char *man_file) {
+ const char *cat_file;
+ const char *ext;
+ int status;
+ int standards;
+
+ ext = (do_compress ? getval("COMPRESS_EXT") : 0);
+
+ standards = (fhs ? FHS : 0) | (fsstnd ? FSSTND : 0) | (dohp ? DO_HP : 0);
+
+ if ((cat_file = convert_to_cat(man_file, ext, standards)) == NULL)
+ return 0;
+
+ if (debug)
+ gripe (PROPOSED_CATFILE, cat_file);
+
+ /*
+ * If cat_file exists, check whether it is more recent.
+ * Otherwise, check for other cat files (maybe there are
+ * old .Z files that should be removed).
+ */
+
+ status = ((nocats | preformat) ? -2 : is_newer (man_file, cat_file));
+ if (debug)
+ gripe (IS_NEWER_RESULT, status);
+ if (status == -1 || status == -3) {
+ /* what? man_file does not exist anymore? */
+ gripe (CANNOT_STAT, man_file);
+ return(0);
+ }
+
+ if (status != 0 || access (cat_file, R_OK) != 0) {
+ /*
+ * Cat file is out of date (status = 1) or does not exist or is
+ * empty or is to be rewritten (status = -2) or is unreadable.
+ * Try to format and save it.
+ */
+ if (print_where) {
+ printf ("%s\n", man_file);
+ return 1;
+ }
+
+ if (!make_cat_file (path, man_file, cat_file))
+ return 0;
+
+ /*
+ * If we just created this cat file, unlink any others.
+ */
+ if (status == -2 && do_compress)
+ remove_other_catfiles(cat_file);
+ } else {
+ /*
+ * Formatting not necessary. Cat file is newer than source
+ * file, or source file is not present but cat file is.
+ */
+ if (print_where) {
+ if (one_per_line) {
+ /* addition by marty leisner - leisner at sdsp.mc.xerox.com */
+ printf("%s\n", cat_file);
+ printf("%s\n", man_file);
+ } else
+ printf ("%s (<-- %s)\n", cat_file, man_file);
+ return 1;
+ }
+ }
+ (void) display_cat_file (cat_file);
+ return 1;
+}
+
+/*
+ * Try to format the man page source and save it, then display it. If
+ * that's not possible, try to format the man page source and display
+ * it directly.
+ */
+static int
+format_and_display (const char *man_file) {
+ const char *path;
+
+ if (access (man_file, R_OK) != 0)
+ return 0;
+
+ path = mandir_of(man_file);
+ if (path == NULL)
+ return 0;
+
+ /* first test for contents .so man1/xyzzy.1 */
+ /* (in that case we do not want to make a cat file identical
+ to cat1/xyzzy.1) */
+ man_file = ultimate_source (man_file);
+ if (man_file == NULL)
+ return 0;
+
+ if (do_troff) {
+ char *command;
+ char *roff_command = make_roff_command (path, man_file);
+
+ if (roff_command == NULL)
+ return 0;
+
+ command = my_xsprintf("(cd \"%S\" && %s)", path, roff_command);
+ return !do_system_command (command, 0);
+ }
+
+ if (can_use_cache && make_and_display_cat_file (path, man_file))
+ return 1;
+
+ /* line length was wrong or could not display cat_file */
+ if (print_where) {
+ printf ("%s\n", man_file);
+ return 1;
+ }
+
+ return display_man_file (path, man_file);
+}
+
+/*
+ * Search for manual pages.
+ *
+ * If preformatted manual pages are supported, look for the formatted
+ * file first, then the man page source file. If they both exist and
+ * the man page source file is newer, or only the source file exists,
+ * try to reformat it and write the results in the cat directory. If
+ * it is not possible to write the cat file, simply format and display
+ * the man file.
+ *
+ * If preformatted pages are not supported, or the troff option is
+ * being used, only look for the man page source file.
+ *
+ * Note that globbing is necessary also if the section is given,
+ * since a preformatted man page might be compressed.
+ *
+ */
+static int
+man (const char *name, const char *section) {
+ int found, type, flags;
+ struct manpage *mp;
+
+ found = 0;
+
+ /* allow man ./manpage for formatting explicitly given man pages */
+ if (index(name, '/')) {
+ char fullname[BUFSIZE];
+ char fullpath[BUFSIZE];
+ char *path;
+ char *cp;
+ FILE *fp = fopen(name, "r");
+
+ if (!fp) {
+ perror(name);
+ return 0;
+ }
+ fclose (fp);
+ if (*name != '/' && getcwd(fullname, sizeof(fullname))
+ && strlen(fullname) + strlen(name) + 3 < sizeof(fullname)) {
+ strcat (fullname, "/");
+ strcat (fullname, name);
+ } else if (strlen(name) + 2 < sizeof(fullname)) {
+ strcpy (fullname, name);
+ } else {
+ fprintf(stderr, "%s: name too long\n", name);
+ return 0;
+ }
+
+ strcpy (fullpath, fullname);
+ if ((cp = rindex(fullpath, '/')) != NULL
+ && cp-fullpath+4 < sizeof(fullpath)) {
+ strcpy(cp+1, "..");
+ path = fullpath;
+ } else
+ path = ".";
+
+ name = ultimate_source (fullname);
+ if (!name)
+ return 0;
+
+ if (print_where) {
+ printf("%s\n", name);
+ return 1;
+ }
+ return display_man_file (path, name);
+ }
+
+ fflush (stdout);
+ init_manpath();
+
+ can_use_cache = nocache ? 0 : (preformat || print_where ||
+ (isatty(0) && isatty(1) && !setll()));
+
+ if (do_troff) {
+ const char *t = getval("TROFF");
+ if (!t || !*t)
+ return 0; /* don't know how to format */
+ type = TYPE_MAN;
+ } else {
+ const char *n = getval("NROFF");
+ type = 0;
+ if (can_use_cache)
+ type |= TYPE_CAT;
+ if (n && *n)
+ type |= TYPE_MAN;
+ if (fhs || fsstnd)
+ type |= TYPE_SCAT;
+
+ n = getval("BROWSER");
+ if (n && *n)
+ type |= TYPE_HTML;
+ }
+
+ flags = type;
+ if (!findall)
+ flags |= ONLY_ONE;
+ if (fsstnd)
+ flags |= FSSTND;
+ else if (fhs)
+ flags |= FHS;
+ if (dohp)
+ flags |= DO_HP;
+ if (do_irix)
+ flags |= DO_IRIX;
+ if (do_win32)
+ flags |= DO_WIN32;
+
+ mp = manfile(name, section, flags, section_list, mandirlist,
+ convert_to_cat);
+ found = 0;
+ while (mp) {
+ if (mp->type == TYPE_MAN) {
+ found = format_and_display(mp->filename);
+ } else if (mp->type == TYPE_CAT || mp->type == TYPE_SCAT) {
+ if (print_where) {
+ printf ("%s\n", mp->filename);
+ found = 1;
+ } else
+ found = display_cat_file(mp->filename);
+ } else if (mp->type == TYPE_HTML) {
+ if (print_where) {
+ printf ("%s\n", mp->filename);
+ found = 1;
+ } else
+ found = display_html_file(mp->filename);
+ } else
+ /* internal error */
+ break;
+ if (found && !findall)
+ break;
+ mp = mp->next;
+ }
+ return found;
+}
+
+static char **
+get_section_list (void) {
+ int i;
+ const char *p;
+ char *end;
+ static char *tmp_section_list[100];
+
+ if (colon_sep_section_list == NULL) {
+ if ((p = getenv ("MANSECT")) == NULL)
+ p = getval ("MANSECT");
+ colon_sep_section_list = my_strdup (p);
+ }
+
+ i = 0;
+ for (p = colon_sep_section_list; ; p = end+1) {
+ if ((end = strchr (p, ':')) != NULL)
+ *end = '\0';
+
+ tmp_section_list[i++] = my_strdup (p);
+
+ if (end == NULL || i+1 == SIZE(tmp_section_list))
+ break;
+ }
+
+ tmp_section_list [i] = NULL;
+ return tmp_section_list;
+}
+
+/* return 0 when all was OK */
+static int
+do_global_apropos (char *name, char *section) {
+ char **dp, **gf;
+ char *pathname;
+ char *command;
+ int status, res;
+
+ status = 0;
+ init_manpath();
+ if (mandirlist)
+ for (dp = mandirlist; *dp; dp++) {
+ if (debug)
+ gripe(SEARCHING, *dp);
+ pathname = my_xsprintf("%s/man%s/*", *dp, section ? section : "*");
+ gf = glob_filename (pathname);
+ free(pathname);
+
+ if (gf != (char **) -1 && gf != NULL) {
+ for( ; *gf; gf++) {
+ const char *expander = get_expander (*gf);
+ if (expander)
+ command = my_xsprintf("%s %S | grep '%Q'"
+ "> /dev/null 2> /dev/null",
+ expander, *gf, name);
+ else
+ command = my_xsprintf("grep '%Q' %S"
+ "> /dev/null 2> /dev/null",
+ name, *gf);
+ res = do_system_command (command, 1);
+ status |= res;
+ free (command);
+ if (res == 0) {
+ if (print_where)
+ printf("%s\n", *gf);
+ else {
+ /* should read LOCALE, but libc 4.6.27 doesn't
+ seem to handle LC_RESPONSE yet */
+ int answer, c;
+ char path[BUFSIZE];
+
+ printf("%s? [ynq] ", *gf);
+ fflush(stdout);
+ answer = c = getchar();
+ while (c != '\n' && c != EOF)
+ c = getchar();
+ if(index("QqXx", answer))
+ exit(0);
+ if(index("YyJj", answer)) {
+ char *ri;
+
+ strcpy(path, *gf);
+ ri = rindex(path, '/');
+ if (ri)
+ *ri = 0;
+ format_and_display(*gf);
+ }
+ }
+ }
+ }
+ }
+ }
+ return status;
+}
+
+/* Special code for Japanese (to pick jnroff instead of nroff, etc.) */
+static void
+setlang(void) {
+ char *lang;
+
+ /* We use getenv() instead of setlocale(), because of
+ glibc 2.1.x security policy for SetUID/SetGID binary. */
+ if ((lang = getenv("LANG")) == NULL &&
+ (lang = getenv("LC_ALL")) == NULL &&
+ (lang = getenv("LC_CTYPE")) == NULL)
+ /* nothing */;
+
+ language = lang;
+ is_japanese = (lang && strncmp(lang, "ja", 2) == 0);
+}
+
+/*
+ * Handle the apropos option. Cheat by using another program.
+ */
+static int
+do_apropos (char *name) {
+ char *command;
+
+ command = my_xsprintf("'%s' '%Q'", getval("APROPOS"), name);
+ return do_system_command (command, 0);
+}
+
+/*
+ * Handle the whatis option. Cheat by using another program.
+ */
+static int
+do_whatis (char *name) {
+ char *command;
+
+ command = my_xsprintf("'%s' '%Q'", getval("WHATIS"), name);
+ return do_system_command (command, 0);
+}
+
+int
+main (int argc, char **argv) {
+ int status = 0;
+ char *nextarg;
+ char *tmp;
+ char *section = 0;
+
+#ifdef __CYGWIN__
+ extern int optind;
+#endif
+
+
+#if 0
+ {
+ /* There are no known cases of buffer overflow caused by
+ excessively long environment variables. In case you find one,
+ the simplistic way to fix is to enable this stopgap. */
+ char *s;
+#define CHECK(p,l) s=getenv(p); if(s && strlen(s)>(l)) { fprintf(stderr, "ERROR: Environment variable %s too long!\n", p); exit(1); }
+ CHECK("LANG", 32);
+ CHECK("LANGUAGE", 128);
+ CHECK("LC_MESSAGES", 128);
+ CHECK("MANPAGER", 128);
+ CHECK("MANPL", 128);
+ CHECK("MANROFFSEQ", 128);
+ CHECK("MANSECT", 128);
+ CHECK("MAN_HP_DIREXT", 128);
+ CHECK("PAGER", 128);
+ CHECK("SYSTEM", 64);
+ CHECK("BROWSER", 64);
+ CHECK("HTMLPAGER", 64);
+ /* COLUMNS, LC_ALL, LC_CTYPE, MANPATH, MANWIDTH, MAN_IRIX_CATNAMES,
+ MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
+ MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
+ }
+#endif
+
+
+#ifndef __FreeBSD__
+ /* Slaven Rezif: FreeBSD-2.2-SNAP does not recognize LC_MESSAGES. */
+ setlocale(LC_CTYPE, ""); /* used anywhere? maybe only isdigit()? */
+ setlocale(LC_MESSAGES, "");
+#endif
+
+ /* No doubt we'll need some generic language code here later.
+ For the moment only Japanese support. */
+ setlang();
+
+ /* Handle /usr/man/man1.Z/name.1 nonsense from HP */
+ dohp = getenv("MAN_HP_DIREXT"); /* .Z */
+
+ /* Handle ls.z (instead of ls.1.z) cat page naming from IRIX */
+ if (getenv("MAN_IRIX_CATNAMES"))
+ do_irix = 1;
+
+ /* Handle lack of ':' in NTFS file names */
+#if defined(_WIN32) || defined(__CYGWIN__)
+ do_win32 = 1;
+#endif
+
+ progname = mkprogname (argv[0]);
+
+ get_permissions ();
+ get_line_length();
+
+ /*
+ * read command line options and man.conf
+ */
+ man_getopt (argc, argv);
+
+ /*
+ * manpath or man --path or man -w will only print the manpath
+ */
+ if (!strcmp (progname, "manpath") || (optind == argc && print_where)) {
+ init_manpath();
+ prmanpath();
+ exit(0);
+ }
+
+ if (optind == argc)
+ gripe(NO_NAME_NO_SECTION);
+
+ section_list = get_section_list ();
+
+ while (optind < argc) {
+ nextarg = argv[optind++];
+
+ /* is_section correctly accepts 3Xt as section, but also 9wm,
+ so we should not believe is_section() for the last arg. */
+ tmp = is_section (nextarg);
+ if (tmp && optind < argc) {
+ section = tmp;
+ if (debug)
+ gripe (SECTION, section);
+ continue;
+ }
+
+ if (global_apropos)
+ status = !do_global_apropos (nextarg, section);
+ else if (apropos)
+ status = !do_apropos (nextarg);
+ else if (whatis)
+ status = !do_whatis (nextarg);
+ else {
+ status = man (nextarg, section);
+
+ if (status == 0) {
+ if (section)
+ gripe (NO_SUCH_ENTRY_IN_SECTION, nextarg, section);
+ else
+ gripe (NO_SUCH_ENTRY, nextarg);
+ }
+ }
+
+ /* reset duplicate search -
+ fixes Fedora#542852 "man cut cut throws an error" */
+ free_catman_filelists ();
+ }
+ return status ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/man.conf.in b/src/man.conf.in
new file mode 100644
index 0000000..ce73ffc
--- /dev/null
+++ b/src/man.conf.in
@@ -0,0 +1,140 @@
+# man.conf from @version@
+#
+# 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.
+#
+ at fsstnd@FSSTND
+ at fhs@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/man
+MANPATH /usr/share/man
+MANPATH /usr/local/man
+MANPATH /usr/local/share/man
+MANPATH /usr/X11R6/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/X11R6/bin /usr/X11R6/man
+MANPATH_MAP /usr/bin/X11 /usr/X11R6/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 @troff@
+NROFF @nroff@
+JNROFF @jnroff@
+EQN @eqn@
+NEQN @neqn@
+JNEQN @jneqn@
+TBL @tbl@
+ at nocol@COL @col@
+REFER @refer@
+PIC @pic@
+VGRIND @vgrind@
+GRAP @grap@
+PAGER @pager@
+BROWSER @browser@
+HTMLPAGER @htmlpager@
+CAT @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 @cmp@
+#
+# Compress cat pages
+#
+COMPRESS @compress@
+COMPRESS_EXT @compress_ext@
+#
+# Default manual sections (and order) to search if -S is not specified
+# and the MANSECT environment variable is not set.
+#
+MANSECT @sections@
+#
+# 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 @gunzip@
+.bz2 @bzip2@
+.lzma @unlzma@
+.z @pcat@
+.Z @zcat@
+.F @fcat@
+.Y @unyabba@
+.xz @unxz@
diff --git a/src/man.h b/src/man.h
new file mode 100644
index 0000000..285aac7
--- /dev/null
+++ b/src/man.h
@@ -0,0 +1,22 @@
+extern int debug;
+extern int do_compress;
+extern int fhs;
+extern int fsstnd;
+extern int noautopath;
+extern int nocache;
+extern int findall;
+extern int nocats;
+extern int preformat;
+extern int do_troff;
+extern int apropos;
+extern int whatis;
+extern int print_where;
+extern int one_per_line;
+extern int do_irix;
+extern char *dohp;
+extern const char *progname;
+extern const char *pager;
+extern const char *browser;
+extern const char *htmlpager;
+extern char *colon_sep_section_list;
+extern char *roff_directive;
diff --git a/src/man2dvi b/src/man2dvi
new file mode 100755
index 0000000..f9cb52e
--- /dev/null
+++ b/src/man2dvi
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# Script to format manpages to dvi.
+# Copyright (c) 1997 Tobias Begalke (tb at lst.de)
+#
+# Part of release 1.6g of the man suite.
+#
+
+groff="groff -Tdvi -mandoc"
+
+if [ ! $# = 1 ]; then
+ echo "$0: usage:"
+ echo " $0 [topic] > topic.dvi"
+ exit 1
+fi
+
+location=`man -c -w $1`
+
+if [ "$location" = "" ]; then
+ exit 1
+fi
+
+case `file $location` in
+ *gzip* )
+ zcat $location | $groff
+ ;;
+
+ *bzip2* )
+ bzcat $location | $groff
+ ;;
+
+ *troff* )
+ $groff $location
+ ;;
+esac
+
diff --git a/src/manfile.c b/src/manfile.c
new file mode 100644
index 0000000..0df62ea
--- /dev/null
+++ b/src/manfile.c
@@ -0,0 +1,337 @@
+/*
+ * manfile.c - aeb, 971231
+ *
+ * Used both by man and man2html - be careful with printing!
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "glob.h"
+#include "util.h"
+#include "manfile.h"
+#include "gripes.h"
+#include "man.h" /* for debug */
+
+static int standards;
+static const char *((*to_cat_filename)(const char *man_filename,
+ const char *ext, int flags));
+
+/*
+ * Append the struct or chain A to the chain HEAD.
+ */
+static void
+append(struct manpage **head, struct manpage *a) {
+ struct manpage *p;
+
+ if (a) {
+ if (*head) {
+ p = *head;
+ while(p->next)
+ p = p->next;
+ p->next = a;
+ } else
+ *head = a;
+ }
+}
+
+
+static int
+my_lth(const char *s) {
+ return s ? strlen(s) : 0;
+}
+
+/*
+ * Find the files of the form DIR/manSEC/NAME.EXT etc.
+ * Use "man" for TYPE_MAN, "cat" for TYPE_SCAT, and
+ * apply convert_to_cat() to the man version for TYPE_CAT.
+ *
+ * Some HP systems use /usr/man/man1.Z/name.1, where name.1 is
+ * compressed - yuk. We can handle this by using section 1.Z
+ * instead of 1 and assuming that the man page is compressed
+ * if the directory name ends in .Z.
+ *
+ * Some Sun systems use /usr/share/man/sman1/man.1 and
+ * /usr/share/man/sman1m/mkfs.1m.
+ *
+ * We support HTML filenames of the following form:
+ * /usr/share/man/sman1m/mkfs.1m.html, optionally followed
+ * by a compression suffix.
+ *
+ * Returns an array with pathnames, or 0 if out-of-memory or error.
+ */
+static char **
+glob_for_file_ext_glob (const char *dir, const char *sec,
+ const char *name, const char *ext, char *hpx,
+ int glob, int type) {
+ char *pathname;
+ const char *p;
+ char **names;
+ int len;
+#define MANFORM "%s/%s%s%s/%s.%s"
+#define GLOB "*"
+#define LENGTHOF(s) (sizeof(s)-1)
+/* This must be long enough to hold the format-directory name.
+ * The basic type-directory names are 'cat' and 'man'; this needs to
+ * allocate space for those or any others such as html or sman.
+ */
+#define TYPELEN 8
+
+ len = my_lth(dir) + my_lth(sec) + my_lth(hpx) + my_lth(name) + my_lth(ext)
+ + TYPELEN
+ + LENGTHOF(".html") + LENGTHOF(MANFORM) + LENGTHOF(GLOB);
+
+ if (debug >= 2)
+ gripe(CALLTRACE3, dir, sec, name, ext, hpx, glob, type);
+
+ pathname = (char *) malloc(len);
+ if (!pathname)
+ return 0;
+
+ sprintf (pathname, MANFORM,
+ dir,
+ (type==TYPE_HTML) ? "html" : (type==TYPE_XML) ? "sman" : (type==TYPE_SCAT) ? "cat" : "man",
+ sec, hpx, name, ext);
+ if (type == TYPE_HTML)
+ strcat(pathname, ".html");
+ if (glob)
+ strcat(pathname, GLOB);
+
+ if (type == TYPE_CAT) {
+ p = to_cat_filename(pathname, 0, standards);
+ if (p) {
+ free(pathname);
+ } else {
+ sprintf (pathname, "%s/cat%s%s/%s.%s%s",
+ dir, sec, hpx, name, ext, glob ? GLOB : "");
+ p = pathname;
+ }
+ } else
+ p = pathname;
+
+ if (debug >=2)
+ gripe(ABOUT_TO_GLOB, p);
+ names = glob_filename (p);
+ if (names == (char **) -1) /* file system error; print msg? */
+ names = 0;
+ return names;
+}
+
+static char **
+glob_for_file_ext (const char *dir, const char *sec,
+ const char *name, const char *ext, int type) {
+ char **names, **namesglob;
+ char *hpx = ((standards & DO_HP) ? ".Z" : "");
+
+ namesglob = glob_for_file_ext_glob(dir,sec,name,ext,hpx,1,type);
+ if (!namesglob && *hpx) {
+ hpx = "";
+ namesglob = glob_for_file_ext_glob(dir,sec,name,ext,hpx,1,type);
+ }
+ if (!namesglob)
+ return 0;
+ if (*namesglob) {
+ /* we found something - try to get a more precise match */
+ names = glob_for_file_ext_glob(dir,sec,name,ext,hpx,0,type);
+ if (names && *names)
+ namesglob = names;
+ }
+ return namesglob;
+}
+
+/*
+ * Find the files of the form DIR/manSEC/NAME.SEC etc.
+ */
+static char **
+glob_for_file (const char *dir, const char *sec, const char *name, int type) {
+ char **names;
+
+ if (debug >= 2)
+ gripe(CALLTRACE2, dir, sec, name, type);
+
+ if (standards & DO_IRIX) {
+ /* try first without `sec' extension */
+ /* maybe this should be done only for cat pages? */
+ return glob_for_file_ext (dir, sec, name, "", type);
+ }
+
+ /* try /usr/X11R6/man/man3x/XSetFont.3x */
+ names = glob_for_file_ext (dir, sec, name, sec, type);
+
+ if (!names)
+ return 0; /* out-of-memory or error */
+
+ /* sometimes the extension is only a single digit */
+ if (!*names && isdigit(sec[0]) && sec[1] != 0) {
+ char ext[2];
+ ext[0] = sec[0];
+ ext[1] = 0;
+ names = glob_for_file_ext (dir, sec, name, ext, type);
+ }
+
+ if (!names)
+ return 0; /* out-of-memory or error */
+
+ /* or the extension could be .man */
+ if (!*names)
+ names = glob_for_file_ext (dir, sec, name, "man", type);
+
+ if (debug >= 2) {
+ if (!names[0])
+ gripe(NO_MATCH);
+ else {
+ char **np;
+ for (np = names; *np; np++)
+ gripe(GLOB_FOR_FILE, *np);
+ }
+ }
+
+ return names;
+}
+
+/*
+ * Find a man page of the given NAME under the directory DIR,
+ * in section SEC. Only types (man, cat, scat, html) permitted in FLAGS
+ * are allowed, and priorities are in this order.
+ */
+static struct manpage *
+manfile_from_sec_and_dir(const char *dir,
+ const char *sec, const char *name, int flags) {
+ struct manpage *res = 0;
+ struct manpage *p;
+ char **names, **np;
+ int i, type;
+ int types[] = {TYPE_HTML, TYPE_MAN, TYPE_CAT, TYPE_SCAT};
+
+ if (debug >= 2)
+ gripe(CALLTRACE1, dir, sec, name, flags);
+
+ for (i=0; i<(sizeof(types)/sizeof(types[0])); i++) {
+ type = types[i];
+
+ /* If convert_to_cat() is trivial, TYPE_CAT and TYPE_SCAT
+ are the same thing. */
+ if ((type == TYPE_CAT) && (flags & TYPE_SCAT) && !standards)
+ continue;
+
+ if (flags & type) {
+ names = glob_for_file (dir, sec, name, type);
+ if (names) {
+ for (np = names; *np; np++) {
+#if 1
+ /* Keep looking if we encounter a file
+ we can't access */
+ if (access(*np, R_OK))
+ continue;
+
+ if (debug >= 2)
+ gripe(FOUND_FILE, *np);
+ /* disadvantage: no error message when permissions
+ are wrong, the page just silently becomes
+ invisible */
+#endif
+ p = (struct manpage *) malloc(sizeof(*p));
+ if (!p)
+ break; /* %% perhaps print msg, free names */
+ p->filename = *np;
+ p->type = type;
+ p->next = 0;
+ append(&res, p);
+ if (res && (flags & ONLY_ONE_PERSEC))
+ break;
+ }
+ free(names);
+ }
+ }
+
+ if (res)
+ return res;
+ }
+
+ return res;
+}
+
+/*
+ * Find a man page of the given NAME, searching in the specified SECTION.
+ * Searching is done in all directories of MANPATH.
+ */
+static struct manpage *
+manfile_from_section(const char *name, const char *section,
+ int flags, char **manpath) {
+ char **mp;
+ struct manpage *res = 0;
+
+ for (mp = manpath; *mp; mp++) {
+ append(&res, manfile_from_sec_and_dir(*mp, section, name, flags));
+ if (res && (flags & ONLY_ONE_PERSEC))
+ break;
+ }
+#if 0
+ /* Someone wants section 1p - better not to give 1 */
+ if (res == NULL && isdigit(section[0]) && section[1]) {
+ char sec[2];
+
+ sec[0] = section[0];
+ sec[1] = 0;
+ for (mp = manpath; *mp; mp++) {
+ append(&res, manfile_from_sec_and_dir(*mp, sec, name, flags));
+ if (res && (flags & ONLY_ONE_PERSEC))
+ break;
+ }
+ }
+#endif
+ return res;
+}
+
+/*
+ * Find a man page of the given NAME, searching in the specified
+ * SECTION, or, if that is 0, in all sections in SECTIONLIST.
+ * Searching is done in all directories of MANPATH.
+ * If FLAGS contains the ONLY_ONE bits, only the first matching
+ * page is returned; otherwise all matching pages are found.
+ * Only types (man, cat, scat) permitted in FLAGS are allowed.
+ */
+struct manpage *
+manfile(const char *name, const char *section, int flags,
+ char **sectionlist, char **manpath,
+ const char *((*tocat)(const char *man_filename, const char *ext,
+ int flags))) {
+ char **sl;
+ struct manpage *res;
+
+ standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
+ to_cat_filename = tocat;
+
+ if (name && (flags & DO_WIN32)) { /* Convert : sequences to a ? */
+ char *n = my_malloc(strlen(name) + 1);
+ const char *p = name;
+ char *q = n;
+
+ while (*p) {
+ if (*p == ':') {
+ *q++ = '?';
+ while (*p == ':')
+ p++;
+ } else
+ *q++ = *p++;
+ }
+ *q = 0;
+ name = n;
+ }
+
+ if (!name || !manpath) /* error msg? */
+ res = 0;
+ else if (section)
+ res = manfile_from_section(name, section, flags, manpath);
+ else if (sectionlist) {
+ res = 0;
+ for (sl = sectionlist; *sl; sl++) {
+ append(&res, manfile_from_section(name, *sl, flags, manpath));
+ if (res && (flags & ONLY_ONE))
+ break;
+ }
+ }
+ return res;
+}
diff --git a/src/manfile.h b/src/manfile.h
new file mode 100644
index 0000000..cae3add
--- /dev/null
+++ b/src/manfile.h
@@ -0,0 +1,36 @@
+struct manpage {
+ struct manpage *next;
+ char *filename;
+ int type;
+};
+
+#define TYPE_MAN 0x0001
+#define TYPE_CAT 0x0002
+#define TYPE_SCAT 0x0004
+#define TYPE_HTML 0x0008
+#define TYPE_XML 0x0010 /* not presently used */
+
+#define ONLY_ONE_PERSEC 0x0020 /* do not return more pages from one section */
+#define ONLY_ONE 0x0040 /* return only a single page */
+
+/* various standards have various ideas about where the cat pages
+ ought to live */
+#define FSSTND 0x0080
+#define FHS 0x0100
+
+/* HP has a peculiar way to indicate that pages are compressed */
+#define DO_HP 0x0200 /* compressed file in man1.Z/ls.1 */
+
+/* IRIX has a peculiar cat page naming */
+#define DO_IRIX 0x0400 /* cat page ls.z, not ls.1.z */
+
+/* Sun uses both man and sman, where sman contains XML */
+#define DO_SUN 0x0800 /* unused today */
+
+/* NTFS cannot handle : in filenames */
+#define DO_WIN32 0x1000 /* turn :: into ? */
+
+extern struct manpage *
+manfile(const char *name, const char *section, int flags,
+ char **sectionlist, char **manpath,
+ const char *(*tocat)(const char *, const char *, int));
diff --git a/src/manpath.c b/src/manpath.c
new file mode 100644
index 0000000..90d520e
--- /dev/null
+++ b/src/manpath.c
@@ -0,0 +1,412 @@
+/*
+ * manpath.c
+ *
+ * Copyright (c) 1990, 1991, John W. Eaton.
+ *
+ * You may distribute under the terms of the GNU General Public
+ * License as specified in the file COPYING that comes with the man
+ * distribution.
+ *
+ * John W. Eaton
+ * jwe at che.utexas.edu
+ * Department of Chemical Engineering
+ * The University of Texas at Austin
+ * Austin, Texas 78712
+ *
+ * Changed PATH->manpath algorithm
+ * Added: an empty string in MANPATH denotes the system path
+ * Added: use LANG to search in /usr/man/<locale>
+ * Lots of other minor things, including spoiling the indentation.
+ * aeb - 940315
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/* not always in <string.h> */
+extern char *index(const char *, int);
+extern char *rindex(const char *, int);
+
+#include "defs.h"
+#include "gripes.h"
+#include "man.h" /* for debug */
+#include "man-config.h" /* for cfdirlist */
+#include "man-getopt.h" /* for alt_system, opt_manpath */
+#include "manpath.h"
+#include "util.h" /* my_malloc, my_strdup */
+
+char **mandirlist;
+static int mandirlistlth = 0;
+static int mandirlistmax = 0;
+
+/*
+ * Input: a string, with : as separator
+ * For each entry in the string, call fn.
+ */
+static void
+split (char *string, void (*fn)(char *, int), int perrs) {
+ char *p, *q, *r;
+
+ if (string) {
+ p = my_strdup(string);
+ for (q = p; ; ) {
+ if ((r = index(q, ':'))==(char*)0)
+ r=index(q,'\01');
+ if (r) {
+ *r = 0;
+ fn (q, perrs);
+ q = r+1;
+ } else {
+ fn (q, perrs);
+ break;
+ }
+ }
+ free (p);
+ }
+}
+
+static void
+split2 (char *s, char *string, void (*fn)(char *, char *, int), int perrs) {
+ char *p, *q, *r;
+
+ if (string) {
+ p = my_strdup(string);
+ for (q = p; ; ) {
+ r = index(q, ':');
+ if (r) {
+ *r = 0;
+ fn (s, q, perrs);
+ q = r+1;
+ } else {
+ fn (s, q, perrs);
+ break;
+ }
+ }
+ free (p);
+ }
+}
+
+/*
+ * Is path a directory?
+ * -1: error, 0: no, 1: yes.
+ */
+static int
+is_directory (char *path) {
+ struct stat sb;
+
+ if (stat (path, &sb) != 0)
+ return -1;
+
+ return ((sb.st_mode & S_IFDIR) == S_IFDIR);
+}
+
+/*
+ * Check to see if the current directory has man or MAN
+ * or ../man or ../man1 or ../man8 subdirectories.
+ */
+static char *
+find_man_subdir (char *p) {
+ int len;
+ char *t, *sp;
+
+ len = strlen (p);
+
+ t = my_malloc ((unsigned) len + 20);
+
+ memcpy (t, p, len);
+ strcpy (t + len, "/man");
+
+ if (is_directory (t) == 1)
+ return t;
+
+ strcpy (t + len, "/MAN");
+
+ if (is_directory (t) == 1)
+ return t;
+
+ /* find parent directory */
+ t[len] = 0;
+ if ((sp = rindex (t, '/')) != NULL) {
+ *sp = 0;
+ len = sp - t;
+ } else {
+ strcpy (t + len, "/..");
+ len += 3;
+ }
+
+ /* look for the situation with packagedir/bin and packagedir/man */
+ strcpy (t + len, "/man");
+
+ if (is_directory (t) == 1)
+ return t;
+
+ /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */
+ /* (looking for all man[1-9] would probably be a waste of stats) */
+ strcpy (t + len, "/man1");
+
+ if (is_directory (t) == 1) {
+ t[len] = 0;
+ return t;
+ }
+
+ strcpy (t + len, "/man8");
+
+ if (is_directory (t) == 1) {
+ t[len] = 0;
+ return t;
+ }
+
+ free (t);
+ return NULL;
+}
+
+/*
+ * Add a directory to the manpath list if it isn't already there.
+ */
+static void
+add_to_list (char *dir, char *lang, int perrs) {
+ int status;
+ char cwd[BUFSIZ];
+ char **dp;
+
+ if (!lang)
+ lang = "";
+
+ /* only add absolute paths */
+ if (*dir != '/') {
+ if (!getcwd(cwd, sizeof(cwd)))
+ return; /* cwd not readable, or pathname very long */
+ if (cwd[0] != '/')
+ return; /* strange.. */
+ if (strlen(dir) + strlen(lang) + strlen(cwd) + 3 > sizeof(cwd))
+ return;
+ if (!strncmp (dir, "./", 2))
+ dir += 2;
+ while (!strncmp (dir, "../", 3)) {
+ char *p = rindex (cwd, '/');
+ if (p > cwd)
+ *p = 0;
+ else
+ cwd[1] = 0;
+ dir += 3;
+ }
+ strcat (cwd, "/");
+ strcat (cwd, dir);
+ if (*lang) {
+ strcat (cwd, "/");
+ strcat (cwd, lang);
+ }
+ dir = cwd;
+ } else if (*lang) {
+ if (strlen(dir) + strlen(lang) + 2 > sizeof(cwd))
+ return;
+ strcpy (cwd, dir);
+ strcat (cwd, "/");
+ strcat (cwd, lang);
+ dir = cwd;
+ }
+
+ if (mandirlist) {
+ for (dp = mandirlist; *dp; dp++) {
+ if (!strcmp (*dp, dir))
+ return;
+ }
+ }
+
+ /*
+ * Avoid trickery: no /../ in path.
+ */
+ if (strstr(dir, "/../"))
+ return;
+
+ /*
+ * Not found -- add it.
+ */
+ status = is_directory(dir);
+
+ if (status < 0 && perrs) {
+ gripe (CANNOT_STAT, dir);
+ } else if (status == 0 && perrs) {
+ gripe (IS_NO_DIR, dir);
+ } else if (status == 1) {
+ if (debug)
+ gripe (ADDING_TO_MANPATH, dir);
+
+ if (!mandirlist || mandirlistlth+1 >= mandirlistmax) {
+ int i, ct = mandirlistmax + 100;
+ char **p = (char **) my_malloc(ct * sizeof(char *));
+
+ if (mandirlist) {
+ for (i=0; i<mandirlistlth; i++)
+ p[i] = mandirlist[i];
+ free(mandirlist);
+ }
+ mandirlistmax = ct;
+ mandirlist = p;
+ }
+ mandirlist[mandirlistlth++] = my_strdup (dir);
+ mandirlist[mandirlistlth] = 0;
+ }
+}
+
+static void
+add_to_mandirlist_x (char *dir, char *lang, int perrs) {
+ add_to_list(dir, lang, perrs);
+ if (lang && strlen(lang) > 5 && lang[5] == '.') {
+ char lang2[6]; /* e.g. zh_CN from zh_CN.GB2312 */
+
+ strncpy(lang2,lang,5);
+ lang2[5] = 0;
+ add_to_list(dir, lang2, perrs);
+ }
+ if (lang && strlen(lang) > 2) {
+ char lang2[3];
+
+ strncpy(lang2,lang,2);
+ lang2[2] = 0;
+ add_to_list(dir, lang2, perrs);
+ }
+}
+
+static void
+add_to_mandirlist (char *dir, int perrs) {
+ char *lang;
+
+ if (alt_system) {
+ add_to_list(dir, alt_system_name, perrs);
+ } else {
+ /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
+ the return value of setlocale is an opaque string. */
+ /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
+ if((lang = getenv("LC_ALL")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+ if((lang = getenv("LC_MESSAGES")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+ if((lang = getenv("LANG")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+ if((lang = getenv("LANGUAGE")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+ add_to_mandirlist_x(dir, 0, perrs);
+ }
+}
+
+/*
+ * For each directory in the user's path, see if it is one of the
+ * directories listed in the man.conf file. If so, and it is
+ * not already in the manpath, add it. If the directory is not listed
+ * in the man.conf file, see if there is a subdirectory `man' or
+ * `MAN'. If so, and it is not already in the manpath, add it.
+ *
+ * Example: user has <dir>/bin in his path and the directory
+ * <dir>/bin/man exists -- the directory <dir>/bin/man will be added
+ * to the manpath.
+ * Try also <dir>/man ?and <dir>?, and, if LANG is set, <dir>/$LANG/man.
+ * aeb - 940320
+ */
+static void
+get_manpath_from_pathdir (char *dir, int perrs) {
+ char *t;
+ struct dirs *dlp;
+
+ if (debug)
+ gripe (PATH_DIR, dir);
+
+ /*
+ * The directory we're working on is in the config file.
+ * If we haven't added it to the list yet, do.
+ */
+ if (*dir) {
+ for (dlp = cfdirlist.nxt; dlp; dlp = dlp->nxt) {
+ if (!strcmp (dir, dlp->bindir)) {
+ if (debug)
+ gripe (IS_IN_CONFIG);
+
+ add_to_mandirlist (dlp->mandir, perrs);
+ return;
+ }
+ }
+ }
+
+ if (!noautopath) {
+ /*
+ * The directory we're working on isn't in the config file.
+ * See if it has man or MAN subdirectories. If so, and this
+ * subdirectory hasn't been added to the list, do. (Try also
+ * a few other places nearby.)
+ */
+ if (debug)
+ gripe (IS_NOT_IN_CONFIG);
+
+ t = find_man_subdir (dir);
+ if (t != NULL) {
+ if (debug)
+ gripe (MAN_NEARBY);
+
+ add_to_mandirlist (t, perrs);
+ free (t);
+ } else {
+ if (debug)
+ gripe (NO_MAN_NEARBY);
+ }
+ }
+}
+
+static void
+add_default_manpath (int perrs) {
+ struct dirs *dlp;
+
+ if (debug)
+ gripe (ADDING_MANDIRS);
+
+ for (dlp = cfdirlist.nxt; dlp; dlp = dlp->nxt)
+ if (dlp->mandatory)
+ add_to_mandirlist (dlp->mandir, perrs);
+}
+
+static void
+to_mandirlist(char *s, int perrs) {
+ char *path;
+
+ if (*s) {
+ add_to_mandirlist (s, perrs);
+ } else {
+ /* empty substring: insert default path */
+ if((path = getenv ("PATH")) != NULL)
+ split (path, get_manpath_from_pathdir, perrs);
+ add_default_manpath (perrs);
+ }
+}
+
+void
+init_manpath () {
+ static int done = 0;
+
+ if (!done) {
+ char *manp;
+
+ if ((manp = opt_manpath) == NULL &&
+ (manp = getenv ("manpath")) == NULL &&
+ (manp = getenv ("MANPATH")) == NULL)
+ manp = ""; /* default path */
+ split (manp, to_mandirlist, 0);
+ done = 1;
+ }
+}
+
+void
+prmanpath () {
+ char **dp, **dp0;
+
+ if (mandirlist) {
+ for (dp0 = dp = mandirlist; *dp; dp++) {
+ if (dp != dp0)
+ printf(":");
+ printf("%s", *dp);
+ }
+ }
+ printf("\n");
+}
diff --git a/src/manpath.h b/src/manpath.h
new file mode 100644
index 0000000..5232938
--- /dev/null
+++ b/src/manpath.h
@@ -0,0 +1,5 @@
+/* functions and variables exported by manpath.c */
+void prmanpath (void);
+void init_manpath (void);
+
+extern char ** mandirlist;
diff --git a/src/mwi b/src/mwi
new file mode 100755
index 0000000..3b52feb
--- /dev/null
+++ b/src/mwi
@@ -0,0 +1,19 @@
+#!/bin/sh
+# test which words in all caps end a NAME section in a (compressed) cat page
+#
+# Found so far:
+#
+# SYNOPSIS
+# SYNOPOSIS
+# SYSTEM V SYNOPSIS
+# SYNTAX
+# DESCRIPTION
+# COMMAND
+# OVERVIEW
+# STRUCTURES
+# INTRODUCTION
+#
+ for i in *
+ do
+ zcat $i | col -bx | sed '1,/^NAME/d; /^[A-Z][A-Z]/q' | tail -1
+ done
diff --git a/src/ndir.h b/src/ndir.h
new file mode 100644
index 0000000..438d5c2
--- /dev/null
+++ b/src/ndir.h
@@ -0,0 +1,51 @@
+/*
+ <dir.h> -- definitions for 4.2BSD-compatible directory access
+
+ last edit: 09-Jul-1983 D A Gwyn
+*/
+
+#ifdef VMS
+#ifndef FAB$C_BID
+#include <fab.h>
+#endif
+#ifndef NAM$C_BID
+#include <nam.h>
+#endif
+#ifndef RMS$_SUC
+#include <rmsdef.h>
+#endif
+#include "dir.h"
+#endif /* VMS */
+
+#define DIRBLKSIZ 512 /* size of directory block */
+#ifdef VMS
+#define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */
+#define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */
+#else
+#define MAXNAMLEN 15 /* maximum filename length */
+#endif /* VMS */
+ /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
+
+struct direct /* data from readdir() */
+ {
+ long d_ino; /* inode number of entry */
+ unsigned short d_reclen; /* length of this record */
+ unsigned short d_namlen; /* length of string in d_name */
+ char d_name[MAXNAMLEN+1]; /* name of file */
+ };
+
+typedef struct
+ {
+ int dd_fd; /* file descriptor */
+ int dd_loc; /* offset in block */
+ int dd_size; /* amount of valid data */
+ char dd_buf[DIRBLKSIZ]; /* directory block */
+ } DIR; /* stream data from opendir() */
+
+extern DIR *opendir();
+extern struct direct *readdir();
+extern long telldir();
+extern void seekdir();
+extern void closedir();
+
+#define rewinddir( dirp ) seekdir( dirp, 0L )
diff --git a/src/paths.h.in b/src/paths.h.in
new file mode 100644
index 0000000..ee9ec75
--- /dev/null
+++ b/src/paths.h.in
@@ -0,0 +1,39 @@
+/* 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 "@man_config_file@"
+#endif
+
+static struct paths {
+ char *name;
+ char *path; /* path plus command options - never NULL */
+} paths[] = {
+ { "MANBIN", "" }, /* value unused */
+ { "APROPOS", "@apropos@" },
+ { "WHATIS", "@whatis@" },
+ { "TROFF", "@troff@" },
+ { "NROFF", "@nroff@" },
+ { "JNROFF", "@jnroff@" },
+ { "EQN", "@eqn@" },
+ { "NEQN", "@neqn@" },
+ { "JNEQN", "@jneqn@" },
+ { "TBL", "@tbl@" },
+ { "COL", "@pcol@" },
+ { "REFER", "@refer@" },
+ { "PIC", "@pic@" },
+ { "VGRIND", "@vgrind@" },
+ { "GRAP", "@grap@" },
+ { "PAGER", "@pager@" },
+ { "BROWSER","@browser@" },
+ { "HTMLPAGER", "@htmlpager@" },
+ { "CMP", "@cmp@" },
+ { "CAT", "@cat@" },
+ { "COMPRESS", "@compress@" },
+ { "COMPRESS_EXT", "@compress_ext@" }, /* not a path, just a string variable */
+ { "DECOMPRESS", "@decompress@" },
+ { "MANSECT", "@sections@"}, /* idem */
+ { "MANDEFOPTIONS", ""} /* idem */
+};
diff --git a/src/to_cat.c b/src/to_cat.c
new file mode 100644
index 0000000..c6aeb5f
--- /dev/null
+++ b/src/to_cat.c
@@ -0,0 +1,171 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+extern char *rindex (const char *, int); /* not always in <string.h> */
+
+#include "defs.h"
+#include "manfile.h"
+#include "man-config.h"
+#include "to_cat.h"
+#include "util.h"
+
+/*
+ * Given PATH/man1/name.1, return a pointer to the '/' following PATH.
+ */
+static char *
+mantail_of(char *name) {
+ char *s0, *s1, *s;
+
+ s0 = s1 = 0;
+ for (s = name; *s; s++) {
+ if (*s == '/') {
+ s0 = s1;
+ s1 = s;
+ }
+ }
+ return s0;
+}
+
+/*
+ * Given PATH/man1/name.1, return PATH, newly allocated.
+ * The argument must be writable, not a constant string.
+ */
+const char *
+mandir_of(const char *name) {
+ char *p, *q;
+
+ q = my_strdup(name);
+ p = mantail_of(q);
+ if (p) {
+ *p = 0;
+ return q;
+ }
+ free(q);
+ return NULL;
+}
+
+/*
+ * Change a name of the form PATH/man1/name.1[.Z]
+ * into PATH/cat1/name.1.EXT
+ * or (FSSTND) change /usr/PA/man/PB/man1/name.1
+ * into /var/catman/PA/PB/cat1/name.1.EXT
+ * or (FHS) change /usr/PATH/share/man/LOC/man1/name.1
+ * into /var/cache/man/PATH/LOC/cat1/name.1.EXT
+ * (here the /LOC part is absent or a single [locale] dir).
+ *
+ * Returns 0 on failure.
+ */
+
+const char *
+convert_to_cat (const char *name0, const char *ext, int standards) {
+ char *name, *freename, *cat_name = 0;
+ char *t0, *t2, *t3, *t4;
+ struct dirs *dlp;
+ int len;
+
+ freename = name = my_strdup (name0);
+
+ t0 = rindex (name, '.');
+ if (t0 && get_expander(t0)) /* remove compressee extension */
+ *t0 = 0;
+
+ t2 = mantail_of (name);
+ if (t2 == NULL)
+ return 0;
+ *t2 = 0; /* remove man1/name.1 part */
+
+ if (strncmp(t2+1, "man", 3) != 0)
+ return 0;
+ t2[1] = 'c';
+ t2[3] = 't';
+
+ len = (ext ? strlen(ext) : 0);
+
+ /* Explicitly given cat file? */
+ for (dlp = cfdirlist.nxt; dlp; dlp = dlp->nxt) {
+ if (!strcmp (name, dlp->mandir)) {
+ if (!dlp->catdir[0])
+ break;
+ *t2 = '/';
+ len += strlen (dlp->catdir) + strlen (t2) + 1;
+ cat_name = (char *) my_malloc (len);
+ strcpy (cat_name, dlp->catdir);
+ strcat (cat_name, t2);
+ goto gotit;
+ }
+ }
+
+ if (standards & FHS) {
+ if (*name != '/')
+ return 0;
+
+ /* possibly strip locale part */
+ t3 = t2;
+ if ((t4 = rindex(name,'/')) != NULL && strcmp(t4, "/man")) {
+ *t3 = '/';
+ t3 = t4;
+ *t3 = 0;
+ }
+
+ if(t3 - name >= 4 && !strcmp(t3 - 4, "/man")) {
+ /* fhs is applicable; strip leading /usr and trailing share */
+ if(!strncmp(name, "/usr/", 5))
+ name += 4;
+ t4 = t3 - 4;
+ *t4 = 0;
+ if(t4 - name >= 6 && !strcmp(t4 - 6, "/share"))
+ t4[-6] = 0;
+ *t3 = '/';
+
+ len += strlen("/var/cache/man") + strlen(name) + strlen(t3) + 1;
+ cat_name = (char *) my_malloc (len);
+ strcpy (cat_name, "/var/cache/man");
+ strcat (cat_name, name);
+ strcat (cat_name, t3);
+ goto gotit;
+ }
+
+ return 0;
+ }
+
+ if ((standards & FSSTND) && !strncmp(name, "/usr/", 5)) {
+ /* search, starting at the end, for a part `man' to delete */
+ t3 = t2;
+ while ((t4 = rindex(name, '/')) != NULL && strcmp(t4, "/man")) {
+ *t3 = '/';
+ t3 = t4;
+ *t3 = 0;
+ }
+ *t3 = '/';
+ if (t4) {
+ *t4 = 0;
+ len += strlen("/var/catman") + strlen (name+4) + strlen (t3) + 1;
+ cat_name = (char *) my_malloc (len);
+ strcpy (cat_name, "/var/catman");
+ strcat (cat_name, name+4);
+ strcat (cat_name, t3);
+ goto gotit;
+ }
+ } else
+ *t2 = '/';
+
+ if (ext) { /* allocate room for extension */
+ len += strlen(name) + 1;
+ cat_name = (char *) my_malloc (len);
+ strcpy (cat_name, name);
+ } else
+ cat_name = name;
+
+gotit:
+
+ if ((standards & DO_HP) && get_expander(cat_name)) {
+ /* nothing - we have cat1.Z/file.1 */
+ } else if (ext)
+ strcat (cat_name, ext);
+
+ if (name != cat_name)
+ free (freename);
+
+ return cat_name;
+}
diff --git a/src/to_cat.h b/src/to_cat.h
new file mode 100644
index 0000000..c9cc7e9
--- /dev/null
+++ b/src/to_cat.h
@@ -0,0 +1,3 @@
+extern const char *mandir_of (const char *name);
+extern const char *convert_to_cat (const char *name, const char *ext,
+ int standards);
diff --git a/src/util.c b/src/util.c
new file mode 100644
index 0000000..d074451
--- /dev/null
+++ b/src/util.c
@@ -0,0 +1,305 @@
+/*
+ * util.c
+ *
+ * Copyright (c) 1990, 1991, John W. Eaton.
+ *
+ * You may distribute under the terms of the GNU General Public
+ * License as specified in the file COPYING that comes with the man
+ * distribution.
+ *
+ * John W. Eaton
+ * jwe at che.utexas.edu
+ * Department of Chemical Engineering
+ * The University of Texas at Austin
+ * Austin, Texas 78712
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "util.h"
+#include "gripes.h"
+#include "man.h" /* for debug */
+
+/*
+ * Extract last element of a name like /foo/bar/baz.
+ */
+const char *
+mkprogname (const char *s) {
+ const char *t;
+
+ t = strrchr (s, '/');
+ if (t == (char *)NULL)
+ t = s;
+ else
+ t++;
+
+ return my_strdup (t);
+}
+
+/*
+ * Is file a nonempty and newer than file b?
+ *
+ * case:
+ *
+ * a newer than b returns 1
+ * a older than b returns 0
+ * stat on a fails or a empty returns -1
+ * stat on b fails or b empty returns -2
+ * both fail or empty returns -3
+ */
+int
+is_newer (const char *fa, const char *fb) {
+ struct stat fa_sb;
+ struct stat fb_sb;
+ register int fa_stat;
+ register int fb_stat;
+ register int status = 0;
+
+ fa_stat = stat (fa, &fa_sb);
+ if (fa_stat != 0 || fa_sb.st_size == 0)
+ status = 1;
+
+ fb_stat = stat (fb, &fb_sb);
+ if (fb_stat != 0 || fb_sb.st_size == 0)
+ status |= 2;
+
+ if (status != 0)
+ return -status;
+
+ return (fa_sb.st_mtime > fb_sb.st_mtime);
+}
+
+int ruid, rgid, euid, egid, suid;
+
+void
+get_permissions (void) {
+ ruid = getuid();
+ euid = geteuid();
+ rgid = getgid();
+ egid = getegid();
+ suid = (ruid != euid || rgid != egid);
+}
+
+void
+no_privileges (void) {
+ if (suid) {
+#if !defined (__CYGWIN__) && !defined (__BEOS__)
+ setreuid(ruid, ruid);
+ setregid(rgid, rgid);
+#endif
+ suid = 0;
+ }
+}
+
+/*
+ * What to do upon an interrupt? Experience shows that
+ * if we exit immediately, sh notices that its child has
+ * died and will try to fiddle with the tty.
+ * Simultaneously, also less will fiddle with the tty,
+ * resetting the mode before exiting.
+ * This leads to undesirable races. So, we catch SIGINT here
+ * and exit after the child has exited.
+ */
+static int interrupted = 0;
+static void catch_int(int a) {
+ interrupted = 1;
+}
+
+static int
+system1 (const char *command) {
+ void (*prev_handler)(int) = signal (SIGINT,catch_int);
+ int ret = system(command);
+
+ /* child terminated with signal? */
+ if (WIFSIGNALED(ret) &&
+ (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
+ exit(1);
+
+ /* or we caught an interrupt? */
+ if (interrupted)
+ exit(1);
+
+ signal(SIGINT,prev_handler);
+ return ret;
+}
+
+static int
+my_system (const char *command) {
+ int pid, pid2, status, stat;
+
+ if (!suid)
+ return system1 (command);
+
+#ifdef _POSIX_SAVED_IDS
+
+ /* we need not fork */
+ setuid(ruid);
+ setgid(rgid);
+ status = system1(command);
+ setuid(euid);
+ setgid(egid);
+ return (WIFEXITED(status) ? WEXITSTATUS(status) : 127);
+#endif
+
+ fflush(stdout); fflush(stderr);
+ pid = fork();
+ if (pid == -1) {
+ perror(progname);
+ fatal (CANNOT_FORK, command);
+ }
+ if (pid == 0) {
+ setuid(ruid);
+ setgid(rgid);
+ status = system1 (command);
+ exit(WIFEXITED(status) ? WEXITSTATUS(status) : 127);
+ }
+ pid2 = wait (&stat);
+ if (pid2 == -1) {
+ perror(progname);
+ fatal (WAIT_FAILED, command); /* interrupted? */
+ }
+ if (pid2 != pid)
+ fatal (GOT_WRONG_PID);
+ if (WIFEXITED(stat) && WEXITSTATUS(stat) != 127)
+ return WEXITSTATUS(stat);
+ fatal (CHILD_TERMINATED_ABNORMALLY, command);
+ return -1; /* not reached */
+}
+
+FILE *
+my_popen(const char *command, const char *type) {
+ FILE *r;
+
+ if (!suid)
+ return popen(command, type);
+
+#ifdef _POSIX_SAVED_IDS
+ setuid(ruid);
+ setgid(rgid);
+ r = popen(command, type);
+ setuid(euid);
+ setgid(egid);
+ return r;
+#endif
+
+ no_privileges();
+ return popen(command, type);
+}
+
+#define NOT_SAFE "/unsafe/"
+
+/*
+ * Attempt a system () call.
+ */
+int
+do_system_command (const char *command, int silent) {
+ int status = 0;
+
+ /*
+ * If we're debugging, don't really execute the command
+ */
+ if ((debug & 1) || !strncmp(command, NOT_SAFE, strlen(NOT_SAFE)))
+ fatal (NO_EXEC, command);
+ else
+ status = my_system (command);
+
+ if (status && !silent)
+ gripe (SYSTEM_FAILED, command, status);
+
+ return status;
+}
+
+char *
+my_malloc (int n) {
+ char *s = malloc(n);
+ if (!s)
+ fatal (OUT_OF_MEMORY, n);
+ return s;
+}
+
+char *
+my_strdup (const char *s) {
+ char *t = my_malloc(strlen(s) + 1);
+ strcpy(t, s);
+ return t;
+}
+
+/*
+ * Call: my_xsprintf(format,s1,s2,...) where format only contains %s/%S/%Q
+ * (or %d or %o) and all %s/%S/%Q parameters are strings.
+ * Result: allocates a new string containing the sprintf result.
+ * The %S parameters are checked for being shell safe.
+ * The %Q parameters are checked for being shell safe inside single quotes.
+ */
+
+static int
+is_shell_safe(const char *ss, int quoted) {
+ char *bad = " ;'\\\"<>|&";
+ char *p;
+
+ if (quoted)
+ bad++; /* allow a space inside quotes */
+ for (p = bad; *p; p++)
+ if (strchr(ss, *p))
+ return 0;
+ return 1;
+}
+
+static void
+nothing(int x) {}
+
+char *
+my_xsprintf (char *format, ...) {
+ va_list p;
+ char *s, *ss, *fm;
+ int len;
+
+ len = strlen(format) + 1;
+ fm = my_strdup(format);
+
+ va_start(p, format);
+ for (s = fm; *s; s++) {
+ if (*s == '%') {
+ switch (s[1]) {
+ case 'Q':
+ case 'S': /* check and turn into 's' */
+ ss = va_arg(p, char *);
+ if (!is_shell_safe(ss, (s[1] == 'Q')))
+ return NOT_SAFE;
+ len += strlen(ss);
+ s[1] = 's';
+ break;
+ case 's':
+ len += strlen(va_arg(p, char *));
+ break;
+ case 'd':
+ case 'o':
+ case 'c':
+ len += 20;
+ nothing(va_arg(p, int)); /* advance */
+ break;
+ default:
+ fprintf(stderr,
+ "my_xsprintf called with %s\n",
+ format);
+ exit(1);
+ }
+ }
+ }
+ va_end(p);
+
+ s = my_malloc(len);
+ va_start(p, format);
+ vsprintf(s, fm, p);
+ va_end(p);
+
+ return s;
+}
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..c317bd9
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,13 @@
+/* functions and variables exported from util.c */
+
+void get_permissions (void);
+void no_privileges (void);
+char *my_malloc (int n);
+char *my_strdup (const char *s);
+const char *mkprogname (const char *s);
+int is_newer (const char *fa, const char *fb);
+int do_system_command (const char *cmd, int silent);
+FILE *my_popen(const char *cmd, const char *type);
+char *my_xsprintf(char *f,...);
+
+extern int ruid, rgid, euid, egid, suid;
diff --git a/version b/version
new file mode 100644
index 0000000..4188706
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+man-1.6g
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/man2html.git
More information about the Reproducible-commits
mailing list