Initial commit

This commit is contained in:
Andrew Hyatt 2016-11-15 19:04:15 -08:00
commit a479d016fb
119 changed files with 17987 additions and 0 deletions

29
CMakeLists.txt Normal file
View File

@ -0,0 +1,29 @@
project(man)
cmake_minimum_required(VERSION 2.4.0)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories(${DARLING_TOP_DIRECTORY}/src/libc/include/FreeBSD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -fwrapv -fPIC -ggdb")
set(CMAKE_SHARED_LINKER_FLAGS "-nodefaultlibs -nostdlib -fPIC -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -fPIC -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
set(man_sources
src/man.c
src/manfile.c
src/manpath.c
src/man-config.c
src/man-getopt.c
src/man-iconv.c
src/to_cat.c
src/different.c
src/gripes.c
src/glob.c
src/util.c
src/msg.c
)
add_darling_executable(man ${man_sources})
target_link_libraries(man system)

339
COPYING Normal file
View File

@ -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.

76
Makefile.in Normal file
View File

@ -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

29
catopen/README Normal file
View File

@ -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.

209
catopen/catopen.c Normal file
View File

@ -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;
}

1340
configure vendored Executable file

File diff suppressed because it is too large Load Diff

61
man/Makefile.in Normal file
View File

@ -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

1
man/en.txt Normal file
View File

@ -0,0 +1 @@
english

32
man/en/apropos.man Normal file
View File

@ -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).

100
man/en/makewhatis.man Normal file
View File

@ -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, its value is assumed to be
.I \'1 2 3 4 5 6 7 8 9 n l\'
.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)

46
man/en/man.conf.man Normal file
View File

@ -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).

494
man/en/man.man Normal file
View File

@ -0,0 +1,494 @@
.\" 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 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).

34
man/en/whatis.man Normal file
View File

@ -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).

64
man2html/Makefile.in Normal file
View File

@ -0,0 +1,64 @@
CC = @CC@
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
bindir = $(DESTDIR)$(PREFIX)/usr/bin
mandir = $(DESTDIR)$(PREFIX)@mandir@
vardir = $(DESTDIR)$(PREFIX)/var
httpdir = $(DESTDIR)$(PREFIX)/home/httpd
cgiowner = nobody
cgigroup = nobody
all: man2html hman
man2html: $(OBJECTS)
$(CC) $(LDFLAGS) -o man2html $(OBJECTS)
# man2html: ../src/version.h
# This installs the man2html utility
install: man2html
install -m 755 man2html $(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 $(OBJECTS) *~
spotless: clean
rm -f Makefile
$(OBJECTS): defs.h

94
man2html/README Normal file
View File

@ -0,0 +1,94 @@
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*
--------------------------------------------------------------------------
aeb@cwi.nl, 980119

43
man2html/TODO Normal file
View File

@ -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.)
Many browsers do not handle tables well (or at all).
Arena (arena-0.98.beta3-3) fails on many constructions.

62
man2html/abbrev.c Normal file
View File

@ -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;
}

143
man2html/cgibase.c Normal file
View File

@ -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);
}

41
man2html/defs.h Normal file
View File

@ -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);

3
man2html/glimpse_filters Normal file
View File

@ -0,0 +1,3 @@
*.gz gzip -d -c
*.Z gzip -d -c

69
man2html/hman.1 Normal file
View File

@ -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

96
man2html/hman.sh Executable file
View File

@ -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

145
man2html/man2html.1 Normal file
View File

@ -0,0 +1,145 @@
'\" 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 "SEE ALSO"
.BR lynx (1),
.BR man (1)

3233
man2html/man2html.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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.6c maintained by <A HREF="mailto:flucifredi@acm.org">
Federico Lucifredi</A>.
</body>
</HTML>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,103 @@
#!/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"
;;
*)
"$MAN2HTML" "$LL" "$PAGE"
;;
esac
elif [ -r "$PAGE".gz ]
then
zcat "$PAGE".gz | "$MAN2HTML" "$LL" -D "$PAGE"
else
"$MAN2HTML" -E "Strange... Cannot find (or read) $PAGE."
fi
exit 0

View File

@ -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;
}' "$@"

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

176
man2html/strdefs.c Normal file
View File

@ -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;
}

1
misc/README Normal file
View File

