Retire xman(1).
It's totally broken (requires MLINKS which we removed long ago, relies on the old man.conf(5) format we stopped supporting long ago, Alfred Morgan reported additional bugs on bugs@, ...), it reimplements man(1) in a very poor way, and it lacks many useful features that man(1) in an xterm(1) readily provides, so fixing it would be a waste of time. matthieu@ deraadt@ krw@ agree with the direction.
This commit is contained in:
parent
2bcb96d9fd
commit
7a992bbebd
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.36 2018/12/21 14:37:24 matthieu Exp $
|
# $OpenBSD: Makefile,v 1.37 2019/08/15 12:11:36 schwarze Exp $
|
||||||
.include <bsd.xconf.mk>
|
.include <bsd.xconf.mk>
|
||||||
|
|
||||||
SUBDIR= bdftopcf mkfontscale mkfontdir \
|
SUBDIR= bdftopcf mkfontscale mkfontdir \
|
||||||
@ -10,7 +10,7 @@ SUBDIR= bdftopcf mkfontscale mkfontdir \
|
|||||||
xenodm xdpyinfo xedit xev xeyes xf86dga \
|
xenodm xdpyinfo xedit xev xeyes xf86dga \
|
||||||
xfd xfontsel xgamma xgc xhost \
|
xfd xfontsel xgamma xgc xhost \
|
||||||
xinit xinput xkbcomp xkbevd xkbprint xkbutils xkill xload xlogo \
|
xinit xinput xkbcomp xkbevd xkbprint xkbutils xkill xload xlogo \
|
||||||
xlsatoms xlsclients xlsfonts xmag xman xmessage \
|
xlsatoms xlsclients xlsfonts xmag xmessage \
|
||||||
xmodmap xmore xpr \
|
xmodmap xmore xpr \
|
||||||
xprop xrandr xrdb xrefresh xset \
|
xprop xrandr xrdb xrefresh xset \
|
||||||
xsetroot xsm xvidtune xvinfo xwd xwininfo \
|
xsetroot xsm xvidtune xvinfo xwd xwininfo \
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
Copyright (c) 1987, 1988, 1989, 1991 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
1269
app/xman/ChangeLog
1269
app/xman/ChangeLog
File diff suppressed because it is too large
Load Diff
370
app/xman/INSTALL
370
app/xman/INSTALL
@ -1,370 +0,0 @@
|
|||||||
Installation Instructions
|
|
||||||
*************************
|
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
|
||||||
Inc.
|
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
|
||||||
are permitted in any medium without royalty provided the copyright
|
|
||||||
notice and this notice are preserved. This file is offered as-is,
|
|
||||||
without warranty of any kind.
|
|
||||||
|
|
||||||
Basic Installation
|
|
||||||
==================
|
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
|
||||||
configure, build, and install this package. The following
|
|
||||||
more-detailed instructions are generic; see the `README' file for
|
|
||||||
instructions specific to this package. Some packages provide this
|
|
||||||
`INSTALL' file but do not implement all of the features documented
|
|
||||||
below. The lack of an optional feature in a given package is not
|
|
||||||
necessarily a bug. More recommendations for GNU packages can be found
|
|
||||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
|
||||||
various system-dependent variables used during compilation. It uses
|
|
||||||
those values to create a `Makefile' in each directory of the package.
|
|
||||||
It may also create one or more `.h' files containing system-dependent
|
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
|
||||||
you can run in the future to recreate the current configuration, and a
|
|
||||||
file `config.log' containing compiler output (useful mainly for
|
|
||||||
debugging `configure').
|
|
||||||
|
|
||||||
It can also use an optional file (typically called `config.cache'
|
|
||||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
|
||||||
the results of its tests to speed up reconfiguring. Caching is
|
|
||||||
disabled by default to prevent problems with accidental use of stale
|
|
||||||
cache files.
|
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
|
||||||
diffs or instructions to the address given in the `README' so they can
|
|
||||||
be considered for the next release. If you are using the cache, and at
|
|
||||||
some point `config.cache' contains results you don't want to keep, you
|
|
||||||
may remove or edit it.
|
|
||||||
|
|
||||||
The file `configure.ac' (or `configure.in') is used to create
|
|
||||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
|
||||||
you want to change it or regenerate `configure' using a newer version
|
|
||||||
of `autoconf'.
|
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and type
|
|
||||||
`./configure' to configure the package for your system.
|
|
||||||
|
|
||||||
Running `configure' might take a while. While running, it prints
|
|
||||||
some messages telling which features it is checking for.
|
|
||||||
|
|
||||||
2. Type `make' to compile the package.
|
|
||||||
|
|
||||||
3. Optionally, type `make check' to run any self-tests that come with
|
|
||||||
the package, generally using the just-built uninstalled binaries.
|
|
||||||
|
|
||||||
4. Type `make install' to install the programs and any data files and
|
|
||||||
documentation. When installing into a prefix owned by root, it is
|
|
||||||
recommended that the package be configured and built as a regular
|
|
||||||
user, and only the `make install' phase executed with root
|
|
||||||
privileges.
|
|
||||||
|
|
||||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
|
||||||
this time using the binaries in their final installed location.
|
|
||||||
This target does not install anything. Running this target as a
|
|
||||||
regular user, particularly if the prior `make install' required
|
|
||||||
root privileges, verifies that the installation completed
|
|
||||||
correctly.
|
|
||||||
|
|
||||||
6. You can remove the program binaries and object files from the
|
|
||||||
source code directory by typing `make clean'. To also remove the
|
|
||||||
files that `configure' created (so you can compile the package for
|
|
||||||
a different kind of computer), type `make distclean'. There is
|
|
||||||
also a `make maintainer-clean' target, but that is intended mainly
|
|
||||||
for the package's developers. If you use it, you may have to get
|
|
||||||
all sorts of other programs in order to regenerate files that came
|
|
||||||
with the distribution.
|
|
||||||
|
|
||||||
7. Often, you can also type `make uninstall' to remove the installed
|
|
||||||
files again. In practice, not all packages have tested that
|
|
||||||
uninstallation works correctly, even though it is required by the
|
|
||||||
GNU Coding Standards.
|
|
||||||
|
|
||||||
8. Some packages, particularly those that use Automake, provide `make
|
|
||||||
distcheck', which can by used by developers to test that all other
|
|
||||||
targets like `make install' and `make uninstall' work correctly.
|
|
||||||
This target is generally not run by end users.
|
|
||||||
|
|
||||||
Compilers and Options
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
|
||||||
the `configure' script does not know about. Run `./configure --help'
|
|
||||||
for details on some of the pertinent environment variables.
|
|
||||||
|
|
||||||
You can give `configure' initial values for configuration parameters
|
|
||||||
by setting variables in the command line or in the environment. Here
|
|
||||||
is an example:
|
|
||||||
|
|
||||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
|
||||||
|
|
||||||
*Note Defining Variables::, for more details.
|
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
|
||||||
====================================
|
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
|
||||||
same time, by placing the object files for each architecture in their
|
|
||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
|
||||||
directory where you want the object files and executables to go and run
|
|
||||||
the `configure' script. `configure' automatically checks for the
|
|
||||||
source code in the directory that `configure' is in and in `..'. This
|
|
||||||
is known as a "VPATH" build.
|
|
||||||
|
|
||||||
With a non-GNU `make', it is safer to compile the package for one
|
|
||||||
architecture at a time in the source code directory. After you have
|
|
||||||
installed the package for one architecture, use `make distclean' before
|
|
||||||
reconfiguring for another architecture.
|
|
||||||
|
|
||||||
On MacOS X 10.5 and later systems, you can create libraries and
|
|
||||||
executables that work on multiple system types--known as "fat" or
|
|
||||||
"universal" binaries--by specifying multiple `-arch' options to the
|
|
||||||
compiler but only a single `-arch' option to the preprocessor. Like
|
|
||||||
this:
|
|
||||||
|
|
||||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
|
||||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
|
||||||
CPP="gcc -E" CXXCPP="g++ -E"
|
|
||||||
|
|
||||||
This is not guaranteed to produce working output in all cases, you
|
|
||||||
may have to build one architecture at a time and combine the results
|
|
||||||
using the `lipo' tool if you have problems.
|
|
||||||
|
|
||||||
Installation Names
|
|
||||||
==================
|
|
||||||
|
|
||||||
By default, `make install' installs the package's commands under
|
|
||||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
|
||||||
can specify an installation prefix other than `/usr/local' by giving
|
|
||||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
|
||||||
absolute file name.
|
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
|
||||||
architecture-specific files and architecture-independent files. If you
|
|
||||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
|
||||||
PREFIX as the prefix for installing programs and libraries.
|
|
||||||
Documentation and other data files still use the regular prefix.
|
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
|
||||||
options like `--bindir=DIR' to specify different values for particular
|
|
||||||
kinds of files. Run `configure --help' for a list of the directories
|
|
||||||
you can set and what kinds of files go in them. In general, the
|
|
||||||
default for these options is expressed in terms of `${prefix}', so that
|
|
||||||
specifying just `--prefix' will affect all of the other directory
|
|
||||||
specifications that were not explicitly provided.
|
|
||||||
|
|
||||||
The most portable way to affect installation locations is to pass the
|
|
||||||
correct locations to `configure'; however, many packages provide one or
|
|
||||||
both of the following shortcuts of passing variable assignments to the
|
|
||||||
`make install' command line to change installation locations without
|
|
||||||
having to reconfigure or recompile.
|
|
||||||
|
|
||||||
The first method involves providing an override variable for each
|
|
||||||
affected directory. For example, `make install
|
|
||||||
prefix=/alternate/directory' will choose an alternate location for all
|
|
||||||
directory configuration variables that were expressed in terms of
|
|
||||||
`${prefix}'. Any directories that were specified during `configure',
|
|
||||||
but not in terms of `${prefix}', must each be overridden at install
|
|
||||||
time for the entire installation to be relocated. The approach of
|
|
||||||
makefile variable overrides for each directory variable is required by
|
|
||||||
the GNU Coding Standards, and ideally causes no recompilation.
|
|
||||||
However, some platforms have known limitations with the semantics of
|
|
||||||
shared libraries that end up requiring recompilation when using this
|
|
||||||
method, particularly noticeable in packages that use GNU Libtool.
|
|
||||||
|
|
||||||
The second method involves providing the `DESTDIR' variable. For
|
|
||||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
|
||||||
`/alternate/directory' before all installation names. The approach of
|
|
||||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
|
||||||
does not work on platforms that have drive letters. On the other hand,
|
|
||||||
it does better at avoiding recompilation issues, and works well even
|
|
||||||
when some directory options were not specified in terms of `${prefix}'
|
|
||||||
at `configure' time.
|
|
||||||
|
|
||||||
Optional Features
|
|
||||||
=================
|
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
|
||||||
with an extra prefix or suffix on their names by giving `configure' the
|
|
||||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
|
||||||
`README' should mention any `--enable-' and `--with-' options that the
|
|
||||||
package recognizes.
|
|
||||||
|
|
||||||
For packages that use the X Window System, `configure' can usually
|
|
||||||
find the X include and library files automatically, but if it doesn't,
|
|
||||||
you can use the `configure' options `--x-includes=DIR' and
|
|
||||||
`--x-libraries=DIR' to specify their locations.
|
|
||||||
|
|
||||||
Some packages offer the ability to configure how verbose the
|
|
||||||
execution of `make' will be. For these packages, running `./configure
|
|
||||||
--enable-silent-rules' sets the default to minimal output, which can be
|
|
||||||
overridden with `make V=1'; while running `./configure
|
|
||||||
--disable-silent-rules' sets the default to verbose, which can be
|
|
||||||
overridden with `make V=0'.
|
|
||||||
|
|
||||||
Particular systems
|
|
||||||
==================
|
|
||||||
|
|
||||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
|
||||||
CC is not installed, it is recommended to use the following options in
|
|
||||||
order to use an ANSI C compiler:
|
|
||||||
|
|
||||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
|
||||||
|
|
||||||
HP-UX `make' updates targets which have the same time stamps as
|
|
||||||
their prerequisites, which makes it generally unusable when shipped
|
|
||||||
generated files such as `configure' are involved. Use GNU `make'
|
|
||||||
instead.
|
|
||||||
|
|
||||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
|
||||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
|
||||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
|
||||||
to try
|
|
||||||
|
|
||||||
./configure CC="cc"
|
|
||||||
|
|
||||||
and if that doesn't work, try
|
|
||||||
|
|
||||||
./configure CC="cc -nodtk"
|
|
||||||
|
|
||||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
|
||||||
directory contains several dysfunctional programs; working variants of
|
|
||||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
|
||||||
in your `PATH', put it _after_ `/usr/bin'.
|
|
||||||
|
|
||||||
On Haiku, software installed for all users goes in `/boot/common',
|
|
||||||
not `/usr/local'. It is recommended to use the following options:
|
|
||||||
|
|
||||||
./configure --prefix=/boot/common
|
|
||||||
|
|
||||||
Specifying the System Type
|
|
||||||
==========================
|
|
||||||
|
|
||||||
There may be some features `configure' cannot figure out
|
|
||||||
automatically, but needs to determine by the type of machine the package
|
|
||||||
will run on. Usually, assuming the package is built to be run on the
|
|
||||||
_same_ architectures, `configure' can figure that out, but if it prints
|
|
||||||
a message saying it cannot guess the machine type, give it the
|
|
||||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
|
||||||
type, such as `sun4', or a canonical name which has the form:
|
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
|
||||||
|
|
||||||
where SYSTEM can have one of these forms:
|
|
||||||
|
|
||||||
OS
|
|
||||||
KERNEL-OS
|
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
|
||||||
need to know the machine type.
|
|
||||||
|
|
||||||
If you are _building_ compiler tools for cross-compiling, you should
|
|
||||||
use the option `--target=TYPE' to select the type of system they will
|
|
||||||
produce code for.
|
|
||||||
|
|
||||||
If you want to _use_ a cross compiler, that generates code for a
|
|
||||||
platform different from the build platform, you should specify the
|
|
||||||
"host" platform (i.e., that on which the generated programs will
|
|
||||||
eventually be run) with `--host=TYPE'.
|
|
||||||
|
|
||||||
Sharing Defaults
|
|
||||||
================
|
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share,
|
|
||||||
you can create a site shell script called `config.site' that gives
|
|
||||||
default values for variables like `CC', `cache_file', and `prefix'.
|
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
|
||||||
A warning: not all `configure' scripts look for a site script.
|
|
||||||
|
|
||||||
Defining Variables
|
|
||||||
==================
|
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
|
||||||
environment passed to `configure'. However, some packages may run
|
|
||||||
configure again during the build, and the customized values of these
|
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
|
||||||
them in the `configure' command line, using `VAR=value'. For example:
|
|
||||||
|
|
||||||
./configure CC=/usr/local2/bin/gcc
|
|
||||||
|
|
||||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
|
||||||
overridden in the site shell script).
|
|
||||||
|
|
||||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
|
||||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
|
||||||
|
|
||||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
|
||||||
|
|
||||||
`configure' Invocation
|
|
||||||
======================
|
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
|
||||||
operates.
|
|
||||||
|
|
||||||
`--help'
|
|
||||||
`-h'
|
|
||||||
Print a summary of all of the options to `configure', and exit.
|
|
||||||
|
|
||||||
`--help=short'
|
|
||||||
`--help=recursive'
|
|
||||||
Print a summary of the options unique to this package's
|
|
||||||
`configure', and exit. The `short' variant lists options used
|
|
||||||
only in the top level, while the `recursive' variant lists options
|
|
||||||
also present in any nested packages.
|
|
||||||
|
|
||||||
`--version'
|
|
||||||
`-V'
|
|
||||||
Print the version of Autoconf used to generate the `configure'
|
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`--cache-file=FILE'
|
|
||||||
Enable the cache: use and save the results of the tests in FILE,
|
|
||||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
|
||||||
disable caching.
|
|
||||||
|
|
||||||
`--config-cache'
|
|
||||||
`-C'
|
|
||||||
Alias for `--cache-file=config.cache'.
|
|
||||||
|
|
||||||
`--quiet'
|
|
||||||
`--silent'
|
|
||||||
`-q'
|
|
||||||
Do not print messages saying which checks are being made. To
|
|
||||||
suppress all normal output, redirect it to `/dev/null' (any error
|
|
||||||
messages will still be shown).
|
|
||||||
|
|
||||||
`--srcdir=DIR'
|
|
||||||
Look for the package's source code in directory DIR. Usually
|
|
||||||
`configure' can determine that directory automatically.
|
|
||||||
|
|
||||||
`--prefix=DIR'
|
|
||||||
Use DIR as the installation prefix. *note Installation Names::
|
|
||||||
for more details, including other options available for fine-tuning
|
|
||||||
the installation locations.
|
|
||||||
|
|
||||||
`--no-create'
|
|
||||||
`-n'
|
|
||||||
Run the configure checks, but stop before creating any output
|
|
||||||
files.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
|
||||||
`configure --help' for more details.
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright 2005 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
# documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
# the above copyright notice appear in all copies and that both that
|
|
||||||
# copyright notice and this permission notice appear in supporting
|
|
||||||
# documentation, and that the name of Red Hat not be used in
|
|
||||||
# advertising or publicity pertaining to distribution of the software without
|
|
||||||
# specific, written prior permission. Red Hat makes no
|
|
||||||
# representations about the suitability of this software for any purpose. It
|
|
||||||
# is provided "as is" without express or implied warranty.
|
|
||||||
#
|
|
||||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
# PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
SUBDIRS = man
|
|
||||||
bin_PROGRAMS = xman
|
|
||||||
|
|
||||||
helpdir=@HELPDIR@
|
|
||||||
dist_help_DATA = xman.help
|
|
||||||
|
|
||||||
AM_CFLAGS = $(CWARNFLAGS) $(XMAN_CFLAGS) \
|
|
||||||
-D_BSD_SOURCE -DHELPFILE=\"$(helpdir)/xman.help\"
|
|
||||||
xman_LDADD = $(XMAN_LIBS)
|
|
||||||
|
|
||||||
xman_SOURCES = \
|
|
||||||
buttons.c \
|
|
||||||
defs.h \
|
|
||||||
globals.c \
|
|
||||||
globals.h \
|
|
||||||
handler.c \
|
|
||||||
help.c \
|
|
||||||
iconclosed.h \
|
|
||||||
icon_help.h \
|
|
||||||
icon_open.h \
|
|
||||||
main.c \
|
|
||||||
man.c \
|
|
||||||
man.h \
|
|
||||||
misc.c \
|
|
||||||
ScrollByL.c \
|
|
||||||
ScrollByL.h \
|
|
||||||
ScrollByLP.h \
|
|
||||||
search.c \
|
|
||||||
tkfuncs.c \
|
|
||||||
vendor.c \
|
|
||||||
vendor.h
|
|
||||||
|
|
||||||
# App default files
|
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
|
|
||||||
|
|
||||||
appdefaultdir = @appdefaultdir@
|
|
||||||
|
|
||||||
dist_appdefault_DATA = app-defaults/Xman
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
|
||||||
|
|
||||||
.PHONY: ChangeLog INSTALL
|
|
||||||
|
|
||||||
INSTALL:
|
|
||||||
$(INSTALL_CMD)
|
|
||||||
|
|
||||||
ChangeLog:
|
|
||||||
$(CHANGELOG_CMD)
|
|
||||||
|
|
||||||
dist-hook: ChangeLog INSTALL
|
|
@ -1,5 +0,0 @@
|
|||||||
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2006/11/28 13:53:23 matthieu Exp $
|
|
||||||
|
|
||||||
CONFIGURE_ARGS= --with-helpdir=${LIBDIR}/X11
|
|
||||||
|
|
||||||
.include <bsd.xorg.mk>
|
|
1023
app/xman/Makefile.in
1023
app/xman/Makefile.in
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
|||||||
xman is a graphical manual page browser using the Athena Widgets (Xaw) toolkit.
|
|
||||||
|
|
||||||
All questions regarding this software should be directed at the
|
|
||||||
Xorg mailing list:
|
|
||||||
|
|
||||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
|
||||||
|
|
||||||
Please submit bug reports to the Xorg bugzilla:
|
|
||||||
|
|
||||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
|
||||||
|
|
||||||
The master development code repository can be found at:
|
|
||||||
|
|
||||||
git://anongit.freedesktop.org/git/xorg/app/xman
|
|
||||||
|
|
||||||
http://cgit.freedesktop.org/xorg/app/xman
|
|
||||||
|
|
||||||
For patch submission instructions, see:
|
|
||||||
|
|
||||||
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
|
||||||
|
|
||||||
For more information on the git code manager, see:
|
|
||||||
|
|
||||||
http://wiki.x.org/wiki/GitPage
|
|
||||||
|
|
1211
app/xman/ScrollByL.c
1211
app/xman/ScrollByL.c
File diff suppressed because it is too large
Load Diff
@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _XtScrollByLine_h
|
|
||||||
#define _XtScrollByLine_h
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* ScrollByLine Widget (subclass of Simple)
|
|
||||||
*
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The default fonts.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef ATHENA
|
|
||||||
#define MANPAGE_NORMAL "fixed"
|
|
||||||
#define MANPAGE_BOLD "helvetica-bold12"
|
|
||||||
#define MANPAGE_ITALIC "helvetica-boldoblique12"
|
|
||||||
#define MANPAGE_SYMBOL "symbol-medium12"
|
|
||||||
#else
|
|
||||||
#define MANPAGE_NORMAL "*-new century schoolbook-medium-r-normal--*-120-*"
|
|
||||||
#define MANPAGE_BOLD "*-new century schoolbook-bold-r-normal--*-120-*"
|
|
||||||
#define MANPAGE_ITALIC "*-new century schoolbook-bold-i-normal--*-120-*"
|
|
||||||
#define MANPAGE_SYMBOL "*-symbol-medium-r-normal--*-120-*"
|
|
||||||
#endif /* ATHENA */
|
|
||||||
|
|
||||||
#define XtNindent "indent"
|
|
||||||
#define XtNforceVert "forceVert"
|
|
||||||
#define XtNmanualFontNormal "manualFontNormal"
|
|
||||||
#define XtNmanualFontBold "manualFontBold"
|
|
||||||
#define XtNmanualFontItalic "manualFontItalic"
|
|
||||||
#define XtNmanualFontSymbol "manualFontSymbol"
|
|
||||||
#define XtNNumTotalLines "numTotalLines"
|
|
||||||
#define XtNNumVisibleLines "numVisibleLines"
|
|
||||||
|
|
||||||
#define XtCIndent "Indent"
|
|
||||||
#define XtCNumTotalLines "NumTotalLines"
|
|
||||||
#define XtCNumVisibleLines "NumVisibleLines"
|
|
||||||
|
|
||||||
/* Class record constants */
|
|
||||||
|
|
||||||
extern WidgetClass scrollByLineWidgetClass;
|
|
||||||
|
|
||||||
typedef struct _ScrollByLineClassRec *ScrollByLineWidgetClass;
|
|
||||||
typedef struct _ScrollByLineRec *ScrollByLineWidget;
|
|
||||||
|
|
||||||
#endif /* _XtScrollByLine_h --- DON'T ADD STUFF AFTER THIS LINE */
|
|
@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _XtScrollByLinePrivate_h
|
|
||||||
#define _XtScrollByLinePrivate_h
|
|
||||||
|
|
||||||
#include <X11/Xaw/SimpleP.h>
|
|
||||||
|
|
||||||
#include "ScrollByL.h"
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
*
|
|
||||||
* ScrollByLine Widget Private Data
|
|
||||||
*
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
/* New fields for the ScrollByLine widget class record */
|
|
||||||
typedef struct {
|
|
||||||
int mumble; /* No new procedures */
|
|
||||||
} ScrollByLineClassPart;
|
|
||||||
|
|
||||||
/* Full class record declaration */
|
|
||||||
typedef struct _ScrollByLineClassRec {
|
|
||||||
CoreClassPart core_class;
|
|
||||||
SimpleClassPart simple_class;
|
|
||||||
ScrollByLineClassPart scrolled_widget_class;
|
|
||||||
} ScrollByLineClassRec;
|
|
||||||
|
|
||||||
extern ScrollByLineClassRec scrollByLineClassRec;
|
|
||||||
|
|
||||||
/* New fields for the ScrollByLine widget record */
|
|
||||||
typedef struct _ScrollByLinePart {
|
|
||||||
Pixel foreground; /* The color for the foreground of the text. */
|
|
||||||
Boolean force_vert, /* Must have scrollbar visible */
|
|
||||||
use_right; /* put scroll bar on right side of window. */
|
|
||||||
FILE *file; /* The file to display. */
|
|
||||||
Dimension indent; /* amount to indent the file. */
|
|
||||||
XFontStruct *bold_font, /* The four fonts. */
|
|
||||||
*normal_font,
|
|
||||||
*italic_font,
|
|
||||||
*symbol_font;
|
|
||||||
int h_width; /* Main font width */
|
|
||||||
|
|
||||||
/* variables not in resource list. */
|
|
||||||
|
|
||||||
Widget bar; /* The scrollbar. */
|
|
||||||
int font_height; /* the height of the font. */
|
|
||||||
int line_pointer; /* The line that currently is at the top
|
|
||||||
of the window being displayed. */
|
|
||||||
Dimension offset; /* Drawing offset because of scrollbar. */
|
|
||||||
GC move_gc; /* GC to use when moving the text. */
|
|
||||||
GC bold_gc, normal_gc, italic_gc, symbol_gc; /* gc for drawing. */
|
|
||||||
|
|
||||||
char **top_line; /* The top line of the file. */
|
|
||||||
int lines; /* Total number of line in the file. */
|
|
||||||
int num_visible_lines; /* Number of lines visible */
|
|
||||||
} ScrollByLinePart;
|
|
||||||
|
|
||||||
/****************************************************************
|
|
||||||
*
|
|
||||||
* Full instance record declaration
|
|
||||||
*
|
|
||||||
****************************************************************/
|
|
||||||
|
|
||||||
typedef struct _ScrollByLineRec {
|
|
||||||
CorePart core;
|
|
||||||
SimplePart simple;
|
|
||||||
ScrollByLinePart scroll;
|
|
||||||
} ScrollByLineRec;
|
|
||||||
|
|
||||||
#endif /* _XtScrollByLinePrivate_h --- DON'T ADD STUFF AFTER THIS LINE */
|
|
3138
app/xman/aclocal.m4
vendored
3138
app/xman/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@ -1,195 +0,0 @@
|
|||||||
*input: True
|
|
||||||
|
|
||||||
*topBox: True
|
|
||||||
*topBox.Title: Xman
|
|
||||||
*topBox.IconName: Xman
|
|
||||||
|
|
||||||
*manualBrowser.Title: Manual Page
|
|
||||||
*manualBrowser.IconName: Manual Page
|
|
||||||
*manualBrowser.geometry: 780x600
|
|
||||||
|
|
||||||
*manualFontBold: -*-courier-bold-r-*-*-*-120-*-*-*-*-*-*
|
|
||||||
*manualFontItalic: -*-courier-medium-o-*-*-*-120-*-*-*-*-*-*
|
|
||||||
*manualFontNormal: -*-courier-medium-r-*-*-*-120-*-*-*-*-*-*
|
|
||||||
*manualFontSymbol: -*-symbol-*-*-*-*-*-120-*-*-*-*-*-*
|
|
||||||
!*directoryFontNormal: -*-courier-medium-r-*-*-*-120-*-*-*-*-*-*
|
|
||||||
*directoryFontNormal: -*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*
|
|
||||||
!*directoryFontNormal: -*-lucida-bold-r-*-*-*-120-*-*-*-*-*-*
|
|
||||||
|
|
||||||
!*SimpleMenu.BackingStore: Always
|
|
||||||
!*SimpleMenu.SaveUnder: Off
|
|
||||||
|
|
||||||
*horizPane.orientation: horizontal
|
|
||||||
*horizPane*showGrip: False
|
|
||||||
*horizPane.min: 22
|
|
||||||
*horizPane.max: 22
|
|
||||||
*topLabel.BorderWidth: 0
|
|
||||||
*search*label.BorderWidth: 0
|
|
||||||
|
|
||||||
*search*dialog*value: Xman
|
|
||||||
|
|
||||||
!*optionMenu.Label: Options
|
|
||||||
!*sectionMenu.Label: Sections
|
|
||||||
|
|
||||||
*horizPane*options.Label: Options
|
|
||||||
*horizPane*sections.Label: Sections
|
|
||||||
|
|
||||||
*helpButton.Label: Help
|
|
||||||
*helpButton.Tip: Open help browser
|
|
||||||
|
|
||||||
*quitButton.Label: Quit
|
|
||||||
*quitButton.Tip: Quit Xman
|
|
||||||
|
|
||||||
*manpageButton.Label: Manual Page
|
|
||||||
*manpageButton.Tip: Open new manpage browser
|
|
||||||
|
|
||||||
*topLabel.Label: Manual Browser
|
|
||||||
|
|
||||||
!*SimpleMenu*menuLabel*vertSpace: 100
|
|
||||||
!*SimpleMenu*menuLabel*leftMargin: 20
|
|
||||||
|
|
||||||
*displayDirectory.Label: Display Directory
|
|
||||||
*displayManualPage.Label: Display Manual Page
|
|
||||||
*help.Label: Help
|
|
||||||
*help.geometry: 780x600
|
|
||||||
*search.Label: Search
|
|
||||||
*removeThisManpage.Label: Remove This Manpage
|
|
||||||
*help*removeThisManpage.Label: Remove Help
|
|
||||||
*openNewManpage.Label: Open New Manpage
|
|
||||||
*showVersion.Label: Show Version
|
|
||||||
*quit.Label: Quit
|
|
||||||
|
|
||||||
*pleaseStandBy*Label: Formatting Manual Page, Please Stand By...
|
|
||||||
|
|
||||||
*search*dialog.Label: Type string to search for:
|
|
||||||
*search*apropos.Label: Apropos
|
|
||||||
*search*manualPage.Label: Manual Page
|
|
||||||
*search*cancel.Label: Cancel
|
|
||||||
|
|
||||||
*likeToSave*dialog.Label: Would you like to save this formatted Manual Page?
|
|
||||||
*likeToSave*yes.Label: Yes
|
|
||||||
*likeToSave*no.Label: No
|
|
||||||
|
|
||||||
*translations: #override \
|
|
||||||
Ctrl<Key>q: Quit() \n\
|
|
||||||
Ctrl<Key>c: Quit() \n\
|
|
||||||
Ctrl<Key>n: CreateNewManpage() \n\
|
|
||||||
Ctrl<Key>h: PopupHelp() \n\
|
|
||||||
Ctrl<Key>s: PopupSearch()
|
|
||||||
|
|
||||||
*help*Paned.manualPage.translations:#override \
|
|
||||||
Ctrl<Btn1Down>: \
|
|
||||||
XawPositionSimpleMenu(optionMenu) \
|
|
||||||
MenuPopup(optionMenu) \n\
|
|
||||||
Ctrl<Key>q: Quit() \n\
|
|
||||||
Ctrl<Key>c: Quit() \n\
|
|
||||||
Ctrl<Key>r: RemoveThisManpage() \n\
|
|
||||||
Ctrl<Key>n: CreateNewManpage() \n\
|
|
||||||
Ctrl<Key>h: PopupHelp() \n\
|
|
||||||
Ctrl<Key>d: GotoPage(Directory) \n\
|
|
||||||
Ctrl<Key>m: GotoPage(ManualPage) \n\
|
|
||||||
Ctrl<Key>v: ShowVersion() \n\
|
|
||||||
<Key>Prior: Page(Back) \n\
|
|
||||||
<Key>Next : Page(Forward) \n\
|
|
||||||
Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
|
|
||||||
Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
|
|
||||||
Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
|
|
||||||
Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
|
|
||||||
~Shift ~Ctrl<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
|
|
||||||
~Shift ~Ctrl<Btn5Down>,<Btn5Up>: Page(Line,5)
|
|
||||||
|
|
||||||
*manualBrowser*manualPage.translations: #override \
|
|
||||||
Ctrl<Btn1Down>: \
|
|
||||||
XawPositionSimpleMenu(optionMenu) \
|
|
||||||
MenuPopup(optionMenu) \n\
|
|
||||||
Ctrl<Btn2Down>: \
|
|
||||||
XawPositionSimpleMenu(sectionMenu) \
|
|
||||||
MenuPopup(sectionMenu) \n\
|
|
||||||
Shift<Btn2Down>,<Btn2Up>:GotoPage(Directory)\n\
|
|
||||||
Ctrl<Key>q: Quit() \n\
|
|
||||||
Ctrl<Key>c: Quit() \n\
|
|
||||||
Ctrl<Key>r: RemoveThisManpage() \n\
|
|
||||||
Ctrl<Key>n: CreateNewManpage() \n\
|
|
||||||
Ctrl<Key>h: PopupHelp() \n\
|
|
||||||
Ctrl<Key>d: GotoPage(Directory) \n\
|
|
||||||
Ctrl<Key>m: GotoPage(ManualPage) \n\
|
|
||||||
Ctrl<Key>v: ShowVersion() \n\
|
|
||||||
<Key>Prior: Page(Back) \n\
|
|
||||||
<Key>Next : Page(Forward) \n\
|
|
||||||
Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
|
|
||||||
Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
|
|
||||||
Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
|
|
||||||
Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
|
|
||||||
~Shift ~Ctrl<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
|
|
||||||
~Shift ~Ctrl<Btn5Down>,<Btn5Up>: Page(Line,5) \n\
|
|
||||||
Ctrl<Key>s: PopupSearch()
|
|
||||||
|
|
||||||
!*manualBrowser*directory.background: Grey80
|
|
||||||
*manualBrowser*directory.translations: #override \
|
|
||||||
Ctrl<Btn1Down>: \
|
|
||||||
XawPositionSimpleMenu(optionMenu) \
|
|
||||||
MenuPopup(optionMenu) \n\
|
|
||||||
Ctrl<Btn2Down>: \
|
|
||||||
XawPositionSimpleMenu(sectionMenu) \
|
|
||||||
MenuPopup(sectionMenu) \n\
|
|
||||||
Shift<Btn2Down>,<Btn2Up>: GotoPage(Manpage) \n\
|
|
||||||
Ctrl<Key>q: Quit() \n\
|
|
||||||
Ctrl<Key>c: Quit() \n\
|
|
||||||
Ctrl<Key>r: RemoveThisManpage() \n\
|
|
||||||
Ctrl<Key>n: CreateNewManpage() \n\
|
|
||||||
Ctrl<Key>h: PopupHelp() \n\
|
|
||||||
Ctrl<Key>d: GotoPage(Directory) \n\
|
|
||||||
Ctrl<Key>m: GotoPage(ManualPage) \n\
|
|
||||||
Ctrl<Key>v: ShowVersion() \n\
|
|
||||||
Ctrl<Key>s: PopupSearch()
|
|
||||||
|
|
||||||
*manualBrowser*search*manualPage.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Manpage) reset()
|
|
||||||
|
|
||||||
*manualBrowser*search*apropos.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Apropos) reset()
|
|
||||||
|
|
||||||
*manualBrowser*search*cancel*translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Cancel) reset()
|
|
||||||
|
|
||||||
*manualBrowser*search*value*translations: #override \
|
|
||||||
<Key>Return: Search(Manpage) \n\
|
|
||||||
Ctrl<Key>m: Search(Manpage)
|
|
||||||
|
|
||||||
*topBox*search*manualPage.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Manpage, Open) reset()
|
|
||||||
|
|
||||||
*topBox*search*apropos.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Apropos, Open) reset()
|
|
||||||
|
|
||||||
*topBox*search*cancel*translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Search(Cancel, Open) reset()
|
|
||||||
|
|
||||||
*topBox*search*value*translations: #override \
|
|
||||||
<Key>Return: Search(Manpage, Open) \n\
|
|
||||||
Ctrl<Key>m: Search(Manpage, Open)
|
|
||||||
|
|
||||||
*manualBrowser*likeToSave*yes.translations: #override \
|
|
||||||
<Btn1Down>,<Btn1Up>: SaveFormattedPage(Save) reset() \n\
|
|
||||||
<Key>y: SaveFormattedPage(Save) \n\
|
|
||||||
<Key>n: SaveFormattedPage(Cancel)
|
|
||||||
|
|
||||||
*manualBrowser*likeToSave*no.translations: #override \
|
|
||||||
<Btn1Down>,<Btn1Up>: SaveFormattedPage(Cancel) reset() \n\
|
|
||||||
<Key>y: SaveFormattedPage(Save) \n\
|
|
||||||
<Key>n: SaveFormattedPage(Cancel)
|
|
||||||
|
|
||||||
*manualBrowser*likeToSave*translations: #override \
|
|
||||||
<Key>y: SaveFormattedPage(Save) \n\
|
|
||||||
<Key>n: SaveFormattedPage(Cancel)
|
|
||||||
|
|
||||||
*helpButton.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: PopupHelp() reset()
|
|
||||||
|
|
||||||
*quitButton.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: Quit() reset()
|
|
||||||
|
|
||||||
*manpageButton.translations: #augment \
|
|
||||||
<Btn1Down>,<Btn1Up>: CreateNewManpage() reset()
|
|
||||||
|
|
||||||
! EOF.
|
|
@ -1,771 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: October 27, 1987
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
#include "vendor.h"
|
|
||||||
|
|
||||||
/* The files with the icon bits in them. */
|
|
||||||
|
|
||||||
#include "icon_open.h"
|
|
||||||
#include "icon_help.h"
|
|
||||||
#include "iconclosed.h"
|
|
||||||
|
|
||||||
static void CreateOptionMenu(ManpageGlobals * man_globals, Widget parent);
|
|
||||||
static void CreateSectionMenu(ManpageGlobals * man_globals, Widget parent);
|
|
||||||
static void StartManpage(ManpageGlobals * man_globals, Boolean help,
|
|
||||||
Boolean page);
|
|
||||||
static Widget *ConvertNamesToWidgets(Widget parent, const char **names);
|
|
||||||
|
|
||||||
/* Function Name: MakeTopBox
|
|
||||||
* Description: This function creates the top menu, in a shell widget.
|
|
||||||
* Arguments: none.
|
|
||||||
* Returns: the top level widget
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define TOPARGS 5
|
|
||||||
|
|
||||||
Widget top; /* needed in PopupWarning, misc.c */
|
|
||||||
|
|
||||||
void
|
|
||||||
MakeTopBox(void)
|
|
||||||
{
|
|
||||||
Widget form, command, label; /* widgets. */
|
|
||||||
Arg arglist[TOPARGS]; /* An argument list */
|
|
||||||
Cardinal num_args = 0; /* The number of arguments. */
|
|
||||||
ManpageGlobals *man_globals;
|
|
||||||
static const char *full_size[] = {
|
|
||||||
"topLabel", MANPAGE_BUTTON, NULL
|
|
||||||
};
|
|
||||||
static const char *half_size[] = {
|
|
||||||
HELP_BUTTON, QUIT_BUTTON, NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/* create the top icon. */
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNiconPixmap,
|
|
||||||
XCreateBitmapFromData(XtDisplay(initial_widget),
|
|
||||||
XtScreen(initial_widget)->root,
|
|
||||||
(const char *) iconclosed_bits,
|
|
||||||
iconclosed_width, iconclosed_height));
|
|
||||||
num_args++;
|
|
||||||
XtSetArg(arglist[num_args], XtNtitle, resources.title);
|
|
||||||
num_args++;
|
|
||||||
XtSetArg(arglist[num_args], XtNiconic, resources.iconic);
|
|
||||||
num_args++;
|
|
||||||
top = XtCreatePopupShell(TOPBOXNAME, topLevelShellWidgetClass,
|
|
||||||
initial_widget, arglist, num_args);
|
|
||||||
|
|
||||||
form = XtCreateManagedWidget("form", formWidgetClass, top,
|
|
||||||
NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
label = XtCreateManagedWidget("topLabel", labelWidgetClass, form,
|
|
||||||
NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNfromVert, label);
|
|
||||||
num_args++;
|
|
||||||
command = XtCreateManagedWidget(HELP_BUTTON, commandWidgetClass, form,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
/* use same vertical as help widget. */
|
|
||||||
XtSetArg(arglist[num_args], XtNfromHoriz, command);
|
|
||||||
num_args++;
|
|
||||||
command = XtCreateManagedWidget(QUIT_BUTTON, commandWidgetClass, form,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNfromVert, command);
|
|
||||||
num_args++;
|
|
||||||
command = XtCreateManagedWidget(MANPAGE_BUTTON, commandWidgetClass, form,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
help_widget = NULL; /* We have not seen the help yet. */
|
|
||||||
|
|
||||||
FormUpWidgets(form, full_size, half_size);
|
|
||||||
|
|
||||||
XtRealizeWidget(top);
|
|
||||||
/* add WM_COMMAND property */
|
|
||||||
XSetCommand(XtDisplay(top), XtWindow(top), saved_argv, saved_argc);
|
|
||||||
|
|
||||||
man_globals =
|
|
||||||
(ManpageGlobals *) XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
|
|
||||||
MakeSearchWidget(man_globals, top);
|
|
||||||
MakeSaveWidgets(man_globals, top);
|
|
||||||
|
|
||||||
SaveGlobals((man_globals->This_Manpage = top), man_globals);
|
|
||||||
XtMapWidget(top);
|
|
||||||
AddCursor(top, resources.cursors.top);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set up ICCCM delete window.
|
|
||||||
*/
|
|
||||||
XtOverrideTranslations
|
|
||||||
(top, XtParseTranslationTable("<Message>WM_PROTOCOLS: Quit()"));
|
|
||||||
(void) XSetWMProtocols(XtDisplay(top), XtWindow(top), &wm_delete_window, 1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateManpage
|
|
||||||
* Description: Creates a new manpage.
|
|
||||||
* Arguments: none.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Widget
|
|
||||||
CreateManpage(FILE * file)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals; /* The pseudo global structure. */
|
|
||||||
|
|
||||||
man_globals = InitPsuedoGlobals();
|
|
||||||
if (man_globals == NULL)
|
|
||||||
return NULL;
|
|
||||||
CreateManpageWidget(man_globals, MANNAME, TRUE);
|
|
||||||
|
|
||||||
if (file == NULL)
|
|
||||||
StartManpage(man_globals, OpenHelpfile(man_globals), FALSE);
|
|
||||||
else {
|
|
||||||
OpenFile(man_globals, file);
|
|
||||||
StartManpage(man_globals, FALSE, TRUE);
|
|
||||||
}
|
|
||||||
return (man_globals->This_Manpage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: InitPsuedoGlobals
|
|
||||||
* Description: Initializes the pseudo global variables.
|
|
||||||
* Arguments: none.
|
|
||||||
* Returns: a pointer to a new pseudo globals structure.
|
|
||||||
*/
|
|
||||||
|
|
||||||
ManpageGlobals *
|
|
||||||
InitPsuedoGlobals(void)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Allocate necessary memory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
man_globals =
|
|
||||||
(ManpageGlobals *) XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
|
|
||||||
if (!man_globals)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
man_globals->search_widget = NULL;
|
|
||||||
man_globals->section_name = (char **) XtMalloc((Cardinal) (sections *
|
|
||||||
sizeof(char *)));
|
|
||||||
man_globals->manpagewidgets.box = (Widget *) XtCalloc((Cardinal) sections,
|
|
||||||
(Cardinal)
|
|
||||||
sizeof(Widget));
|
|
||||||
|
|
||||||
/* Initialize the number of screens that will be shown */
|
|
||||||
|
|
||||||
man_globals->both_shown = resources.both_shown_initial;
|
|
||||||
|
|
||||||
return (man_globals);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateManpageWidget
|
|
||||||
* Description: Creates a new manual page widget.
|
|
||||||
* Arguments: man_globals - a new man_globals structure.
|
|
||||||
* name - name of this shell widget instance.
|
|
||||||
* full_instance - if true then create a full manpage,
|
|
||||||
* otherwise create stripped down version
|
|
||||||
* used for help.
|
|
||||||
* Returns: none
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MANPAGEARGS 10
|
|
||||||
|
|
||||||
void
|
|
||||||
CreateManpageWidget(ManpageGlobals * man_globals,
|
|
||||||
char *name, Boolean full_instance)
|
|
||||||
{
|
|
||||||
Arg arglist[MANPAGEARGS]; /* An argument list for widget creation */
|
|
||||||
Cardinal num_args; /* The number of arguments in the list. */
|
|
||||||
Widget mytop, pane, hpane, mysections; /* Widgets */
|
|
||||||
ManPageWidgets *mpw = &(man_globals->manpagewidgets);
|
|
||||||
|
|
||||||
num_args = (Cardinal) 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNwidth, default_width);
|
|
||||||
num_args++;
|
|
||||||
XtSetArg(arglist[num_args], XtNheight, default_height);
|
|
||||||
num_args++;
|
|
||||||
|
|
||||||
mytop = XtCreatePopupShell(name, topLevelShellWidgetClass, initial_widget,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
man_globals->This_Manpage = mytop; /* pointer to root widget of Manualpage. */
|
|
||||||
num_args = 0;
|
|
||||||
if (full_instance)
|
|
||||||
XtSetArg(arglist[num_args], XtNiconPixmap,
|
|
||||||
XCreateBitmapFromData(XtDisplay(mytop), XtScreen(mytop)->root,
|
|
||||||
(const char *) icon_open_bits,
|
|
||||||
icon_open_width, icon_open_height));
|
|
||||||
else
|
|
||||||
XtSetArg(arglist[num_args], XtNiconPixmap,
|
|
||||||
XCreateBitmapFromData(XtDisplay(mytop), XtScreen(mytop)->root,
|
|
||||||
(const char *) icon_help_bits,
|
|
||||||
icon_help_width, icon_help_height));
|
|
||||||
num_args++;
|
|
||||||
XtSetValues(mytop, arglist, num_args);
|
|
||||||
|
|
||||||
pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL,
|
|
||||||
(Cardinal) 0);
|
|
||||||
|
|
||||||
/* Create menu bar. */
|
|
||||||
|
|
||||||
hpane = XtCreateManagedWidget("horizPane", panedWidgetClass,
|
|
||||||
pane, NULL, (Cardinal) 0);
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNmenuName, OPTION_MENU);
|
|
||||||
num_args++;
|
|
||||||
(void) XtCreateManagedWidget("options", menuButtonWidgetClass,
|
|
||||||
hpane, arglist, num_args);
|
|
||||||
|
|
||||||
CreateOptionMenu(man_globals, mytop);
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNmenuName, SECTION_MENU);
|
|
||||||
num_args++;
|
|
||||||
mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
|
|
||||||
hpane, arglist, num_args);
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
if (full_instance) {
|
|
||||||
MakeSearchWidget(man_globals, mytop);
|
|
||||||
CreateSectionMenu(man_globals, mytop);
|
|
||||||
MakeSaveWidgets(man_globals, mytop);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
XtSetSensitive(mysections, FALSE);
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, FALSE);
|
|
||||||
XtSetValues(man_globals->dir_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->help_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->search_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, ONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, True);
|
|
||||||
XtSetValues(man_globals->print_entry, arglist, ONE);
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
|
|
||||||
man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
|
|
||||||
hpane, NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
/* Create Directory */
|
|
||||||
|
|
||||||
if (full_instance) {
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNallowVert, TRUE);
|
|
||||||
num_args++;
|
|
||||||
|
|
||||||
mpw->directory = XtCreateWidget(DIRECTORY_NAME, viewportWidgetClass,
|
|
||||||
pane, arglist, num_args);
|
|
||||||
|
|
||||||
man_globals->current_directory = INITIAL_DIR;
|
|
||||||
MakeDirectoryBox(man_globals, mpw->directory,
|
|
||||||
mpw->box + man_globals->current_directory,
|
|
||||||
man_globals->current_directory);
|
|
||||||
XtManageChild(mpw->box[man_globals->current_directory]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create Manpage */
|
|
||||||
|
|
||||||
mpw->manpage = XtCreateWidget(MANUALPAGE, scrollByLineWidgetClass,
|
|
||||||
pane, NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: StartManpage
|
|
||||||
* Description: Starts up a new manpage.
|
|
||||||
* Arguments: man_globals - the pseudo globals variable.
|
|
||||||
* help - is this a help file?
|
|
||||||
* page - Is there a page to display?
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
|
|
||||||
{
|
|
||||||
Widget dir = man_globals->manpagewidgets.directory;
|
|
||||||
Widget manpage = man_globals->manpagewidgets.manpage;
|
|
||||||
Widget label = man_globals->label;
|
|
||||||
Arg arglist[1];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If there is a helpfile then put up both screens if both_show is set.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (page || help) {
|
|
||||||
if (help)
|
|
||||||
strcpy(man_globals->manpage_title, "Xman Help");
|
|
||||||
|
|
||||||
if (man_globals->both_shown) {
|
|
||||||
XtManageChild(dir);
|
|
||||||
man_globals->dir_shown = TRUE;
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNpreferredPaneSize,
|
|
||||||
resources.directory_height);
|
|
||||||
XtSetValues(dir, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, FALSE);
|
|
||||||
XtSetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->dir_entry, arglist, ONE);
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNlabel, SHOW_ONE);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, ONE);
|
|
||||||
ChangeLabel(label,
|
|
||||||
man_globals->section_name[man_globals->
|
|
||||||
current_directory]);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ChangeLabel(label, man_globals->manpage_title);
|
|
||||||
}
|
|
||||||
XtManageChild(manpage);
|
|
||||||
man_globals->dir_shown = FALSE;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Since There is file to display, put up directory and do not allow change
|
|
||||||
* to manpage, show both, or help.
|
|
||||||
*/
|
|
||||||
else {
|
|
||||||
XtManageChild(dir);
|
|
||||||
man_globals->dir_shown = TRUE;
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, FALSE);
|
|
||||||
XtSetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->help_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, ONE);
|
|
||||||
man_globals->both_shown = FALSE;
|
|
||||||
ChangeLabel(label,
|
|
||||||
man_globals->section_name[man_globals->current_directory]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Start 'er up, and change the cursor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
XtRealizeWidget(man_globals->This_Manpage);
|
|
||||||
SaveGlobals(man_globals->This_Manpage, man_globals);
|
|
||||||
XtMapWidget(man_globals->This_Manpage);
|
|
||||||
AddCursor(man_globals->This_Manpage, resources.cursors.manpage);
|
|
||||||
XtSetArg(arglist[0], XtNtransientFor, man_globals->This_Manpage);
|
|
||||||
XtSetValues(XtParent(man_globals->standby), arglist, (Cardinal) 1);
|
|
||||||
XtSetValues(XtParent(man_globals->save), arglist, (Cardinal) 1);
|
|
||||||
XtRealizeWidget(XtParent(man_globals->standby));
|
|
||||||
XtRealizeWidget(XtParent(man_globals->save));
|
|
||||||
AddCursor(XtParent(man_globals->standby), resources.cursors.top);
|
|
||||||
AddCursor(XtParent(man_globals->save), resources.cursors.top);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set up ICCCM delete window.
|
|
||||||
*/
|
|
||||||
XtOverrideTranslations
|
|
||||||
(man_globals->This_Manpage,
|
|
||||||
XtParseTranslationTable("<Message>WM_PROTOCOLS: RemoveThisManpage()"));
|
|
||||||
(void) XSetWMProtocols(XtDisplay(man_globals->This_Manpage),
|
|
||||||
XtWindow(man_globals->This_Manpage),
|
|
||||||
&wm_delete_window, 1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: MenuDestroy
|
|
||||||
* Description: free's data associated with menu when it is destroyed.
|
|
||||||
* Arguments: w - menu widget.
|
|
||||||
* free_me - data to free.
|
|
||||||
* junk - not used.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ARGSUSED */
|
|
||||||
static void
|
|
||||||
MenuDestroy(Widget w, XtPointer free_me, XtPointer junk)
|
|
||||||
{
|
|
||||||
XtFree((char *) free_me);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateOptionMenu
|
|
||||||
* Description: Create the option menu.
|
|
||||||
* Arguments: man_globals - the manual page globals.
|
|
||||||
* parent - the button that activates the menu.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
CreateOptionMenu(ManpageGlobals * man_globals, Widget parent)
|
|
||||||
{
|
|
||||||
Widget menu, entry;
|
|
||||||
int i;
|
|
||||||
static const char *option_names[] = { /* Names of the buttons. */
|
|
||||||
DIRECTORY,
|
|
||||||
MANPAGE,
|
|
||||||
HELP,
|
|
||||||
SEARCH,
|
|
||||||
BOTH_SCREENS,
|
|
||||||
REMOVE_MANPAGE,
|
|
||||||
OPEN_MANPAGE,
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
PRINT_MANPAGE,
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
SHOW_VERSION,
|
|
||||||
QUIT
|
|
||||||
};
|
|
||||||
|
|
||||||
menu = XtCreatePopupShell(OPTION_MENU, simpleMenuWidgetClass, parent,
|
|
||||||
NULL, (Cardinal) 0);
|
|
||||||
man_globals->option_menu = menu;
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_OPTIONS; i++) {
|
|
||||||
entry = XtCreateManagedWidget(option_names[i], smeBSBObjectClass,
|
|
||||||
menu, NULL, ZERO);
|
|
||||||
XtAddCallback(entry, XtNcallback, OptionCallback,
|
|
||||||
(caddr_t) man_globals);
|
|
||||||
switch (i) {
|
|
||||||
case 0:
|
|
||||||
man_globals->dir_entry = entry;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
man_globals->manpage_entry = entry;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
man_globals->help_entry = entry;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
man_globals->search_entry = entry;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
man_globals->both_screens_entry = entry;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
man_globals->remove_entry = entry;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
man_globals->open_entry = entry;
|
|
||||||
break;
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
case 7:
|
|
||||||
man_globals->print_entry = entry;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
man_globals->version_entry = entry;
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
man_globals->quit_entry = entry;
|
|
||||||
break;
|
|
||||||
#else /* !INCLUDE_XPRINT_SUPPORT */
|
|
||||||
case 7:
|
|
||||||
man_globals->version_entry = entry;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
man_globals->quit_entry = entry;
|
|
||||||
break;
|
|
||||||
#endif /* !INCLUDE_XPRINT_SUPPORT */
|
|
||||||
default:
|
|
||||||
Error(("CreateOptionMenu: Unknown id=%d\n", i));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
XtVaSetValues(man_globals->print_entry, XtNsensitive, FALSE, NULL);
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateSectionMenu
|
|
||||||
* Description: Create the Section menu.
|
|
||||||
* Arguments: man_globals - the manual page globals.
|
|
||||||
* parent - the button that activates the menu.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
|
|
||||||
{
|
|
||||||
Widget menu, entry;
|
|
||||||
int i;
|
|
||||||
MenuStruct *menu_struct;
|
|
||||||
Arg args[1];
|
|
||||||
Cardinal num_args;
|
|
||||||
char entry_name[BUFSIZ];
|
|
||||||
|
|
||||||
menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
|
|
||||||
NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
for (i = 0; i < sections; i++) {
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(args[num_args], XtNlabel, manual[i].blabel);
|
|
||||||
num_args++;
|
|
||||||
snprintf(entry_name, sizeof(entry_name), "section%d", i);
|
|
||||||
|
|
||||||
entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
|
|
||||||
menu, args, num_args);
|
|
||||||
menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
|
|
||||||
menu_struct->data = (caddr_t) man_globals;
|
|
||||||
menu_struct->number = i;
|
|
||||||
XtAddCallback(entry, XtNcallback, DirPopupCallback,
|
|
||||||
(caddr_t) menu_struct);
|
|
||||||
XtAddCallback(entry, XtNdestroyCallback, MenuDestroy,
|
|
||||||
(caddr_t) menu_struct);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateList
|
|
||||||
* Description: this function prints a label in the directory list
|
|
||||||
* Arguments: section - the manual section.
|
|
||||||
* Returns: none
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char **
|
|
||||||
CreateList(int section)
|
|
||||||
{
|
|
||||||
char **ret_list, **current;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
ret_list = (char **) XtMalloc((manual[section].nentries + 1) *
|
|
||||||
sizeof(char *));
|
|
||||||
|
|
||||||
for (current = ret_list, count = 0; count < manual[section].nentries;
|
|
||||||
count++, current++)
|
|
||||||
*current = CreateManpageName(manual[section].entries[count], section,
|
|
||||||
manual[section].flags);
|
|
||||||
|
|
||||||
*current = NULL; /* NULL terminate the list. */
|
|
||||||
return (ret_list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: MakeDirectoryBox
|
|
||||||
* Description: make a directory box.
|
|
||||||
* Arguments: man_globals - the pseudo global structure for each manpage.
|
|
||||||
* parent - this guys parent widget.
|
|
||||||
* dir_disp - the directory display widget.
|
|
||||||
* section - the section number.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
MakeDirectoryBox(ManpageGlobals * man_globals, Widget parent, Widget * dir_disp,
|
|
||||||
int section)
|
|
||||||
{
|
|
||||||
Arg arglist[10];
|
|
||||||
Cardinal num_args;
|
|
||||||
char *name, label_name[BUFSIZ];
|
|
||||||
|
|
||||||
if (*dir_disp != NULL) /* If we have one, don't make another. */
|
|
||||||
return;
|
|
||||||
|
|
||||||
name = manual[section].blabel; /* Set the section name */
|
|
||||||
snprintf(label_name, sizeof(label_name), "Directory of: %s", name);
|
|
||||||
man_globals->section_name[section] = XtNewString(label_name);
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNlist, CreateList(section));
|
|
||||||
num_args++;
|
|
||||||
XtSetArg(arglist[num_args], XtNfont, resources.fonts.directory);
|
|
||||||
num_args++;
|
|
||||||
|
|
||||||
*dir_disp = XtCreateWidget(DIRECTORY_NAME, listWidgetClass, parent,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
XtAddCallback(*dir_disp, XtNcallback,
|
|
||||||
DirectoryHandler, (caddr_t) man_globals);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: MakeSaveWidgets.
|
|
||||||
* Description: This functions creates two popup widgets, the please
|
|
||||||
* standby widget and the would you like to save widget.
|
|
||||||
* Arguments: man_globals - the pseudo globals structure for each man page
|
|
||||||
* parent - the realized parent for both popups.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
MakeSaveWidgets(ManpageGlobals * man_globals, Widget parent)
|
|
||||||
{
|
|
||||||
Widget shell, dialog; /* misc. widgets. */
|
|
||||||
Arg warg[1];
|
|
||||||
Cardinal n = 0;
|
|
||||||
|
|
||||||
/* make the please stand by popup widget. */
|
|
||||||
if (XtIsRealized(parent)) {
|
|
||||||
XtSetArg(warg[0], XtNtransientFor, parent);
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
shell = XtCreatePopupShell("pleaseStandBy", transientShellWidgetClass,
|
|
||||||
parent, warg, (Cardinal) n);
|
|
||||||
|
|
||||||
man_globals->standby = XtCreateManagedWidget("label", labelWidgetClass,
|
|
||||||
shell, NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
man_globals->save = XtCreatePopupShell("likeToSave",
|
|
||||||
transientShellWidgetClass,
|
|
||||||
parent, warg, n);
|
|
||||||
|
|
||||||
dialog = XtCreateManagedWidget("dialog", dialogWidgetClass,
|
|
||||||
man_globals->save, NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
XawDialogAddButton(dialog, FILE_SAVE, NULL, NULL);
|
|
||||||
XawDialogAddButton(dialog, CANCEL_FILE_SAVE, NULL, NULL);
|
|
||||||
|
|
||||||
if (XtIsRealized(parent)) {
|
|
||||||
XtRealizeWidget(shell);
|
|
||||||
AddCursor(shell, resources.cursors.top);
|
|
||||||
XtRealizeWidget(man_globals->save);
|
|
||||||
AddCursor(man_globals->save, resources.cursors.top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: FormUpWidgets
|
|
||||||
* Description: Sizes widgets to look nice.
|
|
||||||
* Arguments: parent - the common parent of all the widgets.
|
|
||||||
* full_size - array of widget names that will be full size.
|
|
||||||
* half_size - array of widget names that will be half size.
|
|
||||||
* Returns: none
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
FormUpWidgets(Widget parent, const char **full_size, const char **half_size)
|
|
||||||
{
|
|
||||||
Widget *full_widgets, *half_widgets, *temp, long_widget;
|
|
||||||
Dimension longest, length, b_width;
|
|
||||||
int interior_dist;
|
|
||||||
Arg arglist[2];
|
|
||||||
|
|
||||||
full_widgets = ConvertNamesToWidgets(parent, full_size);
|
|
||||||
half_widgets = ConvertNamesToWidgets(parent, half_size);
|
|
||||||
|
|
||||||
long_widget = NULL;
|
|
||||||
longest = 0;
|
|
||||||
XtSetArg(arglist[0], XtNwidth, &length);
|
|
||||||
XtSetArg(arglist[1], XtNborderWidth, &b_width);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find Longest widget.
|
|
||||||
*/
|
|
||||||
|
|
||||||
for (temp = full_widgets; *temp != (Widget) NULL; temp++) {
|
|
||||||
XtGetValues(*temp, arglist, (Cardinal) 2);
|
|
||||||
length += 2 * b_width;
|
|
||||||
if (length > longest) {
|
|
||||||
longest = length;
|
|
||||||
long_widget = *temp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (long_widget == (Widget) NULL) { /* Make sure we found one. */
|
|
||||||
PopupWarning(GetGlobals(parent),
|
|
||||||
"Could not find longest widget, aborting...");
|
|
||||||
XtFree((char *) full_widgets);
|
|
||||||
XtFree((char *) half_widgets);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set all other full_widgets to this length.
|
|
||||||
*/
|
|
||||||
|
|
||||||
for (temp = full_widgets; *temp != (Widget) NULL; temp++)
|
|
||||||
if (long_widget != *temp) {
|
|
||||||
Dimension width, border_width;
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNborderWidth, &border_width);
|
|
||||||
XtGetValues(*temp, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
width = longest - 2 * border_width;
|
|
||||||
XtSetArg(arglist[0], XtNwidth, width);
|
|
||||||
XtSetValues(*temp, arglist, (Cardinal) 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set all the half widgets to the right length.
|
|
||||||
*/
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNdefaultDistance, &interior_dist);
|
|
||||||
XtGetValues(parent, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
for (temp = half_widgets; *temp != (Widget) NULL; temp++) {
|
|
||||||
Dimension width, border_width;
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNborderWidth, &border_width);
|
|
||||||
XtGetValues(*temp, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
width = (int) (longest - interior_dist) / 2 - 2 * border_width;
|
|
||||||
XtSetArg(arglist[0], XtNwidth, width);
|
|
||||||
XtSetValues(*temp, arglist, (Cardinal) 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
XtFree((char *) full_widgets);
|
|
||||||
XtFree((char *) half_widgets);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: ConvertNamesToWidgets
|
|
||||||
* Description: Converts a list of names into a list of widgets.
|
|
||||||
* Arguments: parent - the common parent of these widgets.
|
|
||||||
* names - an array of widget names.
|
|
||||||
* Returns: an array of widget id's.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static Widget *
|
|
||||||
ConvertNamesToWidgets(Widget parent, const char **names)
|
|
||||||
{
|
|
||||||
const char **temp;
|
|
||||||
Widget *ids, *temp_ids;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
for (count = 0, temp = names; *temp != NULL; count++, temp++);
|
|
||||||
|
|
||||||
ids = (Widget *) XtMalloc((count + 1) * sizeof(Widget));
|
|
||||||
|
|
||||||
for (temp_ids = ids; *names != NULL; names++, temp_ids++) {
|
|
||||||
*temp_ids = XtNameToWidget(parent, *names);
|
|
||||||
if (*temp_ids == NULL) {
|
|
||||||
char error_buf[BUFSIZ];
|
|
||||||
|
|
||||||
snprintf(error_buf, sizeof(error_buf),
|
|
||||||
"Could not find widget named '%s'", *names);
|
|
||||||
PrintError(error_buf);
|
|
||||||
XtFree((char *) ids);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*temp_ids = (Widget) NULL;
|
|
||||||
return (ids);
|
|
||||||
}
|
|
347
app/xman/compile
347
app/xman/compile
@ -1,347 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
|
|
||||||
scriptversion=2012-10-14.11; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
|
||||||
#
|
|
||||||
# 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, 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
|
|
||||||
# We need space, tab and new line, in precisely that order. Quoting is
|
|
||||||
# there to prevent tools from complaining about whitespace usage.
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
file_conv=
|
|
||||||
|
|
||||||
# func_file_conv build_file lazy
|
|
||||||
# Convert a $build file to $host form and store it in $file
|
|
||||||
# Currently only supports Windows hosts. If the determined conversion
|
|
||||||
# type is listed in (the comma separated) LAZY, no conversion will
|
|
||||||
# take place.
|
|
||||||
func_file_conv ()
|
|
||||||
{
|
|
||||||
file=$1
|
|
||||||
case $file in
|
|
||||||
/ | /[!/]*) # absolute file, and not a UNC file
|
|
||||||
if test -z "$file_conv"; then
|
|
||||||
# lazily determine how to convert abs files
|
|
||||||
case `uname -s` in
|
|
||||||
MINGW*)
|
|
||||||
file_conv=mingw
|
|
||||||
;;
|
|
||||||
CYGWIN*)
|
|
||||||
file_conv=cygwin
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
file_conv=wine
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
case $file_conv/,$2, in
|
|
||||||
*,$file_conv,*)
|
|
||||||
;;
|
|
||||||
mingw/*)
|
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
||||||
;;
|
|
||||||
cygwin/*)
|
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
wine/*)
|
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashL linkdir
|
|
||||||
# Make cl look for libraries in LINKDIR
|
|
||||||
func_cl_dashL ()
|
|
||||||
{
|
|
||||||
func_file_conv "$1"
|
|
||||||
if test -z "$lib_path"; then
|
|
||||||
lib_path=$file
|
|
||||||
else
|
|
||||||
lib_path="$lib_path;$file"
|
|
||||||
fi
|
|
||||||
linker_opts="$linker_opts -LIBPATH:$file"
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashl library
|
|
||||||
# Do a library search-path lookup for cl
|
|
||||||
func_cl_dashl ()
|
|
||||||
{
|
|
||||||
lib=$1
|
|
||||||
found=no
|
|
||||||
save_IFS=$IFS
|
|
||||||
IFS=';'
|
|
||||||
for dir in $lib_path $LIB
|
|
||||||
do
|
|
||||||
IFS=$save_IFS
|
|
||||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.dll.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/$lib.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/lib$lib.a"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/lib$lib.a
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS=$save_IFS
|
|
||||||
|
|
||||||
if test "$found" != yes; then
|
|
||||||
lib=$lib.lib
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_wrapper cl arg...
|
|
||||||
# Adjust compile command to suit cl
|
|
||||||
func_cl_wrapper ()
|
|
||||||
{
|
|
||||||
# Assume a capable shell
|
|
||||||
lib_path=
|
|
||||||
shared=:
|
|
||||||
linker_opts=
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.[oO][bB][jJ])
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fo"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fe"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
-I)
|
|
||||||
eat=1
|
|
||||||
func_file_conv "$2" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-I*)
|
|
||||||
func_file_conv "${1#-I}" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashl "$2"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l*)
|
|
||||||
func_cl_dashl "${1#-l}"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-L)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashL "$2"
|
|
||||||
;;
|
|
||||||
-L*)
|
|
||||||
func_cl_dashL "${1#-L}"
|
|
||||||
;;
|
|
||||||
-static)
|
|
||||||
shared=false
|
|
||||||
;;
|
|
||||||
-Wl,*)
|
|
||||||
arg=${1#-Wl,}
|
|
||||||
save_ifs="$IFS"; IFS=','
|
|
||||||
for flag in $arg; do
|
|
||||||
IFS="$save_ifs"
|
|
||||||
linker_opts="$linker_opts $flag"
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
;;
|
|
||||||
-Xlinker)
|
|
||||||
eat=1
|
|
||||||
linker_opts="$linker_opts $2"
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
|
||||||
func_file_conv "$1"
|
|
||||||
set x "$@" -Tp"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
|
||||||
func_file_conv "$1" mingw
|
|
||||||
set x "$@" "$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
if test -n "$linker_opts"; then
|
|
||||||
linker_opts="-link$linker_opts"
|
|
||||||
fi
|
|
||||||
exec "$@" $linker_opts
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
eat=
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
|
||||||
arguments, and rename the output as expected.
|
|
||||||
|
|
||||||
If you are trying to build a whole package this is not the
|
|
||||||
right script to run: please start by reading the file 'INSTALL'.
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "compile $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ofile=
|
|
||||||
cfile=
|
|
||||||
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
# So we strip '-o arg' only if arg is an object.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.obj)
|
|
||||||
ofile=$2
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" -o "$2"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*.c)
|
|
||||||
cfile=$1
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$ofile" || test -z "$cfile"; then
|
|
||||||
# If no '-o' option was seen then we might have been invoked from a
|
|
||||||
# pattern rule where we don't need one. That is ok -- this is a
|
|
||||||
# normal compilation that the losing compiler can handle. If no
|
|
||||||
# '.c' file was seen then we are probably linking. That is also
|
|
||||||
# ok.
|
|
||||||
exec "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Name of file we expect compiler to create.
|
|
||||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
|
||||||
|
|
||||||
# Create the lock directory.
|
|
||||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
|
||||||
# that we are using for the .o file. Also, base the name on the expected
|
|
||||||
# object file name, since that is what matters with a parallel build.
|
|
||||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
|
||||||
while true; do
|
|
||||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
# FIXME: race condition here if user kills between mkdir and trap.
|
|
||||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|
||||||
|
|
||||||
# Run the compile.
|
|
||||||
"$@"
|
|
||||||
ret=$?
|
|
||||||
|
|
||||||
if test -f "$cofile"; then
|
|
||||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
|
||||||
elif test -f "${cofile}bj"; then
|
|
||||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rmdir "$lockdir"
|
|
||||||
exit $ret
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
1537
app/xman/config.guess
vendored
1537
app/xman/config.guess
vendored
File diff suppressed because it is too large
Load Diff
@ -1,94 +0,0 @@
|
|||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the groff package. */
|
|
||||||
#undef HAS_GROFF
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#undef HAVE_INTTYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
|
||||||
#undef HAVE_MKSTEMP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#undef HAVE_STDINT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#undef HAVE_STDLIB_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#undef HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#undef HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#undef HAVE_SYS_STAT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#undef HAVE_SYS_TYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#undef HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Default local man page search path (default: none) */
|
|
||||||
#undef LOCALMANPATH
|
|
||||||
|
|
||||||
/* Define to path to man config file if you have one */
|
|
||||||
#undef MANCONF
|
|
||||||
|
|
||||||
/* Define to 1 if you have BSD format manpath.config */
|
|
||||||
#undef MANCONFIGSTYLE_BSD
|
|
||||||
|
|
||||||
/* Define to 1 if you have FreeBSD format manpath.config */
|
|
||||||
#undef MANCONFIGSTYLE_FreeBSD
|
|
||||||
|
|
||||||
/* Define to 1 if you have Linux format man.conf or man.config */
|
|
||||||
#undef MANCONFIGSTYLE_Linux
|
|
||||||
|
|
||||||
/* Define to 1 if you have OpenBSD format manpath.config */
|
|
||||||
#undef MANCONFIGSTYLE_OpenBSD
|
|
||||||
|
|
||||||
/* Name of package */
|
|
||||||
#undef PACKAGE
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#undef PACKAGE_BUGREPORT
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#undef PACKAGE_NAME
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#undef PACKAGE_STRING
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#undef PACKAGE_TARNAME
|
|
||||||
|
|
||||||
/* Define to the home page for this package. */
|
|
||||||
#undef PACKAGE_URL
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#undef PACKAGE_VERSION
|
|
||||||
|
|
||||||
/* Major version of this package */
|
|
||||||
#undef PACKAGE_VERSION_MAJOR
|
|
||||||
|
|
||||||
/* Minor version of this package */
|
|
||||||
#undef PACKAGE_VERSION_MINOR
|
|
||||||
|
|
||||||
/* Patch version of this package */
|
|
||||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
|
||||||
|
|
||||||
/* Release version string if set */
|
|
||||||
#undef RELEASE_VERSION
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#undef STDC_HEADERS
|
|
||||||
|
|
||||||
/* Default system man page search path (default: none) */
|
|
||||||
#undef SYSMANPATH
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef VERSION
|
|
1793
app/xman/config.sub
vendored
1793
app/xman/config.sub
vendored
File diff suppressed because it is too large
Load Diff
12371
app/xman/configure
vendored
12371
app/xman/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,154 +0,0 @@
|
|||||||
|
|
||||||
dnl Copyright 2005 Red Hat, Inc.
|
|
||||||
dnl
|
|
||||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
dnl the above copyright notice appear in all copies and that both that
|
|
||||||
dnl copyright notice and this permission notice appear in supporting
|
|
||||||
dnl documentation, and that the name of Red Hat not be used in
|
|
||||||
dnl advertising or publicity pertaining to distribution of the software without
|
|
||||||
dnl specific, written prior permission. Red Hat makes no
|
|
||||||
dnl representations about the suitability of this software for any purpose. It
|
|
||||||
dnl is provided "as is" without express or implied warranty.
|
|
||||||
dnl
|
|
||||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
dnl PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
dnl
|
|
||||||
dnl Process this file with autoconf to create configure.
|
|
||||||
|
|
||||||
# Initialize Autoconf
|
|
||||||
AC_PREREQ([2.60])
|
|
||||||
AC_INIT([xman], [1.1.4],
|
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xman])
|
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
|
||||||
|
|
||||||
# Initialize Automake
|
|
||||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
|
||||||
|
|
||||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
|
||||||
m4_ifndef([XORG_MACROS_VERSION],
|
|
||||||
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
|
|
||||||
XORG_MACROS_VERSION(1.8)
|
|
||||||
XORG_DEFAULT_OPTIONS
|
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
|
|
||||||
AC_CHECK_PROG([GROFF], [groff], [found], [missing])
|
|
||||||
if test "x$GROFF" = "xfound" ; then
|
|
||||||
AC_DEFINE([HAS_GROFF], 1, [Define to 1 if you have the groff package.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS([mkstemp])
|
|
||||||
|
|
||||||
AC_ARG_WITH(helpdir,
|
|
||||||
AS_HELP_STRING([--with-helpdir=<path>],
|
|
||||||
[Set default directory for xman.help (default: ${datadir}/X11)]),
|
|
||||||
[HELPDIR="$withval"],
|
|
||||||
[HELPDIR=${datadir}/X11])
|
|
||||||
AC_SUBST([HELPDIR])
|
|
||||||
|
|
||||||
AC_ARG_WITH(sysmanpath,
|
|
||||||
AS_HELP_STRING([--with-sysmanpath=<path>],
|
|
||||||
[Set default system man page search path]),
|
|
||||||
[SYSMANPATH="$withval"], [])
|
|
||||||
if test x$SYSMANPATH != x; then
|
|
||||||
AC_DEFINE_UNQUOTED(SYSMANPATH, "$SYSMANPATH",
|
|
||||||
[Default system man page search path (default: none)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH(localmanpath,
|
|
||||||
AS_HELP_STRING([--with-localmanpath=<path>],
|
|
||||||
[Set default local man page search path]),
|
|
||||||
[LOCALMANPATH="$withval"], [])
|
|
||||||
if test x$LOCALMANPATH != x; then
|
|
||||||
AC_DEFINE_UNQUOTED(LOCALMANPATH, "$LOCALMANPATH",
|
|
||||||
[Default local man page search path (default: none)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Obtain compiler/linker options from depedencies
|
|
||||||
PKG_CHECK_MODULES(XMAN, [xproto >= 7.0.17 xaw7 xt])
|
|
||||||
|
|
||||||
AC_ARG_WITH(manconfig,
|
|
||||||
AS_HELP_STRING([--with-manconfig=<filename>],
|
|
||||||
[Set default system man configuration file]),
|
|
||||||
[MANCONF="$withval"], [])
|
|
||||||
if test x$MANCONF = x; then
|
|
||||||
# Check for man page config files
|
|
||||||
AC_CHECK_FILE([/etc/man.conf], [MANCONF="/etc/man.conf"],
|
|
||||||
AC_CHECK_FILE([/etc/man.config], [MANCONF="/etc/man.config"],
|
|
||||||
AC_CHECK_FILE([/etc/manpath.config], [MANCONF="/etc/manpath.config"],
|
|
||||||
AC_CHECK_FILE([/usr/share/misc/man.conf], [MANCONF="/usr/share/misc/man.conf"]))))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$MANCONF != x ; then
|
|
||||||
AC_DEFINE_UNQUOTED(MANCONF, "$MANCONF",
|
|
||||||
[Define to path to man config file if you have one])
|
|
||||||
|
|
||||||
# Try to determine format of config file
|
|
||||||
# would be better to somehow determine from the files themselves, but
|
|
||||||
# we'll guess based on pathname and OS for now (mirrors old Imake tests)
|
|
||||||
AC_MSG_CHECKING([man config file format])
|
|
||||||
if test x$MANCONF = x/etc/manpath.config ; then
|
|
||||||
MAN_CONFIG_STYLE="FreeBSD"
|
|
||||||
else
|
|
||||||
case $host_os in
|
|
||||||
*darwin* | *openbsd* | *netbsd* )
|
|
||||||
MAN_CONFIG_STYLE="OpenBSD"
|
|
||||||
;;
|
|
||||||
*linux* | cygwin* )
|
|
||||||
MAN_CONFIG_STYLE="Linux"
|
|
||||||
;;
|
|
||||||
*bsd* )
|
|
||||||
MAN_CONFIG_STYLE="BSD"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($MAN_CONFIG_STYLE)
|
|
||||||
|
|
||||||
case $MAN_CONFIG_STYLE in
|
|
||||||
FreeBSD)
|
|
||||||
AC_DEFINE([MANCONFIGSTYLE_FreeBSD],1,
|
|
||||||
[Define to 1 if you have FreeBSD format manpath.config])
|
|
||||||
;;
|
|
||||||
OpenBSD)
|
|
||||||
AC_DEFINE([MANCONFIGSTYLE_OpenBSD],1,
|
|
||||||
[Define to 1 if you have OpenBSD format manpath.config])
|
|
||||||
;;
|
|
||||||
BSD)
|
|
||||||
AC_DEFINE([MANCONFIGSTYLE_BSD],1,
|
|
||||||
[Define to 1 if you have BSD format manpath.config])
|
|
||||||
;;
|
|
||||||
Linux)
|
|
||||||
AC_DEFINE([MANCONFIGSTYLE_Linux],1,
|
|
||||||
[Define to 1 if you have Linux format man.conf or man.config])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([Could not determine man page file config format.])
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES(APPDEFS, xt)
|
|
||||||
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
|
|
||||||
AC_ARG_WITH(appdefaultdir,
|
|
||||||
AS_HELP_STRING([--with-appdefaultdir=<pathname>],
|
|
||||||
[specify directory for app-defaults files (default is autodetected)]),
|
|
||||||
[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
|
|
||||||
AC_SUBST(appdefaultdir)
|
|
||||||
|
|
||||||
if test "x$RELEASE_VERSION" != "x"; then
|
|
||||||
AC_DEFINE_UNQUOTED([RELEASE_VERSION], "$RELEASE_VERSION",
|
|
||||||
[Release version string if set])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
|
||||||
Makefile
|
|
||||||
man/Makefile])
|
|
||||||
AC_OUTPUT
|
|
148
app/xman/defs.h
148
app/xman/defs.h
@ -1,148 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: October 22, 1987
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HELPFILE
|
|
||||||
#define HELPFILE "/usr/lib/X11/xman.help" /* name of the default helpfile. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The default cursors */
|
|
||||||
|
|
||||||
#define XMAN_CURSOR "left_ptr" /* Top level cursor. */
|
|
||||||
#define HELP_CURSOR "left_ptr" /* The help cursor. */
|
|
||||||
#define MANPAGE_CURSOR "left_ptr" /* The manpage cursor. */
|
|
||||||
#define SEARCH_ENTRY_CURSOR "question_arrow" /* The search text widget
|
|
||||||
cursor. */
|
|
||||||
#define DIRECTORY_NORMAL "fixed" /* The default dir font */
|
|
||||||
|
|
||||||
#define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
|
|
||||||
#define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
|
|
||||||
|
|
||||||
#define HELP_BUTTON "helpButton" /* Name of top help button */
|
|
||||||
#define QUIT_BUTTON "quitButton" /* Name of top quit button */
|
|
||||||
#define MANPAGE_BUTTON "manpageButton" /* Name of top manpage button */
|
|
||||||
|
|
||||||
#define TOPBOXNAME "topBox" /* Name of the Top Box. */
|
|
||||||
#define MANNAME "manualBrowser" /* name for each manual page widget. */
|
|
||||||
#define SEARCHNAME "search" /* The name for the search widget. */
|
|
||||||
#define HELPNAME "help" /* The name of the help widget. */
|
|
||||||
#define DIRECTORY_NAME "directory" /* name of the directory widget. */
|
|
||||||
#define MANUALPAGE "manualPage" /* name of the Scrollbyline widget that
|
|
||||||
contains the man page. */
|
|
||||||
#define DIALOG "dialog"
|
|
||||||
|
|
||||||
/* Names of the menu buttons */
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
#define NUM_OPTIONS 10 /* Number of menu options. */
|
|
||||||
#else /* !INCLUDE_XPRINT_SUPPORT */
|
|
||||||
#define NUM_OPTIONS 9 /* Number of menu options. */
|
|
||||||
#endif /* !INCLUDE_XPRINT_SUPPORT */
|
|
||||||
|
|
||||||
#define DIRECTORY "displayDirectory"
|
|
||||||
#define MANPAGE "displayManualPage"
|
|
||||||
#define HELP "help"
|
|
||||||
#define SEARCH "search"
|
|
||||||
#define BOTH_SCREENS "showBothScreens"
|
|
||||||
#define REMOVE_MANPAGE "removeThisManpage"
|
|
||||||
#define OPEN_MANPAGE "openNewManpage"
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
#define PRINT_MANPAGE "printManualPage"
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
#define SHOW_VERSION "showVersion"
|
|
||||||
#define QUIT "quit"
|
|
||||||
|
|
||||||
/* definitions of string to use for show both and show one. */
|
|
||||||
|
|
||||||
#define SHOW_BOTH "Show Both Screens"
|
|
||||||
#define SHOW_ONE "Show One Screen"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Things will not look right if you change these names to make
|
|
||||||
* MANUALSEARCH longer APROPOSSEARCH, see search.c for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MANUALSEARCH "manualPage"
|
|
||||||
#define APROPOSSEARCH "apropos"
|
|
||||||
#define CANCEL "cancel"
|
|
||||||
|
|
||||||
#define MANUAL 0
|
|
||||||
#define APROPOS 1
|
|
||||||
|
|
||||||
#define NO_SECTION_DEFAULTS ("no default sections")
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Define HANDLE_ROFFSEQ to enable parsing of '\" <string>
|
|
||||||
* sequences in source files to set the format pipeline.
|
|
||||||
* This is necessary because the default pipeline causes incorrect
|
|
||||||
* display of ascii(7) on Linux.
|
|
||||||
* This depends on GNU roff.
|
|
||||||
*/
|
|
||||||
#ifdef HAS_GROFF
|
|
||||||
#define HANDLE_ROFFSEQ
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFAULT_WIDTH 500 /* The default width of xman. */
|
|
||||||
#define SECTALLOC 8 /* The number of entries allocated
|
|
||||||
at a time for the manual structures. */
|
|
||||||
#define ENTRYALLOC 100 /* The number of entries allocated
|
|
||||||
at a time for a section. */
|
|
||||||
|
|
||||||
#define INITIAL_DIR 0 /* The Initial Directory displayed. */
|
|
||||||
|
|
||||||
#define COPY "cp" /* copy command */
|
|
||||||
#define CHMOD_MODE 00666 /* permissions set on saved formatted files */
|
|
||||||
#define MANDESC "mandesc" /* name of the mandesc files */
|
|
||||||
|
|
||||||
#define INDENT 15
|
|
||||||
#define TYP20STR "MMMMMMMMMMMMMMMMMMMM"
|
|
||||||
|
|
||||||
#define FILE_SAVE "yes"
|
|
||||||
#define CANCEL_FILE_SAVE "no"
|
|
||||||
#define MANTEMP "/tmp/xmanXXXXXX"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Macro Definitions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define streq(a, b) ( strcmp((a), (b)) == 0 )
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Function definitions moved to man.h
|
|
||||||
*/
|
|
787
app/xman/depcomp
787
app/xman/depcomp
@ -1,787 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
|
||||||
|
|
||||||
scriptversion=2012-07-12.20; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2012 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 2, 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
|
||||||
as side-effects.
|
|
||||||
|
|
||||||
Environment variables:
|
|
||||||
depmode Dependency tracking mode.
|
|
||||||
source Source file read by 'PROGRAMS ARGS'.
|
|
||||||
object Object file output by 'PROGRAMS ARGS'.
|
|
||||||
DEPDIR directory where to store dependencies.
|
|
||||||
depfile Dependency file to output.
|
|
||||||
tmpdepfile Temporary file to use when outputting dependencies.
|
|
||||||
libtool Whether libtool is used (yes/no).
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "depcomp $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# A tabulation character.
|
|
||||||
tab=' '
|
|
||||||
# A newline character.
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
|
|
||||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
|
||||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
|
||||||
depfile=${depfile-`echo "$object" |
|
|
||||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
|
||||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
|
|
||||||
# Avoid interferences from the environment.
|
|
||||||
gccflag= dashmflag=
|
|
||||||
|
|
||||||
# Some modes work just like other modes, but use different flags. We
|
|
||||||
# parameterize here, but still list the modes in the big case below,
|
|
||||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
|
||||||
# here, because this file can only contain one case statement.
|
|
||||||
if test "$depmode" = hp; then
|
|
||||||
# HP compiler uses -M and no extra arg.
|
|
||||||
gccflag=-M
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = dashXmstdout; then
|
|
||||||
# This is just like dashmstdout with a different argument.
|
|
||||||
dashmflag=-xM
|
|
||||||
depmode=dashmstdout
|
|
||||||
fi
|
|
||||||
|
|
||||||
cygpath_u="cygpath -u -f -"
|
|
||||||
if test "$depmode" = msvcmsys; then
|
|
||||||
# This is just like msvisualcpp but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvisualcpp
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = msvc7msys; then
|
|
||||||
# This is just like msvc7 but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvc7
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = xlc; then
|
|
||||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
|
||||||
gccflag=-qmakedep=gcc,-MF
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$depmode" in
|
|
||||||
gcc3)
|
|
||||||
## gcc 3 implements dependency tracking that does exactly what
|
|
||||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
|
||||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
|
||||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
|
||||||
## the command line argument order; so add the flags where they
|
|
||||||
## appear in depend2.am. Note that the slowdown incurred here
|
|
||||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
|
||||||
*) set fnord "$@" "$arg" ;;
|
|
||||||
esac
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
done
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
mv "$tmpdepfile" "$depfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
gcc)
|
|
||||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
|
||||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
|
||||||
## (see the conditional assignment to $gccflag above).
|
|
||||||
## There are various ways to get dependency output from gcc. Here's
|
|
||||||
## why we pick this rather obscure method:
|
|
||||||
## - Don't want to use -MD because we'd like the dependencies to end
|
|
||||||
## up in a subdir. Having to rename by hand is ugly.
|
|
||||||
## (We might end up doing this anyway to support other compilers.)
|
|
||||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
|
||||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
|
||||||
## supported by the other compilers which use the 'gcc' depmode.
|
|
||||||
## - Using -M directly means running the compiler twice (even worse
|
|
||||||
## than renaming).
|
|
||||||
if test -z "$gccflag"; then
|
|
||||||
gccflag=-MD,
|
|
||||||
fi
|
|
||||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
|
||||||
## The second -e expression handles DOS-style file names with drive letters.
|
|
||||||
sed -e 's/^[^:]*: / /' \
|
|
||||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
|
||||||
## This next piece of magic avoids the "deleted header file" problem.
|
|
||||||
## The problem is that when a header file which appears in a .P file
|
|
||||||
## is deleted, the dependency causes make to die (because there is
|
|
||||||
## typically no way to rebuild the header). We avoid this by adding
|
|
||||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
|
||||||
## this for us directly.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" |
|
|
||||||
## Some versions of gcc put a space before the ':'. On the theory
|
|
||||||
## that the space means something, we add a space to the output as
|
|
||||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
|
||||||
## to the object. Take care to not repeat it in the output.
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
sgi)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
|
||||||
else
|
|
||||||
"$@" -MDupdate "$tmpdepfile"
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
|
|
||||||
# Clip off the initial element (the dependent). Don't try to be
|
|
||||||
# clever and replace this with sed code, as IRIX sed won't handle
|
|
||||||
# lines with more than a fixed number of characters (4096 in
|
|
||||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
|
||||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
|
||||||
# dependency line.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
|
||||||
tr "$nl" ' ' >> "$depfile"
|
|
||||||
echo >> "$depfile"
|
|
||||||
|
|
||||||
# The second pass generates a dummy entry for each header file.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
|
||||||
>> "$depfile"
|
|
||||||
else
|
|
||||||
# The sourcefile does not contain any dependencies, so just
|
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
|
||||||
# "include basename.Plo" scheme.
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
xlc)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
aix)
|
|
||||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
|
||||||
# in a .u file. In older versions, this file always lives in the
|
|
||||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
|
||||||
# start of each line; $object doesn't have directory information.
|
|
||||||
# Version 6 uses the directory in both cases.
|
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
||||||
test "x$dir" = "x$object" && dir=
|
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$base.u
|
|
||||||
tmpdepfile3=$dir.libs/$base.u
|
|
||||||
"$@" -Wc,-M
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$dir$base.u
|
|
||||||
tmpdepfile3=$dir$base.u
|
|
||||||
"$@" -M
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
# Each line is of the form 'foo.o: dependent.h'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
|
||||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
|
||||||
# The sourcefile does not contain any dependencies, so just
|
|
||||||
# store a dummy comment line, to avoid errors with the Makefile
|
|
||||||
# "include basename.Plo" scheme.
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
icc)
|
|
||||||
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
|
|
||||||
# However on
|
|
||||||
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
|
||||||
# ICC 7.0 will fill foo.d with something like
|
|
||||||
# foo.o: sub/foo.c
|
|
||||||
# foo.o: sub/foo.h
|
|
||||||
# which is wrong. We want
|
|
||||||
# sub/foo.o: sub/foo.c
|
|
||||||
# sub/foo.o: sub/foo.h
|
|
||||||
# sub/foo.c:
|
|
||||||
# sub/foo.h:
|
|
||||||
# ICC 7.1 will output
|
|
||||||
# foo.o: sub/foo.c sub/foo.h
|
|
||||||
# and will wrap long lines using '\':
|
|
||||||
# foo.o: sub/foo.c ... \
|
|
||||||
# sub/foo.h ... \
|
|
||||||
# ...
|
|
||||||
# tcc 0.9.26 (FIXME still under development at the moment of writing)
|
|
||||||
# will emit a similar output, but also prepend the continuation lines
|
|
||||||
# with horizontal tabulation characters.
|
|
||||||
"$@" -MD -MF "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each line is of the form 'foo.o: dependent.h',
|
|
||||||
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
|
||||||
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
|
|
||||||
< "$tmpdepfile" > "$depfile"
|
|
||||||
sed '
|
|
||||||
s/[ '"$tab"'][ '"$tab"']*/ /g
|
|
||||||
s/^ *//
|
|
||||||
s/ *\\*$//
|
|
||||||
s/^[^:]*: *//
|
|
||||||
/^$/d
|
|
||||||
/:$/d
|
|
||||||
s/$/ :/
|
|
||||||
' < "$tmpdepfile" >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
## The order of this option in the case statement is important, since the
|
|
||||||
## shell code in configure will try each of these formats in the order
|
|
||||||
## listed in this file. A plain '-MD' option would be understood by many
|
|
||||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
|
||||||
pgcc)
|
|
||||||
# Portland's C compiler understands '-MD'.
|
|
||||||
# Will always output deps to 'file.d' where file is the root name of the
|
|
||||||
# source file under compilation, even if file resides in a subdirectory.
|
|
||||||
# The object file name does not affect the name of the '.d' file.
|
|
||||||
# pgcc 10.2 will output
|
|
||||||
# foo.o: sub/foo.c sub/foo.h
|
|
||||||
# and will wrap long lines using '\' :
|
|
||||||
# foo.o: sub/foo.c ... \
|
|
||||||
# sub/foo.h ... \
|
|
||||||
# ...
|
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
||||||
test "x$dir" = "x$object" && dir=
|
|
||||||
# Use the source, not the object, to determine the base name, since
|
|
||||||
# that's sadly what pgcc will do too.
|
|
||||||
base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
|
|
||||||
tmpdepfile="$base.d"
|
|
||||||
|
|
||||||
# For projects that build the same source file twice into different object
|
|
||||||
# files, the pgcc approach of using the *source* file root name can cause
|
|
||||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
|
||||||
# the same $tmpdepfile.
|
|
||||||
lockdir="$base.d-lock"
|
|
||||||
trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
|
|
||||||
numtries=100
|
|
||||||
i=$numtries
|
|
||||||
while test $i -gt 0 ; do
|
|
||||||
# mkdir is a portable test-and-set.
|
|
||||||
if mkdir $lockdir 2>/dev/null; then
|
|
||||||
# This process acquired the lock.
|
|
||||||
"$@" -MD
|
|
||||||
stat=$?
|
|
||||||
# Release the lock.
|
|
||||||
rm -rf $lockdir
|
|
||||||
break
|
|
||||||
else
|
|
||||||
## the lock is being held by a different process,
|
|
||||||
## wait until the winning process is done or we timeout
|
|
||||||
while test -d $lockdir && test $i -gt 0; do
|
|
||||||
sleep 1
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
trap - 1 2 13 15
|
|
||||||
if test $i -le 0; then
|
|
||||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
|
||||||
echo "$0: check lockdir '$lockdir'" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each line is of the form `foo.o: dependent.h',
|
|
||||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
|
||||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
|
||||||
sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp2)
|
|
||||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
|
||||||
# compilers, which have integrated preprocessors. The correct option
|
|
||||||
# to use with these is +Maked; it writes dependencies to a file named
|
|
||||||
# 'foo.d', which lands next to the object file, wherever that
|
|
||||||
# happens to be.
|
|
||||||
# Much of this is similar to the tru64 case; see comments there.
|
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
||||||
test "x$dir" = "x$object" && dir=
|
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir.libs/$base.d
|
|
||||||
"$@" -Wc,+Maked
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
"$@" +Maked
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
|
||||||
# Add 'dependent.h:' lines.
|
|
||||||
sed -ne '2,${
|
|
||||||
s/^ *//
|
|
||||||
s/ \\*$//
|
|
||||||
s/$/:/
|
|
||||||
p
|
|
||||||
}' "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
|
||||||
;;
|
|
||||||
|
|
||||||
tru64)
|
|
||||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
|
||||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
|
||||||
# dependencies in 'foo.d' instead, so we check for that too.
|
|
||||||
# Subdirectories are respected.
|
|
||||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
|
||||||
test "x$dir" = "x$object" && dir=
|
|
||||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
|
||||||
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
# With Tru64 cc, shared objects can also be used to make a
|
|
||||||
# static library. This mechanism is used in libtool 1.4 series to
|
|
||||||
# handle both shared and static libraries in a single compilation.
|
|
||||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
|
||||||
#
|
|
||||||
# With libtool 1.5 this exception was removed, and libtool now
|
|
||||||
# generates 2 separate objects for the 2 libraries. These two
|
|
||||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
|
||||||
# in $dir$base.o.d. We have to check for both files, because
|
|
||||||
# one of the two compilations can be disabled. We should prefer
|
|
||||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
|
||||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
|
||||||
# the former would cause a distcleancheck panic.
|
|
||||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
|
||||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
|
||||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
|
||||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
|
||||||
"$@" -Wc,-MD
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.o.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
tmpdepfile3=$dir$base.d
|
|
||||||
tmpdepfile4=$dir$base.d
|
|
||||||
"$@" -MD
|
|
||||||
fi
|
|
||||||
|
|
||||||
stat=$?
|
|
||||||
if test $stat -eq 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
|
||||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
showIncludes=-Wc,-showIncludes
|
|
||||||
else
|
|
||||||
showIncludes=-showIncludes
|
|
||||||
fi
|
|
||||||
"$@" $showIncludes > "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
|
||||||
if test "$stat" = 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The first sed program below extracts the file names and escapes
|
|
||||||
# backslashes for cygpath. The second sed program outputs the file
|
|
||||||
# name when reading, but also accumulates all include files in the
|
|
||||||
# hold buffer in order to output them again at the end. This only
|
|
||||||
# works with sed implementations that can handle large buffers.
|
|
||||||
sed < "$tmpdepfile" -n '
|
|
||||||
/^Note: including file: *\(.*\)/ {
|
|
||||||
s//\1/
|
|
||||||
s/\\/\\\\/g
|
|
||||||
p
|
|
||||||
}' | $cygpath_u | sort -u | sed -n '
|
|
||||||
s/ /\\ /g
|
|
||||||
s/\(.*\)/'"$tab"'\1 \\/p
|
|
||||||
s/.\(.*\) \\/\1:/
|
|
||||||
H
|
|
||||||
$ {
|
|
||||||
s/.*/'"$tab"'/
|
|
||||||
G
|
|
||||||
p
|
|
||||||
}' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7msys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
#nosideeffect)
|
|
||||||
# This comment above is used by automake to tell side-effect
|
|
||||||
# dependency tracking mechanisms from slower ones.
|
|
||||||
|
|
||||||
dashmstdout)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout, regardless of -o.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
|
||||||
# Require at least two characters before searching for ':'
|
|
||||||
# in the target name. This is to cope with DOS-style filenames:
|
|
||||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
|
||||||
"$@" $dashmflag |
|
|
||||||
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" | \
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
dashXmstdout)
|
|
||||||
# This case only exists to satisfy depend.m4. It is never actually
|
|
||||||
# run, as this mode is specially recognized in the preamble.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
makedepend)
|
|
||||||
"$@" || exit $?
|
|
||||||
# Remove any Libtool call
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
# X makedepend
|
|
||||||
shift
|
|
||||||
cleared=no eat=no
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $cleared in
|
|
||||||
no)
|
|
||||||
set ""; shift
|
|
||||||
cleared=yes ;;
|
|
||||||
esac
|
|
||||||
if test $eat = yes; then
|
|
||||||
eat=no
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
case "$arg" in
|
|
||||||
-D*|-I*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
# Strip any option that makedepend may not understand. Remove
|
|
||||||
# the object too, otherwise makedepend will parse it as a source file.
|
|
||||||
-arch)
|
|
||||||
eat=yes ;;
|
|
||||||
-*|$object)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
|
||||||
touch "$tmpdepfile"
|
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
|
||||||
rm -f "$depfile"
|
|
||||||
# makedepend may prepend the VPATH from the source file name to the object.
|
|
||||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
|
||||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
|
||||||
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
|
||||||
;;
|
|
||||||
|
|
||||||
cpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
"$@" -E |
|
|
||||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
||||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
|
||||||
sed '$ s: \\$::' > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvisualcpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case "$arg" in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
|
||||||
set fnord "$@"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
"$@" -E 2>/dev/null |
|
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
|
||||||
echo "$tab" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvcmsys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
none)
|
|
||||||
exec "$@"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown depmode $depmode" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "man.h"
|
|
||||||
|
|
||||||
Xman_Resources resources; /* Resource manager sets these. */
|
|
||||||
|
|
||||||
/* bookkeeping global variables. */
|
|
||||||
|
|
||||||
Widget help_widget; /* The help widget. */
|
|
||||||
|
|
||||||
int default_height, default_width; /* Approximately the default width and
|
|
||||||
height, of the manpage when shown,
|
|
||||||
the the top level manual page
|
|
||||||
window */
|
|
||||||
|
|
||||||
Manual *manual; /* The manual structure. */
|
|
||||||
|
|
||||||
int sections; /* The number of manual sections. */
|
|
||||||
|
|
||||||
int man_pages_shown; /* The current number of manual
|
|
||||||
pages being shown, if 0 we exit. */
|
|
||||||
|
|
||||||
Widget initial_widget; /* The initial widget, never realized. */
|
|
||||||
|
|
||||||
XContext manglobals_context; /* The context for man_globals. */
|
|
@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _globals_h
|
|
||||||
#define _globals_h
|
|
||||||
|
|
||||||
#include "man.h"
|
|
||||||
|
|
||||||
extern Xman_Resources resources; /* Resource manager sets these. */
|
|
||||||
|
|
||||||
/* bookkeeping global variables. */
|
|
||||||
|
|
||||||
extern Widget help_widget; /* The help widget. */
|
|
||||||
|
|
||||||
extern int default_height, default_width; /* Approximately the default width and
|
|
||||||
height, of the manpage when shown,
|
|
||||||
the the top level manual page
|
|
||||||
window */
|
|
||||||
extern int man_pages_shown; /* The current number of manual
|
|
||||||
pages being shown, if 0 we exit. */
|
|
||||||
|
|
||||||
extern Manual *manual; /* The manual structure. */
|
|
||||||
|
|
||||||
extern int sections; /* The number of manual sections. */
|
|
||||||
|
|
||||||
extern XContext manglobals_context; /* The context for man_globals. */
|
|
||||||
|
|
||||||
extern Widget initial_widget; /* The initial widget, never realized. */
|
|
||||||
|
|
||||||
extern char **saved_argv;
|
|
||||||
extern int saved_argc;
|
|
||||||
|
|
||||||
extern Atom wm_delete_window;
|
|
||||||
|
|
||||||
extern Widget top;
|
|
||||||
|
|
||||||
#endif /* _globals_h */
|
|
@ -1,741 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: October 29, 1987
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include "globals.h"
|
|
||||||
#include "vendor.h"
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
#include "printdialog.h"
|
|
||||||
#include "print.h"
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
|
|
||||||
#ifdef RELEASE_VERSION
|
|
||||||
#define XMAN_VERSION "Xman Version " PACKAGE_VERSION " - X11R" RELEASE_VERSION
|
|
||||||
#else
|
|
||||||
#define XMAN_VERSION "Xman Version " PACKAGE_VERSION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void PutUpManpage(ManpageGlobals * man_globals, FILE * file);
|
|
||||||
static void ToggleBothShownState(ManpageGlobals * man_globals);
|
|
||||||
|
|
||||||
/* Function Name: OptionCallback
|
|
||||||
* Description: This is the callback function for the callback menu.
|
|
||||||
* Arguments: w - the widget we are calling back from.
|
|
||||||
* globals_pointer - a pointer to the pseudo globals structure
|
|
||||||
* for this manpage.
|
|
||||||
* junk - (call data) not used.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
OptionCallback(Widget w, XtPointer pointer, XtPointer junk)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals = (ManpageGlobals *) pointer;
|
|
||||||
String params;
|
|
||||||
Cardinal num_params = 1;
|
|
||||||
|
|
||||||
if (w == man_globals->search_entry)
|
|
||||||
PopupSearch(XtParent(w), NULL, NULL, NULL);
|
|
||||||
else if (w == man_globals->dir_entry) { /* Put Up Directory */
|
|
||||||
params = "Directory";
|
|
||||||
GotoPage(XtParent(w), NULL, ¶ms, &num_params);
|
|
||||||
}
|
|
||||||
else if (w == man_globals->manpage_entry) { /* Put Up Man Page */
|
|
||||||
params = "ManualPage";
|
|
||||||
GotoPage(XtParent(w), NULL, ¶ms, &num_params);
|
|
||||||
}
|
|
||||||
else if (w == man_globals->help_entry) /* Help */
|
|
||||||
PopupHelp(XtParent(w), NULL, NULL, NULL);
|
|
||||||
else if (w == man_globals->both_screens_entry) /*Toggle Both_Shown State. */
|
|
||||||
ToggleBothShownState(man_globals);
|
|
||||||
else if (w == man_globals->remove_entry) /* Kill the manpage */
|
|
||||||
RemoveThisManpage(XtParent(w), NULL, NULL, NULL);
|
|
||||||
else if (w == man_globals->open_entry) /* Open new manpage */
|
|
||||||
CreateNewManpage(XtParent(w), NULL, NULL, NULL);
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
else if (w == man_globals->print_entry) /* Print current manpage */
|
|
||||||
PrintThisManpage(XtParent(w), NULL, NULL, NULL);
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
else if (w == man_globals->version_entry) /* Get version */
|
|
||||||
ShowVersion(XtParent(w), NULL, NULL, NULL);
|
|
||||||
else if (w == man_globals->quit_entry) /* Quit. */
|
|
||||||
Quit(XtParent(w), NULL, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: ToggleBothShownState;
|
|
||||||
* Description: toggles the state of the both shown feature.
|
|
||||||
* Arguments: man_globals - the man globals structure.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I did not have a two state widget, which is the way this
|
|
||||||
* should really be done. 1/22/88 - CDP.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
ToggleBothShownState(ManpageGlobals * man_globals)
|
|
||||||
{
|
|
||||||
const char *label_str;
|
|
||||||
Arg arglist[1];
|
|
||||||
|
|
||||||
if (man_globals->both_shown == TRUE) {
|
|
||||||
label_str = SHOW_BOTH;
|
|
||||||
if (man_globals->dir_shown)
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.manpage);
|
|
||||||
else
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.directory);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Widget manpage = man_globals->manpagewidgets.manpage;
|
|
||||||
Widget dir = man_globals->manpagewidgets.directory;
|
|
||||||
|
|
||||||
label_str = SHOW_ONE;
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNpreferredPaneSize, resources.directory_height);
|
|
||||||
XtSetValues(dir, arglist, (Cardinal) 1);
|
|
||||||
|
|
||||||
if (!man_globals->dir_shown) {
|
|
||||||
XtUnmanageChild(manpage);
|
|
||||||
XtManageChild(dir);
|
|
||||||
}
|
|
||||||
XtManageChild(manpage);
|
|
||||||
}
|
|
||||||
man_globals->both_shown = !man_globals->both_shown;
|
|
||||||
|
|
||||||
if (man_globals->dir_shown)
|
|
||||||
ChangeLabel(man_globals->label,
|
|
||||||
man_globals->section_name[man_globals->current_directory]);
|
|
||||||
else
|
|
||||||
ChangeLabel(man_globals->label, man_globals->manpage_title);
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNlabel, label_str);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, ONE);
|
|
||||||
|
|
||||||
/* if both are shown there is no need to switch between the two. */
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, !man_globals->both_shown);
|
|
||||||
XtSetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->dir_entry, arglist, ONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: Popup
|
|
||||||
* Description: This function pops up the given widget under the cursor.
|
|
||||||
* Arguments: w - the widget to popup.
|
|
||||||
* grab_kind - the kind of grab to register.
|
|
||||||
* Returns: none
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* How far off the top of the widget to have the initial cursor position. */
|
|
||||||
|
|
||||||
#define OFF_OF_TOP 25
|
|
||||||
|
|
||||||
void
|
|
||||||
Popup(Widget w, XtGrabKind grab_kind)
|
|
||||||
{
|
|
||||||
int x_root, y_root, y_pos, garbage;
|
|
||||||
unsigned int mask;
|
|
||||||
Window junk_window;
|
|
||||||
|
|
||||||
XQueryPointer(XtDisplay(w), XtWindow(w), &junk_window, &junk_window,
|
|
||||||
&x_root, &y_root, &garbage, &garbage, &mask);
|
|
||||||
|
|
||||||
y_pos = OFF_OF_TOP - Height(w) / 2 - BorderWidth(w);
|
|
||||||
PositionCenter(w, x_root, y_root, y_pos, 0, 2, 2);
|
|
||||||
XtPopup(w, grab_kind);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: PutUpManpage
|
|
||||||
* Description: Puts the manpage on the display.
|
|
||||||
* Arguments: man_globals - a pointer to the pseudo globals structure
|
|
||||||
* for this manpage.
|
|
||||||
* file - the file to display.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
PutUpManpage(ManpageGlobals * man_globals, FILE * file)
|
|
||||||
{
|
|
||||||
String params = "ManualPage";
|
|
||||||
Cardinal num_params = 1;
|
|
||||||
|
|
||||||
if (file == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
OpenFile(man_globals, file);
|
|
||||||
|
|
||||||
if (!man_globals->both_shown) {
|
|
||||||
Arg arglist[1];
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, TRUE);
|
|
||||||
XtSetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
XtSetValues(man_globals->both_screens_entry, arglist, ONE);
|
|
||||||
}
|
|
||||||
GotoPage(man_globals->manpagewidgets.manpage, NULL, ¶ms, &num_params);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: DirectoryHandler
|
|
||||||
* Description: This is the callback function for the directory listings.
|
|
||||||
* Arguments: w - the widget we are calling back from.
|
|
||||||
* global_pointer - the pointer to the pseudo global structure
|
|
||||||
* associated with this manpage.
|
|
||||||
* ret_val - return value from the list widget.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
DirectoryHandler(Widget w, XtPointer global_pointer, XtPointer ret_val)
|
|
||||||
{
|
|
||||||
FILE *file; /* The manpage file. */
|
|
||||||
ManpageGlobals *man_globals = (ManpageGlobals *) global_pointer;
|
|
||||||
XawListReturnStruct *ret_struct = (XawListReturnStruct *) ret_val;
|
|
||||||
|
|
||||||
file = FindManualFile(man_globals, man_globals->current_directory,
|
|
||||||
ret_struct->list_index);
|
|
||||||
PutUpManpage(man_globals, file);
|
|
||||||
if ((file != NULL) && (file != man_globals->curr_file)) {
|
|
||||||
fclose(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: DirPopupCallback
|
|
||||||
* Description: This is the callback function for the callback menu.
|
|
||||||
* Arguments: w - the widget we are calling back from.
|
|
||||||
* pointer - a pointer to the pseudo globals structure
|
|
||||||
* for this manpage.
|
|
||||||
* junk - (call data) not used.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
DirPopupCallback(Widget w, XtPointer pointer, XtPointer junk)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals;
|
|
||||||
MenuStruct *menu_struct;
|
|
||||||
Widget parent;
|
|
||||||
int number;
|
|
||||||
int current_box;
|
|
||||||
|
|
||||||
menu_struct = (MenuStruct *) pointer;
|
|
||||||
man_globals = (ManpageGlobals *) menu_struct->data;
|
|
||||||
|
|
||||||
number = menu_struct->number;
|
|
||||||
current_box = man_globals->current_directory;
|
|
||||||
|
|
||||||
/* We have used this guy, pop down the menu. */
|
|
||||||
|
|
||||||
if (number != current_box) {
|
|
||||||
/* This is the only one that we know has a parent. */
|
|
||||||
parent = XtParent(man_globals->manpagewidgets.box[INITIAL_DIR]);
|
|
||||||
|
|
||||||
MakeDirectoryBox(man_globals, parent,
|
|
||||||
man_globals->manpagewidgets.box + number, number);
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.box[current_box]);
|
|
||||||
XtManageChild(man_globals->manpagewidgets.box[number]);
|
|
||||||
|
|
||||||
XawListUnhighlight(man_globals->manpagewidgets.box[current_box]);
|
|
||||||
ChangeLabel(man_globals->label, man_globals->section_name[number]);
|
|
||||||
man_globals->current_directory = number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* put up directory. */
|
|
||||||
if (!man_globals->both_shown) {
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.manpage);
|
|
||||||
XtManageChild(man_globals->manpagewidgets.directory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************
|
|
||||||
*
|
|
||||||
* Action Routines.
|
|
||||||
*
|
|
||||||
************************************************************/
|
|
||||||
|
|
||||||
/* Function Name: SaveFormattedPage
|
|
||||||
* Description: This is the action routine may save the manpage.
|
|
||||||
* Arguments: w - any widget in the widget tree.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - the parameters passed to the action
|
|
||||||
* routine, can be either Manpage or
|
|
||||||
* Directory.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
SaveFormattedPage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals;
|
|
||||||
char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
|
|
||||||
|
|
||||||
if (*num_params != 1) {
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - SaveFormattedPage: This action routine requires one argument.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
man_globals = GetGlobals(w);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If we are not active then take no action.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (man_globals->tempfile[0] == '\0')
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (params[0][0]) {
|
|
||||||
case 'S':
|
|
||||||
case 's':
|
|
||||||
|
|
||||||
#ifndef NO_COMPRESS
|
|
||||||
if (!man_globals->compress)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), "%s %s %s", COPY,
|
|
||||||
man_globals->tempfile, man_globals->save_file);
|
|
||||||
|
|
||||||
#ifndef NO_COMPRESS
|
|
||||||
else if (man_globals->gzip)
|
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), "%s < %s > %s", GZIP_COMPRESS,
|
|
||||||
man_globals->tempfile, man_globals->save_file);
|
|
||||||
else
|
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), "%s < %s > %s", COMPRESS,
|
|
||||||
man_globals->tempfile, man_globals->save_file);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!system(cmdbuf)) {
|
|
||||||
/* make sure the formatted man page is fully accessible by the world */
|
|
||||||
if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
|
|
||||||
snprintf(error_buf, sizeof(error_buf),
|
|
||||||
"Couldn't set permissions on formatted man page '%s'.\n",
|
|
||||||
man_globals->save_file);
|
|
||||||
PopupWarning(man_globals, error_buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
snprintf(error_buf, sizeof(error_buf),
|
|
||||||
"Error while executing the command '%s'.\n", cmdbuf);
|
|
||||||
PopupWarning(man_globals, error_buf);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'C':
|
|
||||||
case 'c':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
PopupWarning(man_globals, "Xman - SaveFormattedPage: "
|
|
||||||
"Unknown argument must be either 'Save' or 'Cancel'.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We do not need the filename anymore, and have the fd open.
|
|
||||||
* We will remove it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
remove(man_globals->tempfile);
|
|
||||||
XtPopdown(XtParent(XtParent(w)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: GotoPage
|
|
||||||
* Description: The Action routine that switches over to the manpage
|
|
||||||
* or directory.
|
|
||||||
* Arguments: w - any widget in the widget tree.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - the parameters passed to the action
|
|
||||||
* routine, can be either Manpage or
|
|
||||||
* Directory.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals;
|
|
||||||
Arg arglist[1];
|
|
||||||
Boolean sensitive;
|
|
||||||
|
|
||||||
if (*num_params != 1) {
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - GotoPage: This action routine requires one argument.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
man_globals = GetGlobals(w);
|
|
||||||
|
|
||||||
if (man_globals->both_shown) {
|
|
||||||
ChangeLabel(man_globals->label,
|
|
||||||
man_globals->section_name[man_globals->current_directory]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (params[0][0]) {
|
|
||||||
case 'M':
|
|
||||||
case 'm':
|
|
||||||
XtSetArg(arglist[0], XtNsensitive, &sensitive);
|
|
||||||
XtGetValues(man_globals->manpage_entry, arglist, ONE);
|
|
||||||
if (sensitive) {
|
|
||||||
ChangeLabel(man_globals->label, man_globals->manpage_title);
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.directory);
|
|
||||||
XtManageChild(man_globals->manpagewidgets.manpage);
|
|
||||||
man_globals->dir_shown = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'D':
|
|
||||||
case 'd':
|
|
||||||
ChangeLabel(man_globals->label,
|
|
||||||
man_globals->section_name[man_globals->current_directory]);
|
|
||||||
XtUnmanageChild(man_globals->manpagewidgets.manpage);
|
|
||||||
XtManageChild(man_globals->manpagewidgets.directory);
|
|
||||||
man_globals->dir_shown = TRUE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - GotoPage: Unknown argument must be "
|
|
||||||
"either Manpage or Directory.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: Quit.
|
|
||||||
* Description: Quits Xman.
|
|
||||||
* Arguments: w - any widget.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
Quit(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: PopupHelp
|
|
||||||
* Description: Pops up xman's help.
|
|
||||||
* Arguments: w - NOT USED.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
PopupHelp(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
if (MakeHelpWidget())
|
|
||||||
XtPopup(help_widget, XtGrabNone);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: PopupSearch
|
|
||||||
* Description: Pops up this manual pages search widget.
|
|
||||||
* Arguments: w - any widget in this manpage.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
PopupSearch(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals = GetGlobals(w);
|
|
||||||
|
|
||||||
if (man_globals->search_widget) {
|
|
||||||
if (!XtIsRealized(man_globals->search_widget)) {
|
|
||||||
XtRealizeWidget(man_globals->search_widget);
|
|
||||||
AddCursor(man_globals->search_widget,
|
|
||||||
resources.cursors.search_entry);
|
|
||||||
}
|
|
||||||
Popup(man_globals->search_widget, XtGrabNone);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: CreateNewManpage
|
|
||||||
* Description: Creates A New Manual Page.
|
|
||||||
* Arguments: w - NOT USED.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
CreateNewManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params)
|
|
||||||
{
|
|
||||||
if (CreateManpage(NULL))
|
|
||||||
man_pages_shown++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: RemoveThisManpage
|
|
||||||
* Description: Removes a manual page.
|
|
||||||
* Arguments: w - any widget in the manpage.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
RemoveThisManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals = GetGlobals(w);
|
|
||||||
|
|
||||||
if (man_globals->This_Manpage != help_widget) {
|
|
||||||
RemoveGlobals(man_globals->This_Manpage);
|
|
||||||
XtDestroyWidget(man_globals->This_Manpage);
|
|
||||||
|
|
||||||
XtFree((char *) man_globals->section_name);
|
|
||||||
XtFree((char *) man_globals->manpagewidgets.box);
|
|
||||||
XtFree((char *) man_globals);
|
|
||||||
|
|
||||||
if ((--man_pages_shown) == 0)
|
|
||||||
Quit(w, NULL, NULL, NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
XtPopdown(help_widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: Search
|
|
||||||
* Description: Actually performs a search.
|
|
||||||
* Arguments: w - any widget in the manpage.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals = GetGlobals(w);
|
|
||||||
FILE *file = NULL;
|
|
||||||
|
|
||||||
XtPopdown(XtParent(XtParent(w))); /* popdown the search widget */
|
|
||||||
|
|
||||||
if ((*num_params < 1) || (*num_params > 2)) {
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - Search: This action routine requires one or two arguments.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (params[0][0]) {
|
|
||||||
case 'a':
|
|
||||||
case 'A':
|
|
||||||
file = DoSearch(man_globals, APROPOS);
|
|
||||||
break;
|
|
||||||
case 'm':
|
|
||||||
case 'M':
|
|
||||||
file = DoSearch(man_globals, MANUAL);
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
case 'C':
|
|
||||||
file = NULL;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - Search: First parameter unknown.");
|
|
||||||
file = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*num_params == 2)
|
|
||||||
switch (params[1][0]) {
|
|
||||||
case 'O':
|
|
||||||
case 'o':
|
|
||||||
if (file != NULL) {
|
|
||||||
Widget w2;
|
|
||||||
char *label;
|
|
||||||
|
|
||||||
w2 = CreateManpage(file);
|
|
||||||
if (w2) {
|
|
||||||
man_pages_shown++;
|
|
||||||
|
|
||||||
/* Put title into new manual page. */
|
|
||||||
|
|
||||||
label = man_globals->manpage_title;
|
|
||||||
man_globals = GetGlobals(w2);
|
|
||||||
strcpy(man_globals->manpage_title, label);
|
|
||||||
ChangeLabel(man_globals->label, label);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
XtAppWarning(XtWidgetToApplicationContext(w),
|
|
||||||
"Xman - Search: Second parameter unknown.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PutUpManpage(man_globals, file);
|
|
||||||
}
|
|
||||||
if ((file != NULL) && (file != man_globals->curr_file)) {
|
|
||||||
fclose(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
static void
|
|
||||||
printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
|
|
||||||
{
|
|
||||||
ManpageGlobals *mg = GetGlobals(w);
|
|
||||||
|
|
||||||
XawPrintDialogClosePrinterConnection(mg->printdialog, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
|
|
||||||
{
|
|
||||||
XawPrintDialogCallbackStruct *pdcs =
|
|
||||||
(XawPrintDialogCallbackStruct *) callData;
|
|
||||||
Cardinal n;
|
|
||||||
Arg args[2];
|
|
||||||
ManpageGlobals *mg = GetGlobals(w);
|
|
||||||
Widget topwindow = mg->This_Manpage;
|
|
||||||
FILE *file;
|
|
||||||
|
|
||||||
Log(("printOKXtProc: OK.\n"));
|
|
||||||
|
|
||||||
/* Get file object */
|
|
||||||
n = 0;
|
|
||||||
XtSetArg(args[n], XtNfile, &file);
|
|
||||||
n++;
|
|
||||||
XtGetValues(mg->manpagewidgets.manpage, args, n);
|
|
||||||
Assertion(file != NULL, (("printOKXtProc: file == NULL.\n")));
|
|
||||||
|
|
||||||
DoPrintManpage("Xman",
|
|
||||||
file, topwindow,
|
|
||||||
pdcs->pdpy, pdcs->pcontext, pdcs->colorspace,
|
|
||||||
printshellDestroyXtProc,
|
|
||||||
mg->manpage_title,
|
|
||||||
pdcs->printToFile ? pdcs->printToFileName : NULL);
|
|
||||||
|
|
||||||
XtPopdown(mg->printdialog_shell);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
|
|
||||||
{
|
|
||||||
ManpageGlobals *mg = GetGlobals(w);
|
|
||||||
|
|
||||||
Log(("printCancelXtProc: cancel.\n"));
|
|
||||||
XtPopdown(mg->printdialog_shell);
|
|
||||||
|
|
||||||
Log(("destroying print dialog shell...\n"));
|
|
||||||
XtDestroyWidget(mg->printdialog_shell);
|
|
||||||
mg->printdialog_shell = NULL;
|
|
||||||
mg->printdialog = NULL;
|
|
||||||
Log(("... done\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: PrintThisManpage
|
|
||||||
* Description: Print the current manual page.
|
|
||||||
* Arguments: mg - manpage globals
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
PrintThisManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *mg = GetGlobals(w);
|
|
||||||
Dimension width, height;
|
|
||||||
Position x, y;
|
|
||||||
Widget parent = mg->This_Manpage;
|
|
||||||
Widget topwindow = mg->This_Manpage;
|
|
||||||
|
|
||||||
Log(("print!\n"));
|
|
||||||
|
|
||||||
if (!mg->printdialog) {
|
|
||||||
int n;
|
|
||||||
Arg args[20];
|
|
||||||
|
|
||||||
n = 0;
|
|
||||||
XtSetArg(args[n], XtNallowShellResize, True);
|
|
||||||
n++;
|
|
||||||
mg->printdialog_shell = XtCreatePopupShell("printdialogshell",
|
|
||||||
transientShellWidgetClass,
|
|
||||||
topwindow, args, n);
|
|
||||||
n = 0;
|
|
||||||
mg->printdialog =
|
|
||||||
XtCreateManagedWidget("printdialog", printDialogWidgetClass,
|
|
||||||
mg->printdialog_shell, args, n);
|
|
||||||
XtAddCallback(mg->printdialog, XawNOkCallback, printOKXtProc, NULL);
|
|
||||||
XtAddCallback(mg->printdialog, XawNCancelCallback, printCancelXtProc,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
XtRealizeWidget(mg->printdialog_shell);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Center dialog */
|
|
||||||
XtVaGetValues(mg->printdialog_shell,
|
|
||||||
XtNwidth, &width, XtNheight, &height, NULL);
|
|
||||||
|
|
||||||
x = (Position) (XWidthOfScreen(XtScreen(parent)) - width) / 2;
|
|
||||||
y = (Position) (XHeightOfScreen(XtScreen(parent)) - height) / 3;
|
|
||||||
|
|
||||||
XtVaSetValues(mg->printdialog_shell, XtNx, x, XtNy, y, NULL);
|
|
||||||
|
|
||||||
XtPopup(mg->printdialog_shell, XtGrabNonexclusive);
|
|
||||||
}
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
|
|
||||||
/* Function Name: ShowVersion
|
|
||||||
* Description: Show current version.
|
|
||||||
* Arguments: w - any widget in the manpage.
|
|
||||||
* event - NOT USED.
|
|
||||||
* params, num_params - NOT USED.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
|
||||||
void
|
|
||||||
ShowVersion(Widget w, XEvent * event, String * params, Cardinal * num_params)
|
|
||||||
{
|
|
||||||
ManpageGlobals *man_globals = GetGlobals(w);
|
|
||||||
|
|
||||||
ChangeLabel(man_globals->label, XMAN_VERSION);
|
|
||||||
}
|
|
108
app/xman/help.c
108
app/xman/help.c
@ -1,108 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: January 19, 1988
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
|
|
||||||
/* Function Name: MakeHelpWidget.
|
|
||||||
* Description: This function creates the help widget so that it will be
|
|
||||||
* ready to be displayed.
|
|
||||||
* Arguments: none.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Boolean
|
|
||||||
MakeHelpWidget(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
ManpageGlobals *man_globals; /* The pseudo global structure. */
|
|
||||||
|
|
||||||
if (help_widget != NULL) /* If we already have a help widget.
|
|
||||||
then do not create one. */
|
|
||||||
return (TRUE);
|
|
||||||
|
|
||||||
man_globals = InitPsuedoGlobals();
|
|
||||||
if (man_globals == NULL)
|
|
||||||
return (FALSE);
|
|
||||||
|
|
||||||
CreateManpageWidget(man_globals, HELPNAME, FALSE);
|
|
||||||
help_widget = man_globals->This_Manpage;
|
|
||||||
|
|
||||||
if (OpenHelpfile(man_globals) == FALSE) {
|
|
||||||
XtDestroyWidget(help_widget);
|
|
||||||
help_widget = NULL;
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
ChangeLabel(man_globals->label, "Xman Help");
|
|
||||||
|
|
||||||
XtManageChild(man_globals->manpagewidgets.manpage);
|
|
||||||
XtRealizeWidget(help_widget);
|
|
||||||
SaveGlobals(man_globals->This_Manpage, man_globals);
|
|
||||||
AddCursor(help_widget, resources.cursors.manpage);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set up ICCCM delete window.
|
|
||||||
*/
|
|
||||||
XtOverrideTranslations
|
|
||||||
(man_globals->This_Manpage,
|
|
||||||
XtParseTranslationTable("<Message>WM_PROTOCOLS: RemoveThisManpage()"));
|
|
||||||
(void) XSetWMProtocols(XtDisplay(man_globals->This_Manpage),
|
|
||||||
XtWindow(man_globals->This_Manpage),
|
|
||||||
&wm_delete_window, 1);
|
|
||||||
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: OpenHelpfile
|
|
||||||
* Description: opens the helpfile.
|
|
||||||
* Arguments: man_globals - the pseudo globals structure.
|
|
||||||
* Returns: False if no helpfile was found.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Boolean
|
|
||||||
OpenHelpfile(ManpageGlobals * man_globals)
|
|
||||||
{
|
|
||||||
FILE *help_file_ptr;
|
|
||||||
|
|
||||||
if ((help_file_ptr = fopen(resources.help_file, "r")) == NULL) {
|
|
||||||
PopupWarning(man_globals,
|
|
||||||
"Could not open help file, NO HELP WILL BE AVAILABLE.");
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenFile(man_globals, help_file_ptr);
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: August 15, 1988
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define icon_help_width 30
|
|
||||||
#define icon_help_height 30
|
|
||||||
static const unsigned char icon_help_bits[] = {
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xf8, 0xdf, 0xfe, 0x07,
|
|
||||||
0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
|
|
||||||
0x06, 0xe0, 0x03, 0x18, 0x06, 0xf0, 0x07, 0x18, 0x06, 0x18, 0x0c, 0x18,
|
|
||||||
0x06, 0x0c, 0x18, 0x18, 0x06, 0x0c, 0x18, 0x18, 0x06, 0x0c, 0x18, 0x18,
|
|
||||||
0x06, 0x00, 0x18, 0x18, 0x06, 0x00, 0x18, 0x18, 0x06, 0x00, 0x0c, 0x18,
|
|
||||||
0x06, 0x80, 0x07, 0x18, 0x06, 0xc0, 0x03, 0x18, 0x06, 0xc0, 0x00, 0x18,
|
|
||||||
0x06, 0xc0, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18,
|
|
||||||
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18,
|
|
||||||
0x06, 0xc0, 0x00, 0x18, 0xc6, 0x03, 0xf0, 0x18, 0xfe, 0x1f, 0xfe, 0x1f,
|
|
||||||
0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: January 29, 1988
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define icon_open_width 30
|
|
||||||
#define icon_open_height 30
|
|
||||||
static const unsigned char icon_open_bits[] = {
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xf8, 0xdf, 0xfe, 0x07,
|
|
||||||
0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0x00, 0x00, 0x18, 0x06, 0x30, 0x03, 0x18,
|
|
||||||
0xc6, 0x31, 0xe3, 0x18, 0x36, 0x32, 0x13, 0x1b, 0x06, 0x30, 0x03, 0x18,
|
|
||||||
0xc6, 0xf1, 0xe3, 0x18, 0x36, 0xe2, 0x11, 0x1b, 0x06, 0x00, 0x00, 0x18,
|
|
||||||
0xc6, 0xf1, 0xe3, 0x18, 0x36, 0x32, 0x13, 0x1b, 0x06, 0x30, 0x03, 0x18,
|
|
||||||
0xc6, 0xf1, 0xe3, 0x18, 0x36, 0x32, 0x10, 0x1b, 0x06, 0x30, 0x00, 0x18,
|
|
||||||
0xc6, 0x01, 0xe0, 0x18, 0x36, 0x3a, 0x17, 0x1b, 0x06, 0xf8, 0x07, 0x18,
|
|
||||||
0xc6, 0xd9, 0xe6, 0x18, 0x36, 0xda, 0x16, 0x1b, 0x06, 0x18, 0x06, 0x18,
|
|
||||||
0x06, 0x18, 0x06, 0x18, 0xc6, 0x03, 0xf0, 0x18, 0xfe, 0x1f, 0xfe, 0x1f,
|
|
||||||
0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: January 29, 1988
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define iconclosed_width 20
|
|
||||||
#define iconclosed_height 30
|
|
||||||
static const unsigned char iconclosed_bits[] = {
|
|
||||||
0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x0e, 0xf8, 0x07, 0x06, 0x00, 0x05,
|
|
||||||
0xfe, 0xff, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04,
|
|
||||||
0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04, 0x3e, 0xf8, 0x04, 0xfe, 0xff, 0x04,
|
|
||||||
0xfe, 0xff, 0x04, 0x3e, 0xf8, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04,
|
|
||||||
0x3e, 0xf8, 0x04, 0xbe, 0xff, 0x04, 0xbe, 0xff, 0x04, 0xfe, 0xff, 0x04,
|
|
||||||
0xfe, 0xff, 0x04, 0x3e, 0xf9, 0x04, 0x3e, 0xf9, 0x04, 0xbe, 0xfa, 0x04,
|
|
||||||
0xbe, 0xfa, 0x04, 0xbe, 0xfb, 0x06, 0xbe, 0xfb, 0x05, 0xfe, 0xff, 0x00,
|
|
||||||
0xfe, 0xff, 0x00, 0x00, 0x00, 0x00
|
|
||||||
};
|
|
@ -1,527 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
|
|
||||||
scriptversion=2011-11-20.07; # UTC
|
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
|
||||||
# following copyright and license.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 X Consortium
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to
|
|
||||||
# deal in the Software without restriction, including without limitation the
|
|
||||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
# sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
||||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
# Except as contained in this notice, the name of the X Consortium shall not
|
|
||||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
||||||
# ings in this Software without prior written authorization from the X Consor-
|
|
||||||
# tium.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FSF changes to this file are in the public domain.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# 'make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script
|
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
|
||||||
doit=${DOITPROG-}
|
|
||||||
if test -z "$doit"; then
|
|
||||||
doit_exec=exec
|
|
||||||
else
|
|
||||||
doit_exec=$doit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
|
||||||
# or use environment vars.
|
|
||||||
|
|
||||||
chgrpprog=${CHGRPPROG-chgrp}
|
|
||||||
chmodprog=${CHMODPROG-chmod}
|
|
||||||
chownprog=${CHOWNPROG-chown}
|
|
||||||
cmpprog=${CMPPROG-cmp}
|
|
||||||
cpprog=${CPPROG-cp}
|
|
||||||
mkdirprog=${MKDIRPROG-mkdir}
|
|
||||||
mvprog=${MVPROG-mv}
|
|
||||||
rmprog=${RMPROG-rm}
|
|
||||||
stripprog=${STRIPPROG-strip}
|
|
||||||
|
|
||||||
posix_glob='?'
|
|
||||||
initialize_posix_glob='
|
|
||||||
test "$posix_glob" != "?" || {
|
|
||||||
if (set -f) 2>/dev/null; then
|
|
||||||
posix_glob=
|
|
||||||
else
|
|
||||||
posix_glob=:
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
'
|
|
||||||
|
|
||||||
posix_mkdir=
|
|
||||||
|
|
||||||
# Desired mode of installed file.
|
|
||||||
mode=0755
|
|
||||||
|
|
||||||
chgrpcmd=
|
|
||||||
chmodcmd=$chmodprog
|
|
||||||
chowncmd=
|
|
||||||
mvcmd=$mvprog
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
stripcmd=
|
|
||||||
|
|
||||||
src=
|
|
||||||
dst=
|
|
||||||
dir_arg=
|
|
||||||
dst_arg=
|
|
||||||
|
|
||||||
copy_on_change=false
|
|
||||||
no_target_directory=
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
|
||||||
|
|
||||||
In the 1st form, copy SRCFILE to DSTFILE.
|
|
||||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
||||||
In the 4th, create DIRECTORIES.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--help display this help and exit.
|
|
||||||
--version display version info and exit.
|
|
||||||
|
|
||||||
-c (ignored)
|
|
||||||
-C install only if different (preserve the last data modification time)
|
|
||||||
-d create directories instead of installing files.
|
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
|
||||||
-o USER $chownprog installed files to USER.
|
|
||||||
-s $stripprog installed files.
|
|
||||||
-t DIRECTORY install into DIRECTORY.
|
|
||||||
-T report an error if DSTFILE is a directory.
|
|
||||||
|
|
||||||
Environment variables override the default commands:
|
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
||||||
RMPROG STRIPPROG
|
|
||||||
"
|
|
||||||
|
|
||||||
while test $# -ne 0; do
|
|
||||||
case $1 in
|
|
||||||
-c) ;;
|
|
||||||
|
|
||||||
-C) copy_on_change=true;;
|
|
||||||
|
|
||||||
-d) dir_arg=true;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
|
||||||
|
|
||||||
-m) mode=$2
|
|
||||||
case $mode in
|
|
||||||
*' '* | *' '* | *'
|
|
||||||
'* | *'*'* | *'?'* | *'['*)
|
|
||||||
echo "$0: invalid mode: $mode" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
|
||||||
|
|
||||||
-t) dst_arg=$2
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) no_target_directory=true;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
|
||||||
|
|
||||||
--) shift
|
|
||||||
break;;
|
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
|
||||||
# When -t is used, the destination is already specified.
|
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
# $@ is not empty: it contains at least $arg.
|
|
||||||
set fnord "$@" "$dst_arg"
|
|
||||||
shift # fnord
|
|
||||||
fi
|
|
||||||
shift # arg
|
|
||||||
dst_arg=$arg
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
echo "$0: no input file specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# It's OK to call 'install-sh -d' without argument.
|
|
||||||
# This can happen when creating conditional directories.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
do_exit='(exit $ret); exit $ret'
|
|
||||||
trap "ret=129; $do_exit" 1
|
|
||||||
trap "ret=130; $do_exit" 2
|
|
||||||
trap "ret=141; $do_exit" 13
|
|
||||||
trap "ret=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
|
||||||
# However, 'strip' requires both read and write access to temps.
|
|
||||||
case $mode in
|
|
||||||
# Optimize common cases.
|
|
||||||
*644) cp_umask=133;;
|
|
||||||
*755) cp_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw='% 200'
|
|
||||||
fi
|
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
||||||
*)
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw=,u+rw
|
|
||||||
fi
|
|
||||||
cp_umask=$mode$u_plus_rw;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
for src
|
|
||||||
do
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $src in
|
|
||||||
-* | [=\(\)!]) src=./$src;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
dst=$src
|
|
||||||
dstdir=$dst
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
if test ! -f "$src" && test ! -d "$src"; then
|
|
||||||
echo "$0: $src does not exist." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dst_arg"; then
|
|
||||||
echo "$0: no destination specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dst=$dst_arg
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
|
||||||
# if double slashes aren't ignored.
|
|
||||||
if test -d "$dst"; then
|
|
||||||
if test -n "$no_target_directory"; then
|
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dstdir=$dst
|
|
||||||
dst=$dstdir/`basename "$src"`
|
|
||||||
dstdir_status=0
|
|
||||||
else
|
|
||||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
|
||||||
dstdir=`
|
|
||||||
(dirname "$dst") 2>/dev/null ||
|
|
||||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
|
||||||
X"$dst" : 'X\(//\)[^/]' \| \
|
|
||||||
X"$dst" : 'X\(//\)$' \| \
|
|
||||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
|
||||||
echo X"$dst" |
|
|
||||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)[^/].*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\).*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
s/.*/./; q'
|
|
||||||
`
|
|
||||||
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
|
||||||
case $posix_mkdir in
|
|
||||||
'')
|
|
||||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
|
||||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
|
||||||
umask=`umask`
|
|
||||||
case $stripcmd.$umask in
|
|
||||||
# Optimize common cases.
|
|
||||||
*[2367][2367]) mkdir_umask=$umask;;
|
|
||||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
mkdir_umask=`expr $umask + 22 \
|
|
||||||
- $umask % 100 % 40 + $umask % 20 \
|
|
||||||
- $umask % 10 % 4 + $umask % 2
|
|
||||||
`;;
|
|
||||||
*) mkdir_umask=$umask,go-w;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
|
||||||
# Otherwise, rely on $mkdir_umask.
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
mkdir_mode=-m$mode
|
|
||||||
else
|
|
||||||
mkdir_mode=
|
|
||||||
fi
|
|
||||||
|
|
||||||
posix_mkdir=false
|
|
||||||
case $umask in
|
|
||||||
*[123567][0-7][0-7])
|
|
||||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
|
||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
||||||
|
|
||||||
if (umask $mkdir_umask &&
|
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
if test -z "$dir_arg" || {
|
|
||||||
# Check for POSIX incompatibilities with -m.
|
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
||||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
|
||||||
d????-?r-*) different_mode=700;;
|
|
||||||
d????-?--*) different_mode=755;;
|
|
||||||
*) false;;
|
|
||||||
esac &&
|
|
||||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
|
||||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
then posix_mkdir=:
|
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/d" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if
|
|
||||||
$posix_mkdir && (
|
|
||||||
umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
||||||
)
|
|
||||||
then :
|
|
||||||
else
|
|
||||||
|
|
||||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
|
||||||
# or it failed possibly due to a race condition. Create the
|
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
/*) prefix='/';;
|
|
||||||
[-=\(\)!]*) prefix='./';;
|
|
||||||
*) prefix='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob"
|
|
||||||
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
$posix_glob set -f
|
|
||||||
set fnord $dstdir
|
|
||||||
shift
|
|
||||||
$posix_glob set +f
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
prefixes=
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test X"$d" = X && continue
|
|
||||||
|
|
||||||
prefix=$prefix$d
|
|
||||||
if test -d "$prefix"; then
|
|
||||||
prefixes=
|
|
||||||
else
|
|
||||||
if $posix_mkdir; then
|
|
||||||
(umask=$mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
test -d "$prefix" || exit 1
|
|
||||||
else
|
|
||||||
case $prefix in
|
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
||||||
*) qprefix=$prefix;;
|
|
||||||
esac
|
|
||||||
prefixes="$prefixes '$qprefix'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
prefix=$prefix/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
||||||
test -d "$dstdir" || exit 1
|
|
||||||
obsolete_mkdir_used=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
||||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
||||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
|
||||||
dsttmp=$dstdir/_inst.$$_
|
|
||||||
rmtmp=$dstdir/_rm.$$_
|
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
|
||||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
|
||||||
#
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
||||||
#
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
|
||||||
if $copy_on_change &&
|
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob" &&
|
|
||||||
$posix_glob set -f &&
|
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
|
||||||
$posix_glob set +f &&
|
|
||||||
|
|
||||||
test "$old" = "$new" &&
|
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
rm -f "$dsttmp"
|
|
||||||
else
|
|
||||||
# Rename the file to the real destination.
|
|
||||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
||||||
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
|
||||||
# support -f.
|
|
||||||
{
|
|
||||||
# Now remove or move aside any old file at destination location.
|
|
||||||
# We try this two ways since rm can't unlink itself on some
|
|
||||||
# systems and the destination file might be busy for other
|
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
|
||||||
# file should still install successfully.
|
|
||||||
{
|
|
||||||
test ! -f "$dst" ||
|
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
||||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
|
||||||
} ||
|
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
|
||||||
(exit 1); exit 1
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
|
||||||
}
|
|
||||||
fi || exit 1
|
|
||||||
|
|
||||||
trap '' 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
298
app/xman/main.c
298
app/xman/main.c
@ -1,298 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* xman - X window system manual page display program.
|
|
||||||
* Author: Chris D. Peterson, MIT Project Athena
|
|
||||||
* Created: October 22, 1987
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
#ifndef ZERO
|
|
||||||
#include <X11/Xaw/Cardinals.h>
|
|
||||||
#endif /* ZERO */
|
|
||||||
|
|
||||||
static void ArgError(int argc, char **argv);
|
|
||||||
static void AdjustDefResources(void);
|
|
||||||
|
|
||||||
#define Offset(field) (XtOffsetOf(Xman_Resources , field))
|
|
||||||
|
|
||||||
static XtResource my_resources[] = {
|
|
||||||
{"directoryFontNormal", XtCFont, XtRFontStruct, sizeof(XFontStruct *),
|
|
||||||
Offset(fonts.directory), XtRString, DIRECTORY_NORMAL},
|
|
||||||
{"bothShown", XtCBoolean, XtRBoolean, sizeof(Boolean),
|
|
||||||
Offset(both_shown_initial), XtRString, "False"},
|
|
||||||
{"directoryHeight", "DirectoryHeight", XtRInt, sizeof(int),
|
|
||||||
Offset(directory_height), XtRString, "150"},
|
|
||||||
{"topCursor", XtCCursor, XtRCursor, sizeof(Cursor),
|
|
||||||
Offset(cursors.top), XtRString, XMAN_CURSOR},
|
|
||||||
{"helpCursor", XtCCursor, XtRCursor, sizeof(Cursor),
|
|
||||||
Offset(cursors.help), XtRString, HELP_CURSOR},
|
|
||||||
{"manpageCursor", XtCCursor, XtRCursor, sizeof(Cursor),
|
|
||||||
Offset(cursors.manpage), XtRString, MANPAGE_CURSOR},
|
|
||||||
{"searchEntryCursor", XtCCursor, XtRCursor, sizeof(Cursor),
|
|
||||||
Offset(cursors.search_entry), XtRString, SEARCH_ENTRY_CURSOR},
|
|
||||||
{"pointerColor", XtCForeground, XtRPixel, sizeof(Pixel),
|
|
||||||
Offset(cursors.fg_color), XtRString, "XtDefaultForeground"},
|
|
||||||
{"pointerColorBackground", XtCBackground, XtRPixel, sizeof(Pixel),
|
|
||||||
Offset(cursors.bg_color), XtRString, "XtDefaultBackground"},
|
|
||||||
{"help", XtCBoolean, XtRBoolean, sizeof(Boolean),
|
|
||||||
Offset(show_help_syntax), XtRImmediate, NULL},
|
|
||||||
{"helpFile", XtCFile, XtRString, sizeof(char *),
|
|
||||||
Offset(help_file), XtRString, HELPFILE},
|
|
||||||
{"topBox", XtCBoolean, XtRBoolean, sizeof(Boolean),
|
|
||||||
Offset(top_box_active), XtRString, "True"},
|
|
||||||
{"clearSearchString", "ClearSearchString", XtRBoolean, sizeof(Boolean),
|
|
||||||
Offset(clear_search_string), XtRImmediate, (caddr_t) TRUE},
|
|
||||||
{"title", XtCString, XtRString, sizeof(char *),
|
|
||||||
Offset(title), XtRString, "xman"},
|
|
||||||
{"iconic", XtCBoolean, XtRBoolean, sizeof(Boolean),
|
|
||||||
Offset(iconic), XtRString, "False"},
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef Offset
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The resource that we absolutely need.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char *fallback_resources[] = {
|
|
||||||
"Xman*quitButton.translations: #override \\n <Btn1Up>: Quit() reset()",
|
|
||||||
"Xman*helpButton.sensitive: FALSE",
|
|
||||||
"Xman*manpageButton.sensitive: FALSE",
|
|
||||||
"Xman*helpButton.Label: Help",
|
|
||||||
"Xman*quitButton.Label: Quit",
|
|
||||||
"Xman*manpageButton.Label: Manual Page",
|
|
||||||
"Xman*topLabel.label: No App-Defaults File",
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is necessary to keep all TopLevel shells from becoming
|
|
||||||
* the size that is specified on the command line.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static XrmOptionDescRec xman_options[] = {
|
|
||||||
{"-geometry", "*topBox.geometry", XrmoptionSepArg, (caddr_t) NULL},
|
|
||||||
{"-help", "help", XrmoptionNoArg, (caddr_t) "True"},
|
|
||||||
{"=", "*topBox.geometry", XrmoptionIsArg, (caddr_t) NULL},
|
|
||||||
{"-pagesize", "*manualBrowser.geometry", XrmoptionSepArg, (caddr_t) NULL},
|
|
||||||
{"-notopbox", "topBox", XrmoptionNoArg, (caddr_t) "False"},
|
|
||||||
{"-helpfile", "helpFile", XrmoptionSepArg, (caddr_t) NULL},
|
|
||||||
{"-bothshown", "bothShown", XrmoptionNoArg, (caddr_t) "True"},
|
|
||||||
{"-title", "title", XrmoptionSepArg, (caddr_t) "xman"},
|
|
||||||
{"-iconic", "iconic", XrmoptionNoArg, (caddr_t) "True"},
|
|
||||||
};
|
|
||||||
|
|
||||||
static XtActionsRec xman_actions[] = {
|
|
||||||
{"GotoPage", GotoPage},
|
|
||||||
{"Quit", Quit},
|
|
||||||
{"Search", Search},
|
|
||||||
{"PopupHelp", PopupHelp},
|
|
||||||
{"PopupSearch", PopupSearch},
|
|
||||||
{"CreateNewManpage", CreateNewManpage},
|
|
||||||
{"RemoveThisManpage", RemoveThisManpage},
|
|
||||||
{"SaveFormattedPage", SaveFormattedPage},
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
{"PrintThisManpage", PrintThisManpage},
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
{"ShowVersion", ShowVersion},
|
|
||||||
};
|
|
||||||
|
|
||||||
char **saved_argv;
|
|
||||||
int saved_argc;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This atom is used to make the application ICCCM compliant.
|
|
||||||
*/
|
|
||||||
Atom wm_delete_window;
|
|
||||||
|
|
||||||
/* Function Name: main
|
|
||||||
* Description: This is the main driver for Xman.
|
|
||||||
* Arguments: argc, argv - the command line arguments.
|
|
||||||
* Returns: return, what return.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
XtAppContext app_con;
|
|
||||||
|
|
||||||
saved_argc = argc;
|
|
||||||
saved_argv = (char **) XtMalloc(argc * sizeof(char *));
|
|
||||||
bcopy(argv, saved_argv, argc * sizeof(char *));
|
|
||||||
|
|
||||||
XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
|
|
||||||
|
|
||||||
initial_widget = XtAppInitialize(&app_con, "Xman", xman_options,
|
|
||||||
XtNumber(xman_options), &argc, argv,
|
|
||||||
fallback_resources, NULL, ZERO);
|
|
||||||
wm_delete_window =
|
|
||||||
XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW", False);
|
|
||||||
|
|
||||||
manglobals_context = XStringToContext(MANNAME);
|
|
||||||
|
|
||||||
AdjustDefResources();
|
|
||||||
|
|
||||||
XtGetApplicationResources(initial_widget, (caddr_t) & resources,
|
|
||||||
my_resources, XtNumber(my_resources),
|
|
||||||
NULL, (Cardinal) 0);
|
|
||||||
|
|
||||||
if ((argc != 1) || (resources.show_help_syntax)) {
|
|
||||||
ArgError(argc, argv);
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
|
|
||||||
|
|
||||||
if (!resources.fonts.directory)
|
|
||||||
PrintError("Failed to get the directory font.");
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
printf("debugging mode\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set the default width and height.
|
|
||||||
* I am not real happy with this method, but it will usually do something
|
|
||||||
* reasonable, if not the "right" thing. It is not a real big issue since
|
|
||||||
* it is easy to change the values with resources or command line options.
|
|
||||||
* NOTE: if you are in a 100 dpi display you will lose.
|
|
||||||
*/
|
|
||||||
|
|
||||||
default_width = DEFAULT_WIDTH;
|
|
||||||
default_height = DisplayHeight(XtDisplay(initial_widget),
|
|
||||||
DefaultScreen(XtDisplay(initial_widget)));
|
|
||||||
default_height *= 3;
|
|
||||||
default_height /= 4;
|
|
||||||
|
|
||||||
if ((sections = Man()) == 0)
|
|
||||||
PrintError
|
|
||||||
("There are no manual sections to display, check your MANPATH.");
|
|
||||||
|
|
||||||
if (resources.top_box_active)
|
|
||||||
MakeTopBox();
|
|
||||||
else
|
|
||||||
(void) CreateManpage(NULL);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to keep track of the number of manual pages that are shown on
|
|
||||||
* the screen so that if this user does not have a top box then when they
|
|
||||||
* remove all their manual pages we can kill off the xman process.
|
|
||||||
* To make things easier we will consider the top box a shown manual page
|
|
||||||
* here, but since you cannot remove it, man_page_shown only goes to zero when
|
|
||||||
* no top box is present.
|
|
||||||
*/
|
|
||||||
|
|
||||||
man_pages_shown = 1;
|
|
||||||
|
|
||||||
XtAppMainLoop(app_con);
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: ArgError
|
|
||||||
* Description: Prints error message about unknown arguments.
|
|
||||||
* Arguments: argc, argv - args not understood.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
ArgError(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
static const char **syntax, *syntax_def[] = {
|
|
||||||
"-help", "Print this message",
|
|
||||||
"-helpfile <filename>", "Specifies the helpfile to use.",
|
|
||||||
"-bothshown", "Show both the directory and manpage at once.",
|
|
||||||
"-notopbox", "Starts with manpage rather than topbox.",
|
|
||||||
"-geometry <geom>", "Specifies the geometry of the top box.",
|
|
||||||
"=<geom>", "Specifies the geometry of the top box.",
|
|
||||||
"-pagesize <geom>", "Specifies the geometry of the manual page.",
|
|
||||||
"-bw <pixels>", "Width of all window borders.",
|
|
||||||
"-borderwidth <pixels>", "Width of all window borders.",
|
|
||||||
"-bd <color>", "Color of all window borders.",
|
|
||||||
"-bordercolor <color>", "Color of all window borders.",
|
|
||||||
"-fg <color>", "Foreground color for the application.",
|
|
||||||
"-foreground <color>", "Foreground color for the application.",
|
|
||||||
"-bg <color>", "Background color for the application.",
|
|
||||||
"-background <color>", "Background color for the application.",
|
|
||||||
"-display <display name>", "Specify a display that is not the default",
|
|
||||||
"-fn <font>", "Font to be used for button and label text.",
|
|
||||||
"-font <font>", "Font to be used for button and label text.",
|
|
||||||
"-name <name>", "Change the name used for retrieving resources.",
|
|
||||||
"-title <name>", "Change the name without affecting resources.",
|
|
||||||
"-xrm <resource>", "Specifies a resource on the command line.",
|
|
||||||
NULL, NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
syntax = syntax_def;
|
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
|
||||||
(void) printf("This argument is unknown to Xman: %s\n", argv[i]);
|
|
||||||
|
|
||||||
(void) printf("\nKnown arguments are:\n");
|
|
||||||
|
|
||||||
while (*syntax != NULL) {
|
|
||||||
printf("%-30s - %s\n", syntax[0], syntax[1]);
|
|
||||||
syntax += 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: AdjustDefResources
|
|
||||||
* Description: Changes default resources which contain paths when
|
|
||||||
* XWINHOME is set
|
|
||||||
* Arguments: none
|
|
||||||
* Returns: nothing
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
|
||||||
AdjustDefResources(void)
|
|
||||||
{
|
|
||||||
char *xwinhome = NULL;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!(xwinhome = getenv("XWINHOME")))
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof(my_resources) / sizeof(XtResource); i++) {
|
|
||||||
if (!strcmp(my_resources[i].resource_name, "helpFile")) {
|
|
||||||
char filename[PATH_MAX];
|
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%s/lib/X11/xman.help",
|
|
||||||
xwinhome);
|
|
||||||
if (!(my_resources[i].default_addr = strdup(filename))) {
|
|
||||||
fprintf(stderr, "malloc failure\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
1136
app/xman/man.c
1136
app/xman/man.c
File diff suppressed because it is too large
Load Diff
292
app/xman/man.h
292
app/xman/man.h
@ -1,292 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* X toolkit header files */
|
|
||||||
|
|
||||||
#include <X11/Intrinsic.h>
|
|
||||||
#include <X11/StringDefs.h>
|
|
||||||
#include <X11/Shell.h>
|
|
||||||
|
|
||||||
#include <X11/Xaw/Cardinals.h>
|
|
||||||
|
|
||||||
/* Std system and C header files */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#include <X11/Xfuncs.h>
|
|
||||||
#include <X11/Xos.h>
|
|
||||||
|
|
||||||
/* X include files */
|
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
|
||||||
|
|
||||||
/* Widget header files. */
|
|
||||||
|
|
||||||
#include <X11/Xaw/AsciiText.h>
|
|
||||||
#include <X11/Xaw/SmeBSB.h>
|
|
||||||
#include <X11/Xaw/Box.h>
|
|
||||||
#include <X11/Xaw/Command.h>
|
|
||||||
#include <X11/Xaw/Dialog.h>
|
|
||||||
#include <X11/Xaw/Label.h>
|
|
||||||
#include <X11/Xaw/List.h>
|
|
||||||
#include <X11/Xaw/MenuButton.h>
|
|
||||||
#include <X11/Xaw/SimpleMenu.h>
|
|
||||||
#include <X11/Xaw/Paned.h>
|
|
||||||
#include <X11/Xaw/Viewport.h>
|
|
||||||
|
|
||||||
/* program specific header files. */
|
|
||||||
|
|
||||||
#include "ScrollByL.h"
|
|
||||||
|
|
||||||
#include "defs.h"
|
|
||||||
|
|
||||||
#define Error(x) { printf x ; exit(EXIT_FAILURE); }
|
|
||||||
#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
|
|
||||||
#ifdef DEBUG
|
|
||||||
# define Log(x) { if(True) printf x; }
|
|
||||||
#else
|
|
||||||
# define Log(x) { if(False) printf x; }
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Assigning values here allows the user of Bitwise Or.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _XmanFonts {
|
|
||||||
XFontStruct *directory; /* The font for the directory. */
|
|
||||||
} XmanFonts;
|
|
||||||
|
|
||||||
typedef struct _XmanCursors {
|
|
||||||
Cursor top, /* The top Cursor, default for xman. */
|
|
||||||
help, /* The top cursor for the help menu. */
|
|
||||||
manpage, /* The cursor for the Manpage. */
|
|
||||||
search_entry; /* The cursor for the text widget in the
|
|
||||||
search box. */
|
|
||||||
Pixel fg_color; /* foreground color of cursors. */
|
|
||||||
Pixel bg_color; /* background color of cursors. */
|
|
||||||
} XmanCursors;
|
|
||||||
|
|
||||||
typedef struct _ManPageWidgets {
|
|
||||||
Widget manpage, /* The manual page window (scrolled) */
|
|
||||||
directory, /* The widget in which all directories will
|
|
||||||
appear. */
|
|
||||||
*box; /* The boxes containing the sections. */
|
|
||||||
} ManPageWidgets;
|
|
||||||
|
|
||||||
typedef struct _MenuStruct {
|
|
||||||
caddr_t data;
|
|
||||||
int number;
|
|
||||||
XrmQuark quark;
|
|
||||||
} MenuStruct;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The manual sections and entries
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct tManual {
|
|
||||||
char *blabel; /* The button label. */
|
|
||||||
char **entries; /* The individual man page file names. */
|
|
||||||
char **entries_less_paths; /* Entry names only */
|
|
||||||
int nentries; /* how many (TOTAL) */
|
|
||||||
int nalloc; /* how much space allocated */
|
|
||||||
int flags; /* suffix, fold */
|
|
||||||
} Manual;
|
|
||||||
|
|
||||||
/* pseudo Globals that are specific to each manpage created. */
|
|
||||||
|
|
||||||
typedef struct _ManpageGlobals {
|
|
||||||
int current_directory; /* The directory currently being shown
|
|
||||||
on this manpage. */
|
|
||||||
Boolean dir_shown, /* True if the directory is then current
|
|
||||||
visible screen */
|
|
||||||
both_shown; /* If true then both the manpage and
|
|
||||||
the directory are to be shown. */
|
|
||||||
Widget label, /* The label widget at the top of the page. */
|
|
||||||
standby, /* The please standby widget. */
|
|
||||||
save, /* The "would you like to save?" widget. */
|
|
||||||
search_widget, /* The search widget popup. */
|
|
||||||
help_button, /* The help button. */
|
|
||||||
option_menu, /* The option menu. */
|
|
||||||
text_widget; /* text widget containing search string. */
|
|
||||||
|
|
||||||
/* Widgets (Objects really) for the command menu entries. */
|
|
||||||
|
|
||||||
Widget dir_entry, manpage_entry, help_entry,
|
|
||||||
search_entry, both_screens_entry, remove_entry,
|
|
||||||
open_entry, print_entry, version_entry, quit_entry;
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
/* Print objects and data */
|
|
||||||
Widget printdialog_shell; /* Shell for the print dialog */
|
|
||||||
Widget printdialog; /* Print dialog */
|
|
||||||
#endif /*INCLUDE_XPRINT_SUPPORT */
|
|
||||||
/* Misc. */
|
|
||||||
|
|
||||||
char manpage_title[80]; /* The label to use for the current manpage. */
|
|
||||||
|
|
||||||
char save_file[80]; /* the name of the file to save formatted
|
|
||||||
page into. */
|
|
||||||
char tempfile[80]; /* the name of the file to copy the formatted
|
|
||||||
page from. */
|
|
||||||
Boolean compress; /* Compress file on save? */
|
|
||||||
Boolean gzip; /* Gzip file on save? */
|
|
||||||
Boolean bzip2; /* Bzip2 file on save? */
|
|
||||||
Boolean lzma;
|
|
||||||
Boolean deletetempfile; /* Need to delete tempfile when done? */
|
|
||||||
char **section_name; /* The name of each of the sections */
|
|
||||||
|
|
||||||
ManPageWidgets manpagewidgets; /* The manpage widgets. */
|
|
||||||
|
|
||||||
/* Things to remember when cleaning up when killing manpage. */
|
|
||||||
|
|
||||||
Widget This_Manpage; /* a pointer to the root of
|
|
||||||
this manpage. */
|
|
||||||
|
|
||||||
FILE *curr_file; /* Current file shown in manpage widget */
|
|
||||||
} ManpageGlobals;
|
|
||||||
|
|
||||||
|
|
||||||
/* Resource manager sets these. */
|
|
||||||
|
|
||||||
typedef struct _Xman_Resources {
|
|
||||||
XmanFonts fonts; /* The fonts used for the man pages. */
|
|
||||||
XmanCursors cursors; /* The cursors for xman. */
|
|
||||||
Boolean show_help_syntax; /* True if syntax message should be dumped to
|
|
||||||
stdout. */
|
|
||||||
Boolean both_shown_initial; /* The initial state of the manual pages
|
|
||||||
show two screens or only one. */
|
|
||||||
Boolean top_box_active; /* Put up the Top Box. */
|
|
||||||
Boolean clear_search_string; /* clear the search string each time it
|
|
||||||
is popped down? */
|
|
||||||
int directory_height; /* The default height of directory in
|
|
||||||
both_shown mode. */
|
|
||||||
char *help_file; /* The name of the help file. */
|
|
||||||
char *title; /* The title for topBox */
|
|
||||||
Boolean iconic; /* Should topBox come up in an iconic state */
|
|
||||||
} Xman_Resources;
|
|
||||||
|
|
||||||
/************************************************************
|
|
||||||
*
|
|
||||||
* Function Definitions
|
|
||||||
*
|
|
||||||
************************************************************/
|
|
||||||
|
|
||||||
/* Standard library function definitions. */
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* buttons.c */
|
|
||||||
|
|
||||||
ManpageGlobals *InitPsuedoGlobals(void);
|
|
||||||
Widget CreateManpage(FILE * file);
|
|
||||||
void CreateManpageWidget(ManpageGlobals * man_globals, char *name,
|
|
||||||
Boolean full_instance);
|
|
||||||
void FormUpWidgets(Widget parent,
|
|
||||||
const char **full_size, const char **half_size);
|
|
||||||
void MakeDirectoryBox(ManpageGlobals * man_globals, Widget parent,
|
|
||||||
Widget * dir_disp, int section);
|
|
||||||
void MakeSaveWidgets(ManpageGlobals * man_globals, Widget parent);
|
|
||||||
void MakeTopBox(void);
|
|
||||||
|
|
||||||
/* handler.c */
|
|
||||||
|
|
||||||
void DirPopupCallback(Widget w, XtPointer pointer, XtPointer junk);
|
|
||||||
void DirectoryHandler(Widget w, XtPointer global_pointer, XtPointer ret_val);
|
|
||||||
void OptionCallback(Widget w, XtPointer pointer, XtPointer junk);
|
|
||||||
void Popup(Widget w, XtGrabKind grab_kind);
|
|
||||||
|
|
||||||
/* Action Routines. */
|
|
||||||
|
|
||||||
void CreateNewManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
void GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params);
|
|
||||||
void PopupHelp(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
void PopupSearch(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
void Quit(Widget w, XEvent * event, String * params, Cardinal * num_params);
|
|
||||||
void RemoveThisManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
void SaveFormattedPage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
void Search(Widget w, XEvent * event, String * params, Cardinal * num_params);
|
|
||||||
|
|
||||||
#ifdef INCLUDE_XPRINT_SUPPORT
|
|
||||||
void PrintThisManpage(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
#endif /* INCLUDE_XPRINT_SUPPORT */
|
|
||||||
void ShowVersion(Widget w, XEvent * event, String * params,
|
|
||||||
Cardinal * num_params);
|
|
||||||
|
|
||||||
/* help.c */
|
|
||||||
|
|
||||||
Boolean MakeHelpWidget(void);
|
|
||||||
Boolean OpenHelpfile(ManpageGlobals * man_globals);
|
|
||||||
|
|
||||||
/* man.c */
|
|
||||||
Bool ReadManConfig(char manpath[]);
|
|
||||||
int Man(void);
|
|
||||||
|
|
||||||
/* misc.c */
|
|
||||||
#ifndef HAVE_MKSTEMP
|
|
||||||
_X_HIDDEN int Xmkstemp (char *template);
|
|
||||||
# define mkstemp Xmkstemp
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FILE *FindManualFile(ManpageGlobals * man_globals, int section_num,
|
|
||||||
int entry_num);
|
|
||||||
ManpageGlobals *GetGlobals(Widget w);
|
|
||||||
|
|
||||||
void AddCursor(Widget w, Cursor cursor);
|
|
||||||
void ChangeLabel(Widget w, const char *str);
|
|
||||||
void OpenFile(ManpageGlobals * man_globals, FILE * file);
|
|
||||||
void PopupWarning(ManpageGlobals * man_globals, const char *string);
|
|
||||||
void PositionCenter(Widget widget, int x, int y, int above, int left,
|
|
||||||
int v_space, int h_space);
|
|
||||||
void PrintError(const char *string) _X_NORETURN;
|
|
||||||
void RemoveGlobals(Widget w);
|
|
||||||
void SaveGlobals(Widget w, ManpageGlobals * globals);
|
|
||||||
void ParseEntry(const char *entry, char *path, char *sect, char *page);
|
|
||||||
FILE *Format(ManpageGlobals * man_globals, const char *entry);
|
|
||||||
|
|
||||||
/* search */
|
|
||||||
FILE *DoSearch(ManpageGlobals * man_globals, int type);
|
|
||||||
void MakeSearchWidget(ManpageGlobals * man_globals, Widget parent);
|
|
||||||
|
|
||||||
/* tkfunctions.c */
|
|
||||||
|
|
||||||
int Width(Widget);
|
|
||||||
int Height(Widget);
|
|
||||||
int BorderWidth(Widget);
|
|
||||||
char *Name(Widget);
|
|
@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
appmandir = $(APP_MAN_DIR)
|
|
||||||
appman_PRE = xman.man
|
|
||||||
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
|
|
||||||
|
|
||||||
EXTRA_DIST = $(appman_PRE)
|
|
||||||
CLEANFILES = $(appman_DATA)
|
|
||||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
|
||||||
|
|
||||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
|
||||||
.man.$(APP_MAN_SUFFIX):
|
|
||||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
|
@ -1,462 +0,0 @@
|
|||||||
# Makefile.in generated by automake 1.12.6 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
# PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
@SET_MAKE@
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
am__make_dryrun = \
|
|
||||||
{ \
|
|
||||||
am__dry=no; \
|
|
||||||
case $$MAKEFLAGS in \
|
|
||||||
*\\[\ \ ]*) \
|
|
||||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
|
||||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
|
||||||
*) \
|
|
||||||
for am__flg in $$MAKEFLAGS; do \
|
|
||||||
case $$am__flg in \
|
|
||||||
*=*|--*) ;; \
|
|
||||||
*n*) am__dry=yes; break;; \
|
|
||||||
esac; \
|
|
||||||
done;; \
|
|
||||||
esac; \
|
|
||||||
test $$am__dry = yes; \
|
|
||||||
}
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
install_sh_DATA = $(install_sh) -c -m 644
|
|
||||||
install_sh_PROGRAM = $(install_sh) -c
|
|
||||||
install_sh_SCRIPT = $(install_sh) -c
|
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
|
||||||
transform = $(program_transform_name)
|
|
||||||
NORMAL_INSTALL = :
|
|
||||||
PRE_INSTALL = :
|
|
||||||
POST_INSTALL = :
|
|
||||||
NORMAL_UNINSTALL = :
|
|
||||||
PRE_UNINSTALL = :
|
|
||||||
POST_UNINSTALL = :
|
|
||||||
build_triplet = @build@
|
|
||||||
host_triplet = @host@
|
|
||||||
subdir = man
|
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
|
||||||
CONFIG_HEADER = $(top_builddir)/config.h
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
|
||||||
am__v_P_0 = false
|
|
||||||
am__v_P_1 = :
|
|
||||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
|
||||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
|
||||||
am__v_GEN_0 = @echo " GEN " $@;
|
|
||||||
am__v_GEN_1 =
|
|
||||||
AM_V_at = $(am__v_at_@AM_V@)
|
|
||||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
|
||||||
am__v_at_0 = @
|
|
||||||
am__v_at_1 =
|
|
||||||
SOURCES =
|
|
||||||
DIST_SOURCES =
|
|
||||||
am__can_run_installinfo = \
|
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
|
||||||
n|no|NO) false;; \
|
|
||||||
*) (install-info --version) >/dev/null 2>&1;; \
|
|
||||||
esac
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__uninstall_files_from_dir = { \
|
|
||||||
test -z "$$files" \
|
|
||||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
|
||||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
|
||||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
|
||||||
}
|
|
||||||
am__installdirs = "$(DESTDIR)$(appmandir)"
|
|
||||||
DATA = $(appman_DATA)
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
|
||||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
|
||||||
APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
|
|
||||||
APPDEFS_LIBS = @APPDEFS_LIBS@
|
|
||||||
APP_MAN_DIR = @APP_MAN_DIR@
|
|
||||||
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
BASE_CFLAGS = @BASE_CFLAGS@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
|
||||||
CPP = @CPP@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CWARNFLAGS = @CWARNFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
|
||||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
|
||||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
|
||||||
GREP = @GREP@
|
|
||||||
GROFF = @GROFF@
|
|
||||||
HELPDIR = @HELPDIR@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_CMD = @INSTALL_CMD@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIB_MAN_DIR = @LIB_MAN_DIR@
|
|
||||||
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAINT = @MAINT@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MAN_SUBSTS = @MAN_SUBSTS@
|
|
||||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
|
||||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
|
||||||
SED = @SED@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
XMAN_CFLAGS = @XMAN_CFLAGS@
|
|
||||||
XMAN_LIBS = @XMAN_LIBS@
|
|
||||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
appdefaultdir = @appdefaultdir@
|
|
||||||
bindir = @bindir@
|
|
||||||
build = @build@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
build_cpu = @build_cpu@
|
|
||||||
build_os = @build_os@
|
|
||||||
build_vendor = @build_vendor@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host = @host@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
host_cpu = @host_cpu@
|
|
||||||
host_os = @host_os@
|
|
||||||
host_vendor = @host_vendor@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
appmandir = $(APP_MAN_DIR)
|
|
||||||
appman_PRE = xman.man
|
|
||||||
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
|
|
||||||
EXTRA_DIST = $(appman_PRE)
|
|
||||||
CLEANFILES = $(appman_DATA)
|
|
||||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
|
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
|
||||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --foreign man/Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
install-appmanDATA: $(appman_DATA)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
|
|
||||||
if test -n "$$list"; then \
|
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \
|
|
||||||
$(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \
|
|
||||||
fi; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
|
|
||||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-appmanDATA:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir)
|
|
||||||
tags: TAGS
|
|
||||||
TAGS:
|
|
||||||
|
|
||||||
ctags: CTAGS
|
|
||||||
CTAGS:
|
|
||||||
|
|
||||||
cscope cscopelist:
|
|
||||||
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
else \
|
|
||||||
test -f "$(distdir)/$$file" \
|
|
||||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
check-am: all-am
|
|
||||||
check: check-am
|
|
||||||
all-am: Makefile $(DATA)
|
|
||||||
installdirs:
|
|
||||||
for dir in "$(DESTDIR)$(appmandir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
install: install-am
|
|
||||||
install-exec: install-exec-am
|
|
||||||
install-data: install-data-am
|
|
||||||
uninstall: uninstall-am
|
|
||||||
|
|
||||||
install-am: all-am
|
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
|
||||||
|
|
||||||
installcheck: installcheck-am
|
|
||||||
install-strip:
|
|
||||||
if test -z '$(STRIP)'; then \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
|
||||||
install; \
|
|
||||||
else \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
|
||||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
|
||||||
fi
|
|
||||||
mostlyclean-generic:
|
|
||||||
|
|
||||||
clean-generic:
|
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
|
||||||
|
|
||||||
maintainer-clean-generic:
|
|
||||||
@echo "This command is intended for maintainers to use"
|
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
|
||||||
clean: clean-am
|
|
||||||
|
|
||||||
clean-am: clean-generic mostlyclean-am
|
|
||||||
|
|
||||||
distclean: distclean-am
|
|
||||||
-rm -f Makefile
|
|
||||||
distclean-am: clean-am distclean-generic
|
|
||||||
|
|
||||||
dvi: dvi-am
|
|
||||||
|
|
||||||
dvi-am:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-appmanDATA
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am:
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
installcheck-am:
|
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
|
||||||
-rm -f Makefile
|
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic
|
|
||||||
|
|
||||||
pdf: pdf-am
|
|
||||||
|
|
||||||
pdf-am:
|
|
||||||
|
|
||||||
ps: ps-am
|
|
||||||
|
|
||||||
ps-am:
|
|
||||||
|
|
||||||
uninstall-am: uninstall-appmanDATA
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
|
||||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-appmanDATA install-data \
|
|
||||||
install-data-am install-dvi install-dvi-am install-exec \
|
|
||||||
install-exec-am install-html install-html-am install-info \
|
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
|
||||||
install-ps install-ps-am install-strip installcheck \
|
|
||||||
installcheck-am installdirs maintainer-clean \
|
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
|
||||||
pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA
|
|
||||||
|
|
||||||
|
|
||||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
|
||||||
.man.$(APP_MAN_SUFFIX):
|
|
||||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
|
||||||
.NOEXPORT:
|
|
@ -1,386 +0,0 @@
|
|||||||
.\" t
|
|
||||||
.\"
|
|
||||||
.TH XMAN 1 __xorgversion__
|
|
||||||
.SH NAME
|
|
||||||
xman \- Manual page display program for the X Window System
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B xman
|
|
||||||
[
|
|
||||||
.I \-options
|
|
||||||
\&.\|.\|. ]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.I Xman
|
|
||||||
is a manual page browser. The default size of the initial \fIxman\fP
|
|
||||||
window is small so that you can leave it running throughout your entire login
|
|
||||||
session. In the initial window there are three options:
|
|
||||||
\fIHelp\fP will pop up a window with on-line help, \fIQuit\fP will
|
|
||||||
exit, and \fIManual Page\fP will pop up a window with a manual page
|
|
||||||
browser in it.
|
|
||||||
Typing Control-S will pop up a window prompting for a specific manual
|
|
||||||
page to display.
|
|
||||||
You may display more than one manual page browser window at a time
|
|
||||||
from a single execution of \fIxman\fP.
|
|
||||||
.PP
|
|
||||||
For further information on using \fIxman\fP, please read the on-line
|
|
||||||
help information. Most of this manual will discuss
|
|
||||||
customization of \fIxman\fP.
|
|
||||||
.SH "OPTIONS"
|
|
||||||
.PP
|
|
||||||
Xman supports all standard Toolkit command line arguments (see
|
|
||||||
\fIX\fP(__miscmansuffix__)). The following additional arguments are supported.
|
|
||||||
.sp
|
|
||||||
.IP "\fB\-helpfile\fP \fIfilename\fP"
|
|
||||||
Specifies a helpfile to use other than the default.
|
|
||||||
.IP \fB\-bothshown\fP
|
|
||||||
Allows both the manual page and manual directory to be on the screen at
|
|
||||||
the same time.
|
|
||||||
.IP \fB\-notopbox\fP
|
|
||||||
Starts without the Top Menu with the three buttons in it.
|
|
||||||
.IP "\fB\-geometry\fP \fIWxH+X+Y\fP"
|
|
||||||
Sets the size and location of the Top Menu with the three buttons in it.
|
|
||||||
.IP "\fB\-pagesize\fP \fIWxH+X+Y\fP"
|
|
||||||
Sets the size and location of all the Manual Pages.
|
|
||||||
.SH "CUSTOMIZING XMAN"
|
|
||||||
.PP
|
|
||||||
.I Xman
|
|
||||||
allows customization of both the directories to be searched for manual pages,
|
|
||||||
and the name that each directory will map to in the \fISections\fP
|
|
||||||
menu. Xman determines which directories it will
|
|
||||||
search by reading the \fIMANPATH\fP environment variable. If no
|
|
||||||
\fIMANPATH\fP is found then the directory is /usr/man is searched on
|
|
||||||
POSIX systems. This environment
|
|
||||||
is expected to be a colon-separated list of directories for xman to search.
|
|
||||||
.sp
|
|
||||||
.nf
|
|
||||||
setenv MANPATH /mit/kit/man:/usr/man
|
|
||||||
.fi
|
|
||||||
.PP
|
|
||||||
By default,
|
|
||||||
.I xman
|
|
||||||
will search each of the following directories (in each of the directories
|
|
||||||
specified in the users MANPATH) for manual pages. If manual pages exist
|
|
||||||
in that directory then they are added to list of manual pages for
|
|
||||||
the corresponding menu item.
|
|
||||||
A menu item is only displayed for those sections that actually contain
|
|
||||||
manual pages.
|
|
||||||
|
|
||||||
.TS
|
|
||||||
l l.
|
|
||||||
Directory Section Name
|
|
||||||
- -
|
|
||||||
man1 (1) User Commands
|
|
||||||
man2 (2) System Calls
|
|
||||||
man3 (3) Subroutines
|
|
||||||
man4 (4) Devices
|
|
||||||
man5 (5) File Formats
|
|
||||||
man6 (6) Games
|
|
||||||
man7 (7) Miscellaneous
|
|
||||||
man8 (8) Sys. Administration
|
|
||||||
manl (l) Local
|
|
||||||
mann (n) New
|
|
||||||
mano (o) Old
|
|
||||||
.TE
|
|
||||||
|
|
||||||
For instance, a user has three directories in her manual path and each
|
|
||||||
contain a directory called \fIman3\fP. All these manual pages will appear
|
|
||||||
alphabetically sorted when the user selects the menu item called
|
|
||||||
\fI(__libmansuffix__) Subroutines\fP. If there is no directory called
|
|
||||||
\fImano\fP in any of the directories in her MANPATH, or there are no manual
|
|
||||||
pages in any of the directories called \fImano\fP then no menu item will be
|
|
||||||
displayed for the section called \fI(o) Old\fP.
|
|
||||||
.SH "BSD AND LINUX SYSTEMS"
|
|
||||||
.PP
|
|
||||||
In newer BSD and Linux systems, \fIXman\fP will search for a file named
|
|
||||||
\fI/etc/man.conf\fP which will contain the list of directories containing
|
|
||||||
manual pages. See \fIman.conf\fP(__filemansuffix__) for a complete description of the file
|
|
||||||
format.
|
|
||||||
.SH "THE MANDESC FILE"
|
|
||||||
.PP
|
|
||||||
By using the \fImandesc\fP file a user or system manager is able to
|
|
||||||
more closely control which manual pages will appear in each of the sections
|
|
||||||
represented by menu items in the \fISections\fP menu. This
|
|
||||||
functionality is only available on a section by section basis, and individual
|
|
||||||
manual pages may not be handled in this manner.
|
|
||||||
(Although generous use of
|
|
||||||
symbolic links \(em see \fIln\fP(__appmansuffix__) \(em will allow
|
|
||||||
almost any configuration you can imagine.)
|
|
||||||
.PP
|
|
||||||
The format of the mandesc file is a character followed by a label. The
|
|
||||||
character determines which of the sections will be added under this label.
|
|
||||||
For instance suppose that you would like to create an extra menu item that
|
|
||||||
contains all programmer subroutines. This label should contain all manual
|
|
||||||
pages in both sections two and three. The \fImandesc\fP file
|
|
||||||
would look like this:
|
|
||||||
.nf
|
|
||||||
|
|
||||||
2Programmer Subroutines
|
|
||||||
3Programmer Subroutines
|
|
||||||
|
|
||||||
.fi
|
|
||||||
This will add a menu item to the \fISections\fP menu that would
|
|
||||||
bring up a listing of all manual pages in sections two and three of
|
|
||||||
the Programmers Manual. Since the label names are \fIexactly\fP the
|
|
||||||
same they will be added to the same section. Note, however, that the
|
|
||||||
original sections still exist.
|
|
||||||
.PP
|
|
||||||
If you want to completely ignore the default sections in a manual directory
|
|
||||||
then add the line:
|
|
||||||
.nf
|
|
||||||
|
|
||||||
no default sections
|
|
||||||
|
|
||||||
.fi
|
|
||||||
anywhere in your mandesc file. This keeps xman from searching
|
|
||||||
the default manual sections \fIIn that directory only\fP. As an example,
|
|
||||||
suppose you want to do the same thing as above, but you don't think that
|
|
||||||
it is useful to have the \fISystem Calls\fP or \fISubroutines\fP sections
|
|
||||||
any longer. You would need to duplicate the default entries, as well as
|
|
||||||
adding your new one.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
no default sections
|
|
||||||
1(1) User Commands
|
|
||||||
2Programmer Subroutines
|
|
||||||
3Programmer Subroutines
|
|
||||||
4(4) Devices
|
|
||||||
5(5) File Formats
|
|
||||||
6(6) Games
|
|
||||||
7(7) Miscellaneous
|
|
||||||
8(8) Sys. Administration
|
|
||||||
l(l) Local
|
|
||||||
n(n) New
|
|
||||||
o(o) Old
|
|
||||||
|
|
||||||
.fi
|
|
||||||
Xman will read any section that is of the from \fIman<character>\fP, where
|
|
||||||
<character> is an upper or lower case letter (they are treated distinctly) or
|
|
||||||
a numeral (0-9). Be warned, however, that man(__appmansuffix__) and
|
|
||||||
catman(__adminmansuffix__) will not search directories that are non-standard.
|
|
||||||
.SH WIDGETS
|
|
||||||
In order to specify resources, it is useful to know the hierarchy of
|
|
||||||
the widgets which compose \fIxman\fR. In the notation below,
|
|
||||||
indentation indicates hierarchical structure. The widget class name
|
|
||||||
is given first, followed by the widget instance name.
|
|
||||||
.sp
|
|
||||||
.nf
|
|
||||||
.ft CW
|
|
||||||
Xman xman \fI(This widget is never used)\fP
|
|
||||||
TopLevelShell topBox
|
|
||||||
Form form
|
|
||||||
Label topLabel
|
|
||||||
Command helpButton
|
|
||||||
Command quitButton
|
|
||||||
Command manpageButton
|
|
||||||
TransientShell search
|
|
||||||
DialogWidgetClass dialog
|
|
||||||
Label label
|
|
||||||
Text value
|
|
||||||
Command manualPage
|
|
||||||
Command apropos
|
|
||||||
Command cancel
|
|
||||||
TransientShell pleaseStandBy
|
|
||||||
Label label
|
|
||||||
TopLevelShell manualBrowser
|
|
||||||
Paned Manpage_Vpane
|
|
||||||
Paned horizPane
|
|
||||||
MenuButton options
|
|
||||||
MenuButton sections
|
|
||||||
Label manualBrowser
|
|
||||||
Viewport directory
|
|
||||||
List directory
|
|
||||||
List directory
|
|
||||||
.
|
|
||||||
. (one for each section,
|
|
||||||
. created on the fly)
|
|
||||||
.
|
|
||||||
ScrollByLine manualPage
|
|
||||||
SimpleMenu optionMenu
|
|
||||||
SmeBSB displayDirectory
|
|
||||||
SmeBSB displayManualPage
|
|
||||||
SmeBSB help
|
|
||||||
SmeBSB search
|
|
||||||
SmeBSB showBothScreens
|
|
||||||
SmeBSB removeThisManpage
|
|
||||||
SmeBSB openNewManpage
|
|
||||||
SmeBSB showVersion
|
|
||||||
SmeBSB quit
|
|
||||||
SimpleMenu sectionMenu
|
|
||||||
SmeBSB <name of section>
|
|
||||||
.
|
|
||||||
. (one for each section)
|
|
||||||
.
|
|
||||||
TransientShell search
|
|
||||||
DialogWidgetClass dialog
|
|
||||||
Label label
|
|
||||||
Text value
|
|
||||||
Command manualPage
|
|
||||||
Command apropos
|
|
||||||
Command cancel
|
|
||||||
TransientShell pleaseStandBy
|
|
||||||
Label label
|
|
||||||
TransientShell likeToSave
|
|
||||||
Dialog dialog
|
|
||||||
Label label
|
|
||||||
Text value
|
|
||||||
Command yes
|
|
||||||
Command no
|
|
||||||
TopLevelShell help
|
|
||||||
Paned Manpage_Vpane
|
|
||||||
Paned horizPane
|
|
||||||
MenuButton options
|
|
||||||
MenuButton sections
|
|
||||||
Label manualBrowser
|
|
||||||
ScrollByLine manualPage
|
|
||||||
SimpleMenu optionMenu
|
|
||||||
SmeBSB displayDirectory
|
|
||||||
SmeBSB displayManualPage
|
|
||||||
SmeBSB help
|
|
||||||
SmeBSB search
|
|
||||||
SmeBSB showBothScreens
|
|
||||||
SmeBSB removeThisManpage
|
|
||||||
SmeBSB openNewManpage
|
|
||||||
SmeBSB showVersion
|
|
||||||
SmeBSB quit
|
|
||||||
|
|
||||||
.ft
|
|
||||||
.fi
|
|
||||||
.SH "APPLICATION RESOURCES"
|
|
||||||
\fIxman\fP has the following application-specific resources which allow
|
|
||||||
customizations unique to \fIxman\fP.
|
|
||||||
.PP
|
|
||||||
.TP 18
|
|
||||||
\fBmanualFontNormal\fP (Class \fBFont\fP)
|
|
||||||
The font to use for normal text in the manual pages.
|
|
||||||
.TP 18
|
|
||||||
\fBmanualFontBold\fP (Class \fBFont\fP)
|
|
||||||
The font to use for bold text in the manual pages.
|
|
||||||
.TP 18
|
|
||||||
\fBmanualFontItalic\fP (Class \fBFont\fP)
|
|
||||||
The font to use for italic text in the manual pages.
|
|
||||||
.TP 18
|
|
||||||
\fBdirectoryFontNormal\fP (Class \fBFont\fP)
|
|
||||||
The font to use for the directory text.
|
|
||||||
.TP 18
|
|
||||||
\fBbothShown\fP (Class \fBBoolean\fP)
|
|
||||||
Either `true' or `false,' specifies whether or not you want both the
|
|
||||||
directory and the manual page shown at start up.
|
|
||||||
.TP 18
|
|
||||||
\fBdirectoryHeight\fP (Class \fBDirectoryHeight\fP)
|
|
||||||
The height in pixels of the directory, when the directory and the manual page
|
|
||||||
are shown simultaneously.
|
|
||||||
.TP 18
|
|
||||||
\fBtopCursor\fP (Class \fBCursor\fP)
|
|
||||||
The cursor to use in the top box.
|
|
||||||
.TP 18
|
|
||||||
\fBhelpCursor\fP (Class \fBCursor\fP)
|
|
||||||
The cursor to use in the help window.
|
|
||||||
.TP 18
|
|
||||||
\fBmanpageCursor\fP (Class \fBCursor\fP)
|
|
||||||
The cursor to use in the manual page window.
|
|
||||||
.TP 18
|
|
||||||
\fBsearchEntryCursor\fP (Class \fBCursor\fP)
|
|
||||||
The cursor to use in the search entry text widget.
|
|
||||||
.TP 18
|
|
||||||
\fBpointerColor\fP (Class \fBForeground\fP)
|
|
||||||
This is the color of all the cursors (pointers) specified above. The
|
|
||||||
name was chosen to be compatible with xterm.
|
|
||||||
.TP 18
|
|
||||||
\fBhelpFile\fP (Class \fBFile\fP)
|
|
||||||
Use this rather than the system default helpfile.
|
|
||||||
.TP 18
|
|
||||||
\fBtopBox\fP (Class \fBBoolean\fP)
|
|
||||||
Either `true' or `false,' determines whether the top box (containing
|
|
||||||
the help, quit and manual page buttons) or a manual page is put on the screen
|
|
||||||
at start-up. The default is true.
|
|
||||||
.TP 18
|
|
||||||
\fBverticalList\fP (Class \fBBoolean\fP)
|
|
||||||
Either `true' or `false,' determines whether the directory listing is
|
|
||||||
vertically or horizontally organized. The default is horizontal (false).
|
|
||||||
.SH "GLOBAL ACTIONS"
|
|
||||||
\fIXman\fP defines all user interaction through global actions. This allows
|
|
||||||
the user to modify the translation table of any widget, and bind any event
|
|
||||||
to the new user action. The list of actions supported by \fIxman\fP are:
|
|
||||||
.TP 1.5i
|
|
||||||
.B GotoPage(\fIpage\fB)
|
|
||||||
When used in a manual page display window this will allow the user to
|
|
||||||
move between a directory and manual page display. The \fIpage\fP argument can
|
|
||||||
be either \fBDirectory\fP or \fBManualPage\fP.
|
|
||||||
.TP 1.5i
|
|
||||||
.B Quit()
|
|
||||||
This action may be used anywhere, and will exit xman.
|
|
||||||
.TP 1.5i
|
|
||||||
.B Search(\fItype\fB, \fIaction\fB)
|
|
||||||
Only useful when used in a search popup, this action will cause the search
|
|
||||||
widget to perform the named search type on the string in the search popup's
|
|
||||||
value widget. This action will also pop down the search widget. The
|
|
||||||
\fItype\fP argument can be either \fBApropos\fP, \fBManpage\fP or
|
|
||||||
\fBCancel\fP. If an \fIaction\fP of \fBOpen\fP is specified then xman
|
|
||||||
will open a new manual page to display the results of the search, otherwise
|
|
||||||
xman will attempt to display the results in the parent of the search popup.
|
|
||||||
.TP 1.5i
|
|
||||||
.B PopupHelp()
|
|
||||||
This action may be used anywhere, and will popup the help widget.
|
|
||||||
.TP 1.5i
|
|
||||||
.B PopupSearch()
|
|
||||||
This action may be used anywhere except in a help window. It will cause
|
|
||||||
the search popup to become active and visible on the screen, allowing
|
|
||||||
the user search for a manual page.
|
|
||||||
.TP 1.5i
|
|
||||||
.B CreateNewManpage()
|
|
||||||
This action may be used anywhere, and will create a new manual page
|
|
||||||
display window.
|
|
||||||
.TP 1.5i
|
|
||||||
.B RemoveThisManpage()
|
|
||||||
This action may be used in any manual page or help display window. When
|
|
||||||
called it will remove the window, and clean up all resources
|
|
||||||
associated with it.
|
|
||||||
.TP 1.5i
|
|
||||||
.B SaveFormattedPage(\fIaction\fP)
|
|
||||||
This action can only be used in the \fBlikeToSave\fP popup widget, and
|
|
||||||
tells xman whether to \fBSave\fP or \fBCancel\fP a save of the
|
|
||||||
manual page that has just been formatted.
|
|
||||||
.TP 1.5i
|
|
||||||
.B ShowVersion()
|
|
||||||
This action may be called from any manual page or help display window, and
|
|
||||||
will cause the informational display line to show the current version
|
|
||||||
of xman.
|
|
||||||
.SH FILES
|
|
||||||
.IP "\fI<manpath directory>\fP/man<\fIcharacter\fP>" 2.5i
|
|
||||||
.IP "\fI<manpath directory>\fP/cat<\fIcharacter\fP>"
|
|
||||||
.IP "\fI<manpath directory>\fP/mandesc"
|
|
||||||
.IP __apploaddir__/Xman
|
|
||||||
specifies required resources.
|
|
||||||
.IP /tmp
|
|
||||||
.I Xman
|
|
||||||
creates temporary files in /tmp for all unformatted man pages and all apropos
|
|
||||||
searches.
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.IR X (__miscmansuffix__),
|
|
||||||
.IR man (__appmansuffix__),
|
|
||||||
.IR apropos (__appmansuffix__),
|
|
||||||
.IR catman (8),
|
|
||||||
.I "Athena Widget Set"
|
|
||||||
.SH ENVIRONMENT
|
|
||||||
.TP 1.5i
|
|
||||||
.B DISPLAY
|
|
||||||
the default host and display to use.
|
|
||||||
.TP 1.5i
|
|
||||||
.B MANPATH
|
|
||||||
the search path for manual pages. Directories are separated by
|
|
||||||
colons (e.g. /usr/man:/mit/kit/man:/foo/bar/man).
|
|
||||||
.TP 1.5i
|
|
||||||
.B XENVIRONMENT
|
|
||||||
to get the name of a resource file that overrides the global resources
|
|
||||||
stored in the RESOURCE_MANAGER property.
|
|
||||||
.TP 1.5i
|
|
||||||
.B XAPPLRESDIR
|
|
||||||
A string that will have ``Xman'' appended to it. This string will be
|
|
||||||
the full path name of a user app-defaults file to be merged into the
|
|
||||||
resource database after the system app-defaults file, and before
|
|
||||||
the resources that are attached to the display.
|
|
||||||
.br
|
|
||||||
See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
|
|
||||||
.SH AUTHORS
|
|
||||||
Chris Peterson, MIT X Consortium from the V10 version written by Barry
|
|
||||||
Shein formerly of Boston University.
|
|
||||||
Bug fixes and Linux support by Carlos A M dos Santos, for The XFree86 Project.
|
|
1219
app/xman/misc.c
1219
app/xman/misc.c
File diff suppressed because it is too large
Load Diff
330
app/xman/missing
330
app/xman/missing
@ -1,330 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Common stub for a few missing GNU programs while installing.
|
|
||||||
|
|
||||||
scriptversion=2012-01-06.18; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
|
||||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# 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, 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
run=:
|
|
||||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
|
||||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
|
||||||
|
|
||||||
# In the cases where this matters, 'missing' is being run in the
|
|
||||||
# srcdir already.
|
|
||||||
if test -f configure.ac; then
|
|
||||||
configure_ac=configure.ac
|
|
||||||
else
|
|
||||||
configure_ac=configure.in
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg="missing on your system"
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
--run)
|
|
||||||
# Try to run requested program, and just exit if it succeeds.
|
|
||||||
run=
|
|
||||||
shift
|
|
||||||
"$@" && exit 0
|
|
||||||
# Exit code 63 means version mismatch. This often happens
|
|
||||||
# when the user try to use an ancient version of a tool on
|
|
||||||
# a file that requires a minimum version. In this case we
|
|
||||||
# we should proceed has if the program had been absent, or
|
|
||||||
# if --run hadn't been passed.
|
|
||||||
if test $? = 63; then
|
|
||||||
run=:
|
|
||||||
msg="probably too old"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
|
||||||
error status if there is no known handling for PROGRAM.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
--run try to run the given command, and emulate it if it fails
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal touch file 'aclocal.m4'
|
|
||||||
autoconf touch file 'configure'
|
|
||||||
autoheader touch file 'config.h.in'
|
|
||||||
autom4te touch the output file, or create a stub one
|
|
||||||
automake touch all 'Makefile.in' files
|
|
||||||
bison create 'y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
flex create 'lex.yy.c', if possible, from existing .c
|
|
||||||
help2man touch the output file
|
|
||||||
lex create 'lex.yy.c', if possible, from existing .c
|
|
||||||
makeinfo touch the output file
|
|
||||||
yacc create 'y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
|
|
||||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
|
||||||
'g' are ignored when checking the name.
|
|
||||||
|
|
||||||
Send bug reports to <bug-automake@gnu.org>."
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing $scriptversion (GNU Automake)"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: Unknown '$1' option"
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
# normalize program name to check for.
|
|
||||||
program=`echo "$1" | sed '
|
|
||||||
s/^gnu-//; t
|
|
||||||
s/^gnu//; t
|
|
||||||
s/^g//; t'`
|
|
||||||
|
|
||||||
# Now exit if we have it, but it failed. Also exit now if we
|
|
||||||
# don't have it and --version was passed (most likely to detect
|
|
||||||
# the program). This is about non-GNU programs, so use $1 not
|
|
||||||
# $program.
|
|
||||||
case $1 in
|
|
||||||
lex*|yacc*)
|
|
||||||
# Not GNU programs, they don't have --version.
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
|
||||||
# Could not run --version or --help. This is probably someone
|
|
||||||
# running '$TOOL --version' or '$TOOL --help' to check whether
|
|
||||||
# $TOOL exists and not knowing $TOOL uses missing.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If it does not exist, or fails to run (possibly an outdated version),
|
|
||||||
# try to emulate it.
|
|
||||||
case $program in
|
|
||||||
aclocal*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified 'acinclude.m4' or '${configure_ac}'. You might want
|
|
||||||
to install the Automake and Perl packages. Grab them from
|
|
||||||
any GNU archive site."
|
|
||||||
touch aclocal.m4
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoconf*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified '${configure_ac}'. You might want to install the
|
|
||||||
Autoconf and GNU m4 packages. Grab them from any GNU
|
|
||||||
archive site."
|
|
||||||
touch configure
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoheader*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified 'acconfig.h' or '${configure_ac}'. You might want
|
|
||||||
to install the Autoconf and GNU m4 packages. Grab them
|
|
||||||
from any GNU archive site."
|
|
||||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
|
||||||
test -z "$files" && files="config.h"
|
|
||||||
touch_files=
|
|
||||||
for f in $files; do
|
|
||||||
case $f in
|
|
||||||
*:*) touch_files="$touch_files "`echo "$f" |
|
|
||||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
|
||||||
*) touch_files="$touch_files $f.in";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
touch $touch_files
|
|
||||||
;;
|
|
||||||
|
|
||||||
automake*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
|
|
||||||
You might want to install the Automake and Perl packages.
|
|
||||||
Grab them from any GNU archive site."
|
|
||||||
find . -type f -name Makefile.am -print |
|
|
||||||
sed 's/\.am$/.in/' |
|
|
||||||
while read f; do touch "$f"; done
|
|
||||||
;;
|
|
||||||
|
|
||||||
autom4te*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is needed, but is $msg.
|
|
||||||
You might have modified some files without having the
|
|
||||||
proper tools for further handling them.
|
|
||||||
You can get '$1' as part of Autoconf from any GNU
|
|
||||||
archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -f "$file"; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo "#! /bin/sh"
|
|
||||||
echo "# Created by GNU Automake missing as a replacement of"
|
|
||||||
echo "# $ $@"
|
|
||||||
echo "exit 0"
|
|
||||||
chmod +x $file
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
bison*|yacc*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' $msg. You should only need it if
|
|
||||||
you modified a '.y' file. You may need the Bison package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
Bison from any GNU archive site."
|
|
||||||
rm -f y.tab.c y.tab.h
|
|
||||||
if test $# -ne 1; then
|
|
||||||
eval LASTARG=\${$#}
|
|
||||||
case $LASTARG in
|
|
||||||
*.y)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" y.tab.c
|
|
||||||
fi
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" y.tab.h
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if test ! -f y.tab.h; then
|
|
||||||
echo >y.tab.h
|
|
||||||
fi
|
|
||||||
if test ! -f y.tab.c; then
|
|
||||||
echo 'main() { return 0; }' >y.tab.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
lex*|flex*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified a '.l' file. You may need the Flex package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
Flex from any GNU archive site."
|
|
||||||
rm -f lex.yy.c
|
|
||||||
if test $# -ne 1; then
|
|
||||||
eval LASTARG=\${$#}
|
|
||||||
case $LASTARG in
|
|
||||||
*.l)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
|
||||||
if test -f "$SRCFILE"; then
|
|
||||||
cp "$SRCFILE" lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if test ! -f lex.yy.c; then
|
|
||||||
echo 'main() { return 0; }' >lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
help2man*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified a dependency of a manual page. You may need the
|
|
||||||
Help2man package in order for those modifications to take
|
|
||||||
effect. You can get Help2man from any GNU archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -f "$file"; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo ".ab help2man is required to generate this page"
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
makeinfo*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is $msg. You should only need it if
|
|
||||||
you modified a '.texi' or '.texinfo' file, or any other file
|
|
||||||
indirectly affecting the aspect of the manual. The spurious
|
|
||||||
call might also be the consequence of using a buggy 'make' (AIX,
|
|
||||||
DU, IRIX). You might want to install the Texinfo package or
|
|
||||||
the GNU make package. Grab either from any GNU archive site."
|
|
||||||
# The file to touch is that specified with -o ...
|
|
||||||
file=`echo "$*" | sed -n "$sed_output"`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
|
||||||
if test -z "$file"; then
|
|
||||||
# ... or it is the one specified with @setfilename ...
|
|
||||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
|
||||||
file=`sed -n '
|
|
||||||
/^@setfilename/{
|
|
||||||
s/.* \([^ ]*\) *$/\1/
|
|
||||||
p
|
|
||||||
q
|
|
||||||
}' $infile`
|
|
||||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
|
||||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
|
||||||
fi
|
|
||||||
# If the file does not exist, the user really needs makeinfo;
|
|
||||||
# let's fail without touching anything.
|
|
||||||
test -f $file || exit 1
|
|
||||||
touch $file
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: '$1' is needed, and is $msg.
|
|
||||||
You might have modified some files without having the
|
|
||||||
proper tools for further handling them. Check the 'README' file,
|
|
||||||
it often tells you about the needed prerequisites for installing
|
|
||||||
this package. You may also peek at any GNU archive site, in case
|
|
||||||
some other package would contain this missing '$1' program."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
@ -1,399 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
#include "vendor.h"
|
|
||||||
|
|
||||||
/* Map <CR> and control-M to goto beginning of file. */
|
|
||||||
|
|
||||||
#define SEARCHARGS 10
|
|
||||||
|
|
||||||
static FILE *DoManualSearch(ManpageGlobals *man_globals, char *string);
|
|
||||||
static int BEntrySearch(char *string, char **first, int number);
|
|
||||||
|
|
||||||
/* Function Name: MakeSearchWidget
|
|
||||||
* Description: This Function Creates the Search Widget.
|
|
||||||
* Arguments: man_globals - the pseudo globals for this manpage.
|
|
||||||
* w - the widgets parent
|
|
||||||
* Returns: the search widget.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
|
|
||||||
{
|
|
||||||
Widget dialog, command, text, cancel;
|
|
||||||
Arg arglist[2];
|
|
||||||
Cardinal num_args = 0;
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNtransientFor, parent);
|
|
||||||
man_globals->search_widget = XtCreatePopupShell(SEARCHNAME,
|
|
||||||
transientShellWidgetClass,
|
|
||||||
parent, arglist, 1);
|
|
||||||
|
|
||||||
if (resources.clear_search_string) {
|
|
||||||
XtSetArg(arglist[0], XtNvalue, "");
|
|
||||||
num_args++;
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog = XtCreateManagedWidget(DIALOG, dialogWidgetClass,
|
|
||||||
man_globals->search_widget,
|
|
||||||
arglist, num_args);
|
|
||||||
|
|
||||||
if ((text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
|
|
||||||
PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
|
|
||||||
else
|
|
||||||
XtSetKeyboardFocus(dialog, text);
|
|
||||||
|
|
||||||
XawDialogAddButton(dialog, MANUALSEARCH, NULL, NULL);
|
|
||||||
XawDialogAddButton(dialog, APROPOSSEARCH, NULL, NULL);
|
|
||||||
XawDialogAddButton(dialog, CANCEL, NULL, NULL);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is a bit gross, but it get the cancel button underneath the
|
|
||||||
* others, and forms them up to the right size..
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
|
|
||||||
((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL))
|
|
||||||
PopupWarning(NULL,
|
|
||||||
"Could not find manual search widget in MakeSearchWidget.");
|
|
||||||
else {
|
|
||||||
static const char *half_size[] = {
|
|
||||||
MANUALSEARCH, APROPOSSEARCH, NULL
|
|
||||||
};
|
|
||||||
static const char *full_size[] = {
|
|
||||||
"label", "value", CANCEL, NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(arglist[num_args], XtNfromVert, command);
|
|
||||||
num_args++;
|
|
||||||
XtSetArg(arglist[num_args], XtNfromHoriz, NULL);
|
|
||||||
num_args++;
|
|
||||||
XtSetValues(cancel, arglist, num_args);
|
|
||||||
FormUpWidgets(dialog, full_size, half_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: SearchString
|
|
||||||
* Description: Returns the search string.
|
|
||||||
* Arguments: man_globals - the globals.
|
|
||||||
* Returns: the search string.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char *
|
|
||||||
SearchString(ManpageGlobals * man_globals)
|
|
||||||
{
|
|
||||||
Widget dialog;
|
|
||||||
|
|
||||||
dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
|
|
||||||
if (dialog != NULL)
|
|
||||||
return (XawDialogGetValueString(dialog));
|
|
||||||
|
|
||||||
PopupWarning(man_globals,
|
|
||||||
"Could not get the search string, no search will be performed.");
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Function Name: DoSearch
|
|
||||||
* Description: This function performs a search for a man page or apropos
|
|
||||||
* search upon search string.
|
|
||||||
* Arguments: man_globals - the pseudo globals for this manpage.
|
|
||||||
* type - the type of search.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define LOOKLINES 6
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Manual searches look through the list of manual pages for the right one
|
|
||||||
* with a binary search.
|
|
||||||
*
|
|
||||||
* Apropos searches still exec man -k.
|
|
||||||
*
|
|
||||||
* If nothing is found then I send a warning message to the user, and do
|
|
||||||
* nothing.
|
|
||||||
*/
|
|
||||||
|
|
||||||
FILE *
|
|
||||||
DoSearch(ManpageGlobals * man_globals, int type)
|
|
||||||
{
|
|
||||||
char cmdbuf[BUFSIZ], *mantmp, *manpath;
|
|
||||||
char tmp[BUFSIZ], path[BUFSIZ];
|
|
||||||
char string_buf[BUFSIZ], cmp_str[BUFSIZ], error_buf[BUFSIZ];
|
|
||||||
char *search_string = SearchString(man_globals);
|
|
||||||
FILE *file;
|
|
||||||
int fd;
|
|
||||||
int count;
|
|
||||||
Boolean flag;
|
|
||||||
|
|
||||||
if (search_string == NULL)
|
|
||||||
return (NULL);
|
|
||||||
|
|
||||||
/* If the string is empty or starts with a space then do not search */
|
|
||||||
|
|
||||||
if (streq(search_string, "")) {
|
|
||||||
PopupWarning(man_globals, "Search string is empty.");
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(search_string) >= BUFSIZ) {
|
|
||||||
PopupWarning(man_globals, "Search string too long.");
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
if (search_string[0] == ' ') {
|
|
||||||
PopupWarning(man_globals, "First character cannot be a space.");
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == APROPOS) {
|
|
||||||
char label[BUFSIZ];
|
|
||||||
|
|
||||||
strlcpy(tmp, MANTEMP, sizeof(tmp)); /* get a temp file. */
|
|
||||||
fd = mkstemp(tmp);
|
|
||||||
if (fd < 0) {
|
|
||||||
PopupWarning(man_globals, "Cant create temp file");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
mantmp = tmp;
|
|
||||||
|
|
||||||
manpath = getenv("MANPATH");
|
|
||||||
if (manpath == NULL || streq(manpath, "")) {
|
|
||||||
#ifdef MANCONF
|
|
||||||
if (!ReadManConfig(path))
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
strlcpy(path, SYSMANPATH, sizeof(path));
|
|
||||||
#ifdef LOCALMANPATH
|
|
||||||
strlcat(path, ":", sizeof(path));
|
|
||||||
strlcat(path, LOCALMANPATH, sizeof(path));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
strlcpy(path, manpath, sizeof(path));
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(label, sizeof(label),
|
|
||||||
"Results of apropos search on: %s", search_string);
|
|
||||||
|
|
||||||
#ifdef NO_MANPATH_SUPPORT /* not quite correct, but the best I can do. */
|
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
|
|
||||||
#else
|
|
||||||
snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, path, search_string,
|
|
||||||
mantmp);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (system(cmdbuf) != 0) { /* execute search. */
|
|
||||||
snprintf(error_buf, sizeof(error_buf),
|
|
||||||
"Something went wrong trying to run %s\n", cmdbuf);
|
|
||||||
PopupWarning(man_globals, error_buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((file = fdopen(fd, "r")) == NULL)
|
|
||||||
PrintError("lost temp file? out of temp space?");
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Since we keep the FD open we can remove the file safely, this
|
|
||||||
* will keep extra files out of /tmp.
|
|
||||||
*/
|
|
||||||
|
|
||||||
remove(mantmp);
|
|
||||||
|
|
||||||
snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate",
|
|
||||||
search_string);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check first LOOKLINES lines for "nothing appropriate".
|
|
||||||
*/
|
|
||||||
|
|
||||||
count = 0;
|
|
||||||
flag = FALSE;
|
|
||||||
while ((fgets(cmp_str, BUFSIZ, file) != NULL) && (count < LOOKLINES)) {
|
|
||||||
size_t len = strlen(cmp_str);
|
|
||||||
|
|
||||||
if (len > 0 && cmp_str[len - 1] == '\n') /* strip off the '\n' */
|
|
||||||
cmp_str[len - 1] = '\0';
|
|
||||||
|
|
||||||
if (streq(cmp_str, string_buf)) {
|
|
||||||
flag = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the file is less than this number of lines then assume that there is
|
|
||||||
* nothing appropriate found. This does not confuse the apropos filter.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (flag) {
|
|
||||||
fclose(file);
|
|
||||||
file = NULL;
|
|
||||||
ChangeLabel(man_globals->label, string_buf);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
|
|
||||||
"%s", label);
|
|
||||||
ChangeLabel(man_globals->label, label);
|
|
||||||
fseek(file, 0L, SEEK_SET); /* reset file to point at top. */
|
|
||||||
}
|
|
||||||
else { /* MANUAL SEARCH */
|
|
||||||
file = DoManualSearch(man_globals, search_string);
|
|
||||||
if (file == NULL) {
|
|
||||||
snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.",
|
|
||||||
search_string);
|
|
||||||
ChangeLabel(man_globals->label, string_buf);
|
|
||||||
if (man_globals->label == NULL)
|
|
||||||
PopupWarning(man_globals, string_buf);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resources.clear_search_string) {
|
|
||||||
Arg arglist[1];
|
|
||||||
Widget dialog;
|
|
||||||
|
|
||||||
dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
|
|
||||||
if (dialog == NULL)
|
|
||||||
PopupWarning(man_globals, "Could not clear the search string.");
|
|
||||||
|
|
||||||
XtSetArg(arglist[0], XtNvalue, "");
|
|
||||||
XtSetValues(dialog, arglist, (Cardinal) 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (file);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: DoManualSearch
|
|
||||||
* Description: performs a manual search.
|
|
||||||
* Arguments: man_globals - the manual page specific globals.
|
|
||||||
* Returns: the filename of the man page.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NO_ENTRY -100
|
|
||||||
|
|
||||||
static FILE *
|
|
||||||
DoManualSearch(ManpageGlobals * man_globals, char *string)
|
|
||||||
{
|
|
||||||
int e_num = NO_ENTRY;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* search current section first. */
|
|
||||||
|
|
||||||
i = man_globals->current_directory;
|
|
||||||
e_num = BEntrySearch(string, manual[i].entries, manual[i].nentries);
|
|
||||||
|
|
||||||
/* search other sections. */
|
|
||||||
|
|
||||||
if (e_num == NO_ENTRY) {
|
|
||||||
i = 0; /* At the exit of the loop i needs to
|
|
||||||
be the one we used. */
|
|
||||||
while (TRUE) {
|
|
||||||
if (i == man_globals->current_directory)
|
|
||||||
if (++i >= sections)
|
|
||||||
return (NULL);
|
|
||||||
e_num = BEntrySearch(string, manual[i].entries, manual[i].nentries);
|
|
||||||
if (e_num != NO_ENTRY)
|
|
||||||
break;
|
|
||||||
if (++i >= sections)
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Manual page found in some other section, unhighlight the current one.
|
|
||||||
*/
|
|
||||||
if (man_globals->manpagewidgets.box != NULL)
|
|
||||||
XawListUnhighlight(man_globals->manpagewidgets.
|
|
||||||
box[man_globals->current_directory]);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/*
|
|
||||||
* Highlight the element we are searching for if it is in the directory
|
|
||||||
* listing currently being shown.
|
|
||||||
*/
|
|
||||||
if (man_globals->manpagewidgets.box != NULL)
|
|
||||||
XawListHighlight(man_globals->manpagewidgets.box[i], e_num);
|
|
||||||
}
|
|
||||||
return (FindManualFile(man_globals, i, e_num));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: BEntrySearch
|
|
||||||
* Description: binary search through entries.
|
|
||||||
* Arguments: string - the string to match.
|
|
||||||
* first - the first entry in the list.
|
|
||||||
* number - the number of entries.
|
|
||||||
* Returns: a pointer to the entry found.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int
|
|
||||||
BEntrySearch(char *string, char **first, int number)
|
|
||||||
{
|
|
||||||
int check, cmp, len_cmp, global_number;
|
|
||||||
char *head, *tail;
|
|
||||||
|
|
||||||
global_number = 0;
|
|
||||||
while (TRUE) {
|
|
||||||
|
|
||||||
if (number == 0) {
|
|
||||||
return (NO_ENTRY); /* didn't find it. */
|
|
||||||
}
|
|
||||||
|
|
||||||
check = number / 2;
|
|
||||||
|
|
||||||
head = strrchr(first[global_number + check], '/');
|
|
||||||
if (head == NULL)
|
|
||||||
PrintError("index failure in BEntrySearch");
|
|
||||||
head++;
|
|
||||||
|
|
||||||
tail = strrchr(head, '.');
|
|
||||||
if (tail == NULL)
|
|
||||||
/* not an error, some systems (e.g. sgi) have only a .z suffix */
|
|
||||||
tail = head + strlen(head);
|
|
||||||
|
|
||||||
cmp = strncmp(string, head, (tail - head));
|
|
||||||
len_cmp = strlen(string) - (int) (tail - head);
|
|
||||||
|
|
||||||
if (cmp == 0 && len_cmp == 0) {
|
|
||||||
return (global_number + check);
|
|
||||||
}
|
|
||||||
else if (cmp < 0 || ((cmp == 0) && (len_cmp < 0)))
|
|
||||||
number = check;
|
|
||||||
else { /* cmp > 0 || ((cmp == 0) && (len_cmp > 0)) */
|
|
||||||
|
|
||||||
global_number += (check + 1);
|
|
||||||
number -= (check + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,97 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xos.h>
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Intrinsic.h>
|
|
||||||
#include <X11/StringDefs.h>
|
|
||||||
#include <X11/IntrinsicP.h>
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I am doing the "wrong" thing here by looking in the core field for the
|
|
||||||
* widget to get this info, the "right" thing to do is to do a XtGetValues
|
|
||||||
* to get this information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Function Name: Width
|
|
||||||
* Description: finds the width of a widget.
|
|
||||||
* Arguments: w - the widget.
|
|
||||||
* Returns: the width of that widget.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
Width(Widget w)
|
|
||||||
{
|
|
||||||
return ((int) w->core.width);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: Height
|
|
||||||
* Description: finds the height of a widget.
|
|
||||||
* Arguments: w - the widget.
|
|
||||||
* Returns: the height of that widget.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
Height(Widget w)
|
|
||||||
{
|
|
||||||
return ((int) w->core.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Function Name: BorderWidth
|
|
||||||
* Description: finds the BorderWidth of a widget.
|
|
||||||
* Arguments: w - the widget.
|
|
||||||
* Returns: the BorderWidth of that widget.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
|
||||||
BorderWidth(Widget w)
|
|
||||||
{
|
|
||||||
return ((int) w->core.border_width);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* These functions have got to be able to get at the widget tree, I don't see
|
|
||||||
* any way around this one.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Function Name: Name
|
|
||||||
* Description: This function returns the correct popup child
|
|
||||||
* Arguments: w - widget
|
|
||||||
* Returns: the popup child.
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
Name(Widget w)
|
|
||||||
{
|
|
||||||
return (w->core.name);
|
|
||||||
}
|
|
@ -1,281 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1987, 1988 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Vendor-specific data structures and operations */
|
|
||||||
|
|
||||||
#include "globals.h"
|
|
||||||
#include "vendor.h"
|
|
||||||
|
|
||||||
typedef struct sectionName {
|
|
||||||
const char *name;
|
|
||||||
const char *suffix;
|
|
||||||
} SectionNameRec;
|
|
||||||
|
|
||||||
#if (defined(__osf__) || defined(SVR4)) && !defined(sun)
|
|
||||||
|
|
||||||
static SectionNameRec SectionNames[] = {
|
|
||||||
{"(1) User Commands", "1"},
|
|
||||||
{"(1m) Sys, Administration", "1m"},
|
|
||||||
{"(2) System Calls", "2"},
|
|
||||||
{"(3) Subroutines", "3"},
|
|
||||||
{"(4) File Formats", "4"},
|
|
||||||
{"(5) Miscellaneous", "5"},
|
|
||||||
{"(6) Games", "6"},
|
|
||||||
{"(7) Devices", "7"},
|
|
||||||
{"(8) Sys. Administration", "8"},
|
|
||||||
{"(l) Local", "l"},
|
|
||||||
{"(n) New", "n"},
|
|
||||||
{"(o) Old", "o"}
|
|
||||||
#ifdef __SCO__
|
|
||||||
,
|
|
||||||
{"(ADM) System Administration", "ADM"},
|
|
||||||
{"(ADMN) Network Administration", "ADMN"},
|
|
||||||
{"(ADMP) Protocol Administration", "ADMP"},
|
|
||||||
{"(C) Commands", "C"},
|
|
||||||
{"(CMD) DOS Commands", "CMD"},
|
|
||||||
{"(CP) Programming Commands", "CP"},
|
|
||||||
{"(DOS) DOS Subroutines and Libraries", "DOS"},
|
|
||||||
{"(F) File Formats", "F"},
|
|
||||||
{"(HW) Hardware Dependant", "HW"},
|
|
||||||
{"(K) Kernel Subroutines", "K"},
|
|
||||||
{"(LOCAL) Local utilities for your system", "LOCAL"},
|
|
||||||
{"(M) Miscellaneous", "M"},
|
|
||||||
{"(NADM) NFS Administration", "NADM"},
|
|
||||||
{"(NC) Network Commands", "NC"},
|
|
||||||
{"(NF) Network File Formats", "NF"},
|
|
||||||
{"(NS) Network Subroutines", "NS"},
|
|
||||||
{"(NSL) Network Services", "NSL"},
|
|
||||||
{"(S) Subroutines and Libraries", "S"},
|
|
||||||
{"(SCO) Product Engineering Toolkit", "SCO"},
|
|
||||||
{"(SFF) Socket File Formats", "SFF"},
|
|
||||||
{"(STR) Streams", "STR"},
|
|
||||||
{"(TC) Transport Layer Commands", "TC"},
|
|
||||||
{"(X) X Man pages", "X"},
|
|
||||||
{"(XNX) Xenix Subroutines, Commands and Libs", "XNX"},
|
|
||||||
{"(XS) X11 Subroutines and Libraries", "XS"},
|
|
||||||
{"(Xm) Motif Commands and Subroutines", "Xm"},
|
|
||||||
{"(Xt) X Intrinsics", "Xt"}
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#if defined(sun) && defined(SVR4)
|
|
||||||
/* losing man.cf is useless because it has no section names */
|
|
||||||
|
|
||||||
static SectionNameRec SectionNames[] = {
|
|
||||||
{"(1) User Commands", "1"},
|
|
||||||
{"(1b) SunOS/BSD Compatibility Commands", "1b"},
|
|
||||||
{"(1c) Communication Commands", "1c"},
|
|
||||||
{"(1f) FMLI Commands", "1f"},
|
|
||||||
{"(1m) Maintenance Commands", "1m"},
|
|
||||||
{"(1s) SunOS Specific Commands", "1s"},
|
|
||||||
{"(2) System Calls", "2"},
|
|
||||||
{"(3) Introduction to Library Functions", "3"},
|
|
||||||
{"(3adm) General Administrative Library Functions", "3adm"},
|
|
||||||
{"(3aio) Asynchronous I/O Library Functions", "3aio"},
|
|
||||||
{"(3b) SunOS/BSD Compatibility Functions", "3b"},
|
|
||||||
{"(3bsm) Security and Auditing Library Functions", "3bsm"},
|
|
||||||
{"(3c) C Library Functions", "3c"},
|
|
||||||
{"(3cfgadm) Configuration Administration Library Functions", "3cfgadm"},
|
|
||||||
{"(3crypt) Encryption and Decryption Library", "3crypt"},
|
|
||||||
{"(3curses) Curses Library Functions", "3curses"},
|
|
||||||
{"(3devid) Device ID Library Functions", "3devid"},
|
|
||||||
{"(3devinfo) Device Information Library Functions", "3devinfo"},
|
|
||||||
{"(3dl) Dynamic Linking Library Functions", "3dl"},
|
|
||||||
{"(3dmi) DMI Library Functions", "3dmi"},
|
|
||||||
{"(3door) Door Library Functions", "3door"},
|
|
||||||
{"(3e) ELF Library Functions", "3e"},
|
|
||||||
{"(3elf) ELF Library Functions", "3elf"},
|
|
||||||
{"(3ext) Extended Library Functions", "3ext"},
|
|
||||||
{"(3g) C Library Functions", "3g"},
|
|
||||||
{"(3gen) String Pattern-Matching Library Functions", "3gen"},
|
|
||||||
{"(3head) Headers", "3head"},
|
|
||||||
{"(3i) Wide Character Functions", "3i"},
|
|
||||||
{"(3k) Kernel VM Library Functions", "3k"},
|
|
||||||
{"(3krb) Kerberos Library Functions", "3krb"},
|
|
||||||
{"(3kstat) Kernel Statistics Library Functions", "3kstat"},
|
|
||||||
{"(3kvm) Kernel VM Library Functions", "3kvm"},
|
|
||||||
{"(3layout) Layout Services Library Functions", "3layout"},
|
|
||||||
{"(3ldap) LDAP Library Functions", "3ldap"},
|
|
||||||
{"(3lib) Interface Libraries", "3lib"},
|
|
||||||
{"(3libucb) SunOS/BSD Compatibility Interface Libraries", "3libucb"},
|
|
||||||
{"(3m) Mathematical Library Functions", "3m"},
|
|
||||||
{"(3mail) User Mailbox Library Functions", "3mail"},
|
|
||||||
{"(3malloc) Memory Allocation Library Functions", "3malloc"},
|
|
||||||
{"(3mp) Integer Mathematical Library Functions", "3mp"},
|
|
||||||
{"(3n) Network Functions", "3n"},
|
|
||||||
{"(3nsl) Networking Services Library Functions", "3nsl"},
|
|
||||||
{"(3pam) PAM Library Functions", "3pam"},
|
|
||||||
{"(3plot) Graphics Interface Library Functions", "3plot"},
|
|
||||||
{"(3proc) Process Control Library Functions", "3proc"},
|
|
||||||
{"(3r) Realtime Library", "3r"},
|
|
||||||
{"(3rac) Remote Asynchronous Calls Library Functions", "3rac"},
|
|
||||||
{"(3resolv) Resolver Library Functions", "3resolv"},
|
|
||||||
{"(3rpc) RPC Library Functions", "3rpc"},
|
|
||||||
{"(3rt) Realtime Library Functions", "3rt"},
|
|
||||||
{"(3s) Standard I/O Functions", "3s"},
|
|
||||||
{"(3sched) LWP Scheduling Library Functions", "3sched"},
|
|
||||||
{"(3sec) File Access Control Library Functions", "3sec"},
|
|
||||||
{"(3secdb) Security Attributes Database Library Functions", "3secdb"},
|
|
||||||
{"(3snmp) SNMP Library Functions", "3snmp"},
|
|
||||||
{"(3socket) Sockets Library Functions", "3socket"},
|
|
||||||
{"(3t) Threads Library Functions", "3t"},
|
|
||||||
{"(3thr) Threads Library Functions", "3thr"},
|
|
||||||
{"(3tnf) TNF Library Functions", "3tnf"},
|
|
||||||
{"(3ucb) SunOS/BSD Compatibility Library Functions", "3ucb"},
|
|
||||||
{"(3volmgt) Volume Management Library Functions", "3volmgt"},
|
|
||||||
{"(3x) Miscellaneous Library Functions", "3x"},
|
|
||||||
{"(3xc) X/Open Curses Library Functions", "3xc"},
|
|
||||||
{"(3xcurses) X/Open Curses Library Functions", "3xcurses"},
|
|
||||||
{"(3xfn) XFN Interface Library Functions", "3xfn"},
|
|
||||||
{"(3xn) X/Open Networking Services Library Functions", "3xn"},
|
|
||||||
{"(3xnet) X/Open Networking Services Library Functions", "3xnet"},
|
|
||||||
{"(3x11) X Window System: Xlib Functions", "3x11"},
|
|
||||||
{"(3xcb) X Window System: X C Binding Functions", "3xcb"},
|
|
||||||
{"(3xext) X Window System: Protocol Extension Functions", "3xext"},
|
|
||||||
{"(3xi) X Window System: Input Extension Functions", "3xi"},
|
|
||||||
{"(3xmu) X Window System: Miscellaneous Utility Functions","3xmu"},
|
|
||||||
{"(3xp) X Window System: Print Extension Functions", "3xp"},
|
|
||||||
{"(3xt) X Window System: Toolkit Intrinsics Functions", "3xt"},
|
|
||||||
{"(4) File Formats", "4"},
|
|
||||||
{"(4b) Misc. Reference Manual Pages", "4b"},
|
|
||||||
{"(5) Environments, Tables, and TROFF Macros", "5"},
|
|
||||||
{"(6) Games and Demos", "6"},
|
|
||||||
{"(7) Special Files", "7"},
|
|
||||||
{"(7d) Devices", "7d"},
|
|
||||||
{"(7fs) File Systems", "7fs"},
|
|
||||||
{"(7i) Ioctl Requests", "7i"},
|
|
||||||
{"(7m) STREAMS Modules", "7m"},
|
|
||||||
{"(7p) Protocols", "7p"},
|
|
||||||
{"(9) Device Driver Information", "9"},
|
|
||||||
{"(9e) DDI and DKI Driver Entry Points", "9e"},
|
|
||||||
{"(9f) DDI and DKI Kernel Functions", "9f"},
|
|
||||||
{"(9s) DDI and DKI Data Structures", "9s"},
|
|
||||||
{"(l) Local", "l"},
|
|
||||||
{"(n) New", "n"},
|
|
||||||
{"(o) Old", "o"}
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static SectionNameRec SectionNames[] = {
|
|
||||||
{"(1) User Commands", "1"},
|
|
||||||
{"(2) System Calls", "2"},
|
|
||||||
{"(3) Subroutines", "3"},
|
|
||||||
{"(4) Devices", "4"},
|
|
||||||
{"(5) File Formats", "5"},
|
|
||||||
{"(6) Games", "6"},
|
|
||||||
{"(7) Miscellaneous", "7"},
|
|
||||||
{"(8) Sys. Administration", "8"},
|
|
||||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
||||||
{"(9) Kernel Manual", "9"},
|
|
||||||
#endif
|
|
||||||
#if defined(__FreeBSD__)
|
|
||||||
{"(9) Kernel Interfaces", "9"},
|
|
||||||
#endif
|
|
||||||
{"(l) Local", "l"},
|
|
||||||
{"(n) New", "n"},
|
|
||||||
{"(o) Old", "o"},
|
|
||||||
#ifdef sony
|
|
||||||
{"(p) Public Domain", "p"},
|
|
||||||
{"(s) Sony Specific", "s"},
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Function Name: AddStandardSections
|
|
||||||
* Description: Adds all the standard sections to the list for this path.
|
|
||||||
* Arguments: list - a pointer to the section list.
|
|
||||||
* path - the path to these standard sections.
|
|
||||||
* Returns: none.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
AddStandardSections(SectionList ** list, const char *path)
|
|
||||||
{
|
|
||||||
register int i;
|
|
||||||
char file[BUFSIZ];
|
|
||||||
int numSections = sizeof(SectionNames) / sizeof(SectionNames[0]);
|
|
||||||
|
|
||||||
for (i = 0; i < numSections; i++) {
|
|
||||||
snprintf(file, sizeof(file), "%s%s", SEARCHDIR, SectionNames[i].suffix);
|
|
||||||
AddNewSection(list, path, file, SectionNames[i].name, TRUE);
|
|
||||||
#ifdef SEARCHOTHER
|
|
||||||
snprintf(file, sizeof(file), "%s%s", SEARCHOTHER,
|
|
||||||
SectionNames[i].suffix);
|
|
||||||
AddNewSection(list, path, file, SectionNames[i].name, TRUE);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Function Name: CreateManpageName
|
|
||||||
* Description: Creates the manual page name for a given item.
|
|
||||||
* Arguments: entry - the entry to convert.
|
|
||||||
* Returns: the manual page properly allocated.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If the filename is foo.3 - Create an entry of the form: foo
|
|
||||||
* If the filename is foo.3X11 - Create an entry of the form: foo(X11)
|
|
||||||
* IF the filename is a.out.1 - Create an entry of the form: a.out
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
CreateManpageName(const char *entry, int section, /* FIXME: unused */
|
|
||||||
int flags)
|
|
||||||
{
|
|
||||||
char *cp;
|
|
||||||
char page[BUFSIZ];
|
|
||||||
char sect[BUFSIZ];
|
|
||||||
|
|
||||||
ParseEntry(entry, NULL, sect, page);
|
|
||||||
|
|
||||||
if ((cp = strrchr(page, '.')) != NULL) {
|
|
||||||
if ((int) strlen(cp) > 2) {
|
|
||||||
*cp++ = '(';
|
|
||||||
while ((cp[1] != '\0')) {
|
|
||||||
*cp = *(cp + 1);
|
|
||||||
cp++;
|
|
||||||
}
|
|
||||||
*cp++ = ')';
|
|
||||||
*cp = '\0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*cp = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return (XtNewString(page));
|
|
||||||
}
|
|
@ -1,215 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 1991 X Consortium
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of the X Consortium shall
|
|
||||||
not be used in advertising or otherwise to promote the sale, use or
|
|
||||||
other dealings in this Software without prior written authorization
|
|
||||||
from the X Consortium.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Vendor-specific definitions */
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CSRG_BASED
|
|
||||||
#include <sys/param.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SUFFIX "suffix"
|
|
||||||
#define FOLD "fold"
|
|
||||||
#define FOLDSUFFIX "foldsuffix"
|
|
||||||
#define MNULL 0
|
|
||||||
#define MSUFFIX 1
|
|
||||||
#define MFOLD 2
|
|
||||||
#define MFOLDSUFFIX 3
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The directories to search. Assume that the manual directories are more
|
|
||||||
* complete than the cat directories.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define SEARCHDIR MAN
|
|
||||||
|
|
||||||
#if (defined(sgi) || (defined(SVR4) && !defined(sun)) || (defined(BSD) && (BSD >= 199103)) || defined(linux) || defined(__CYGWIN__) )
|
|
||||||
# define SEARCHOTHER CAT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The default manual page directory.
|
|
||||||
*
|
|
||||||
* The MANPATH environment variable will override this.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SYSMANPATH
|
|
||||||
|
|
||||||
#if defined(__bsdi__)
|
|
||||||
# define SYSMANPATH "/usr/share/man:/usr/contrib/man:/usr/contrib/isode/man:/usr/local/man"
|
|
||||||
#elif defined(__OpenBSD__) || defined(__DARWIN__)
|
|
||||||
# define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
|
|
||||||
#elif defined(SVR4) && defined(sun)
|
|
||||||
# define SYSMANPATH "/usr/share/man:/usr/X11/man:/usr/openwin/share/man:/usr/dt/share/man:/usr/sfw/share/man"
|
|
||||||
#elif defined(SVR4) || defined(__osf__) || (defined(BSD) && (BSD >= 199103))
|
|
||||||
# define SYSMANPATH "/usr/share/man"
|
|
||||||
#elif defined(sgi)
|
|
||||||
# define SYSMANPATH "/usr/catman/a_man:/usr/catman/g_man:/usr/catman/p_man:/usr/catman/u_man:/usr/man/p_man:/usr/man/u_man:/usr/man"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SYSMANPATH
|
|
||||||
# define SYSMANPATH "/usr/man"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Compression Definitions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(sgi)
|
|
||||||
# define COMPRESSION_EXTENSION "z"
|
|
||||||
# define UNCOMPRESS_FORMAT "pcat %s > %s"
|
|
||||||
# define NO_COMPRESS /* mac can't handle using pack as a filter and
|
|
||||||
xman needs it to be done that way. */
|
|
||||||
#elif defined (ISC) || defined(__SCO__) || defined(__UNIXWARE__)
|
|
||||||
# define COMPRESSION_EXTENSION "Z" /* dummy */
|
|
||||||
# if !defined(__SCO__) && !defined(__UNIXWARE__)
|
|
||||||
# define COMPRESSION_EXTENSIONS "zZF" /* pack, compress, freeze */
|
|
||||||
# else
|
|
||||||
# define COMPRESSION_EXTENSIONS "zZ" /* pack, compress */
|
|
||||||
# endif
|
|
||||||
# define UNCOMPRESS_FORMAT uncompress_format
|
|
||||||
# define UNCOMPRESS_FORMAT_1 "pcat %s > %s"
|
|
||||||
# define UNCOMPRESS_FORMAT_2 "zcat < %s > %s"
|
|
||||||
# define UNCOMPRESS_FORMAT_3 "fcat < %s > %s"
|
|
||||||
# define NO_COMPRESS
|
|
||||||
#else
|
|
||||||
# define COMPRESSION_EXTENSION "Z"
|
|
||||||
# define UNCOMPRESS_FORMAT "zcat < %s >> %s"
|
|
||||||
# define COMPRESS "compress"
|
|
||||||
# define GZIP_EXTENSION "gz"
|
|
||||||
# define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
|
|
||||||
# define GZIP_COMPRESS "gzip"
|
|
||||||
# define BZIP2_EXTENSION "bz2"
|
|
||||||
# define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s"
|
|
||||||
# define BZIP2_COMPRESS "bzip2"
|
|
||||||
# define LZMA_EXTENSION "lzma"
|
|
||||||
# define UNLZMA_FORMAT "unlzma -c -d < %s >> %s"
|
|
||||||
# define LZMA_COMPRESS "lzma"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The command filters for the manual and apropos searches.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(hpux)
|
|
||||||
# define NO_MANPATH_SUPPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NO_MANPATH_SUPPORT
|
|
||||||
# define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
|
|
||||||
#else
|
|
||||||
# define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HANDLE_ROFFSEQ
|
|
||||||
# if defined(__OpenBSD__)
|
|
||||||
# define FORMAT "| mandoc -Tascii"
|
|
||||||
# elif defined(CSRG_BASED)
|
|
||||||
# define FORMAT "| eqn | tbl | nroff -mandoc"
|
|
||||||
# elif defined(BSD) && (BSD >= 199103)
|
|
||||||
# define FORMAT "| eqn | tbl | nroff -man"
|
|
||||||
# elif defined(linux) || defined(__CYGWIN__)
|
|
||||||
# define FORMAT "| pic | eqn | tbl -Tlatin1 | GROFF_NO_SGR= groff -Tlatin1 -mandoc"
|
|
||||||
# else
|
|
||||||
# define FORMAT "| neqn | nroff -man" /* The format command. */
|
|
||||||
# endif
|
|
||||||
# define TBL "tbl"
|
|
||||||
#else /* HANDLE_ROFFSEQ */
|
|
||||||
# if defined(linux)
|
|
||||||
# define ZSOELIM "zsoelim"
|
|
||||||
# else
|
|
||||||
# define ZSOELIM "soelim"
|
|
||||||
# endif
|
|
||||||
# define EQN "eqn"
|
|
||||||
# define TBL "tbl"
|
|
||||||
# define GRAP "grap"
|
|
||||||
# define ROFF_PIC "pic"
|
|
||||||
# define VGRIND "vgrind"
|
|
||||||
# define REFER "refer"
|
|
||||||
# if defined(__OpenBSD__)
|
|
||||||
# define FORMAT "mandoc -Tascii"
|
|
||||||
# elif defined(CSRG_BASED)
|
|
||||||
# define FORMAT "nroff -mandoc"
|
|
||||||
# elif defined(linux) || defined(__CYGWIN__)
|
|
||||||
# define FORMAT "GROFF_NO_SGR= groff -Tlatin1 -mandoc"
|
|
||||||
# elif defined(__DARWIN__)
|
|
||||||
# define FORMAT "nroff -man"
|
|
||||||
# else
|
|
||||||
# define FORMAT "GROFF_NO_SGR= groff -Tlatin1 -man"
|
|
||||||
# endif
|
|
||||||
# define DEFAULT_MANROFFSEQ "et"
|
|
||||||
#endif /*HANDLE_ROFFSEQ */
|
|
||||||
#if defined(__OpenBSD__)
|
|
||||||
# define TBL "cat"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Names of the man and cat dirs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __bsdi__
|
|
||||||
#define MAN "cat"
|
|
||||||
#else
|
|
||||||
#define MAN "man"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SCO)
|
|
||||||
# define CAT "cat."
|
|
||||||
#else
|
|
||||||
# define CAT "cat"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Solaris has nroff man pages in "man" and sgml man pages in "sman" */
|
|
||||||
#if defined(sun) && defined(SVR4)
|
|
||||||
# define SFORMAT "/usr/lib/sgml/sgml2roff"
|
|
||||||
# define SMAN "sman"
|
|
||||||
# undef SEARCHOTHER
|
|
||||||
# define SEARCHOTHER SMAN
|
|
||||||
# define SGMLENT_EXTENSION "ent" /* SGML entity files end in ".ent" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _SectionList {
|
|
||||||
struct _SectionList *next;
|
|
||||||
char *label; /* section label */
|
|
||||||
char *directory; /* section directory */
|
|
||||||
int flags;
|
|
||||||
} SectionList;
|
|
||||||
|
|
||||||
extern char *CreateManpageName(const char *entry, int section, int flags);
|
|
||||||
extern void AddStandardSections(SectionList ** list, const char *path);
|
|
||||||
extern void AddNewSection(SectionList ** list, const char *path,
|
|
||||||
const char *file, const char *label, int flags);
|
|
@ -1,228 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
XMAN is an X Window System manual browsing tool.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GETTING STARTED
|
|
||||||
|
|
||||||
By default, xman starts by creating a small window that contains three
|
|
||||||
"buttons" (places on which to click a pointer button). Two of these
|
|
||||||
buttons, Help and Quit, are self-explanatory. The third, Manual Page,
|
|
||||||
creates a new manual page browser window; you may use this button to
|
|
||||||
open a new manual page any time xman is running.
|
|
||||||
|
|
||||||
A new manual page starts up displaying this help information. The
|
|
||||||
manual page contains three sections. In the upper left corner are two
|
|
||||||
menu buttons. When the mouse is clicked on either of these buttons a
|
|
||||||
menu is popped up. The contents of these menus is described below.
|
|
||||||
Directly to the right of the menu buttons is an informational display.
|
|
||||||
This display usually contains the name of the directory or manual page
|
|
||||||
being displayed. It is also used to display warning messages and the
|
|
||||||
current version of xman. The last and largest section is the
|
|
||||||
information display. This section of the application contains either a
|
|
||||||
list of manual pages to choose from or the text of a manual page.
|
|
||||||
|
|
||||||
To use xman pull down the Sections menu to select a manual section.
|
|
||||||
When the section is displayed, click the left pointer button on the name
|
|
||||||
of the manual page that you would like to see. Xman will replace the
|
|
||||||
directory listing with the manual page you selected.
|
|
||||||
|
|
||||||
That should be enough to get you started. Once you understand the
|
|
||||||
basics of how to use xman, take a look at the rest of this file to see
|
|
||||||
the advanced features that are available to make using xman fast and
|
|
||||||
efficient.
|
|
||||||
|
|
||||||
|
|
||||||
SCROLLING TEXT
|
|
||||||
|
|
||||||
The scroll bars are similar to xterm and xmh scroll bars; clicking the
|
|
||||||
left or right pointer button with the pointer at the bottom of the
|
|
||||||
scroll bar will scroll the text down or up one page, respectively.
|
|
||||||
Clicking with the pointer farther up the scroll bar scrolls
|
|
||||||
proportionally less than one page. Clicking the middle button a portion
|
|
||||||
of the way down the scroll bar will move the text window that portion of
|
|
||||||
the way down the text. Holding the middle button and moving the pointer
|
|
||||||
up and down allows the text to be scrolled dynamically.
|
|
||||||
|
|
||||||
You may also type 'f' or <space bar> to scroll down one page, and 'b' to
|
|
||||||
scroll up one page.
|
|
||||||
|
|
||||||
|
|
||||||
RESIZING WINDOWS
|
|
||||||
|
|
||||||
You can resize any of the windows in xman with your window manager, and
|
|
||||||
xman will do the best it can to resize everything internally into a
|
|
||||||
useful configuration. The only control over the internal arrangement
|
|
||||||
that you have is moving the border between the manual page and directory
|
|
||||||
when both are displayed. This is done by clicking and holding the any
|
|
||||||
pointer button when the cursor is over the small square (grip) on the
|
|
||||||
right side of the screen. The grip is located on the horizontal line
|
|
||||||
which separates the panes. The grip may be moved up and down to resize
|
|
||||||
the panes of the screen, and when the pointer button is released xman
|
|
||||||
will move the pane boundary to the newly specified location.
|
|
||||||
|
|
||||||
|
|
||||||
MENU COMMANDS
|
|
||||||
|
|
||||||
There are two ways to activate the menus. The first is to click any
|
|
||||||
pointer button in the menu button corresponding to the menu you want to
|
|
||||||
activate. The second method is to hold down the "Control" key and click
|
|
||||||
the left pointer button for the Options menu or the middle pointer
|
|
||||||
button for the Sections menu. Reguardless of how the menu was
|
|
||||||
activated, selecting items is the same.
|
|
||||||
|
|
||||||
Once a menu is activated, continue to hold down the pointer button and
|
|
||||||
drag the pointer cursor over the item that you would like to activate.
|
|
||||||
Once the item that you want to select is highlighted, select it by
|
|
||||||
releasing the pointer button. To avoid making a menu selection, move
|
|
||||||
the pointer cursor outside the menu and release the button.
|
|
||||||
|
|
||||||
Selecting one of the items in the Sections menu will display the named
|
|
||||||
directory.
|
|
||||||
|
|
||||||
The following commands are available through the Options menu:
|
|
||||||
|
|
||||||
Display Directory Show the current section directory.
|
|
||||||
|
|
||||||
Display Manual Page Show the current manual page.
|
|
||||||
|
|
||||||
Help Create a help window with this text displayed.
|
|
||||||
|
|
||||||
Search Pop up a dialogue box that allows the entire
|
|
||||||
tree of manual pages to be searched for a
|
|
||||||
specific name. A keyword (apropos) search is
|
|
||||||
also available through this dialogue box.
|
|
||||||
|
|
||||||
Show Both Screens Split the manual page display window to display
|
|
||||||
both the current manual page and the directory.
|
|
||||||
Show One Screen Return to a single screen display of either a
|
|
||||||
manual page or directory listing.
|
|
||||||
|
|
||||||
Remove This Man Page Remove this manual page, do not quit.
|
|
||||||
|
|
||||||
Open New Man Page Pop up a new manual page browser window.
|
|
||||||
|
|
||||||
Show Version Print the current version of xman to the
|
|
||||||
information display window. Please include the
|
|
||||||
version number when reporting bugs.
|
|
||||||
|
|
||||||
Quit Close all xman windows and quit xman.
|
|
||||||
|
|
||||||
|
|
||||||
SUMMARY OF BASIC ACTIONS
|
|
||||||
|
|
||||||
In a menu button:
|
|
||||||
|
|
||||||
CLICK: Pop up a menu
|
|
||||||
|
|
||||||
In a directory, manual page, or scroll bar:
|
|
||||||
|
|
||||||
<CONTROL> CLICK LEFT: Pop up the Options menu.
|
|
||||||
<CONTROL> CLICK MIDDLE: Pop up the Sections menu.
|
|
||||||
|
|
||||||
In a directory:
|
|
||||||
|
|
||||||
CLICK LEFT: Bring up named manual page
|
|
||||||
<SHIFT> CLICK MIDDLE: Go to manual page previously chosen.
|
|
||||||
|
|
||||||
In a manual page or apropos listing:
|
|
||||||
|
|
||||||
<SHIFT> CLICK MIDDLE: Go to directory of manual pages.
|
|
||||||
|
|
||||||
In scroll bars:
|
|
||||||
|
|
||||||
CLICK LEFT: Move down - more if pointer is near bottom
|
|
||||||
of window, less if at top.
|
|
||||||
CLICK MIDDLE: Move top of page to current pointer position.
|
|
||||||
CLICK RIGHT: Move up - more if pointer is near bottom
|
|
||||||
of window, less if at top.
|
|
||||||
|
|
||||||
SEARCHING
|
|
||||||
|
|
||||||
Xman has a built-in searching utility that allows the user to search the
|
|
||||||
entire manual page tree for a specific topic (manual page search) or a
|
|
||||||
keyword (apropos search). The search dialogue box can be activated from
|
|
||||||
the Options menu, or by the key Control-s. If the search is started
|
|
||||||
from the small initial topbox xman will open a new manual page if the
|
|
||||||
search was successful, and fail silently if the search was unsuccessful.
|
|
||||||
|
|
||||||
Manual page searches are performed starting in the currently displayed
|
|
||||||
section. If no match is found then the remaining sections are searched
|
|
||||||
in the order that the sections appear in the Sections menu, starting at
|
|
||||||
the top. The current version of xman immediately displays the first
|
|
||||||
manual page that it finds. If the manual page cannot be found that fact
|
|
||||||
is noted in the informational display.
|
|
||||||
|
|
||||||
An apropos search will search a list of short descriptions for all
|
|
||||||
manual pages on the system and return a list of all descriptions which
|
|
||||||
contain the keyword specified.
|
|
||||||
|
|
||||||
|
|
||||||
KEYBOARD ACCELERATORS
|
|
||||||
|
|
||||||
Xman contains a set of preinstalled keyboard accelerators. These are a
|
|
||||||
set of key bindings that perform many of the same operations as the menu
|
|
||||||
items. Since it is not necessary to pull down the menu, these actions
|
|
||||||
can be performed more quickly, hence the name accelerators.
|
|
||||||
|
|
||||||
The default key bindings for xman are:
|
|
||||||
|
|
||||||
Anywhere:
|
|
||||||
|
|
||||||
Control - c Exit xman
|
|
||||||
Control - h Create the help window
|
|
||||||
Control - n Create a new man page
|
|
||||||
Control - q Exit xman
|
|
||||||
Control - s Create a search popup
|
|
||||||
|
|
||||||
In a manual page, directory, or help window:
|
|
||||||
|
|
||||||
Control - r Remove this manual page or help display
|
|
||||||
Control - v Show the current version of xman
|
|
||||||
|
|
||||||
In a manual page or directory:
|
|
||||||
|
|
||||||
Control - d Display Directory
|
|
||||||
Control - m Display Man Page
|
|
||||||
|
|
||||||
In a manual page only:
|
|
||||||
|
|
||||||
b Page Back
|
|
||||||
f Page forward
|
|
||||||
<Space> Page forward
|
|
||||||
1 One line forward
|
|
||||||
2 Two lines forward
|
|
||||||
3 Three lines forward
|
|
||||||
4 Four lines forward
|
|
||||||
|
|
||||||
Note: Control-s does not have any effect in the help window.
|
|
||||||
|
|
||||||
|
|
||||||
FURTHER INFORMATION
|
|
||||||
|
|
||||||
Xman is highly customizable. Through the X resource database a user can
|
|
||||||
customize the look and feel of this application so that it meets a
|
|
||||||
preferred style of interaction. Almost any configuration that is
|
|
||||||
available dynamically can be specified through resources. This includes
|
|
||||||
changing the size, color, and fonts, starting with no topbox, showing
|
|
||||||
both screens, and rebinding the keyboard accelerators.
|
|
||||||
|
|
||||||
The information on customizing xman is contained in the xman manual
|
|
||||||
page, I will leave it to you to figure out how to find and display that
|
|
||||||
information :-)
|
|
||||||
|
|
||||||
|
|
||||||
Chris D. Peterson MIT X
|
|
||||||
Consortium
|
|
||||||
|
|
||||||
CREDITS
|
|
||||||
|
|
||||||
Version: Use 'Show Version' menu item.
|
|
||||||
Written By: Chris D. Peterson - formerly MIT X Consortium
|
|
||||||
Based Upon: Xman for X10 by Barry Shein - Boston University
|
|
||||||
|
|
||||||
Copyright 1988, 1989 X Consortium
|
|
||||||
Edited by Donna Converse and Dave Sternlicht
|
|
||||||
|
|
||||||
|
|
@ -138,7 +138,6 @@
|
|||||||
./usr/X11R6/bin/xlsclients
|
./usr/X11R6/bin/xlsclients
|
||||||
./usr/X11R6/bin/xlsfonts
|
./usr/X11R6/bin/xlsfonts
|
||||||
./usr/X11R6/bin/xmag
|
./usr/X11R6/bin/xmag
|
||||||
./usr/X11R6/bin/xman
|
|
||||||
./usr/X11R6/bin/xmessage
|
./usr/X11R6/bin/xmessage
|
||||||
./usr/X11R6/bin/xmodmap
|
./usr/X11R6/bin/xmodmap
|
||||||
./usr/X11R6/bin/xmore
|
./usr/X11R6/bin/xmore
|
||||||
@ -206,7 +205,6 @@
|
|||||||
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc
|
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc
|
||||||
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc-sample-1
|
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc-sample-1
|
||||||
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc-sample-2
|
./usr/X11R6/lib/X11/fvwm/system.fvwm2rc-sample-2
|
||||||
./usr/X11R6/lib/X11/xman.help
|
|
||||||
./usr/X11R6/lib/libICE.a
|
./usr/X11R6/lib/libICE.a
|
||||||
./usr/X11R6/lib/libICE.la
|
./usr/X11R6/lib/libICE.la
|
||||||
./usr/X11R6/lib/libICE.so.11.0
|
./usr/X11R6/lib/libICE.so.11.0
|
||||||
@ -482,7 +480,6 @@
|
|||||||
./usr/X11R6/share/X11/app-defaults/Xgc
|
./usr/X11R6/share/X11/app-defaults/Xgc
|
||||||
./usr/X11R6/share/X11/app-defaults/Xgc-color
|
./usr/X11R6/share/X11/app-defaults/Xgc-color
|
||||||
./usr/X11R6/share/X11/app-defaults/Xmag
|
./usr/X11R6/share/X11/app-defaults/Xmag
|
||||||
./usr/X11R6/share/X11/app-defaults/Xman
|
|
||||||
./usr/X11R6/share/X11/app-defaults/Xmessage
|
./usr/X11R6/share/X11/app-defaults/Xmessage
|
||||||
./usr/X11R6/share/X11/app-defaults/Xmessage-color
|
./usr/X11R6/share/X11/app-defaults/Xmessage-color
|
||||||
./usr/X11R6/share/X11/app-defaults/Xvidtune
|
./usr/X11R6/share/X11/app-defaults/Xvidtune
|
||||||
|
@ -859,7 +859,6 @@
|
|||||||
./usr/X11R6/man/man1/xlsclients.1
|
./usr/X11R6/man/man1/xlsclients.1
|
||||||
./usr/X11R6/man/man1/xlsfonts.1
|
./usr/X11R6/man/man1/xlsfonts.1
|
||||||
./usr/X11R6/man/man1/xmag.1
|
./usr/X11R6/man/man1/xmag.1
|
||||||
./usr/X11R6/man/man1/xman.1
|
|
||||||
./usr/X11R6/man/man1/xmessage.1
|
./usr/X11R6/man/man1/xmessage.1
|
||||||
./usr/X11R6/man/man1/xmodmap.1
|
./usr/X11R6/man/man1/xmodmap.1
|
||||||
./usr/X11R6/man/man1/xmore.1
|
./usr/X11R6/man/man1/xmore.1
|
||||||
|
Loading…
Reference in New Issue
Block a user