summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--COPYING339
-rw-r--r--DOAP.rdf.xml85
-rw-r--r--HISTORY128
-rw-r--r--INSTALL70
-rw-r--r--LSM26
-rw-r--r--Makefile76
-rw-r--r--Makefile.in76
-rw-r--r--README41
-rw-r--r--README.GNU-WIN3232
-rw-r--r--README.HP83
-rw-r--r--README.IRIX28
-rw-r--r--SPDX.rdf.xml35
-rw-r--r--TODO28
-rw-r--r--catopen/README29
-rw-r--r--catopen/catopen.c209
-rwxr-xr-xconf_script87
-rwxr-xr-xconfigure1379
-rw-r--r--gencat/Makefile18
-rw-r--r--gencat/gencat.c265
-rw-r--r--gencat/gencat.h107
-rw-r--r--gencat/genlib.c892
-rw-r--r--gencat/msgcat.h178
-rw-r--r--man/Makefile65
-rw-r--r--man/Makefile.in61
-rw-r--r--man/bg.txt1
-rw-r--r--man/bg/README7
-rw-r--r--man/bg/apropos.man37
-rw-r--r--man/bg/makewhatis.man104
-rw-r--r--man/bg/man.conf.man59
-rw-r--r--man/bg/man.man472
-rw-r--r--man/bg/whatis.man39
-rw-r--r--man/cs.txt1
-rw-r--r--man/cs/apropos.man29
-rw-r--r--man/cs/man.conf.man43
-rw-r--r--man/cs/man.man239
-rw-r--r--man/cs/whatis.man32
-rw-r--r--man/da.txt1
-rw-r--r--man/da/apropos.man30
-rw-r--r--man/da/man.conf.man45
-rw-r--r--man/da/man.man253
-rw-r--r--man/da/whatis.man32
-rw-r--r--man/de.txt1
-rw-r--r--man/de/README6
-rw-r--r--man/de/apropos.man29
-rw-r--r--man/de/man.conf.man43
-rw-r--r--man/de/man.man225
-rw-r--r--man/de/whatis.man31
-rw-r--r--man/el.txt1
-rw-r--r--man/el/apropos.man29
-rw-r--r--man/el/hman.man71
-rw-r--r--man/el/makewhatis.man109
-rw-r--r--man/el/man.conf.man45
-rw-r--r--man/el/man.man491
-rw-r--r--man/el/man2html.man157
-rw-r--r--man/el/whatis.man31
-rw-r--r--man/en.txt1
-rw-r--r--man/en/apropos.136
-rw-r--r--man/en/apropos.man32
-rw-r--r--man/en/makewhatis.8104
-rw-r--r--man/en/makewhatis.man100
-rw-r--r--man/en/man.1528
-rw-r--r--man/en/man.conf.550
-rw-r--r--man/en/man.conf.man46
-rw-r--r--man/en/man.man524
-rw-r--r--man/en/whatis.138
-rw-r--r--man/en/whatis.man34
-rw-r--r--man/es.txt1
-rw-r--r--man/es/README9
-rw-r--r--man/es/apropos.man41
-rw-r--r--man/es/makewhatis.man108
-rw-r--r--man/es/man.conf.man55
-rw-r--r--man/es/man.man240
-rw-r--r--man/es/whatis.man43
-rw-r--r--man/fi.txt1
-rw-r--r--man/fi/apropos.man26
-rw-r--r--man/fi/man.conf.man39
-rw-r--r--man/fi/man.man286
-rw-r--r--man/fi/whatis.man28
-rw-r--r--man/fr.txt1
-rw-r--r--man/fr/apropos.man47
-rw-r--r--man/fr/makewhatis.man123
-rw-r--r--man/fr/man.conf.man77
-rw-r--r--man/fr/man.man496
-rw-r--r--man/fr/whatis.man49
-rw-r--r--man/hr.txt1
-rw-r--r--man/hr/apropos.man31
-rw-r--r--man/hr/man.conf.man56
-rw-r--r--man/hr/man.man280
-rw-r--r--man/hr/whatis.man35
-rw-r--r--man/it.txt1
-rw-r--r--man/it/apropos.man37
-rw-r--r--man/it/makewhatis.man103
-rw-r--r--man/it/man.conf.man55
-rw-r--r--man/it/man.man504
-rw-r--r--man/it/whatis.man39
-rw-r--r--man/ja.txt1
-rw-r--r--man/ja/apropos.man34
-rw-r--r--man/ja/man.conf.man47
-rw-r--r--man/ja/man.man262
-rw-r--r--man/ja/whatis.man34
-rw-r--r--man/ko.txt1
-rw-r--r--man/ko/apropos.man25
-rw-r--r--man/ko/man.conf.man42
-rw-r--r--man/ko/man.man264
-rw-r--r--man/ko/whatis.man29
-rw-r--r--man/nl.txt1
-rw-r--r--man/nl/apropos.man28
-rw-r--r--man/nl/man.conf.man42
-rw-r--r--man/nl/man.man259
-rw-r--r--man/nl/whatis.man32
-rw-r--r--man/pl.txt1
-rw-r--r--man/pl/apropos.man35
-rw-r--r--man/pl/man.conf.man49
-rw-r--r--man/pl/man.man427
-rw-r--r--man/pl/whatis.man37
-rw-r--r--man/pt.txt1
-rw-r--r--man/pt/README6
-rw-r--r--man/pt/apropos.man28
-rw-r--r--man/pt/man.conf.man39
-rw-r--r--man/pt/man.man156
-rw-r--r--man/pt/whatis.man30
-rw-r--r--man/ro.txt1
-rw-r--r--man/ro/apropos.man32
-rw-r--r--man/ro/makewhatis.man96
-rw-r--r--man/ro/man.conf.man42
-rw-r--r--man/ro/man.man434
-rw-r--r--man/ro/man2html.man144
-rw-r--r--man/ro/whatis.man34
-rw-r--r--man/sl.txt1
-rw-r--r--man/sl/apropos.man29
-rw-r--r--man/sl/man.conf.man42
-rw-r--r--man/sl/man.man263
-rw-r--r--man/sl/whatis.man31
-rw-r--r--man2html/Makefile70
-rw-r--r--man2html/Makefile.in66
-rw-r--r--man2html/README91
-rw-r--r--man2html/TODO43
-rw-r--r--man2html/abbrev.c62
-rw-r--r--man2html/cgibase.c143
-rw-r--r--man2html/defs.h41
-rw-r--r--man2html/glimpse_filters3
-rw-r--r--man2html/hman96
-rw-r--r--man2html/hman.169
-rwxr-xr-xman2html/hman.sh96
-rw-r--r--man2html/locales/en/hman.169
-rw-r--r--man2html/locales/en/man2html.1151
-rw-r--r--man2html/locales/fr/man2html.1165
-rw-r--r--man2html/locales/it/hman.171
-rw-r--r--man2html/locales/it/man2html.1153
-rw-r--r--man2html/man2html.1151
-rw-r--r--man2html/man2html.c3241
-rw-r--r--man2html/scripts/cgi-aux/man/man.aux75
-rw-r--r--man2html/scripts/cgi-aux/man/mansearch.aux49
-rw-r--r--man2html/scripts/cgi-aux/man/mansearchhelp.aux295
-rwxr-xr-xman2html/scripts/cgi-bin/man/man2html109
-rwxr-xr-xman2html/scripts/cgi-bin/man/mansearch192
-rwxr-xr-xman2html/scripts/cgi-bin/man/mansearchhelp32
-rwxr-xr-xman2html/scripts/cgi-bin/man/mansec183
-rwxr-xr-xman2html/scripts/cgi-bin/man/manwhatis208
-rw-r--r--man2html/strdefs.c176
-rw-r--r--misc/README4
-rw-r--r--misc/locales/it/manlint.166
-rw-r--r--misc/man-preformat.c332
-rw-r--r--misc/manlint225
-rw-r--r--misc/manlint.163
-rw-r--r--msgs/Makefile.in34
-rw-r--r--msgs/README25
-rw-r--r--msgs/gencat.in3
-rwxr-xr-xmsgs/gencat207fix.sh2
-rwxr-xr-xmsgs/inst.sh38
-rw-r--r--msgs/mess.bg191
-rw-r--r--msgs/mess.bg.codeset1
-rw-r--r--msgs/mess.cs170
-rw-r--r--msgs/mess.cs.codeset1
-rw-r--r--msgs/mess.da170
-rw-r--r--msgs/mess.da.codeset1
-rw-r--r--msgs/mess.de186
-rw-r--r--msgs/mess.de.codeset1
-rw-r--r--msgs/mess.el171
-rw-r--r--msgs/mess.el.codeset1
-rw-r--r--msgs/mess.en188
-rw-r--r--msgs/mess.en.codeset1
-rw-r--r--msgs/mess.es170
-rw-r--r--msgs/mess.es.codeset1
-rw-r--r--msgs/mess.fi170
-rw-r--r--msgs/mess.fi.codeset1
-rw-r--r--msgs/mess.fr190
-rw-r--r--msgs/mess.fr.codeset1
-rw-r--r--msgs/mess.hr170
-rw-r--r--msgs/mess.hr.codeset1
-rw-r--r--msgs/mess.it190
-rw-r--r--msgs/mess.it.codeset1
-rw-r--r--msgs/mess.ja171
-rw-r--r--msgs/mess.ja.codeset1
-rw-r--r--msgs/mess.ko171
-rw-r--r--msgs/mess.ko.codeset1
-rw-r--r--msgs/mess.nl189
-rw-r--r--msgs/mess.nl.codeset1
-rw-r--r--msgs/mess.pl188
-rw-r--r--msgs/mess.pl.codeset1
-rw-r--r--msgs/mess.pt165
-rw-r--r--msgs/mess.pt.codeset1
-rw-r--r--msgs/mess.ro170
-rw-r--r--msgs/mess.ro.codeset1
-rw-r--r--msgs/mess.ru170
-rw-r--r--msgs/mess.ru.codeset1
-rw-r--r--msgs/mess.sl171
-rw-r--r--msgs/mess.sl.codeset1
-rw-r--r--msgs/mess.zh_TW.UTF-8170
-rw-r--r--src/Makefile124
-rw-r--r--src/Makefile.in120
-rwxr-xr-xsrc/apropos88
-rw-r--r--src/apropos.sh88
-rw-r--r--src/defs.h26
-rw-r--r--src/different.c72
-rw-r--r--src/different.h3
-rw-r--r--src/glob.c682
-rw-r--r--src/glob.h1
-rw-r--r--src/gripedefs.h87
-rw-r--r--src/gripes.c139
-rw-r--r--src/gripes.h5
-rw-r--r--src/join.c28
-rwxr-xr-xsrc/makemsgbin0 -> 11755 bytes
-rw-r--r--src/makemsg.c175
-rwxr-xr-xsrc/makewhatis460
-rw-r--r--src/makewhatis.in456
-rw-r--r--src/makewhatis.sh456
-rw-r--r--src/man-config.c297
-rw-r--r--src/man-config.h6
-rw-r--r--src/man-getopt.c322
-rw-r--r--src/man-getopt.h6
-rw-r--r--src/man-iconv.c163
-rw-r--r--src/man-iconv.h1
-rw-r--r--src/man.c1366
-rw-r--r--src/man.conf144
-rw-r--r--src/man.conf.in140
-rw-r--r--src/man.h22
-rwxr-xr-xsrc/man2dvi36
-rw-r--r--src/manfile.c337
-rw-r--r--src/manfile.h36
-rw-r--r--src/manpath.c412
-rw-r--r--src/manpath.h5
-rw-r--r--src/msg.c106
-rwxr-xr-xsrc/mwi19
-rw-r--r--src/ndir.h51
-rw-r--r--src/paths.h43
-rw-r--r--src/paths.h.in39
-rw-r--r--src/to_cat.c171
-rw-r--r--src/to_cat.h3
-rw-r--r--src/util.c305
-rw-r--r--src/util.h13
-rw-r--r--src/version.h1
-rwxr-xr-xsrc/whatis88
-rw-r--r--version1
254 files changed, 31979 insertions, 0 deletions
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@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@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@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@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@acm.org)
+Maintained-by: Federico Lucifredi (flucifredi@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 b/Makefile
new file mode 100644
index 0000000..3fc74e0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,76 @@
+# Makefile for man
+# [need allow_null_glob_expansion=true]
+# The parts behind
+
+all: Makefile conf_script source manhtml manpages
+ @echo; echo 'You can now do "make install"'
+
+# On a machine with time before distribution time
+# it may be necessary to touch all distributed files
+
+Makefile: Makefile.in configure
+ @echo "Please run configure first"
+ exit 1
+
+conf_script: configure
+ @echo "Please run configure first"
+ exit 1
+
+src/Makefile: conf_script src/Makefile.in
+ cd src; ../conf_script Makefile
+
+man2html/Makefile: conf_script man2html/Makefile.in
+ cd man2html; ../conf_script Makefile
+
+man/Makefile: conf_script man/Makefile.in
+ cd man; ../conf_script Makefile
+
+msgs/Makefile: conf_script msgs/Makefile.in
+ cd msgs; ../conf_script Makefile
+
+makefiles: src/Makefile man2html/Makefile man/Makefile msgs/Makefile
+
+source: src/Makefile
+ cd src; $(MAKE)
+
+manhtml: man2html/Makefile source
+ cd man2html; $(MAKE)
+
+manpages: man/Makefile
+ cd man; $(MAKE) subdirs
+
+
+
+
+
+
+
+install: src/Makefile man/Makefile man2html/Makefile
+ cd src; $(MAKE) install
+ cd man2html; $(MAKE) install
+ cd man; $(MAKE) installsubdirs
+
+ @echo; echo 'Done.'
+ @echo 'In case you want to browse man pages using a www browser,'
+ @echo '"cd man2html", read README, and perhaps "make install-scripts".'
+# @echo; echo 'Done. In case you want to mount /usr read-only, please'
+# @echo 'install a symlink /usr/man/whatis -> /var/catman/whatis, or so.'
+
+clean: src/Makefile man/Makefile msgs/Makefile man2html/Makefile
+ cd src; $(MAKE) clean
+ cd man2html; $(MAKE) clean
+ cd man; $(MAKE) cleansubdirs
+ cd msgs; $(MAKE) clean
+ cd gencat; $(MAKE) clean
+ rm -f core *~
+
+spotless distclean reallyclean: clean
+ cd src; $(MAKE) spotless
+ cd man2html; $(MAKE) spotless
+ cd man; $(MAKE) spotlesssubdirs
+ cd msgs; $(MAKE) spotless
+ cd gencat; $(MAKE) clean
+ rm -f conf_script Makefile
+
+DISTR = COPYING README README.HP README.RedHat README.GNU-WIN32 INSTALL \
+ Makefile.in configure src man2html man msgs gencat catopen misc
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@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@netcom.com).
+
+man-1.3, man-1.4* and man-1.5* were released by Andries Brouwer (aeb@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@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@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@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@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@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/conf_script b/conf_script
new file mode 100755
index 0000000..0f4719f
--- /dev/null
+++ b/conf_script
@@ -0,0 +1,87 @@
+#!/bin/sh
+infiles=$@
+trap 'rm -f $infiles; exit 1' 1 3 15
+
+# echo ""
+for infile in $infiles
+do
+ case $infile in
+ *.h)
+ cb="/*"; cs=" *"; ce=" */";;
+ *.1|*.5|*.8|*.man)
+ cb=.\\\"; cs=.\\\"; ce=.\\\";;
+ *)
+ case "`sed -n -e 1p $infile.in`" in
+ '#!'*) cb="`sed -n -e 1p $infile.in`";;
+ *) cb="#";;
+ esac
+ cs="#"; ce="#";;
+ esac
+ echo "$cb" > $infile
+ echo "$cs Generated automatically from $infile.in by the" >> $infile
+ echo "$cs configure script." >> $infile
+ echo "$ce" >> $infile
+ echo "Creating $infile from $infile.in"
+ sed -e '
+s,@version@,man-1.6g,
+s,@CC@,gcc -O,
+s,@EXEEXT@,,
+s,@BUILD_CC@,gcc -O,
+s,@INSTALL@,install,
+s,@DEFS@, -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS,
+s,@LIBS@,,
+s,@LIBOBJS@,,
+s,@troff@,/usr/bin/groff -Tps -mandoc,
+s,@nroff@,/usr/bin/nroff -Tlatin1 -mandoc,
+s,@jnroff@,/usr/bin/groff -Tnippon -mandocj,
+s,@eqn@,/usr/bin/geqn -Tps,
+s,@neqn@,/usr/bin/geqn -Tlatin1,
+s,@jneqn@,/usr/bin/geqn -Tnippon,
+s,@tbl@,/usr/bin/gtbl,
+s,@nocol@,# ,
+s,@pcol@,,
+s,@col@,/usr/bin/col,
+s,@vgrind@,,
+s,@refer@,,
+s,@grap@,,
+s,@pic@,/usr/bin/gpic,
+s,@fcat@,,
+s,@pcat@,,
+s,@zcat@,/bin/zcat,
+s,@unxz@,/usr/bin/unxz -c,
+s,@gunzip@,/bin/gunzip -c,
+s,@bzip2@,/bin/bzip2 -c -d,
+s,@unlzma@,/usr/bin/unlzma -c -d,
+s,@unyabba@,,
+s,@compress@,/usr/bin/xz,
+s,@compress_ext@,.xz,
+s,@decompress@,/usr/bin/unxz -c,
+s,@pager@,/bin/less -is,
+s,@browser@,/bin/less -is,
+s,@htmlpager@,/bin/cat,
+s,@cmp@,/usr/bin/cmp -s,
+s,@cat@,/bin/cat,
+s,@awk@,/usr/bin/awk,
+s,@bindir@,/usr/bin,
+s,@sbindir@,/usr/sbin,
+s,@mandir@,/usr/share/man,
+s,@locale@,,
+s,@fhs@,,
+s,@fsstnd@,# ,
+s,@man1ext@,1,g
+s,@man5ext@,5,g
+s,@man8ext@,8,g
+s,@man_install_flags@,,
+s,@man_user@,,
+s,@languages@,en,
+s,@man@,/usr/bin/man,
+s,@apropos@,/usr/bin/apropos,
+s,@whatis@,/usr/bin/whatis,
+s,@man2dvi@,/usr/bin/man2dvi,
+s,@makewhatis@,/usr/sbin/makewhatis,
+s,@man_config_dir@,/usr/share/misc,
+s,@man_config_file@,/usr/share/misc/man.conf,
+s,@manpathoption@,--path,
+s/@sections@/1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o/
+' $infile.in >> $infile
+done
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,@version@,$version,
+s,@CC@,$CC,
+s,@EXEEXT@,$EXEEXT,
+s,@BUILD_CC@,$BUILD_CC,
+s,@INSTALL@,$INSTALL,
+s,@DEFS@,$DEFS,
+s,@LIBS@,$LIBS,
+s,@LIBOBJS@,$LIBOBJS,
+s,@troff@,$troff,
+s,@nroff@,$nroff,
+s,@jnroff@,$jnroff,
+s,@eqn@,$eqn,
+s,@neqn@,$neqn,
+s,@jneqn@,$jneqn,
+s,@tbl@,$tbl,
+s,@nocol@,$nocol,
+s,@pcol@,$pcol,
+s,@col@,$col,
+s,@vgrind@,$vgrind,
+s,@refer@,$refer,
+s,@grap@,$grap,
+s,@pic@,$pic,
+s,@fcat@,$fcat,
+s,@pcat@,$pcat,
+s,@zcat@,$zcat,
+s,@unxz@,$unxz,
+s,@gunzip@,$gunzip,
+s,@bzip2@,$bzip2,
+s,@unlzma@,$unlzma,
+s,@unyabba@,$unyabba,
+s,@compress@,$compress,
+s,@compress_ext@,$compress_ext,
+s,@decompress@,$decompress,
+s,@pager@,$pager,
+s,@browser@,$browser,
+s,@htmlpager@,$htmlpager,
+s,@cmp@,$cmp,
+s,@cat@,$cat,
+s,@awk@,$awk,
+s,@bindir@,$bindir,
+s,@sbindir@,$sbindir,
+s,@mandir@,$mandir,
+s,@locale@,$locale,
+s,@fhs@,$fhs,
+s,@fsstnd@,$fsstnd,
+s,@man1ext@,$man1ext,g
+s,@man5ext@,$man5ext,g
+s,@man8ext@,$man8ext,g
+s,@man_install_flags@,$man_install_flags,
+s,@man_user@,$man_user,
+s,@languages@,$languages,
+s,@man@,$man,
+s,@apropos@,$apropos,
+s,@whatis@,$whatis,
+s,@man2dvi@,$man2dvi,
+s,@makewhatis@,$makewhatis,
+s,@man_config_dir@,$man_config_dir,
+s,@man_config_file@,$man_config_file,
+s,@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@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@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@alfalfa.com
+
+******************************************************************/
+
+/* Edit History
+
+12/03/82 nazgul Patch from <Jan.Djarv@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@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@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 b/man/Makefile
new file mode 100644
index 0000000..5f21fd0
--- /dev/null
+++ b/man/Makefile
@@ -0,0 +1,65 @@
+#
+# Generated automatically from Makefile.in by the
+# configure script.
+#
+# 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)/usr/share/man$(SLANG)
+
+all: $(ALL)
+ for i in $(MAYBE8); \
+ do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
+
+install: $(ALL)
+ mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
+ for i in $(MAN1); \
+ do $(INSTALL) $$i.1 $(mandir)/man1/$$i.1; done
+ for i in $(MAN5); \
+ do $(INSTALL) $$i.5 $(mandir)/man5/$$i.5; done
+ for i in $(MAN8); \
+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.8; fi; done
+
+clean:
+ rm -f core *.in *.1 *.5 *.8 *~
+
+spotless:
+
+subdirs:
+ @for i in en; do if test -d $$i; then echo; \
+ echo "==== Making the `cat $$i.txt` man pages. ===="; \
+ cd $$i; make -f ../Makefile; cd ..; \
+ else echo "==== No $$i man pages found. ===="; fi; done
+
+installsubdirs:
+ @for i in en; do if test -d $$i; then echo; \
+ echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+ cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+ export SLANG; make -f ../Makefile install; cd ..; \
+ else echo "==== No $$i man pages found. ===="; fi; done
+
+cleansubdirs:
+ @for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
+ rm -f core *~
+
+spotlesssubdirs:
+ for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
+ rm -f Makefile
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.@man1ext@; done
+ for i in $(MAN5); \
+ do $(INSTALL) $$i.5 $(mandir)/man5/$$i.@man5ext@; done
+ for i in $(MAN8); \
+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
+
+clean:
+ rm -f core *.in *.@man1ext@ *.@man5ext@ *.@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@is-vn.bg>
+They were updated by Alexander Shopov.
+E-mail: <ash@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Translated by Dimitar Zhekov <jimmy@is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash@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@acm.org>
+îñúùåñòâÿâà òåêóùî ïîääðúæêàòà íà ïàêåòà.
+.SH ÏÐÅÂÎÄ
+Äèìèòúð Æåêîâ, Àëåêñàíäúð Øîïîâ <ash@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@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@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@acm.org>
+îñúùåñòâÿâà òåêóùî ïîääðúæêàòà íà ïàêåòà.
+.SH ÏÐÅÂÎÄ
+Àëåêñàíäúð Øîïîâ <ash@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@acm.org>
+îñúùåñòâÿâà òåêóùî ïîääðúæêàòà íà ïàêåòà.
+.SH ÏÐÅÂÎÄ
+Äèìèòúð Æåêîâ, Àëåêñàíäúð Øîïîâ <ash@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@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@is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash@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@.
+.TP
+.B HTMLPAGER
+Êîìàíäàòà çà òåêñòîâî èçîáðàçÿâàíå íà ñòðàíèöèòå îò ðúêîâîäñòâîòî ñ HTML.
+Àêî íå å çàäàäåíà ñå èçïîëçâà @htmlpager@.
+.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@acm.org> îñúùåñòâÿâà òåêóùî ïîääðúæêàòà íà ïàêåòà.
+.SH ÏÐÅÂÎÄ
+Äèìèòúð Æåêîâ, Àëåêñàíäúð Øîïîâ <ash@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Translated by Dimitar Zhekov <jimmy@is-vn.bg>, 2002.
+.\" Translated by Alexander Shopov <ash@contact.bg>, 2005.
+.TH whatis 1 "5 ÿíóàðè 1991"
+.LO 1
+.SH ÈÌÅ
+whatis \- òúðñåíå íà öåëè äóìè â áàçàòà îò äàííè íà whatis
+.SH ÑÈÍÒÀÊÑÈÑ
+.BI whatis
+êëþ÷îâà_äóìà ...
+.SH ÎÏÈÑÀÍÈE
+whatis òúðñè êëþ÷îâè äóìè âúâ ôàéëîâåòå íà áàçàòà îò äàííè,
+ñúäúðæàùè êðàòêè îïèñàíèÿ íà ñèñòåìíèòå êîìàíäè, è èçâåæäà
+ðåçóëòàòà íà ñòàíäàðòíèÿ èçõîä.
+Èçâåæäàò ñå ñàìî íàìåðåíèòå öåëè äóìè.
+
+Áàçàòà îò äàííè íà whatis ñå ñúçäàâà ñ êîìàíäàòà @makewhatis@.
+.SH "ÀÂÒÎÐ/ÏÎÄÄÐÚÆÊÀ"
+Ïúðâîíà÷àëíèÿò àâòîð íà
+.BR man
+å John W. Eaton. Federico Lucifredi <flucifredi@acm.org> îñúùåñòâÿâà òåêóùî ïîääðúæêàòà íà ïàêåòà.
+.SH ÏÐÅÂÎÄ
+Äèìèòúð Æåêîâ, Àëåêñàíäúð Øîïîâ <ash@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@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@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@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@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@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
+@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
+@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
+@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@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@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@.
+.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@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@petshop.ping.dk - bo@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@petshop.ping.dk - bo@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@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@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
+@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@.
+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@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@petshop.ping.dk - bo@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@.
+.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@centeotl.in.tu-clausthal.de Tue May 31 08:52:20 1994
+#To: Andries.Brouwer@cwi.nl
+#Subject: Re: man-1.3
+#From: Hein@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Übersetzt von Jochen Hein ( Hein@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@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@Student.TU-Clausthal.de )
+.\" and Ralf W. Stephan ( ralf@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" übersetzt von Jochen Hein ( Hein@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@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@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@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@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@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" ÅëëçíéêÞ ìåôÜöñáóç Ë. ÄçìçôñïõëÜêçò edimitro@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@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@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@host "mailto:name@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\" ÅëëçíéêÞ ìåôÜöñáóç Ë. ÄçìçôñïõëÜêçò edimitro@tee.gr Éïýëéïò 2003
+.\"
+.TH whatis 1 "Jan 5, 1991" "Åã÷åéñßäéï Ëßíïõî" "ÅíôïëÝò ×ñÞóôç"
+.LO 1
+.SH ÏÍÏÌÁ
+whatis \- åñåõíÜ ôç âÜóç äåäïìÝíùí whatis ãéá ðëÞñåéò ëÝîåéò.
+.SH ÓÕÍÏØÇ
+.BI whatis
+ëÝîç-êëåéäß ...
+.SH ÐÅÑÉÃÑÁÖÇ
+Ç åíôïëÞ whatis åñåõíÜ ãéá ëÝîåéò êëåéäéÜ,
+Ýíá óýíïëï áñ÷åßùí âÜóåùí äåäïìÝíùí ðïõ ðåñéÝ÷ïõí óýíôïìåò ðåñéãñáöÝò åíôïëþí óõóôÞìáôïò,
+êé åìöáíßæåé ôï áðïôÝëåóìá óôçí ôõðéêÞ Ýîïäï.
+Åìöáíßæïíôáé ìüíï ðëÞñåéò ëÝîåéò ðïõ ôáéñéÜæïõí.
+
+Ç âÜóç äåäïìÝíùí whatis äçìéïõñãåßôáé êáé åíçìåñþíåôáé ìå ôçí åíôïëÞ @makewhatis@.
+.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.1 b/man/en/apropos.1
new file mode 100644
index 0000000..05baa49
--- /dev/null
+++ b/man/en/apropos.1
@@ -0,0 +1,36 @@
+.\"
+.\" Generated automatically from apropos.1.in by the
+.\" configure script.
+.\"
+.\" Man page for apropos
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the README file that comes with the man 1.0
+.\" distribution.
+.\"
+.\" John W. Eaton
+.\" jwe@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "September 19, 2005"
+.LO 1
+.SH NAME
+apropos \- search the whatis database for strings
+.SH SYNOPSIS
+.BI apropos
+keyword ...
+.SH DESCRIPTION
+apropos searches a set of database files containing short descriptions
+of system commands for keywords and displays the result on the
+standard output.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+whatis(1), man(1).
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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH apropos 1 "September 19, 2005"
+.LO 1
+.SH NAME
+apropos \- search the whatis database for strings
+.SH SYNOPSIS
+.BI apropos
+keyword ...
+.SH DESCRIPTION
+apropos searches a set of database files containing short descriptions
+of system commands for keywords and displays the result on the
+standard output.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+whatis(1), man(1).
diff --git a/man/en/makewhatis.8 b/man/en/makewhatis.8
new file mode 100644
index 0000000..227db4c
--- /dev/null
+++ b/man/en/makewhatis.8
@@ -0,0 +1,104 @@
+.\"
+.\" Generated automatically from makewhatis.8.in by the
+.\" configure script.
+.\"
+.\" Copyright (c) 1999 Ottavio G. Rizzo <rizzo@pluto.linux.it>
+.\"
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, write to the Free
+.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+.\" USA.
+.\"
+.TH MAKEWHATIS 8 "September 19, 2005"
+.SH NAME
+makewhatis \- Create the whatis database
+.SH SYNOPSIS
+.BI "makewhatis [-u] [-v] [-w] [-s " sections " ] [-c [" catpath "]] [" manpath "]"
+.SH DESCRIPTION
+.B makewhatis
+reads all the manual pages contained in the given
+.IR sections " of " manpath
+or the preformatted pages contained in the given
+.IR sections " of " catpath .
+For each page, it writes a line in the whatis database; each line
+consists of the name of the page and a short description, separated
+by a dash. The description is extracted using the content of the
+NAME section of the manual page.
+.LP
+Since other languages use a different term for the NAME section,
+.B makewhatis
+recognizes the equivalent terms in Czech, Italian, Finnish, French,
+German and Spanish.
+.LP
+If no
+.I manpath
+argument is given,
+.I /usr/man
+is assumed by default.
+.SH OPTIONS
+.TP
+.B -u
+Update database with new pages.
+.TP
+.B -v
+Verbose output
+.TP
+.B -w
+Use manpath obtained from `man --path`
+.TP
+.BI -s " sections"
+Looks in the
+.I sections
+of
+.IR manpath " or " catpath .
+If the option is absent, the MANSECT env var will be used. If it too
+is absent, the MANSECT setting in man.conf will be used.
+.TP
+.BI -c " catpath"
+The preformatted manual pages located in
+.I catpath
+are scanned. If the argument is not provided, it is assumed to be the
+first existing directory between
+.IR /usr/man/preformat " and " /usr/man .
+.SH EXAMPLES
+.PP
+To rebuild only
+.IR /usr/X11R6/man/whatis " and " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+To rebuild all the databases, including those of the Finnish, French
+and Italian translations
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH BUGS
+.B makewhatis
+may not handle too well manual pages written with non-standard troff
+macros, such as the Tcl/Tk pages.
+.PP
+.B makewhatis
+does not work on preformatted translations.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH SEE ALSO
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
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@pluto.linux.it>
+.\"
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, write to the Free
+.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+.\" USA.
+.\"
+.TH MAKEWHATIS 8 "September 19, 2005"
+.SH NAME
+makewhatis \- Create the whatis database
+.SH SYNOPSIS
+.BI "makewhatis [-u] [-v] [-w] [-s " sections " ] [-c [" catpath "]] [" manpath "]"
+.SH DESCRIPTION
+.B makewhatis
+reads all the manual pages contained in the given
+.IR sections " of " manpath
+or the preformatted pages contained in the given
+.IR sections " of " catpath .
+For each page, it writes a line in the whatis database; each line
+consists of the name of the page and a short description, separated
+by a dash. The description is extracted using the content of the
+NAME section of the manual page.
+.LP
+Since other languages use a different term for the NAME section,
+.B makewhatis
+recognizes the equivalent terms in Czech, Italian, Finnish, French,
+German and Spanish.
+.LP
+If no
+.I manpath
+argument is given,
+.I /usr/man
+is assumed by default.
+.SH OPTIONS
+.TP
+.B -u
+Update database with new pages.
+.TP
+.B -v
+Verbose output
+.TP
+.B -w
+Use manpath obtained from `man --path`
+.TP
+.BI -s " sections"
+Looks in the
+.I sections
+of
+.IR manpath " or " catpath .
+If the option is absent, the MANSECT env var will be used. If it too
+is absent, the MANSECT setting in man.conf will be used.
+.TP
+.BI -c " catpath"
+The preformatted manual pages located in
+.I catpath
+are scanned. If the argument is not provided, it is assumed to be the
+first existing directory between
+.IR /usr/man/preformat " and " /usr/man .
+.SH EXAMPLES
+.PP
+To rebuild only
+.IR /usr/X11R6/man/whatis " and " /usr/local/man/whatis
+.IP
+makewhatis /usr/X11R6/man /usr/local/man
+.PP
+To rebuild all the databases, including those of the Finnish, French
+and Italian translations
+.IP
+LANGUAGE=fi:fr:it makewhatis -w
+.SH BUGS
+.B makewhatis
+may not handle too well manual pages written with non-standard troff
+macros, such as the Tcl/Tk pages.
+.PP
+.B makewhatis
+does not work on preformatted translations.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH SEE ALSO
+.BR apropos (1),
+.BR man (1),
+.BR whatis (1)
diff --git a/man/en/man.1 b/man/en/man.1
new file mode 100644
index 0000000..1673352
--- /dev/null
+++ b/man/en/man.1
@@ -0,0 +1,528 @@
+.\"
+.\" Generated automatically from man.1.in by the
+.\" configure script.
+.\"
+.\" Man page for man (and the former manpath)
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the README file that comes with the man 1.0
+.\" distribution.
+.\"
+.\" John W. Eaton
+.\" jwe@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Many changes - aeb
+.\" More changes - flc
+.\"
+.TH man 1 "September 19, 2005"
+.LO 1
+.SH NAME
+man \- format and display the on-line manual pages
+.SH SYNOPSIS
+.B man
+.RB [ \-acdfFhkKtwW ]
+.RB [ --path ]
+.RB [ \-m
+.IR system ]
+.RB [ \-p
+.IR string ]
+.RB [ \-C
+.IR config_file ]
+.RB [ \-M
+.IR pathlist ]
+.RB [ \-P
+.IR pager ]
+.RB [ \-B
+.IR browser ]
+.RB [ \-H
+.IR htmlpager ]
+.RB [ \-S
+.IR section_list ]
+.RI [ section ]
+.I "name ..."
+
+.SH DESCRIPTION
+.B man
+formats and displays the on-line manual pages. If you specify
+.IR section ,
+.B man
+only looks in that section of the manual.
+.I name
+is normally the name of the manual page, which is typically the name
+of a command, function, or file.
+However, if
+.I name
+contains a slash
+.RB ( / )
+then
+.B man
+interprets it as a file specification, so that you can do
+.B "man ./foo.5"
+or even
+.B "man /cd/foo/bar.1.gz\fR.\fP"
+.PP
+See below for a description of where
+.B man
+looks for the manual page files.
+
+.SH MANUAL SECTIONS
+The standard sections of the manual include:
+.TP
+.B 1
+User Commands
+.TP
+.B 2
+System Calls
+.TP
+.B 3
+C Library Functions
+.TP
+.B 4
+Devices and Special Files
+.TP
+.B 5
+File Formats and Conventions
+.TP
+.B 6
+Games et. Al.
+.TP
+.B 7
+Miscellanea
+.TP
+.B 8
+System Administration tools and Deamons
+.TP
+Distributions customize the manual section to their specifics, which often include additional sections.
+
+.SH OPTIONS
+.TP
+.B \-\^C " config_file"
+Specify the configuration file to use; the default is
+.BR /usr/share/misc/man.conf .
+(See
+.BR man.conf (5).)
+.TP
+.B \-\^M " path"
+Specify the list of directories to search for man pages.
+Separate the directories with colons. An empty list is the same as
+not specifying
+.B \-M
+at all. See
+.BR "SEARCH PATH FOR MANUAL PAGES" .
+.TP
+.B \-\^P " pager"
+Specify which pager to use.
+This option overrides the
+.B MANPAGER
+environment variable, which in turn overrides the
+.B PAGER
+variable. By default,
+.B man
+uses
+.BR "/bin/less -is" .
+.TP
+.B \-\^B
+Specify which browser to use on HTML files.
+This option overrides the
+.B BROWSER
+environment variable. By default,
+.B man
+uses
+.BR /bin/less -is ,
+.TP
+.B \-\^H
+Specify a command that renders HTML files as text.
+This option overrides the
+.B HTMLPAGER
+environment variable. By default,
+.B man
+uses
+.BR /bin/cat ,
+.TP
+.B \-\^S " section_list"
+List is a colon separated list of manual sections to search.
+This option overrides the
+.B MANSECT
+environment variable.
+.TP
+.B \-\^a
+By default,
+.B man
+will exit after displaying the first manual page it
+finds. Using this option forces
+.B man
+to display all the manual pages that match
+.B name,
+not just the first.
+.TP
+.B \-\^c
+Reformat the source man page, even when an up-to-date cat page exists.
+This can be meaningful if the cat page was formatted for a screen
+with a different number of columns, or if the preformatted page
+is corrupted.
+.TP
+.B \-\^d
+Don't actually display the man pages, but do print gobs of debugging
+information.
+.TP
+.B \-\^D
+Both display and print debugging info.
+.TP
+.B \-\^f
+Equivalent to
+.BR whatis .
+.TP
+.BR \-\^F " or " \-\-preformat
+Format only - do not display.
+.TP
+.B \-\^h
+Print a help message and exit.
+.TP
+.B \-\^k
+Equivalent to
+.BR apropos .
+.TP
+.B \-\^K
+Search for the specified string in *all* man pages. Warning: this is
+probably very slow! It helps to specify a section.
+(Just to give a rough idea, on my machine this takes about a minute
+per 500 man pages.)
+.TP
+.B \-\^m " system"
+Specify an alternate set of man pages to search based on the system
+name given.
+.TP
+.B \-\^p " string"
+Specify the sequence of preprocessors to run before
+.B nroff
+or
+.BR troff .
+Not all installations will have a full set of preprocessors.
+Some of the preprocessors and the letters used to designate them are:
+eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
+This option overrides the
+.B MANROFFSEQ
+environment variable.
+.TP
+.B \-\^t
+Use
+.B /usr/bin/groff -Tps -mandoc
+to format the manual page, passing the output to
+.B stdout.
+The default output format of
+.B /usr/bin/groff -Tps -mandoc
+is Postscript, refer to the manual page of
+.B /usr/bin/groff -Tps -mandoc
+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 /usr/share/misc/man.conf .
+No cat pages are saved when the required cat directory does not exist.
+No cat pages are saved when they are formatted for a line length
+different from 80.
+No cat pages are saved when man.conf contains the line NOCACHE.
+.PP
+It is possible to make
+.B man
+suid to a user man. Then, if a cat directory
+has owner man and mode 0755 (only writable by man), and the cat files
+have owner man and mode 0644 or 0444 (only writable by man, or not
+writable at all), no ordinary user can change the cat pages or put
+other files in the cat directory. If
+.B man
+is not made suid, then a cat directory should have mode 0777
+if all users should be able to leave cat pages there.
+.PP
+The option
+.B \-c
+forces reformatting a page, even if a recent cat page exists.
+
+.SH "HTML PAGES"
+Man will find HTML pages if they live in directories named as
+'html' followed by a section extension. The last file extension is
+expected to be ".html", thus a valid name for an HTML version of the
+.BR ls (1)
+man page would be
+.IR /usr/share/man/htmlman1/ls.1.html .
+
+.SH "SEARCH PATH FOR MANUAL PAGES"
+.B man
+uses a sophisticated method of finding manual page files, based on the
+invocation options and environment variables, the
+.B /usr/share/misc/man.conf
+configuration file, and some built in conventions and heuristics.
+.PP
+First of all, when the
+.I name
+argument to
+.B man
+contains a slash
+.RB ( / ),
+.B man
+assumes it is a file specification itself,
+and there is no searching involved.
+.PP
+But in the normal case where
+.I name
+doesn't contain a slash,
+.B man
+searches a variety of directories for a file that could be a manual page
+for the topic named.
+.PP
+If you specify the
+.BI "-M " pathlist
+option,
+.I pathlist
+is a colon-separated list of the directories that
+.B man
+searches.
+.PP
+If you don't specify
+.B -M
+but set the
+.B MANPATH
+environment variable, the value of that variable is the list of the
+directories that
+.B man
+searches.
+.PP
+If you don't specify an explicit path list with
+.B -M
+or
+.BR MANPATH ,
+.B man
+develops its own path list based on the contents of the configuration
+file
+.BR /usr/share/misc/man.conf .
+The
+.B MANPATH
+statements in the configuration file identify particular directories to
+include in the search path.
+.PP
+Furthermore, the
+.B MANPATH_MAP
+statements add to the search path depending on your command search path
+(i.e. your
+.B PATH
+environment variable). For each directory that may be in the command
+search path, a
+.B MANPATH_MAP
+statement specifies a directory that should be added to the search
+path for manual page files.
+.B man
+looks at the
+.B PATH
+variable and adds the corresponding directories to the manual page
+file search path. Thus, with the proper use of
+.BR MANPATH_MAP ,
+when you issue the command
+.BR "man xyz" ,
+you get a manual page for the program that would run if you issued the
+command
+.BR xyz .
+.PP
+In addition, for each directory in the command search path (we'll call
+it a "command directory") for which you do
+.I not
+have a
+.B MANPATH_MAP
+statement,
+.B man
+automatically looks for a manual page directory "nearby"
+namely as a subdirectory in the command directory itself or
+in the parent directory of the command directory.
+.PP
+You can disable the automatic "nearby" searches by including a
+.B NOAUTOPATH
+statement in
+.BR /usr/share/misc/man.conf .
+.PP
+In each directory in the search path as described above,
+.B man
+searches for a file named
+.IB topic . section\fR,
+with an optional suffix on the section number and
+possibly a compression suffix.
+If it doesn't find such a file, it then looks in any subdirectories
+named
+.BI man N
+or
+.BI cat N
+where
+.I N
+is the manual section number.
+If the file is in a
+.BI cat N
+subdirectory,
+.B man
+assumes it is a formatted manual page file (cat page). Otherwise,
+.B man
+assumes it is unformatted. In either case, if the filename has a
+known compression suffix (like
+.BR .gz ),
+.B man
+assumes it is gzipped.
+.PP
+If you want to see where (or if)
+.B man
+would find the manual page for a particular topic, use the
+.BR "--path " ( -w )
+option.
+
+.SH ENVIRONMENT
+.TP
+.B MANPATH
+If
+.B MANPATH
+is set,
+.B man
+uses it as the path to search for manual page files. It overrides the
+configuration file and the automatic search path, but is overridden by
+the
+.B -M
+invocation option. See
+.BR "SEARCH PATH FOR MANUAL PAGES" .
+.TP
+.B MANPL
+If
+.B MANPL
+is set, its value is used as the display page length.
+Otherwise, the entire man page will occupy one (long) page.
+.TP
+.B MANROFFSEQ
+If
+.B MANROFFSEQ
+is set, its value is used to determine the set of preprocessors run
+before running
+.B nroff
+or
+.BR troff .
+By default, pages are passed through
+the tbl preprocessor before
+.BR nroff .
+.TP
+.B MANSECT
+If
+.B MANSECT
+is set, its value is used to determine which manual sections to search.
+.TP
+.B MANWIDTH
+If
+.B MANWIDTH
+is set, its value is used as the width manpages should be displayed.
+Otherwise the pages may be displayed over the whole width of your
+screen.
+.TP
+.B MANPAGER
+If
+.B MANPAGER
+is set, its value is used as the name of the program to use to display
+the man page. If not, then
+.B PAGER
+is used. If that has no value either,
+.B /bin/less -is
+is used.
+.TP
+.B BROWSER
+The name of a browser to use for displaying HTML manual pages. If
+it is not set, /bin/less -is is used.
+.TP
+.B HTMLPAGER
+The command to use for rendering HTML manual pages as text. If
+it is not set, /bin/cat is used.
+.TP
+.B LANG
+If
+.B LANG
+is set, its value defines the name of the subdirectory where man
+first looks for man pages. Thus, the command `LANG=dk man 1 foo'
+will cause man to look for the foo man page in .../dk/man1/foo.1,
+and if it cannot find such a file, then in .../man1/foo.1,
+where ... is a directory on the search path.
+.TP
+.B "NLSPATH, LC_MESSAGES, LANG"
+The environment variables
+.B NLSPATH
+and
+.B LC_MESSAGES
+(or
+.B LANG
+when the latter does not exist)
+play a role in locating the message catalog.
+(But the English messages are compiled in, and for English no catalog
+is required.)
+Note that programs like
+.BR col(1)
+called by man also use e.g. LC_CTYPE.
+.TP
+.B PATH
+.B PATH
+helps determine the search path for manual page files. See
+.BR "SEARCH PATH FOR MANUAL PAGES" .
+.TP
+.B SYSTEM
+.B SYSTEM
+is used to get the default alternate system name (for use
+with the
+.B \-m
+option).
+.SH BUGS
+The
+.B \-t
+option only works if a troff-like program is installed.
+.br
+If you see blinking \e255 or <AD> instead of hyphens,
+put `LESSCHARSET=latin1' in your environment.
+.SH TIPS
+If you add the line
+
+ (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
+
+to your
+.IR .emacs
+file, then hitting F1 will give you the man page for the library call
+at the current cursor position.
+.LP
+To get a plain text version of a man page, without backspaces
+and underscores, try
+
+ # man foo | col -b > foo.mantxt
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with
+versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+apropos(1), whatis(1), less(1), groff(1), man.conf(5).
diff --git a/man/en/man.conf.5 b/man/en/man.conf.5
new file mode 100644
index 0000000..45c33ca
--- /dev/null
+++ b/man/en/man.conf.5
@@ -0,0 +1,50 @@
+.\"
+.\" Generated automatically from man.conf.5.in by the
+.\" configure script.
+.\"
+.\" @(#)man.conf
+.TH MAN.CONF 5 "September 19, 2005"
+.SH NAME
+man.conf \- configuration data for man
+.SH DESCRIPTION
+.LP
+This file is read by
+.BR man (1)
+and contains (a) information on how to construct the search path for man,
+(b) full path names for various programs like nroff, eqn, tbl etc. used by man,
+and (c) a list with uncompressors for files with a given extension.
+An alternative version of this file can be specified with
+.LP
+.RS
+man -C private_man.conf ...
+.RE
+.LP
+The command names may be provided with options.
+Useful options to nroff can be found in grotty(1).
+For example, instead of the default line
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1
+.fi
+.RE
+.LP
+one may write
+.LP
+.RS
+.nf
+NROFF /usr/bin/groff -mandoc -Tlatin1 -P-u -P-b
+.fi
+.RE
+.LP
+in order to suppress underlining and overstriking.
+.SH FILES
+.I "/usr/share/misc/man.conf"
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+col(1), (g)eqn(1), (g)pic(1), groff(1), grotty(1), (g)refer(1), (g)tbl(1),
+less(1), man (1) and compress(1), gzip(1).
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@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@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@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.1 b/man/en/whatis.1
new file mode 100644
index 0000000..3c331be
--- /dev/null
+++ b/man/en/whatis.1
@@ -0,0 +1,38 @@
+.\"
+.\" Generated automatically from whatis.1.in by the
+.\" configure script.
+.\"
+.\" Man page for whatis
+.\"
+.\" Copyright (c) 1990, 1991, John W. Eaton.
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the README file that comes with the man 1.0
+.\" distribution.
+.\"
+.\" John W. Eaton
+.\" jwe@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.TH whatis 1 "September 19, 2005"
+.LO 1
+.SH NAME
+whatis \- search the whatis database for complete words.
+.SH SYNOPSIS
+.BI whatis
+keyword ...
+.SH DESCRIPTION
+whatis searches a set of database files containing short descriptions
+of system commands for keywords and displays the result on the
+standard output. Only complete word matches are displayed.
+
+The whatis database is created using the command /usr/sbin/makewhatis.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+apropos(1), man(1).
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@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@.
+.SH AUTHOR
+John W. Eaton was the original author of
+.BR "man" .
+Zeyd M. Ben-Halim released man 1.2, and Andries Brouwer followed up with versions 1.3 thru 1.5p.
+Federico Lucifredi <flucifredi@acm.org> is the current maintainer.
+.SH "SEE ALSO"
+apropos(1), man(1).
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@f2219.n293.z2.fidonet.org>
+Inspiradas de las páginas portuguesas de Vitor Duarte <vad@fct.unl.pt>
+
+Fecha: Fri May 24 02:43:10 MET DST 1996
+
+Actualización de Benjamín Albiñana <benalb@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@f2219.n293.z2.fidonet.org>
+.\"
+.\" Traducción actualizada por Benjamín Albiñana <benalb@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@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@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@pluto.linux.it>
+.\"
+.\" Traducido por Benjamín Albiñana <benalb@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@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@f2219.n293.z2.fidonet.org>
+.\"
+.\" Traducción actualizada por Benjamín Albiñana <benalb@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@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@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@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@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@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@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@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@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@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@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@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@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@clinet.fi)
+.\" Proofread by Raimo Koski (rkoski@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@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@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@.
+.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@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@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@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@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@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@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@.
+.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@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@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@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
+@makewhatis@.
+
+.SH AUTEUR
+John W. Eaton est l'auteur historique de
+.BR man .
+Federico Lucifredi <flucifredi@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@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela@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@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@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@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" 9. studenog 1998. preveo Matej Vela <mvela@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@.
+.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@maya.dei.unipd.it
+.\" Luglio 1996
+.\" Aggiornamento alla versione 1.6d di Giulio Daprelà <giulio@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@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@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@pluto.linux.it>
+.\" Traduzione italiana del medesimo
+.\" Aggiornamento alla versione 1.6d di Giulio Daprelà <giulio@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@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@maya.dei.unipd.it
+.\" Luglio 1996
+.\" Correzioni stilistiche di Daniele Giacomini <daniele@evo.it>
+.\" Gennaio 1999
+.\" Aggiornamento alla versione 1.6d di Giulio Daprelà <giulio@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@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@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@maya.dei.unipd.it
+.\" Luglio 1996
+.\" Correzioni stilistiche di Daniele Giacomini <daniele@evo.it>
+.\" Gennaio 1999
+.\" Aggiornamento a 1.5g di Ottavio Rizzo <rizzo@pluto.linux.it>
+.\" Aggiornamento alla versione 1.6d di Giulio Daprelà <giulio@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@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@maya.dei.unipd.it
+.\" Luglio 1996
+.\" Aggiornamento alla versione 1.6d di Giulio Daprelà <giulio@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@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@.
+.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@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@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@sainet.or.jp>
+.\"
+.\" Modified Thu Jan 29 01:53:11 JST 1998
+.\" by HANATAKA Shinya <hanataka@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@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@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@sainet.or.jp>
+.\"
+.\" Modified Thu Jan 29 01:52:36 JST 1998
+.\" by HANATAKA Shinya <hanataka@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@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@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@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@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@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@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@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@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@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
+@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
+@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@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@.
+.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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" T³umaczenie: 950322 Rafa³ Maszkowski <rzm@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@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@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@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@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@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" T³umaczenie - 950322 Rafa³ Maszkowski <rzm@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@.
+.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@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@fct.unl.pt Tue Jun 21 14:15:01 1994
+#To: Andries.Brouwer@cwi.nl
+#Subject: portuguese man
+#From: Vitor Duarte <vad@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@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@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
+@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@. 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@.
+.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@.
+.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@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@.
+.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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft@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@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@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@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@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@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@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@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@gazdã "mailto:nume@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@che.utexas.edu
+.\" Department of Chemical Engineering
+.\" The University of Texas at Austin
+.\" Austin, Texas 78712
+.\"
+.\" Traducere de Ovidiu Constantin <ovidiu.soft@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@.
+.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@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@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@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@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
+@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@.
+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
+@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@.
+.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@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@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@.
+.SH "GLEJTE TUDI"
+apropos(1), man(1).
diff --git a/man2html/Makefile b/man2html/Makefile
new file mode 100644
index 0000000..ed1b981
--- /dev/null
+++ b/man2html/Makefile
@@ -0,0 +1,70 @@
+#
+# Generated automatically from Makefile.in by the
+# configure script.
+#
+CC = gcc -O
+CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
+OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
+EXEEXT =
+bindir = $(DESTDIR)$(PREFIX)/usr/bin
+mandir = $(DESTDIR)$(PREFIX)/usr/share/man
+vardir = $(DESTDIR)$(PREFIX)/var
+httpdir = $(DESTDIR)$(PREFIX)/home/httpd
+cgiowner = nobody
+cgigroup = nobody
+
+all: man2html$(EXEEXT) hman
+
+man2html$(EXEEXT): $(OBJECTS)
+ $(CC) $(LDFLAGS) -o man2html$(EXEEXT) $(OBJECTS)
+
+# man2html: ../src/version.h
+
+# This installs the man2html utility
+install: man2html$(EXEEXT)
+ mkdir -p $(bindir)
+ install -m 755 man2html$(EXEEXT) $(bindir)
+ mkdir -p $(mandir)/man1
+ install -m 644 man2html.1 $(mandir)/man1/man2html.1
+
+install-scripts: install-man-scripts install-glimpse-stuff install-hman
+
+# These are the scripts that allow pointing a browser at
+# http://localhost/cgi-bin/man/man2html
+# to work.
+install-man-scripts:
+ mkdir -p $(httpdir)/cgi-bin/man
+ mkdir -p $(httpdir)/cgi-aux/man
+ install -m 755 scripts/cgi-bin/man/* $(httpdir)/cgi-bin/man
+ install -m 644 scripts/cgi-aux/man/* $(httpdir)/cgi-aux/man
+ install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html
+# (aux was renamed to cgi-aux since aux causes problems under DOS)
+
+# If you have installed glimpse, and have compressed man pages,
+# then perhaps you also want these filters.
+install-glimpse-stuff:
+ install -m 644 glimpse_filters $(vardir)/man2html/.glimpse_filters
+
+# In order not to have to type a long command like
+# netscape http://localhost/cgi-bin/man/man2html?section+topic
+# or
+# lynx lynxcgi:/home/httpd/cgi-bin/man/man2html?section+topic
+# it is convenient to have some shell script as a wrapper.
+# The script hman can be aliased to man. It uses an environment
+# variable MANHTMLPAGER to find out which browser you use, and
+# you can set MANHTMLHOST if the pages are not on localhost.
+hman: hman.sh
+ rm -f hman
+ sed -e 's,%version%,man-1.6g,' hman.sh > hman
+
+install-hman: hman
+ install -m 555 hman $(bindir)/hman
+ install -m 644 hman.1 $(mandir)/man1/hman.1
+
+clean:
+ rm -f core hman man2html$(EXEEXT) $(OBJECTS) *~
+
+spotless: clean
+ rm -f Makefile
+
+$(OBJECTS): defs.h
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.@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%,@version@,' hman.sh > hman
+
+install-hman: hman
+ install -m 555 hman $(bindir)/hman
+ install -m 644 hman.1 $(mandir)/man1/hman.@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@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 &amp; 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>&gt;", 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 b/man2html/hman
new file mode 100644
index 0000000..9426c0d
--- /dev/null
+++ b/man2html/hman
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# hman - interface to the man2html scripts
+#
+# Michael Hamilton <michael@actrix.gen.nz>, Apr 1996
+# Andries Brouwer <aeb@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 man-1.6g
+#
+
+if [ x"$1" = x"-v" -o x"$1" = x"-V" ]; then
+ echo "`basename $0` from man-1.6g"
+ 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/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@actrix.gen.nz>, Apr 1996
+# Andries Brouwer <aeb@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@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@host "mailto:name@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@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@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@host "mailto:name@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@pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni@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@pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni@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@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@host "mailto:name@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@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@host "mailto:name@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@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..b37eef6
--- /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@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@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@host -> mailto:name@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&gt;");
+ 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&gt;");
+ 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'): 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="&nbsp;";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="&lt;";curpos++; break;
+ case '>': h="&gt;";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("&nbsp;");
+ 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("&nbsp;");
+ 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 '&nbsp;' 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);
+ /* &nbsp; for mosaic users */
+ if (mode) out_html("\">&nbsp;</A>\n<H3>");
+ else out_html("\">&nbsp;</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&amp;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("&nbsp;");
+ 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("&nbsp;"); 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) {
+ /* &nbsp; for mosaic users */
+ printf("<HR>\n<A NAME=\"index\">&nbsp;</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@actrix.gen.nz">
+Michael Hamilton</A>.
+This version is from man-1.6g maintained by <A HREF="mailto:flucifredi@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@cs.arizona.edu">
+glimpse@cs.arizona.edu</A>
+<P>
+The Manual Page text search interface was created for Linux by
+<A HREF="mailto:michael@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>&lt;</B>',
+
+`<B>&gt;</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 &lt;&gt; must match the text exactly even
+if the match is with errors. For example, &lt;mathemat&gt;ics matches
+mathematical with one error (replacing the last s with an a), but
+mathe&lt;matics&gt; 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, &quot;glimpse ab.de&quot; will match abcde, but &quot;glimpse ab\.de&quot;
+will not, and &quot;glimpse ab*de&quot; will not match ab*de, but
+&quot;glimpse ab\*de&quot; 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 &quot;ATT&quot;, it will look
+at the index for &quot;att&quot;. Unless you use -w to match the whole word,
+glimpse may have to search all files containing, for example, &quot;Seattle&quot;
+which has &quot;att&quot; 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 &gt; 64.
+<A NAME="lbAQ">&nbsp;</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@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@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@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@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("&", "\&amp;", 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, "&#174;", 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, "&#181;", 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, "&#177;", NULL },
+ { V('1','2'), 1, "&#189;", NULL },
+ { V('1','4'), 1, "&#188;", NULL },
+ { V('3','4'), 1, "&#190;", NULL },
+ { V('F','i'), 3, "ffi", NULL },
+ { V('F','l'), 3, "ffl", NULL },
+ { V('a','a'), 1, "&#180;", 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, "&#169;", NULL },
+ { V('c','t'), 1, "&#162;", NULL },
+ { V('d','e'), 1, "&#176;", NULL },
+ { V('d','g'), 1, "+", NULL }, /* dagger */
+ { V('d','i'), 1, "&#247;", NULL },
+ { V('e','m'), 3, "---", NULL }, /* em dash */
+ { V('e','n'), 1, "-", NULL }, /* en dash */
+ { V('e','q'), 1, "=", NULL },
+ { V('e','s'), 1, "&#216;", NULL },
+ { V('f','f'), 2, "ff", NULL },
+ { V('f','i'), 2, "fi", NULL },
+ { V('f','l'), 2, "fl", NULL },
+ { V('f','m'), 1, "&#180;", NULL },
+ { V('g','a'), 1, "`", NULL },
+ { V('h','y'), 1, "-", NULL },
+ { V('l','c'), 2, "|&#175;", 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, "&#215;", NULL },
+ { V('n','o'), 1, "&#172;", NULL },
+ { V('o','r'), 1, "|", NULL },
+ { V('p','d'), 1, "d", NULL }, /* partial derivative */
+ { V('p','l'), 1, "+", NULL },
+ { V('r','c'), 2, "&#175;|", NULL },
+ { V('r','f'), 2, "_|", NULL },
+ { V('r','g'), 1, "&#174;", NULL },
+ { V('r','k'), 1, "<FONT SIZE=\"+2\">}</FONT>", NULL },
+ { V('r','n'), 1, "&#175;", NULL },
+ { V('r','u'), 1, "_", NULL },
+ { V('s','c'), 1, "&#167;", 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, "&gt;", NULL },
+ { V('<','='), 1, "&lt;", 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@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@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@ida.org)
+.\"
+.\" Traduzione da man-1.6d di Giulio Daprelà <giulio@pluto.it>
+.\" Revisione a cura di Vieri Giugni <v.giugni@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@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@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@cwi.nl>; Sat, 16 Nov 1996 09:32:53 +0100
+Received: (from bryanh@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@giraffe.giraffe.netgate.net>
+From: bryanh@giraffe.netgate.net (Bryan Henderson)
+To: Andries.Brouwer@cwi.nl
+In-Reply-To: <9611151043.AA01606=aeb@zeus.cwi.nl> (Andries.Brouwer@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@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@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@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@ida.org) was the original author of
+.BR "manlint" .
+Federico Lucifredi <flucifredi@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@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 b/src/Makefile
new file mode 100644
index 0000000..c68bd77
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,124 @@
+#
+# Generated automatically from Makefile.in by the
+# configure script.
+#
+#
+# Master Makefile for man, apropos, whatis, and makewhatis
+#
+# Copyright (c) 1990, 1991, John W. Eaton.
+# Copyright (c) 1994-2001, Andries E. Brouwer
+#
+# You may distribute under the terms of the GNU General Public
+# License as specified in the README file that comes with the man 1.0
+# distribution.
+#
+# various changes - aeb, March 1994
+# use of catalogs - aeb, June 1994
+
+CC = gcc -O
+BUILD_CC = gcc -O
+INSTALL = install
+EXEEXT =
+
+pager = /bin/less -is
+
+DEFS = -DSTDC_HEADERS -DTERMIOS_HEADER -DPOSIX -DDO_COMPRESS
+CWARN = -Wall -Wstrict-prototypes -Wmissing-prototypes
+CWARNNP = -Wall
+
+.c.o:
+ $(CC) -c $(CWARN) $(CFLAGS) -I. $(DEFS) $<
+
+# LDFLAGS = -g
+LDFLAGS ?= -s
+
+LIBOBJS =
+
+all: man$(EXEEXT) man.conf apropos whatis 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%,man-1.6g,' \
+ -e 's,%manpathoption%,--path,' \
+ apropos.sh > apropos
+ chmod +x apropos
+
+whatis: apropos.sh Makefile
+ rm -f whatis
+ sed -e 's,%apropos_or_whatis%,whatis,' \
+ -e 's,%version%,man-1.6g,' \
+ -e 's,%manpathoption%,--path,' \
+ apropos.sh > whatis
+ chmod +x whatis
+
+makewhatis: makewhatis.sh Makefile
+ rm -f makewhatis
+ cp makewhatis.sh makewhatis.in
+ ../conf_script makewhatis
+ chmod +x makewhatis
+
+MANCONFIG=$(DESTDIR)$(PREFIX)/usr/share/misc/man.conf
+
+install: all apropos whatis makewhatis
+ mkdir -p $(DESTDIR)$(PREFIX)/usr/bin
+ $(INSTALL) -c man$(EXEEXT) $(DESTDIR)$(PREFIX)/usr/bin/man
+ $(INSTALL) -c -m 755 apropos $(DESTDIR)$(PREFIX)/usr/bin/apropos
+ $(INSTALL) -c -m 755 whatis $(DESTDIR)$(PREFIX)/usr/bin/whatis
+ $(INSTALL) -c -m 755 man2dvi $(DESTDIR)$(PREFIX)/usr/bin/man2dvi
+ mkdir -p $(DESTDIR)$(PREFIX)/usr/sbin
+ $(INSTALL) -c -m 754 makewhatis $(DESTDIR)$(PREFIX)/usr/sbin/makewhatis
+ mkdir -p $(DESTDIR)$(PREFIX)/usr/share/misc
+ 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/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%,@version@,' \
+ -e 's,%manpathoption%,@manpathoption@,' \
+ apropos.sh > apropos
+ chmod +x apropos
+
+whatis: apropos.sh Makefile
+ rm -f whatis
+ sed -e 's,%apropos_or_whatis%,whatis,' \
+ -e 's,%version%,@version@,' \
+ -e 's,%manpathoption%,@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 b/src/apropos
new file mode 100755
index 0000000..a85968a
--- /dev/null
+++ b/src/apropos
@@ -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 man-1.6g)
+#
+# keep old PATH - 000323 - Bryan Henderson
+# also look in /var/cache/man - 030801 - aeb
+
+program=`basename $0`
+
+# When man pages in your favorite locale look to grep like binary files
+# (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
+aproposgrepopt1='i'
+aproposgrepopt2=''
+whatisgrepopt1='iw'
+whatisgrepopt2='^'
+grepopt1=$aproposgrepopt1
+grepopt2=$aproposgrepopt2
+
+if [ $# = 0 ]
+then
+ echo "usage: $program keyword ..."
+ exit 1
+fi
+
+manpath=`man --path | tr : '\040'`
+
+if [ "$manpath" = "" ]
+then
+ echo "$program: manpath is null"
+ exit 1
+fi
+
+args=
+for arg in $*; do
+ case $arg in
+ --version|-V|-v)
+ echo "$program from man-1.6g"
+ exit 0
+ ;;
+ --help|-h)
+ echo "usage: $program keyword ..."
+ exit 0
+ ;;
+ -*)
+ echo "$program: $arg: unknown option"
+ exit 1
+ ;;
+ *)
+ args="$args $arg"
+ esac
+done
+
+while [ "$1" != "" ]
+do
+ found=0
+ for d in /var/cache/man $manpath /usr/lib
+ do
+ if [ -f $d/whatis ]
+ then
+ if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
+ then
+ found=1
+# Some people are satisfied with a single occurrence
+# But it is better to give all
+# break
+ fi
+ fi
+ done
+
+ if [ $found = 0 ]
+ then
+ echo "$1: nothing appropriate"
+ fi
+
+ shift
+done
+
+exit
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@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/gripedefs.h b/src/gripedefs.h
new file mode 100644
index 0000000..57aa898
--- /dev/null
+++ b/src/gripedefs.h
@@ -0,0 +1,87 @@
+#define BAD_CONFIG_FILE 1
+#define CONFIG_OPEN_ERROR 2
+#define PARSE_ERROR_IN_CONFIG 3
+#define INCOMPAT 4
+#define NO_ALTERNATE 5
+#define NO_COMPRESS 6
+#define NO_NAME_FROM_SECTION 7
+#define NO_NAME_NO_SECTION 8
+#define NO_SUCH_ENTRY_IN_SECTION 9
+#define NO_SUCH_ENTRY 10
+#define PAGER_IS 11
+#define SYSTEM_FAILED 12
+#define VERSION 13
+#define OUT_OF_MEMORY 14
+#define ROFF_CMD_FROM_FILE_ERROR 15
+#define MANROFFSEQ_ERROR 16
+#define ROFF_CMD_FROM_COMMANDLINE_ERROR 17
+#define UNRECOGNIZED_LINE 18
+#define GETVAL_ERROR 19
+#define FOUND_MANDIR 20
+#define FOUND_MAP 21
+#define FOUND_CATDIR 22
+#define LINE_TOO_LONG 23
+#define SECTION 24
+#define UNLINKED 25
+#define GLOBBING 26
+#define EXPANSION_FAILED 27
+#define OPEN_ERROR 28
+#define READ_ERROR 29
+#define FOUND_EQN 30
+#define FOUND_GRAP 31
+#define FOUND_PIC 32
+#define FOUND_TBL 33
+#define FOUND_VGRIND 34
+#define FOUND_REFER 35
+#define ROFF_FROM_COMMAND_LINE 36
+#define ROFF_FROM_FILE 37
+#define ROFF_FROM_ENV 38
+#define USING_DEFAULT 39
+#define PLEASE_WAIT 40
+#define CHANGED_MODE 41
+#define CAT_OPEN_ERROR 42
+#define PROPOSED_CATFILE 43
+#define IS_NEWER_RESULT 44
+#define TRYING_SECTION 45
+#define SEARCHING 46
+#define ALREADY_IN_MANPATH 47
+#define CANNOT_STAT 48
+#define IS_NO_DIR 49
+#define ADDING_TO_MANPATH 50
+#define PATH_DIR 51
+#define IS_IN_CONFIG 52
+#define IS_NOT_IN_CONFIG 53
+#define MAN_NEARBY 54
+#define NO_MAN_NEARBY 55
+#define ADDING_MANDIRS 56
+#define CATNAME_IS 57
+#define NO_EXEC 58
+#define USAGE1 59
+#define USAGE2 60
+#define USAGE3 61
+#define USAGE4 62
+#define USAGE5 63
+#define USAGE6 64
+#define USAGE7 65
+#define USAGE8 66
+#define USER_CANNOT_OPEN_CAT 67
+#define USER_CAN_OPEN_CAT 68
+#define CANNOT_FORK 69
+#define WAIT_FAILED 70
+#define GOT_WRONG_PID 71
+#define CHILD_TERMINATED_ABNORMALLY 72
+#define IDENTICAL 73
+#define MAN_FOUND 74
+#define NO_TROFF 75
+#define NO_CAT_FOR_NONSTD_LL 76
+#define BROWSER_IS 77
+#define HTMLPAGER_IS 78
+#define FOUND_FILE 79
+#define CALLTRACE1 80
+#define CALLTRACE2 81
+#define NO_MATCH 82
+#define GLOB_FOR_FILE 83
+#define CALLTRACE3 84
+#define ABOUT_TO_GLOB 85
+
+#define MAXMSG 85
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 b/src/makemsg
new file mode 100755
index 0000000..7c1893c
--- /dev/null
+++ b/src/makemsg
Binary files differ
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 b/src/makewhatis
new file mode 100755
index 0000000..639d488
--- /dev/null
+++ b/src/makewhatis
@@ -0,0 +1,460 @@
+#!/bin/sh
+# Generated automatically from makewhatis.in by the
+# configure script.
+#
+#!/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@cs.unc.edu
+# Revised: Sat Mar 23 17:56:18 1996 by micheal@actrix.gen.nz
+# Copyright 1992, 1993, 1994 Rickard E. Faith (faith@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@cs.unc.edu) applied changes
+# based on Mitchum DSouza (mitchum.dsouza@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@ksu.ksu.edu).
+# Many minor changes.
+# The -s option is undocumented, and may well disappear again.
+#
+# Sat Mar 23 1996: Michael Hamilton (michael@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@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 man-1.6g)
+
+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=/usr/bin/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 }' /usr/share/misc/man.conf`
+ if [ x"$sections" = x ]; then
+ sections="1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o"
+ 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 man-1.6g"
+ 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/makewhatis.in b/src/makewhatis.in
new file mode 100644
index 0000000..5665feb
--- /dev/null
+++ b/src/makewhatis.in
@@ -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@cs.unc.edu
+# Revised: Sat Mar 23 17:56:18 1996 by micheal@actrix.gen.nz
+# Copyright 1992, 1993, 1994 Rickard E. Faith (faith@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@cs.unc.edu) applied changes
+# based on Mitchum DSouza (mitchum.dsouza@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@ksu.ksu.edu).
+# Many minor changes.
+# The -s option is undocumented, and may well disappear again.
+#
+# Sat Mar 23 1996: Michael Hamilton (michael@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@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/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@cs.unc.edu
+# Revised: Sat Mar 23 17:56:18 1996 by micheal@actrix.gen.nz
+# Copyright 1992, 1993, 1994 Rickard E. Faith (faith@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@cs.unc.edu) applied changes
+# based on Mitchum DSouza (mitchum.dsouza@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@ksu.ksu.edu).
+# Many minor changes.
+# The -s option is undocumented, and may well disappear again.
+#
+# Sat Mar 23 1996: Michael Hamilton (michael@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@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@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@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@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@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 b/src/man.conf
new file mode 100644
index 0000000..88073e4
--- /dev/null
+++ b/src/man.conf
@@ -0,0 +1,144 @@
+#
+# Generated automatically from man.conf.in by the
+# configure script.
+#
+# man.conf from man-1.6g
+#
+# For more information about this file, see the man pages man(1)
+# and man.conf(5).
+#
+# This file is read by man to configure the default manpath (also used
+# when MANPATH contains an empty substring), to find out where the cat
+# pages corresponding to given man pages should be stored,
+# and to map each PATH element to a manpath element.
+# It may also record the pathname of the man binary. [This is unused.]
+# The format is:
+#
+# MANBIN pathname
+# MANPATH manpath_element [corresponding_catdir]
+# MANPATH_MAP path_element manpath_element
+#
+# If no catdir is given, it is assumed to be equal to the mandir
+# (so that this dir has both man1 etc. and cat1 etc. subdirs).
+# This is the traditional Unix setup.
+# Certain versions of the FSSTND recommend putting formatted versions
+# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
+# The keyword FSSTND will cause this behaviour.
+# Certain versions of the FHS recommend putting formatted versions of
+# /usr/.../share/man/[locale/]manx/page.x into
+# /var/cache/man/.../[locale/]catx/page.x.
+# The keyword FHS will cause this behaviour (and overrides FSSTND).
+# Explicitly given catdirs override.
+#
+# FSSTND
+FHS
+#
+# This file is also read by man in order to find how to call nroff, less, etc.,
+# and to determine the correspondence between extensions and decompressors.
+#
+# MANBIN /usr/local/bin/man
+#
+# Every automatically generated MANPATH includes these fields
+#
+MANPATH /usr/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 /usr/bin/groff -Tps -mandoc
+NROFF /usr/bin/nroff -Tlatin1 -mandoc
+JNROFF /usr/bin/groff -Tnippon -mandocj
+EQN /usr/bin/geqn -Tps
+NEQN /usr/bin/geqn -Tlatin1
+JNEQN /usr/bin/geqn -Tnippon
+TBL /usr/bin/gtbl
+# COL /usr/bin/col
+REFER
+PIC /usr/bin/gpic
+VGRIND
+GRAP
+PAGER /bin/less -is
+BROWSER /bin/less -is
+HTMLPAGER /bin/cat
+CAT /bin/cat
+#
+# The command "man -a xyzzy" will show all man pages for xyzzy.
+# When CMP is defined man will try to avoid showing the same
+# text twice. (But compressed pages compare unequal.)
+#
+CMP /usr/bin/cmp -s
+#
+# Compress cat pages
+#
+COMPRESS /usr/bin/xz
+COMPRESS_EXT .xz
+#
+# Default manual sections (and order) to search if -S is not specified
+# and the MANSECT environment variable is not set.
+#
+MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
+#
+# Default options to use when man is invoked without options
+# This is mainly for the benefit of those that think -a should be the default
+# Note that some systems have /usr/man/allman, causing pages to be shown twice.
+#
+#MANDEFOPTIONS -a
+#
+# Decompress with given decompressor when input file has given extension
+# The command given must act as a filter.
+#
+.gz /bin/gunzip -c
+.bz2 /bin/bzip2 -c -d
+.lzma /usr/bin/unlzma -c -d
+.z
+.Z /bin/zcat
+.F
+.Y
+.xz /usr/bin/unxz -c
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.
+#
+@fsstnd@FSSTND
+@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@
+@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@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@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/msg.c b/src/msg.c
new file mode 100644
index 0000000..874e22f
--- /dev/null
+++ b/src/msg.c
@@ -0,0 +1,106 @@
+char *msg[] = {
+ "",
+/* 1 */ "unable to make sense of the file %s\n",
+/* 2 */ "Warning: cannot open configuration file %s\n",
+/* 3 */ "Error parsing config file\n",
+/* 4 */ "incompatible options %s and %s\n",
+/* 5 */ "Sorry - no support for alternate systems compiled in\n",
+/* 6 */ "Man was compiled with automatic cat page compression,\n\
+but the configuration file does not define COMPRESS.\n",
+/* 7 */ "What manual page do you want from section %s?\n",
+/* 8 */ "What manual page do you want?\n",
+/* 9 */ "No entry for %s in section %s of the manual\n",
+/* 10 */ "No manual entry for %s\n",
+/* 11 */ "\nusing %s as pager\n",
+/* 12 */ "Error executing formatting or display command.\n\
+System command %s exited with status %d.\n",
+/* 13 */ "%s, version %s\n\n",
+/* 14 */ "Out of memory - can't malloc %d bytes\n",
+/* 15 */ "Error parsing *roff command from file %s\n",
+/* 16 */ "Error parsing MANROFFSEQ. Using system defaults.\n",
+/* 17 */ "Error parsing *roff command from command line.\n",
+/* 18 */ "Unrecognized line in config file (ignored)\n%s\n",
+/* 19 */ "man-config.c: internal error: string %s not found\n",
+/* 20 */ "found man directory %s\n",
+/* 21 */ "found manpath map %s --> %s\n",
+/* 22 */ "corresponding catdir is %s\n",
+/* 23 */ "Line too long in config file\n",
+/* 24 */ "\nsection: %s\n",
+/* 25 */ "unlinked %s\n",
+/* 26 */ "globbing %s\n",
+/* 27 */ "Attempt [%s] to expand man page failed\n",
+/* 28 */ "Cannot open man page %s\n",
+/* 29 */ "Error reading man page %s\n",
+/* 30 */ "found eqn(1) directive\n",
+/* 31 */ "found grap(1) directive\n",
+/* 32 */ "found pic(1) directive\n",
+/* 33 */ "found tbl(1) directive\n",
+/* 34 */ "found vgrind(1) directive\n",
+/* 35 */ "found refer(1) directive\n",
+/* 36 */ "parsing directive from command line\n",
+/* 37 */ "parsing directive from file %s\n",
+/* 38 */ "parsing directive from environment\n",
+/* 39 */ "using default preprocessor sequence\n",
+/* 40 */ "Formatting page, please wait...\n",
+/* 41 */ "changed mode of %s to %o\n",
+/* 42 */ "Couldn't open %s for writing.\n",
+/* 43 */ "will try to write %s if needed\n",
+/* 44 */ "status from is_newer() = %d\n",
+/* 45 */ "trying section %s\n",
+/* 46 */ "\nsearching in %s\n",
+/* 47 */ "but %s is already in the manpath\n",
+/* 48 */ "Warning: cannot stat file %s!\n",
+/* 49 */ "Warning: %s isn't a directory!\n",
+/* 50 */ "adding %s to manpath\n",
+/* 51 */ "\npath directory %s ",
+/* 52 */ "is in the config file\n",
+/* 53 */ "is not in the config file\n",
+/* 54 */ "but there is a man directory nearby\n",
+/* 55 */ "and we found no man directory nearby\n",
+/* 56 */ "\nadding mandatory man directories\n\n",
+/* 57 */ "cat_name in convert_to_cat () is: %s\n",
+/* 58 */ "\nnot executing command:\n %s\n",
+/* 59 */ "usage: %s [-adfhktwW] [section] [-M path] [-P pager] [-S list]\n\t",
+/* 60 */ "[-m system] ",
+/* 61 */ "[-p string] name ...\n\n",
+/* 62 */ " a : find all matching entries\n\
+ c : do not use cat file\n\
+ d : print gobs of debugging information\n\
+ D : as for -d, but also display the pages\n\
+ f : same as whatis(1)\n\
+ h : print this help message\n\
+ k : same as apropos(1)\n\
+ K : search for a string in all pages\n",
+/* 63 */ " t : use troff to format pages for printing\n",
+/* 64 */ "\
+ w : print location of man page(s) that would be displayed\n\
+ (if no name given: print directories that would be searched)\n\
+ W : as for -w, but display filenames only\n\n\
+ C file : use `file' as configuration file\n\
+ M path : set search path for manual pages to `path'\n\
+ P pager : use program `pager' to display pages\n\
+ S list : colon separated section list\n",
+/* 65 */ " m system : search for alternate system's man pages\n",
+/* 66 */ " p string : string tells which preprocessors to run\n\
+ e - [n]eqn(1) p - pic(1) t - tbl(1)\n\
+ g - grap(1) r - refer(1) v - vgrind(1)\n",
+/* 67 */ "and the real user cannot open the cat file either\n",
+/* 68 */ "but the real user can open the cat file\n",
+/* 69 */ "failed to fork off the command _%s_\n",
+/* 70 */ "error while waiting for child _%s_\n",
+/* 71 */ "very strange ..., got wrong pid while waiting for my child\n",
+/* 72 */ "fatal error: the command _%s_ terminated abnormally\n",
+/* 73 */ "Man page %s is identical to %s\n",
+/* 74 */ "Found the man page(s):\n",
+/* 75 */ "error: no TROFF command specified in %s\n",
+/* 76 */ "no cat page stored because of nonstandard line length\n",
+/* 77 */ "\nusing %s as browser\n",
+/* 78 */ "\nusing %s to dump HTML pages as text\n",
+/* 79 */ "manfile_from_sec_and_dir() found %s\n",
+/* 80 */ "manfile_from_sec_and_dir(dir=%s, sec=%s, name=%s, flags=0x%0x)\n",
+/* 81 */ "glob_for_file(dir=%s, sec=%s, name=%s, type=0x%0x, ...)\n",
+/* 82 */ "glob_for_file found no matches.\n",
+/* 83 */ "glob_for_file returns %s.\n",
+/* 84 */ "glob_for_file_ext_glob(dir=%s, sec=%s, name=%s, ext=%s, hpx=%s, glob=%d, type=0x%0x);\n",
+/* 85 */ "glob_for_file_ext_glob will expand %s\n",
+};
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 b/src/paths.h
new file mode 100644
index 0000000..723731d
--- /dev/null
+++ b/src/paths.h
@@ -0,0 +1,43 @@
+/*
+ * Generated automatically from paths.h.in by the
+ * configure script.
+ */
+/* paths.h - included in man-config.c */
+/*
+ * Define the absolute path to the configuration file and programs used.
+ * (If no configuration file is found then the preset values are used.)
+ */
+#ifndef CONFIG_FILE
+#define CONFIG_FILE "/usr/share/misc/man.conf"
+#endif
+
+static struct paths {
+ char *name;
+ char *path; /* path plus command options - never NULL */
+} paths[] = {
+ { "MANBIN", "" }, /* value unused */
+ { "APROPOS", "/usr/bin/apropos" },
+ { "WHATIS", "/usr/bin/whatis" },
+ { "TROFF", "/usr/bin/groff -Tps -mandoc" },
+ { "NROFF", "/usr/bin/nroff -Tlatin1 -mandoc" },
+ { "JNROFF", "/usr/bin/groff -Tnippon -mandocj" },
+ { "EQN", "/usr/bin/geqn -Tps" },
+ { "NEQN", "/usr/bin/geqn -Tlatin1" },
+ { "JNEQN", "/usr/bin/geqn -Tnippon" },
+ { "TBL", "/usr/bin/gtbl" },
+ { "COL", "" },
+ { "REFER", "" },
+ { "PIC", "/usr/bin/gpic" },
+ { "VGRIND", "" },
+ { "GRAP", "" },
+ { "PAGER", "/bin/less -is" },
+ { "BROWSER","/bin/less -is" },
+ { "HTMLPAGER", "/bin/cat" },
+ { "CMP", "/usr/bin/cmp -s" },
+ { "CAT", "/bin/cat" },
+ { "COMPRESS", "/usr/bin/xz" },
+ { "COMPRESS_EXT", ".xz" }, /* not a path, just a string variable */
+ { "DECOMPRESS", "/usr/bin/unxz -c" },
+ { "MANSECT", "1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o"}, /* idem */
+ { "MANDEFOPTIONS", ""} /* idem */
+};
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@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/src/version.h b/src/version.h
new file mode 100644
index 0000000..b575ffd
--- /dev/null
+++ b/src/version.h
@@ -0,0 +1 @@
+static char version[] = "1.6g";
diff --git a/src/whatis b/src/whatis
new file mode 100755
index 0000000..22da854
--- /dev/null
+++ b/src/whatis
@@ -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 man-1.6g)
+#
+# keep old PATH - 000323 - Bryan Henderson
+# also look in /var/cache/man - 030801 - aeb
+
+program=`basename $0`
+
+# When man pages in your favorite locale look to grep like binary files
+# (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
+aproposgrepopt1='i'
+aproposgrepopt2=''
+whatisgrepopt1='iw'
+whatisgrepopt2='^'
+grepopt1=$whatisgrepopt1
+grepopt2=$whatisgrepopt2
+
+if [ $# = 0 ]
+then
+ echo "usage: $program keyword ..."
+ exit 1
+fi
+
+manpath=`man --path | tr : '\040'`
+
+if [ "$manpath" = "" ]
+then
+ echo "$program: manpath is null"
+ exit 1
+fi
+
+args=
+for arg in $*; do
+ case $arg in
+ --version|-V|-v)
+ echo "$program from man-1.6g"
+ exit 0
+ ;;
+ --help|-h)
+ echo "usage: $program keyword ..."
+ exit 0
+ ;;
+ -*)
+ echo "$program: $arg: unknown option"
+ exit 1
+ ;;
+ *)
+ args="$args $arg"
+ esac
+done
+
+while [ "$1" != "" ]
+do
+ found=0
+ for d in /var/cache/man $manpath /usr/lib
+ do
+ if [ -f $d/whatis ]
+ then
+ if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
+ then
+ found=1
+# Some people are satisfied with a single occurrence
+# But it is better to give all
+# break
+ fi
+ fi
+ done
+
+ if [ $found = 0 ]
+ then
+ echo "$1: nothing appropriate"
+ fi
+
+ shift
+done
+
+exit
diff --git a/version b/version
new file mode 100644
index 0000000..4188706
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+man-1.6g