@ -0,0 +1 @@
Here a contributed program to preformat man pages. Untested.

332
misc/man-preformat.c Normal file
View File

@ -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);
}

225
misc/manlint Normal file
View File

@ -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.

61
misc/manlint.1 Normal file
View File

@ -0,0 +1,61 @@
'\"
.\" (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)
.SH "SEE ALSO"
.BR man (7),
.BR mdoc (7).

34
msgs/Makefile.in Normal file
View File

@ -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 ====" ;\
./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

25
msgs/README Normal file
View File

@ -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.

3
msgs/gencat.in Normal file
View File

@ -0,0 +1,3 @@
$quote "
$set 1
1 "test for gencat\n"

2
msgs/gencat207fix.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/gencat --new $1 $2

38
msgs/inst.sh Executable file
View File

@ -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

191
msgs/mess.bg Normal file
View File

@ -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"
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"

1
msgs/mess.bg.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=cp1251

170
msgs/mess.cs Normal file
View File

@ -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"

1
msgs/mess.cs.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-2

170
msgs/mess.da Normal file
View File

@ -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"

1
msgs/mess.da.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

168
msgs/mess.de Normal file
View File

@ -0,0 +1,168 @@
BAD_CONFIG_FILE
"Die Konfigurations-Datei %s ist fehlerhaft\n"
CONFIG_OPEN_ERROR
"Warnung: Die Konfigurations-Datei %s kann nicht geöffnet werden\n"
PARSE_ERROR_IN_CONFIG
"Fehler beim Parsen der Konfigurations-Datei\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 Konfigurations-Datei fehlt die Definition\n\
von COMPRESS.\n"
NO_NAME_FROM_SECTION
"Welche Handbuch-Seite aus der Sektion %s soll angezeigt werden ?\n"
NO_NAME_NO_SECTION
"Welche Handbuch-Seite soll angezeigt werden ?\n"
NO_SUCH_ENTRY_IN_SECTION
"Keine Handbuch-Seite %s in der Sektion %s\n"
NO_SUCH_ENTRY
"Keine Handbuch-Seite für %s\n"
PAGER_IS
"\nAls Anzeige-Programm wird %s benutzt\n"
SYSTEM_FAILED
"Fehler bei der Ausführung des Formattierungs- oder Anzeige-Programms.\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 Konfigurations-Datei (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 Handbuch-Seite zu expandieren schlug fehl.\n"
OPEN_ERROR
"Die Handbuch-Seite %s kann nicht gelesen werden\n"
READ_ERROR
"Fehler beim Lesen der Handbuch-Seite %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 Kommando-Zeile\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 Handbuch-Seite 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 Funktione is_newer() = %d\n"
TRYING_SECTION
"Versuche Sektion %s\n"
SEARCHING
"\nSuche in 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 Konfigurations-Datei\n"
IS_NOT_IN_CONFIG
"ist nicht in der Konfigurations-Datei\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 Handbuch-Einträ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 Handbuch-Seite(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 Handbuch-Seiten\n\
P Pager : Verwende das Programm `Pager' um Handbuch-Seiten anzuzeigen\n\
S List : Durch Doppelpunkte getrennte Liste von Sektionen\n"
USAGE7
" m System : Suche nach alternativen Handbuch-Seiten\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
""
USER_CAN_OPEN_CAT
""
CANNOT_FORK
""
WAIT_FAILED
""
GOT_WRONG_PID
""
CHILD_TERMINATED_ABNORMALLY
""
IDENTICAL
""
MAN_FOUND
""
NO_TROFF
""
NO_CAT_FOR_NONSTD_LL
""

1
msgs/mess.de.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

171
msgs/mess.el Normal file
View File

@ -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"

1
msgs/mess.el.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-7

188
msgs/mess.en Normal file
View File

@ -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"
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"

1
msgs/mess.en.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

170
msgs/mess.es Normal file
View File

@ -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"

1
msgs/mess.es.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

170
msgs/mess.fi Normal file
View File

@ -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"

1
msgs/mess.fi.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

190
msgs/mess.fr Normal file
View File

@ -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"
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"

1
msgs/mess.fr.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

170
msgs/mess.hr Normal file
View File

@ -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"

1
msgs/mess.hr.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-2

190
msgs/mess.it Normal file
View File

@ -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"
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"

1
msgs/mess.it.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

171
msgs/mess.ja Normal file
View File

@ -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"

1
msgs/mess.ja.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=euc-jp

171
msgs/mess.ko Normal file
View File

@ -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 : 모든 페이지보다 캐릭터 라인을 검색하는 \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
"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"

1
msgs/mess.ko.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=euc-kr

170
msgs/mess.nl Normal file
View File

@ -0,0 +1,170 @@
BAD_CONFIG_FILE
"er staat onzin in het bestand %s\n"
CONFIG_OPEN_ERROR
"Waarschuwing: ik kan mijn configuratiebestand %s niet openen.\n"
PARSE_ERROR_IN_CONFIG
"Fout bij het interpreteren van het configuratiebestand.\n"
INCOMPAT
"de vlaggen %s en %s zijn onverenigbaar.\n"
NO_ALTERNATE
"Jammer - er is geen ondersteuning voor andere systemen meevertaald."
NO_COMPRESS
"Bij het vertalen van man was gevraagd om automatische compressie\n\
van cat pagina's, maar het configuratiebestand definieert COMPRESS niet.\n"
NO_NAME_FROM_SECTION
"Welke handboek blz wil je uit sectie %s?\n"
NO_NAME_NO_SECTION
"Welke handboek blz wilt u hebben?\n"
NO_SUCH_ENTRY_IN_SECTION
"Ik kan geen blz over %s in sectie %s van het handboek vinden.\n"
NO_SUCH_ENTRY
"Ik heb niets over %s, geloof ik.\n"
PAGER_IS
"\nIk zal %s als pagineer programma gebruiken.\n"
SYSTEM_FAILED
"Fout bij het uitvoeren van de formatteer- of vertoonopdracht.\n\
De exit status van %s was %d.\n"
VERSION
"%s, versie %s\n\n"
OUT_OF_MEMORY
"Geen geheugen meer - kon van malloc geen %d bytes krijgen\n"
ROFF_CMD_FROM_FILE_ERROR
"Ontleed fout in het *roff commando uit bestand %s\n"
MANROFFSEQ_ERROR
"Ontleed fout bij het lezen van MANROFFSEQ. Ik zal de standaard volgorde gebruiken.\n"
ROFF_CMD_FROM_COMMANDLINE_ERROR
"Ontleed fout in het *roff commando op de opxdrachtregel.\n"
UNRECOGNIZED_LINE
"Onbegrepen regel in het configuratiebestand (genegeerd)\n%s\n"
GETVAL_ERROR
"man-config.c: interne fout: ik kan de string %s niet vinden\n"
FOUND_MANDIR
"man directory %s gevonden\n"
FOUND_MAP
"manpad afbeelding %s --> %s gevonden\n"
FOUND_CATDIR
"het overeenkomstige catdir is %s\n"
LINE_TOO_LONG
"Te lange regel in het configuratiebestand\n"
SECTION
"\nhoofdstuk: %s\n"
UNLINKED
"%s verwijderd\n"
GLOBBING
"glob %s\n"
EXPANSION_FAILED
"Poging [%s] om de man bladzijde te decomprimeren faalde\n"
OPEN_ERROR
"Ik kan de man bladzijde %s niet openen\n"
READ_ERROR
"Fout bij het lezen van de man bladzijde %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
"ontleed aanwijzingen van de opdrachtregel\n"
ROFF_FROM_FILE
"ontleed aanwijzingen uit het bestand %s\n"
ROFF_FROM_ENV
"ontleed aanwijzingen uit de omgeving\n"
USING_DEFAULT
"gebruik de standaard preprocessor volgorde\n"
PLEASE_WAIT
"Ik ben de bladzijde aan het formatteren, even geduld a.u.b...\n"
CHANGED_MODE
"De mode van %s is gewijzigd in %o\n"
CAT_OPEN_ERROR
"Kon niet schrijven in %s.\n"
PROPOSED_CATFILE
"Ik zal indien nodig in het bestand %s schrijven\n"
IS_NEWER_RESULT
"status van is_newer() = %d\n"
TRYING_SECTION
"probeer hoofdstuk %s\n"
SEARCHING
"\nzoek in %s\n"
ALREADY_IN_MANPATH
"maar %s zit al in het zoekpad\n"
CANNOT_STAT
"Waarschuwing: stat %s faalt!\n"
IS_NO_DIR
"Waarschuwing: %s is geen directory!\n"
ADDING_TO_MANPATH
"voeg %s toe aan het zoekpad\n"
PATH_DIR
"\npad directory %s "
IS_IN_CONFIG
"is in het configuratiebestand\n"
IS_NOT_IN_CONFIG
"is niet in het configuratiebestand\n"
MAN_NEARBY
"maar er is een man directory in de buurt\n"
NO_MAN_NEARBY
"en ik zie geen man directory in de buurt\n"
ADDING_MANDIRS
"\nvoeg de standaard man directories toe\n\n"
CATNAME_IS
"cat_name in convert_to_cat () is: %s\n"
NO_EXEC
"\nIk zou de volgende opdracht uitvoeren:\n %s\n"
USAGE1
"aanroep: %s [-adfhktwW] [hoofdstuk] [-M zoekpad] [-P prog] [-S hoofdstukken]\n\t"
USAGE2
"[-m systeem] "
USAGE3
"[-p string] naam ...\n\n"
USAGE4
" a : vind alle passende bladzijden\n\
c : (her)formatteer, zelfs als een recente geformatteerde versie bestaat\n\
d : druk af wat man aan het doen is - om fouten op te sporen\n\
D : idem, maar formatteer en vertoon ook de bladzijden\n\
f : hetzelfde als whatis(1)\n\
h : druk deze hulpboodschap af\n\
k : hetzelfde als apropos(1)\n\
K : zoek een woord in alle pagina's\n"
USAGE5
" t : gebruik troff om bladzijden te formatteren (om ze af te drukken)\n"
USAGE6
"\
w : uit welke bestanden komen de bladzijde(n) die vertoond zouden worden?\n\
(als geen naam is opgegeven: druk af in welke directories wordt gezocht)\n\
W : idem, maar geef alleen de padnamen\n\n\
C bestand: gebruik `bestand' als configuratiebestand\n\
M pad : geef een expliciet zoekpad voor man bladzijden\n\
P prog : gebruik het programma `prog' als pagineerprogramma\n\
S lijst : lijst met door dubbele punten gescheiden hoofdstuknamen\n"
USAGE7
" m systeem: zoek man bladzijden van een ander systeem\n"
USAGE8
" p string : vertel welke preprocessoren de tekst moeten voorbewerken\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
"en de gebruiker kan het cat bestand ook niet openen\n"
USER_CAN_OPEN_CAT
"maar de gebruiker kan het cat bestand openen\n"
CANNOT_FORK
"ik kon het commando _%s_ niet starten\n"
WAIT_FAILED
"fout bij het wachten op mijn kind _%s_\n"
GOT_WRONG_PID
"vreemd ..., ik wachtte op mijn kind maar kreeg een ander terug\n"
CHILD_TERMINATED_ABNORMALLY
"fatale fout: het commando _%s_ werd abnormaal beëindigd\n"
IDENTICAL
"Man bladzijde %s is hetzelfde als %s\n"
MAN_FOUND
"ik heb de volgende bladzijde(n) gevonden:\n"
NO_TROFF
"fout: er is geen TROFF commando in %s gespecificeerd\n"
NO_CAT_FOR_NONSTD_LL
"ik maak geen cat pagina aan, vanwege de afwijkende lijnlengte\n"

1
msgs/mess.nl.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

170
msgs/mess.pl Normal file
View File

@ -0,0 +1,170 @@
BAD_CONFIG_FILE
"nie mogę zrozumieć zawartości pliku %s\n"
CONFIG_OPEN_ERROR
"Ostrzeżenie: nie mogę otworzyć pliku %s\n"
PARSE_ERROR_IN_CONFIG
"Błąd przy interpretowaniu pliku konfiguracji\n"
INCOMPAT
"nie pasujące wzajemnie opcje %s i %s\n"
NO_ALTERNATE
"Niestety - nie mam wkompilowanej możliwości użycia 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
"Jaką stronę w sekcji %s chcesz przeczytać?\n"
NO_NAME_NO_SECTION
"Jaką stronę chcesz przeczytać?\n"
NO_SUCH_ENTRY_IN_SECTION
"Nie ma strony %s w sekcji %s manuala\n"
NO_SUCH_ENTRY
"Nie ma strony manuala dla %s\n"
PAGER_IS
"\nużywam %s jako pagera\n"
SYSTEM_FAILED
"Błąd w trakcie formatowania lub wyświetlania.\n\
Komenda %s zwróciła status %d.\n"
VERSION
"%s, wersja %s\n\n"
OUT_OF_MEMORY
"Brak pamięci - nie mogę malloc %d bajtów\n"
ROFF_CMD_FROM_FILE_ERROR
"Błąd przetwarzania komendy *roff z plku %s\n"
MANROFFSEQ_ERROR
"Błąd przetwarzania MANROFFSEQ. Uzyję systemowych wartości domyślnych.\n"
ROFF_CMD_FROM_COMMANDLINE_ERROR
"Błąd przetwarzania komendy *roff podanej w linii komend.\n"
UNRECOGNIZED_LINE
"Nierozpoznana linia w pliku konfiguracji (zignorowana)\n%s\n"
GETVAL_ERROR
"man-config.c: błąd wewnętrzny: nie ma łańcucha %s\n"
FOUND_MANDIR
"znaleziony katalog man %s\n"
FOUND_MAP
"znaleziona mapa manpath %s --> %s\n"
FOUND_CATDIR
"odpowiadający katalog cat: %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
"Nieudane usiłowanie [%s] ekspansji strony manuala\n"
OPEN_ERROR
"Nie mogę otworzyć strony manuala %s\n"
READ_ERROR
"Błąd czytania strony manuala %s\n"
FOUND_EQN
"znaleziona dyrektywa eqn(1)\n"
FOUND_GRAP
"znaleziona dyrektywa grap(1)\n"
FOUND_PIC
"znaleziona dyrektywa pic(1)\n"
FOUND_TBL
"znaleziona dyrektywa tbl(1)\n"
FOUND_VGRIND
"znaleziona dyrektywa vgrind(1)\n"
FOUND_REFER
"znaleziona dyrektywa refer(1)\n"
ROFF_FROM_COMMAND_LINE
"przetwarzam dyrektywę podaną w linii komend\n"
ROFF_FROM_FILE
"przetwarzam dyrektywę z pliku %s\n"
ROFF_FROM_ENV
"przetwarzam dyrektywę ze zmiennej środowiskowej\n"
USING_DEFAULT
"używam domyślnej sekwencji preprocesora\n"
PLEASE_WAIT
"Formatuje stronę, poczekaj...\n"
CHANGED_MODE
"uprawnienia %s zmienione na %o\n"
CAT_OPEN_ERROR
"Nie mogę otworzyć %s do zapisu.\n"
PROPOSED_CATFILE
"będę próbował wpisać do %s, jeżeli potrzebne\n"
IS_NEWER_RESULT
"status z is_newer() = %d\n"
TRYING_SECTION
"próbuję sekcję %s\n"
SEARCHING
"\nszukam w %s\n"
ALREADY_IN_MANPATH
"ale %s jest już w manpath\n"
CANNOT_STAT
"Ostrzeżenie: nie mogę użyć stat na pliku %s!\n"
IS_NO_DIR
"Ostrzeżenie: %s nie jest katalogiem!\n"
ADDING_TO_MANPATH
"dodaję %s do manpath\n"
PATH_DIR
"\nkatalog path %s "
IS_IN_CONFIG
"jest w pliku konfiguracyjnym\n"
IS_NOT_IN_CONFIG
"nie jest obecny w pliku konfiguracyjnym\n"
MAN_NEARBY
"ale jest katalog man niedaleko\n"
NO_MAN_NEARBY
"i nie ma katalogu man niedaleko\n"
ADDING_MANDIRS
"\ndodaję obowiązkowe katalogi man\n\n"
CATNAME_IS
"cat_name w convert_to_cat () jest: %s\n"
NO_EXEC
"\nnie wykonuję komrndy:\n %s\n"
USAGE1
"użycie: %s [-adfhktw] [sekcja] [-M ścieżka] [-P pager] [-S lista]\n\t"
USAGE2
"[-m system] "
USAGE3
"[-p łańcuch_znaków] nazwa ...\n\n"
USAGE4
" a : (all) znajdź wszystkie pasujące strony\n\
c : (no cat) nie używaj pliku cat\n\
d : (debug) wyświetlaj mnóstwo informacji o wykonywaniu\n\
D : jak -d, ale wyświetl też strony man\n\
f : to samo co whatis(1)\n\
h : wyświetl ten help\n\
k : to samo co apropos(1)\n\
K : szukaj łańcucha znaków we wszystkich stronach\n"
USAGE5
" t : użyj troff do formatowania stron do wydrukowania\n"
USAGE6
"\
w : wyświetl położenie stron(y) man, która bylaby byla wyświetlona\n\
(jeżeli nie podana żadna nazwa: wyświetl przeszukiwane katalogi)\n\n\
W : tak jak -w, ale wypisz tylko nazwy plików\n\n\
C plik : użyj `plik' jako plik konfiguracyjny\n\
M ścieżka: ustaw ścieżkę poszukiwania stron jako `ścieżka'\n\
P pager : użyj programu `pager' do wyswietlania stron\n\
S lista : lista sekcji oddzielona dwukropkami\n"
USAGE7
" m system : szukaj stron man alternatywnego systemu\n"
USAGE8
" p łańcuch : łańcuch znaków podający, jakie użyć preprocesory\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 komendy _%s_\n"
WAIT_FAILED
"błąd w trakcie czekania na proces potomny _%s_\n"
GOT_WRONG_PID
"bardzo dziwne... zły pid w trakcie czekania na mój proces potomny\n"
CHILD_TERMINATED_ABNORMALLY
"błąd krytyczny: komenda _%s_ zakończona nieprawidłowo\n"
IDENTICAL
"Strona man %s jest identyczna jak %s\n"
MAN_FOUND
"Znalazłem stronę(y) manuala:\n"
NO_TROFF
"błąd: nie podana komenda TROFF w %s\n"
NO_CAT_FOR_NONSTD_LL
"strona cat nie została zapisana z powodu niestandardowej długości linii\n"

1
msgs/mess.pl.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-2

165
msgs/mess.pt Normal file
View File

@ -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
""

1
msgs/mess.pt.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-1

170
msgs/mess.ro Normal file
View File

@ -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"

1
msgs/mess.ro.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-2

170
msgs/mess.ru Normal file
View File

@ -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"

1
msgs/mess.ru.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=koi8-r

171
msgs/mess.sl Normal file
View File

@ -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"

1
msgs/mess.sl.codeset Normal file
View File

@ -0,0 +1 @@
$ codeset=iso-8859-2

170
msgs/mess.zh_TW.UTF-8 Normal file
View File

@ -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"

119
src/Makefile.in Normal file
View File

@ -0,0 +1,119 @@
#
# 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@
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 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: $(MANOBJS) $(LIBOBJS)
$(CC) $(LDFLAGS) -o man $(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
sed -e 's,%version%,@version@,' \
-e 's,%awk%,@awk@,' makewhatis.sh > 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 $(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 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

88
src/apropos.sh Normal file
View File

@ -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

26
src/defs.h Normal file
View File

@ -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;
};

46
src/different.c Normal file
View File

@ -0,0 +1,46 @@
#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;
}
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);
}

2
src/different.h Normal file
View File

@ -0,0 +1,2 @@
int different_cat_file (const char *file);
int different_man_file (const char *file);

682
src/glob.c Normal file
View File

@ -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 */

1
src/glob.h Normal file
View File

@ -0,0 +1 @@
char **glob_filename (const char *);

87
src/gripedefs.h Normal file
View File

@ -0,0 +1,87 @@
#define BAD_CONFIG_FILE 1
#define CONFIG_OPEN_ERROR 2
#define PARSE_ERROR_IN_CONFIG 3
#define INCOMPAT 4
#define NO_ALTERNATE 5
#define NO_COMPRESS 6
#define NO_NAME_FROM_SECTION 7
#define NO_NAME_NO_SECTION 8
#define NO_SUCH_ENTRY_IN_SECTION 9
#define NO_SUCH_ENTRY 10
#define PAGER_IS 11
#define SYSTEM_FAILED 12
#define VERSION 13
#define OUT_OF_MEMORY 14
#define ROFF_CMD_FROM_FILE_ERROR 15
#define MANROFFSEQ_ERROR 16
#define ROFF_CMD_FROM_COMMANDLINE_ERROR 17
#define UNRECOGNIZED_LINE 18
#define GETVAL_ERROR 19
#define FOUND_MANDIR 20
#define FOUND_MAP 21
#define FOUND_CATDIR 22
#define LINE_TOO_LONG 23
#define SECTION 24
#define UNLINKED 25
#define GLOBBING 26
#define EXPANSION_FAILED 27
#define OPEN_ERROR 28
#define READ_ERROR 29
#define FOUND_EQN 30
#define FOUND_GRAP 31
#define FOUND_PIC 32
#define FOUND_TBL 33
#define FOUND_VGRIND 34
#define FOUND_REFER 35
#define ROFF_FROM_COMMAND_LINE 36
#define ROFF_FROM_FILE 37
#define ROFF_FROM_ENV 38
#define USING_DEFAULT 39
#define PLEASE_WAIT 40
#define CHANGED_MODE 41
#define CAT_OPEN_ERROR 42
#define PROPOSED_CATFILE 43
#define IS_NEWER_RESULT 44
#define TRYING_SECTION 45
#define SEARCHING 46
#define ALREADY_IN_MANPATH 47
#define CANNOT_STAT 48
#define IS_NO_DIR 49
#define ADDING_TO_MANPATH 50
#define PATH_DIR 51
#define IS_IN_CONFIG 52
#define IS_NOT_IN_CONFIG 53
#define MAN_NEARBY 54
#define NO_MAN_NEARBY 55
#define ADDING_MANDIRS 56
#define CATNAME_IS 57
#define NO_EXEC 58
#define USAGE1 59
#define USAGE2 60
#define USAGE3 61
#define USAGE4 62
#define USAGE5 63
#define USAGE6 64
#define USAGE7 65
#define USAGE8 66
#define USER_CANNOT_OPEN_CAT 67
#define USER_CAN_OPEN_CAT 68
#define CANNOT_FORK 69
#define WAIT_FAILED 70
#define GOT_WRONG_PID 71
#define CHILD_TERMINATED_ABNORMALLY 72
#define IDENTICAL 73
#define MAN_FOUND 74
#define NO_TROFF 75
#define NO_CAT_FOR_NONSTD_LL 76
#define BROWSER_IS 77
#define HTMLPAGER_IS 78
#define FOUND_FILE 79
#define CALLTRACE1 80
#define CALLTRACE2 81
#define NO_MATCH 82
#define GLOB_FOR_FILE 83
#define CALLTRACE3 84
#define ABOUT_TO_GLOB 85
#define MAXMSG 85

139
src/gripes.c Normal file
View File

@ -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")) {
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);
}

5
src/gripes.h Normal file
View File

@ -0,0 +1,5 @@
#include "gripedefs.h"
void gripe (int n, ...);
void fatal (int n, ...);

28
src/join.c Normal file
View File

@ -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;
}

174
src/makemsg.c Normal file
View File

@ -0,0 +1,174 @@
/* 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 <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;
}

418
src/makewhatis.sh Normal file
View File

@ -0,0 +1,418 @@
#!/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);
#
# Note for Slackware users: "makewhatis -v -w -c" will work.
#
# makewhatis aeb 030801 (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 1 2 3 15
# default find arg: no directories, no empty files
findarg0="-type f -size +0"
topath=manpath
defmanpath=$DEFMANPATH
defcatpath=
sections="1 2 3 4 5 6 7 8 9 n l"
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 [-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 " -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
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) {
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) {
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_zcat || use_bzcat) {
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) {
if (use_zcat) {
pipe_cmd = "zcat \"" filename "\"";
} else {
pipe_cmd = "bzcat \"" 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
# kludge for Slackware's /usr/man/preformat
if [ $mandir = /usr/man/preformat ]
then
mandir1=/usr/man
else
mandir1=$mandir
fi
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

297
src/man-config.c Normal file
View File

@ -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);
}
}

6
src/man-config.h Normal file
View File

@ -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;

320
src/man-getopt.c Normal file
View File

@ -0,0 +1,320 @@
#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:acdfFhkKm: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++;
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)
if ((pager = getenv ("PAGER")) == NULL)
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 -D */
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);
}

6
src/man-getopt.h Normal file
View File

@ -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;

163
src/man-iconv.c Normal file
View File

@ -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 */

1
src/man-iconv.h Normal file
View File

@ -0,0 +1 @@
extern const char *get_converter (const char *path);

Some files were not shown because too many files have changed in this diff Show More