summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/xedit/ChangeLog249
-rw-r--r--app/xedit/INSTALL291
-rw-r--r--app/xedit/Makefile.am94
-rw-r--r--app/xedit/Makefile.in159
-rw-r--r--app/xedit/aclocal.m4322
-rw-r--r--app/xedit/app-defaults/Xedit (renamed from app/xedit/app-defaults/Xedit-noxprint.ad)0
-rw-r--r--app/xedit/app-defaults/Xedit-color (renamed from app/xedit/app-defaults/Xedit-color.ad)0
-rw-r--r--app/xedit/app-defaults/Xedit-xprint.ad565
-rw-r--r--app/xedit/commands.c118
-rw-r--r--app/xedit/config.h.in30
-rw-r--r--app/xedit/configure2157
-rw-r--r--app/xedit/configure.ac37
-rw-r--r--app/xedit/lisp/io.c14
-rw-r--r--app/xedit/lisp/modules/progmodes/auto.lsp13
-rw-r--r--app/xedit/print.c435
-rw-r--r--app/xedit/print.h56
-rw-r--r--app/xedit/printdialog.c1396
-rw-r--r--app/xedit/printdialog.h70
-rw-r--r--app/xedit/printdialogprivates.h182
-rw-r--r--app/xedit/tags.c20
-rw-r--r--app/xedit/xedit.c46
-rw-r--r--app/xedit/xedit.h6
-rw-r--r--app/xedit/xedit.man4
23 files changed, 2543 insertions, 3721 deletions
diff --git a/app/xedit/ChangeLog b/app/xedit/ChangeLog
index da4f7e831..754c0d22a 100644
--- a/app/xedit/ChangeLog
+++ b/app/xedit/ChangeLog
@@ -1,3 +1,250 @@
+commit 3fc23c464e814cad0fcf318dfa06afb90006917c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Oct 30 15:29:20 2010 -0700
+
+ xedit 1.2.0
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 503b075a868e8f88eb9816a1ce859e75e7341ca9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Oct 30 15:27:51 2010 -0700
+
+ config: Remove unnecessary calls from configure.ac
+
+ AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f3a39e6188f7ff4baec52d4bd2efc4f029b696c9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sat Oct 30 15:26:40 2010 -0700
+
+ config: update AC_PREREQ statement to 2.60
+
+ Unrelated to the previous patches, the new value simply reflects
+ the reality that the minimum level for autoconf to configure
+ all x.org modules is 2.60 dated June 2006.
+
+ ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ee574a68128653e184389f66cfc5ca686f258455
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Jul 1 17:51:53 2010 -0700
+
+ Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1da695772d64d4919a91c085d96ce1bd528d048e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Jun 30 23:25:03 2010 -0700
+
+ config: upgrade to util-macros 1.8 for additional man page support
+
+ Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+ The value of MAN_SUBST is the same for all X.Org packages.
+
+ Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+ The existing statement can now be removed from the configuration file.
+
+ Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+ Enables silent rule and use platform appropriate version of sed.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b67fdbae96217bda5eecbff3706ff12a25ed2934
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Mar 25 20:04:31 2010 -0400
+
+ xprint: remove conditionally defined related C code
+
+ Reviewed-by: Jeremy Huddleston <jeremyhu@freedestop.org>
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 47b6e661024970b8f3b53d9f7930b9ec77ccdbdc
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Mar 25 19:55:11 2010 -0400
+
+ xprint: remove xprint related C code
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4f452ccf18993f3a68c6f30719fc6ed4e7fe9b13
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Mar 25 19:37:54 2010 -0400
+
+ xprint: remove Xedit-xprint resource file
+
+ Remove configuration regarding xprint support
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 40b17bb87cb89a1b851e1d39e03431ecbc9c155e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Mar 25 19:30:50 2010 -0400
+
+ config: remove dependency on xaw8
+
+ Remove configure option --enable-xprint
+ Remove AM conditional USE_XPRINT
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 553e84525830c551d423d837f7b317df10d69e3f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sat Dec 19 20:48:48 2009 -0500
+
+ configure.ac: use backticks rather than $() for cmd subs
+
+ Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7adc430f7e76a04cd0f2abfa6ea46a3035d8e2ab
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Nov 26 09:19:53 2009 -0500
+
+ Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+
+ Now that the INSTALL file is generated.
+ Allows running make maintainer-clean.
+
+commit 8a56edb05d0881354ec0f5c849495e7604cf5ca7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Oct 28 14:09:08 2009 -0400
+
+ INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+
+ Add missing INSTALL file. Use standard GNU file on building tarball
+ README may have been updated
+ Remove AUTHORS file as it is empty and no content available yet.
+ Remove NEWS file as it is empty and no content available yet.
+
+commit b495f585017d7d441bc2a7b117d400f2ee082a9c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Oct 27 15:07:24 2009 -0400
+
+ Deploy the new XORG_DEFAULT_OPTIONS #24242
+
+ This macro aggregate a number of existing macros that sets commmon
+ X.Org components configuration options. It shields the configuration file from
+ future changes.
+
+commit 7014a702382d55464aefdbd61405a1c49b30cf26
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Oct 26 22:08:38 2009 -0400
+
+ Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+
+ ChangeLog filename is known to Automake and requires no further
+ coding in the makefile.
+
+commit 64a4c3d43b8521c51d9ef77ce6987b274937818d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Oct 22 12:34:15 2009 -0400
+
+ .gitignore: use common defaults with custom section # 24239
+
+ Using common defaults will reduce errors and maintenance.
+ Only the very small or inexistent custom section need periodic maintenance
+ when the structure of the component changes. Do not edit defaults.
+
+commit b5980a1f03ebbc97267682fa912f145728867364
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Mon Jan 26 20:14:44 2009 -0200
+
+ Set text properties after loading all command line files.
+
+ This is more of a workaround for a problem where the first file
+ will end up using the "text properties" of the last file with a
+ syntax highlight definition.
+ A more proper correction could be to actually display the last
+ file loaded (and removed the duplicated code in xedit.c:main()).
+
+commit bb19bb3d1dd5bb9c0070f867324f740894c76887
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Mon Jan 12 20:33:01 2009 -0200
+
+ Correct problems in make distcheck.
+
+commit e7d66545e71cdd223761ce14416cbebccbd6dd75
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Tue Dec 2 02:25:41 2008 -0200
+
+ Use new XORG_CWARNFLAGS and XORG_CHANGELOG macros.
+
+ Also correct a possible uninitialized variable.
+
+commit 99faa7b727a5441b0dfeed72f43571a85ff0a079
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Tue Dec 2 02:05:42 2008 -0200
+
+ Properly read symbol name in tags interface.
+
+ If the symbol is not in a full text "Piece", XawTextSourceRead() will
+ return an XawTextBlock that points to an incomplete buffer, and a new
+ call must be made to read the remaining data.
+
+commit 2c5007e4aa838b0faf1020d90661adfe0a9b6275
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Tue Dec 2 01:27:52 2008 -0200
+
+ Don't put EOF in the unget buffer.
+
+commit e79879904eea8495b28d7895ce126269a9ef300f
+Author: A Costa <agcosta@gis.net>
+Date: Thu Apr 28 01:47:05 2005 -0400
+
+ Man page typo fixes
+
+ Debian bug#306707 <http://bugs.debian.org/306707>
+
+commit ab754905b2878ba76e309963138bf47c2ae8df2a
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Wed Nov 12 01:25:22 2008 -0200
+
+ Add missing check for symbolic links.
+
+ It was properly checking when using <tab-completion>+<enter>, but not
+ when using <tab-completion>+<click-on-filename>, what would allow loading
+ the same file with different names (but save would be done to the
+ real file, and not overwrite the link).
+
+commit cfc78a1c2452362a5e7c88ed239c9d7ef0240a4d
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date: Tue Nov 11 10:52:18 2008 +0100
+
+ reorganize app default files
+
+commit 9d4a9520409fdb50987be6f4ca2c8afd5b53c994
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Mon Nov 10 01:47:46 2008 -0200
+
+ Don't highlight quotes in nested syntax tables for "auto" mode.
+
+ To properly do it, it should also match the pattern for the macro name,
+ to know if it is a plain text one or not, otherwise, it will get confused
+ with usage of the characters (') and (`).
+
+commit 0ab2815743d89b1cd283abaf4d2cb77fed4a2df4
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date: Sun Nov 9 14:24:10 2008 +0100
+
+ avoid race condition for parallel jobs
+
+commit 01ba3d66731e679d07f7083306a712bbfed16b38
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date: Fri Nov 7 16:41:36 2008 -0200
+
+ Xedit version 1.1.2.
+
+ Also update to use ``git log'' instead of ``git-log'', to match
+ newer versions of git.
+
commit 0d133999449ce7c5db19d46680430ab16e81e4fd
Author: Peter Breitenlohner <peb@mppmu.mpg.de>
Date: Thu Nov 6 21:19:56 2008 +0100
@@ -20,7 +267,7 @@ Date: Wed Oct 8 19:21:28 2008 -0300
and a zero sized one created.
commit d96491aad5542f052b722b94d86f0ce7661ae98b
-Merge: cc7cb04... f1efec7...
+Merge: cc7cb04 f1efec7
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Fri Sep 26 17:47:32 2008 -0300
diff --git a/app/xedit/INSTALL b/app/xedit/INSTALL
index 23e5f25d0..c9711092e 100644
--- a/app/xedit/INSTALL
+++ b/app/xedit/INSTALL
@@ -1,6 +1,297 @@
Installation Instructions
*************************
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+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.
+
+ 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.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. 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.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+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 `..'.
+
+ 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'.
+
+ 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.
+
+ 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'.
+
+Optional Features
+=================
+
+ 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.
+
+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"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ 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"
+
+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.
+
+Installation Instructions
+*************************
+
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
diff --git a/app/xedit/Makefile.am b/app/xedit/Makefile.am
index 4222b7705..f02ea7f6a 100644
--- a/app/xedit/Makefile.am
+++ b/app/xedit/Makefile.am
@@ -27,7 +27,7 @@ noinst_PROGRAMS = lisp/lsp lisp/re/tests
# libmp.a
#
-libmp_a_CFLAGS =
+libmp_a_CFLAGS = $(CWARNFLAGS)
libmp_a_SOURCES = \
lisp/mp/mp.c \
lisp/mp/mp.h \
@@ -38,7 +38,7 @@ libmp_a_SOURCES = \
# liblisp.a
#
-liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
+liblisp_a_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
liblisp_a_SOURCES = \
lisp/bytecode.c \
lisp/bytecode.h \
@@ -91,7 +91,7 @@ endif
# libre.a
#
-libre_a_CFLAGS =
+libre_a_CFLAGS = $(CWARNFLAGS)
libre_a_SOURCES = \
lisp/re/re.c \
lisp/re/rec.c \
@@ -103,7 +103,7 @@ libre_a_SOURCES = \
# xedit
#
xedit_DEPENDENCIES = liblisp.a libmp.a libre.a
-xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
+xedit_CFLAGS = $(CWARNFLAGS) $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm
xedit_SOURCES = \
@@ -127,20 +127,9 @@ if NEED_STRCASECMP
xedit_SOURCES += strcasecmp.c
endif
-if USE_XPRINT
-xedit_CFLAGS += -DINCLUDE_XPRINT_SUPPORT
-
-xedit_SOURCES += \
- print.c \
- printdialog.c \
- printdialog.h \
- printdialogprivates.h \
- print.h
-endif
-
# lisp/lsp
lisp_lsp_DEPENDENCIES = liblisp.a libre.a libmp.a
-lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
+lisp_lsp_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm
lisp_lsp_SOURCES = \
hash.c \
@@ -156,37 +145,19 @@ endif
# re/tests
lisp_re_tests_DEPENDENCIES = libre.a
-lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
+lisp_re_tests_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
lisp_re_tests_LDADD = -L. -lre
lisp_re_tests_SOURCES = lisp/re/tests.c
-# App default files (*.ad)
-
-APPDEFAULTFILES = \
- app-defaults/Xedit-color \
- app-defaults/Xedit
-
-if USE_XPRINT
-app-defaults/Xedit.ad:
- test -d app-defaults || mkdir -p app-defaults
- cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad
-else
-app-defaults/Xedit.ad:
- test -d app-defaults || mkdir -p app-defaults
- cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad
-endif
-
-SUFFIXES = .ad
+# App default files
-.ad:
- test -d app-defaults || mkdir -p app-defaults
- cp $< $@
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
appdefaultdir = @appdefaultdir@
-appdefault_DATA = $(APPDEFAULTFILES)
-
-CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad
+appdefault_DATA = \
+ app-defaults/Xedit-color \
+ app-defaults/Xedit
lispdir = $(LISPDIR)
dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
@@ -216,9 +187,8 @@ dist_progmodes_DATA = \
appman_PRE = xedit.man
EXTRA_DIST = \
- app-defaults/Xedit-color.ad \
- app-defaults/Xedit-xprint.ad \
- app-defaults/Xedit-noxprint.ad \
+ app-defaults/Xedit-color \
+ app-defaults/Xedit \
app-defaults/Xedit-sample \
lisp/README \
lisp/TODO \
@@ -246,38 +216,22 @@ appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
- XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|$(prefix)|g' \
- -e 's|__apploaddir__|$(appdefaultdir)|' \
- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
- -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(APP_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES = ChangeLog
+.PHONY: ChangeLog INSTALL
-.PHONY: ChangeLog
+INSTALL:
+ $(INSTALL_CMD)
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
diff --git a/app/xedit/Makefile.in b/app/xedit/Makefile.in
index cdef81cbe..0405e9b32 100644
--- a/app/xedit/Makefile.in
+++ b/app/xedit/Makefile.in
@@ -64,16 +64,8 @@ noinst_PROGRAMS = lisp/lsp$(EXEEXT) lisp/re/tests$(EXEEXT)
@NEED_UNSETENV_TRUE@am__append_1 = lisp/env.c
@NEED_REALPATH_TRUE@am__append_2 = realpath.c
@NEED_STRCASECMP_TRUE@am__append_3 = strcasecmp.c
-@USE_XPRINT_TRUE@am__append_4 = -DINCLUDE_XPRINT_SUPPORT
-@USE_XPRINT_TRUE@am__append_5 = \
-@USE_XPRINT_TRUE@ print.c \
-@USE_XPRINT_TRUE@ printdialog.c \
-@USE_XPRINT_TRUE@ printdialog.h \
-@USE_XPRINT_TRUE@ printdialogprivates.h \
-@USE_XPRINT_TRUE@ print.h
-
-@NEED_REALPATH_TRUE@am__append_6 = realpath.c
-@NEED_STRCASECMP_TRUE@am__append_7 = strcasecmp.c
+@NEED_REALPATH_TRUE@am__append_4 = realpath.c
+@NEED_STRCASECMP_TRUE@am__append_5 = strcasecmp.c
DIST_COMMON = README $(am__configure_deps) $(dist_lisp_DATA) \
$(dist_progmodes_DATA) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
@@ -144,18 +136,14 @@ am_lisp_re_tests_OBJECTS = lisp_re_tests-tests.$(OBJEXT)
lisp_re_tests_OBJECTS = $(am_lisp_re_tests_OBJECTS)
am__xedit_SOURCES_DIST = commands.c hash.c hook.c ispell.c lisp.c \
options.c tags.c util.c util.h xedit.c xedit.h realpath.c \
- strcasecmp.c print.c printdialog.c printdialog.h \
- printdialogprivates.h print.h
+ strcasecmp.c
@NEED_REALPATH_TRUE@am__objects_4 = xedit-realpath.$(OBJEXT)
@NEED_STRCASECMP_TRUE@am__objects_5 = xedit-strcasecmp.$(OBJEXT)
-@USE_XPRINT_TRUE@am__objects_6 = xedit-print.$(OBJEXT) \
-@USE_XPRINT_TRUE@ xedit-printdialog.$(OBJEXT)
am_xedit_OBJECTS = xedit-commands.$(OBJEXT) xedit-hash.$(OBJEXT) \
xedit-hook.$(OBJEXT) xedit-ispell.$(OBJEXT) \
xedit-lisp.$(OBJEXT) xedit-options.$(OBJEXT) \
xedit-tags.$(OBJEXT) xedit-util.$(OBJEXT) \
- xedit-xedit.$(OBJEXT) $(am__objects_4) $(am__objects_5) \
- $(am__objects_6)
+ xedit-xedit.$(OBJEXT) $(am__objects_4) $(am__objects_5)
xedit_OBJECTS = $(am_xedit_OBJECTS)
am__DEPENDENCIES_1 =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
@@ -201,6 +189,7 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
APPDEFS_LIBS = @APPDEFS_LIBS@
APP_MAN_DIR = @APP_MAN_DIR@
@@ -212,7 +201,10 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -221,9 +213,12 @@ 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@
+INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -239,6 +234,7 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NEED_REALPATH_FALSE = @NEED_REALPATH_FALSE@
@@ -259,12 +255,12 @@ PKGDEPS_CFLAGS = @PKGDEPS_CFLAGS@
PKGDEPS_LIBS = @PKGDEPS_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_XPRINT_FALSE = @USE_XPRINT_FALSE@
-USE_XPRINT_TRUE = @USE_XPRINT_TRUE@
VERSION = @VERSION@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
ac_ct_CC = @ac_ct_CC@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
@@ -314,7 +310,7 @@ noinst_LIBRARIES = liblisp.a libre.a libmp.a
#
# libmp.a
#
-libmp_a_CFLAGS =
+libmp_a_CFLAGS = $(CWARNFLAGS)
libmp_a_SOURCES = \
lisp/mp/mp.c \
lisp/mp/mp.h \
@@ -325,7 +321,7 @@ libmp_a_SOURCES = \
#
# liblisp.a
#
-liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
+liblisp_a_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
liblisp_a_SOURCES = lisp/bytecode.c lisp/bytecode.h lisp/core.c \
lisp/core.h lisp/debugger.c lisp/debugger.h lisp/format.c \
lisp/format.h lisp/hash.c lisp/hash.h lisp/helper.c \
@@ -341,7 +337,7 @@ liblisp_a_SOURCES = lisp/bytecode.c lisp/bytecode.h lisp/core.c \
#
# libre.a
#
-libre_a_CFLAGS =
+libre_a_CFLAGS = $(CWARNFLAGS)
libre_a_SOURCES = \
lisp/re/re.c \
lisp/re/rec.c \
@@ -354,33 +350,30 @@ libre_a_SOURCES = \
# xedit
#
xedit_DEPENDENCIES = liblisp.a libmp.a libre.a
-xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE \
- -DXEDIT $(am__append_4)
+xedit_CFLAGS = $(CWARNFLAGS) $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm
xedit_SOURCES = commands.c hash.c hook.c ispell.c lisp.c options.c \
tags.c util.c util.h xedit.c xedit.h $(am__append_2) \
- $(am__append_3) $(am__append_5)
+ $(am__append_3)
# lisp/lsp
lisp_lsp_DEPENDENCIES = liblisp.a libre.a libmp.a
-lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
+lisp_lsp_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm
-lisp_lsp_SOURCES = hash.c lisp/lsp.c $(am__append_6) $(am__append_7)
+lisp_lsp_SOURCES = hash.c lisp/lsp.c $(am__append_4) $(am__append_5)
# re/tests
lisp_re_tests_DEPENDENCIES = libre.a
-lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
+lisp_re_tests_CFLAGS = $(CWARNFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
lisp_re_tests_LDADD = -L. -lre
lisp_re_tests_SOURCES = lisp/re/tests.c
-# App default files (*.ad)
-APPDEFAULTFILES = \
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+appdefault_DATA = \
app-defaults/Xedit-color \
app-defaults/Xedit
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad $(appman_DATA)
lispdir = $(LISPDIR)
dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
${srcdir}/lisp/modules/xedit.lsp \
@@ -407,56 +400,39 @@ dist_progmodes_DATA = \
${srcdir}/lisp/modules/progmodes/xrdb.lsp
appman_PRE = xedit.man
-EXTRA_DIST = app-defaults/Xedit-color.ad app-defaults/Xedit-xprint.ad \
- app-defaults/Xedit-noxprint.ad app-defaults/Xedit-sample \
- lisp/README lisp/TODO lisp/compile.c lisp/env.c lisp/mathimp.c \
- lisp/modules/psql.c lisp/modules/x11.c lisp/modules/xaw.c \
- lisp/modules/xt.c lisp/re/README lisp/re/tests.txt \
- lisp/test/hello.lsp lisp/test/list.lsp lisp/test/math.lsp \
- lisp/test/psql-1.lsp lisp/test/psql-2.lsp lisp/test/psql-3.lsp \
- lisp/test/regex.lsp lisp/test/stream.lsp lisp/test/widgets.lsp \
- $(appman_PRE) ChangeLog
+EXTRA_DIST = app-defaults/Xedit-color app-defaults/Xedit \
+ app-defaults/Xedit-sample lisp/README lisp/TODO lisp/compile.c \
+ lisp/env.c lisp/mathimp.c lisp/modules/psql.c \
+ lisp/modules/x11.c lisp/modules/xaw.c lisp/modules/xt.c \
+ lisp/re/README lisp/re/tests.txt lisp/test/hello.lsp \
+ lisp/test/list.lsp lisp/test/math.lsp lisp/test/psql-1.lsp \
+ lisp/test/psql-2.lsp lisp/test/psql-3.lsp lisp/test/regex.lsp \
+ lisp/test/stream.lsp lisp/test/widgets.lsp $(appman_PRE)
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|$(prefix)|g' \
- -e 's|__apploaddir__|$(appdefaultdir)|' \
- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
- -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-MAINTAINERCLEANFILES = ChangeLog
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
+ $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -593,8 +569,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-ispell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-lisp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-options.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-print.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-printdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-realpath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-strcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-tags.Po@am__quote@
@@ -1216,34 +1190,6 @@ xedit-strcasecmp.obj: strcasecmp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strcasecmp.c' object='xedit-strcasecmp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-strcasecmp.obj `if test -f 'strcasecmp.c'; then $(CYGPATH_W) 'strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/strcasecmp.c'; fi`
-
-xedit-print.o: print.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-print.o -MD -MP -MF "$(DEPDIR)/xedit-print.Tpo" -c -o xedit-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xedit-print.Tpo" "$(DEPDIR)/xedit-print.Po"; else rm -f "$(DEPDIR)/xedit-print.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print.c' object='xedit-print.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c
-
-xedit-print.obj: print.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-print.obj -MD -MP -MF "$(DEPDIR)/xedit-print.Tpo" -c -o xedit-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xedit-print.Tpo" "$(DEPDIR)/xedit-print.Po"; else rm -f "$(DEPDIR)/xedit-print.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print.c' object='xedit-print.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`
-
-xedit-printdialog.o: printdialog.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-printdialog.o -MD -MP -MF "$(DEPDIR)/xedit-printdialog.Tpo" -c -o xedit-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xedit-printdialog.Tpo" "$(DEPDIR)/xedit-printdialog.Po"; else rm -f "$(DEPDIR)/xedit-printdialog.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printdialog.c' object='xedit-printdialog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c
-
-xedit-printdialog.obj: printdialog.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-printdialog.obj -MD -MP -MF "$(DEPDIR)/xedit-printdialog.Tpo" -c -o xedit-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xedit-printdialog.Tpo" "$(DEPDIR)/xedit-printdialog.Po"; else rm -f "$(DEPDIR)/xedit-printdialog.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printdialog.c' object='xedit-printdialog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`
uninstall-info-am:
install-appdefaultDATA: $(appdefault_DATA)
@$(NORMAL_INSTALL)
@@ -1602,26 +1548,19 @@ uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
uninstall-dist_progmodesDATA uninstall-info-am
-@USE_XPRINT_TRUE@app-defaults/Xedit.ad:
-@USE_XPRINT_TRUE@ test -d app-defaults || mkdir -p app-defaults
-@USE_XPRINT_TRUE@ cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad
-@USE_XPRINT_FALSE@app-defaults/Xedit.ad:
-@USE_XPRINT_FALSE@ test -d app-defaults || mkdir -p app-defaults
-@USE_XPRINT_FALSE@ cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad
-
-.ad:
- test -d app-defaults || mkdir -p app-defaults
- cp $< $@
-
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(APP_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
-.PHONY: ChangeLog
+INSTALL:
+ $(INSTALL_CMD)
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
# 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:
diff --git a/app/xedit/aclocal.m4 b/app/xedit/aclocal.m4
index ae2597d95..588bc3332 100644
--- a/app/xedit/aclocal.m4
+++ b/app/xedit/aclocal.m4
@@ -1025,7 +1025,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -1062,7 +1062,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.7.0])
+m4_define([vers_have], [1.11.0])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1130,9 +1130,12 @@ AC_SUBST(RAWCPPFLAGS)
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
# Not sure if there's any better way than just hardcoding by OS name.
# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
@@ -1201,31 +1204,58 @@ AC_SUBST([FILE_MAN_DIR])
AC_SUBST([MISC_MAN_DIR])
AC_SUBST([DRIVER_MAN_DIR])
AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
]) # XORG_MANPAGE_SECTIONS
-# XORG_CHECK_SGML_DOCTOOLS
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
# ------------------------
# Minimum version: 1.7.0
#
# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
# provided by xorg-sgml-doctools, if installed.
AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
-AC_MSG_CHECKING([for X.Org SGML entities])
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
XORG_SGML_PATH=
-PKG_CHECK_EXISTS([xorg-sgml-doctools],
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
[XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
- [if test x"$cross_compiling" != x"yes" ; then
- AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
- [XORG_SGML_PATH=$prefix/share/sgml])
- fi])
-
+ [m4_ifval([$1],[:],
+ [if test x"$cross_compiling" != x"yes" ; then
+ AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+ [XORG_SGML_PATH=$prefix/share/sgml])
+ fi])
+ ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
if test "x$XORG_SGML_PATH" != "x" ; then
AC_MSG_RESULT([$XORG_SGML_PATH])
+ STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+ XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
else
AC_MSG_RESULT([no])
fi
AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
]) # XORG_CHECK_SGML_DOCTOOLS
# XORG_CHECK_LINUXDOC
@@ -1238,9 +1268,9 @@ AC_SUBST(XORG_SGML_PATH)
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[
AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
AC_MSG_CHECKING([whether to build documentation])
@@ -1256,7 +1286,7 @@ AC_MSG_RESULT([$BUILDDOC])
AC_MSG_CHECKING([whether to build pdf documentation])
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
BUILDPDFDOC=yes
else
BUILDPDFDOC=no
@@ -1266,7 +1296,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
AC_MSG_RESULT([$BUILDPDFDOC])
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
MAKE_PDF="$PS2PDF"
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
@@ -1341,15 +1371,17 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
-# XORG_WITH_XMLTO([MIN-VERSION])
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package.
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
#
# Interface to module:
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
@@ -1358,14 +1390,20 @@ AC_SUBST(MAKE_HTML)
# --with-xmlto: 'yes' user instructs the module to use xmlto
# 'no' user instructs the module not to use xmlto
#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+# xmlto for text output requires either lynx, links, or w3m browsers
+#
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_XMLTO],[
AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(xmlto,
AS_HELP_STRING([--with-xmlto],
- [Use xmlto to regenerate documentation (default: yes, if installed)]),
- [use_xmlto=$withval], [use_xmlto=auto])
+ [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+ [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
if test "x$use_xmlto" = x"auto"; then
AC_PATH_PROG([XMLTO], [xmlto])
@@ -1389,6 +1427,8 @@ elif test "x$use_xmlto" = x"no" ; then
else
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
fi
+
+# Test for a minimum version of xmlto, if provided.
m4_ifval([$1],
[if test "$have_xmlto" = yes; then
# scrape the xmlto version
@@ -1403,18 +1443,31 @@ m4_ifval([$1],
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
fi])
fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+ [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
-# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package.
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
#
# Interface to module:
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
@@ -1427,10 +1480,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
#
AC_DEFUN([XORG_WITH_ASCIIDOC],[
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(asciidoc,
AS_HELP_STRING([--with-asciidoc],
- [Use asciidoc to regenerate documentation (default: yes, if installed)]),
- [use_asciidoc=$withval], [use_asciidoc=auto])
+ [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+ [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
if test "x$use_asciidoc" = x"auto"; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
@@ -1471,15 +1526,17 @@ fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_WITH_ASCIIDOC
-# XORG_WITH_DOXYGEN([MIN-VERSION])
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
# --------------------------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package.
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
#
# Interface to module:
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
@@ -1492,10 +1549,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
#
AC_DEFUN([XORG_WITH_DOXYGEN],[
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
- [Use doxygen to regenerate documentation (default: yes, if installed)]),
- [use_doxygen=$withval], [use_doxygen=auto])
+ [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+ [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
if test "x$use_doxygen" = x"auto"; then
AC_PATH_PROG([DOXYGEN], [doxygen])
@@ -1536,15 +1595,17 @@ fi])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
]) # XORG_WITH_DOXYGEN
-# XORG_WITH_GROFF
+# XORG_WITH_GROFF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package.
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
#
# Interface to module:
# HAVE_GROFF: used in makefiles to conditionally generate documentation
@@ -1555,6 +1616,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# --with-groff: 'yes' user instructs the module to use groff
# 'no' user instructs the module not to use groff
#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+# psselect from the psutils package.
+# the ghostcript package. Refer to the grohtml man pages
+#
# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
#
# OS and distros often splits groff in a basic and full package, the former
@@ -1567,10 +1634,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
#
AC_DEFUN([XORG_WITH_GROFF],[
AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(groff,
AS_HELP_STRING([--with-groff],
- [Use groff to regenerate documentation (default: yes, if installed)]),
- [use_groff=$withval], [use_groff=auto])
+ [Use groff to regenerate documentation (default: ]_defopt[)]),
+ [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
if test "x$use_groff" = x"auto"; then
AC_PATH_PROG([GROFF], [groff])
@@ -1594,6 +1663,7 @@ elif test "x$use_groff" = x"no" ; then
else
AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
fi
+
# We have groff, test for the presence of the macro packages
if test "x$have_groff" = x"yes"; then
AC_MSG_CHECKING([for ${GROFF} -ms macros])
@@ -1611,20 +1681,38 @@ if test "x$have_groff" = x"yes"; then
fi
AC_MSG_RESULT([$groff_mm_works])
fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+ AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+ AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+ AC_PATH_PROG(PSSELECT_PATH, [psselect])
+ if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+ have_groff_html=yes
+ else
+ have_groff_html=no
+ AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+ fi
+fi
+
+# Set Automake conditionals for Makefiles
AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
-# XORG_WITH_FOP
+# XORG_WITH_FOP([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package.
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
#
# Interface to module:
# HAVE_FOP: used in makefiles to conditionally generate documentation
@@ -1637,10 +1725,12 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
- [Use fop to regenerate documentation (default: yes, if installed)]),
- [use_fop=$withval], [use_fop=auto])
+ [Use fop to regenerate documentation (default: ]_defopt[)]),
+ [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
if test "x$use_fop" = x"auto"; then
AC_PATH_PROG([FOP], [fop])
@@ -1667,15 +1757,17 @@ fi
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
-# XORG_WITH_PS2PDF
+# XORG_WITH_PS2PDF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package.
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
#
# Interface to module:
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
@@ -1688,10 +1780,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
#
AC_DEFUN([XORG_WITH_PS2PDF],[
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(ps2pdf,
AS_HELP_STRING([--with-ps2pdf],
- [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
- [use_ps2pdf=$withval], [use_ps2pdf=auto])
+ [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+ [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
if test "x$use_ps2pdf" = x"auto"; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
@@ -1742,14 +1836,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-default=$1
-if test "x$default" = x ; then
- default="yes"
-fi
+m4_define([default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: yes)]),
- [build_docs=$enableval], [build_docs=$default])
+ [Enable building the documentation (default: ]default[)]),
+ [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -1777,14 +1869,12 @@ AC_MSG_RESULT([$build_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-devel_default=$1
-if test "x$devel_default" = x ; then
- devel_default="yes"
-fi
+m4_define([devel_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
- [Enable building the developer documentation (default: yes)]),
- [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+ [Enable building the developer documentation (default: ]devel_default[)]),
+ [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
AC_MSG_CHECKING([whether to build developer documentation])
AC_MSG_RESULT([$build_devel_docs])
@@ -1812,14 +1902,12 @@ AC_MSG_RESULT([$build_devel_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_SPECS],[
-spec_default=$1
-if test "x$spec_default" = x ; then
- spec_default="yes"
-fi
+m4_define([spec_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(specs,
AS_HELP_STRING([--enable-specs],
- [Enable building the specs (default: yes)]),
- [build_specs=$enableval], [build_specs=$spec_default])
+ [Enable building the specs (default: ]spec_default[)]),
+ [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
@@ -1878,38 +1966,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
# ----------------
# Minimum version: 1.1.0
#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified. (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT: returns the path to the tool found on the platform
+# or the value set to LINT on the configure cmd line
+# also an Automake conditional
+# LINT_FLAGS: an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+# 'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
#
AC_DEFUN([XORG_WITH_LINT],[
-# Allow checking code with lint, sparse, etc.
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
[Use a lint-style source code checker (default: disabled)])],
[use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
- LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+ *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+ lint_name=splint
+ lint_options="-badflag"
+ ;;
+ *freebsd* | *netbsd*)
+ lint_name=lint
+ lint_options="-u -b"
+ ;;
+ *solaris*)
+ lint_name=lint
+ lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+ ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+ AC_PATH_PROG([LINT], [$lint_name])
+ if test "x$LINT" = "x"; then
+ AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+ fi
+elif test "x$use_lint" = x"no" ; then
+ if test "x$LINT" != "x"; then
+ AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+ fi
else
- LINT="$use_lint"
+ AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
- case $LINT in
- lint|*/lint)
- case $host_os in
- solaris*)
- LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
- ;;
- esac
- ;;
- esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+ lint_options=$LINT_FLAGS
fi
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
]) # XORG_WITH_LINT
@@ -1919,28 +2038,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
#
# Sets up flags for building lint libraries for checking programs that call
# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets:
-# @LINTLIB@ - name of lint library file to make
-# MAKE_LINT_LIB - automake conditional
#
+# Interface to module:
+# LINTLIB - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB - Automake conditional
+#
+# --enable-lint-library: - 'yes' user instructs the module to created a lint library
+# - 'no' user instructs the module not to create a lint library (default)
AC_DEFUN([XORG_LINT_LIBRARY],[
AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
[Create lint library (default: disabled)])],
[make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
- if test "x$LINT" = "xno" ; then
- AC_MSG_ERROR([Cannot make lint library without --with-lint])
- fi
- if test "x$make_lint_lib" = "xyes" ; then
- LINTLIB=llib-l$1.ln
- else
- LINTLIB=$make_lint_lib
- fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+ LINTLIB=llib-l$1.ln
+ if test "x$LINT" = "x"; then
+ AC_MSG_ERROR([Cannot make lint library without --with-lint])
+ fi
+elif test "x$make_lint_lib" != x"no" ; then
+ AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
fi
+
AC_SUBST(LINTLIB)
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
@@ -1953,7 +2073,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@@ -1978,7 +2098,7 @@ AC_SUBST(CWARNFLAGS)
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
@@ -2008,6 +2128,7 @@ AC_SUBST([CWARNFLAGS])
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
@@ -2061,22 +2182,9 @@ dnl
# XORG_RELEASE_VERSION
# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
- AC_ARG_WITH(release-version,
- AS_HELP_STRING([--with-release-version=STRING],
- [Use release version string in package name]),
- [RELEASE_VERSION="$withval"],
- [RELEASE_VERSION=""])
- if test "x$RELEASE_VERSION" != "x"; then
- PACKAGE="$PACKAGE-$RELEASE_VERSION"
- PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
- AC_MSG_NOTICE([Building with package name set to $PACKAGE])
- fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
diff --git a/app/xedit/app-defaults/Xedit-noxprint.ad b/app/xedit/app-defaults/Xedit
index b626bf34a..b626bf34a 100644
--- a/app/xedit/app-defaults/Xedit-noxprint.ad
+++ b/app/xedit/app-defaults/Xedit
diff --git a/app/xedit/app-defaults/Xedit-color.ad b/app/xedit/app-defaults/Xedit-color
index da811b9a1..da811b9a1 100644
--- a/app/xedit/app-defaults/Xedit-color.ad
+++ b/app/xedit/app-defaults/Xedit-color
diff --git a/app/xedit/app-defaults/Xedit-xprint.ad b/app/xedit/app-defaults/Xedit-xprint.ad
deleted file mode 100644
index 34ed4e918..000000000
--- a/app/xedit/app-defaults/Xedit-xprint.ad
+++ /dev/null
@@ -1,565 +0,0 @@
-! $XFree86: xc/programs/xedit/Xedit.ad,v 1.23 2002/09/22 07:09:05 paulo Exp $
-
-*geometry: 590x440
-*input: TRUE
-*enableBackups: True
-*backupNameSuffix: ~
-*changedBitmap: xlogo11
-*international: True
-
-*hints:\
-Use Control-S and Control-R to Search.\n\
-Use Control-Shift-_ to Undo. Control-G to switch between Undo and Redo.\n\
-Use Control-A to jump to the beginning of the line.\n\
-Use Control-E to jump to the end of the line.\n\
-Use Control-T to transpose characters.\n\
-Use Control-K to cut to the end of the line. Control-Y to paste.\n\
-Use Control-Q to escape control characters.\n\
-Use Control-U[,<number>] to multiply actions. Control-G to cancel.\n\
-Use Control-Z to scroll one line up. Meta-Z to scroll one line down.\n\
-Use Meta-Q to format a paragraph.\n\
-Use Right-Button to extend selections.\n\
-Use Meta-I to insert a file.\n\
-Use Control-W to delete a selection, and/or jump to the selection mark.\n\
-Use Control-X,Control-F to find a file. Tab for filename completion.\n\
-Use Control-X,Control-S to save.\n\
-Use Control-X,Control-C to exit.\n\
-Use Control-C to paste the selection at CUT_BUFFER0.\n\
-Use Control Left-Button to popup the File Menu.\n\
-Use Control Middle-Button to popup the Edit Menu.\n\
-Use Control Right-Button to popup the Option Menu.\n\
-Use Control-X,Tab to Indent.\n\
-Use Control-X,0 to delete current splitted window.\n\
-Use Control-X,1 to delete other splitted window.\n\
-Use Control-X,2 to split the window vertically.\n\
-Use Control-X,3 to split the window horizontally.\n\
-Use Control-X,b to switch to another file.\n\
-Use Control-X,d to list directory. Control-G to Cancel.\n\
-Use Control-X,k to close file being edited.\n\
-Use Control-X,o to switch to another splitted window.\n\
-Use Control-X,u to undo. Control-G to switch between Undo and Redo.\n\
-Use Insert to toggle Overwrite mode.\n\
-Use Control-G to interrupt the lisp subprocess
-
-*formWindow*defaultDistance: 2
-*formWindow.?.borderWidth: 0
-*formWindow.min: 18
-*formWindow.max: 18
-*formWindow.showGrip: False
-*positionWindow.fromHoriz: labelWindow
-*positionWindow.horizDistance: 0
-*positionWindow.left: chainRight
-*positionWindow.right: chainRight
-*positionWindow.width: 90
-*positionWindow.label: error
-*positionWindow.justify: left
-*labelWindow*justify: center
-*labelWindow*label: no file yet
-*labelWindow.left: chainLeft
-*labelWindow.right: chainRight
-
-*quit.label: Quit
-*quit.tip: Close xedit window
-*save.label: Save
-*save.tip: Save current file
-*load.label: Load
-*load.tip: Load a new file
-*print.label: Print
-*print.tip: Print current file
-
-*buttons*orientation: horizontal
-*buttons*showGrip: False
-*buttons.min: 18
-
-*messageWindow.height: 70
-*messageWindow.min: 18
-*Paned*Text*allowResize: True
-
-*messageWindow.autoFill: False
-*messageWindow.scrollVertical: Never
-
-*editWindow.autoFill: False
-*editWindow.scrollVertical: Always
-*editWindow.showGrip: True
-xedit.textSource*enableUndo: True
-
-*bc_label*label: Use Control-S and Control-R to Search.
-*bc_label*showGrip: False
-*bc_label.min: 18
-
-*dirlabel.showGrip: False
-*dirlabel.min: 18
-*dirlabel.max: 18
-
-*dirwindow.defaultColumns: 0
-*dirwindow.verticalList: True
-
-*viewport.forceBars: True
-*viewport.allowVert: 1
-
-*insertFile*text.width: 141
-*insertFile*text.?.pieceSize: 256
-*search*searchText.width: 157
-*search*replaceText.width: 157
-*search*case.horizDistance: 25
-*search*Text.?.pieceSize: 256
-
-*SimpleMenu.BackingStore: NotUseful
-*SimpleMenu.menuLabel.vertSpace: 80
-*SimpleMenu.SmeBSB.HorizontalMargins: 16
-*SimpleMenu.justify: center
-*SimpleMenu.menuLabel.height: 250
-*SimpleMenu*cursor: left_ptr
-
-*fileMenu.label: File Menu
-*optionsMenu.label: Option Menu
-*optionsMenu.ispell.label: ispell...
-*editMenu.label: Edit Menu
-*editMenu.wrapMenuItem.label: Wrapping
-*editMenu.wrapMenuItem.leftBitmap: menu12
-*wrapMenu.never.label: Never
-*wrapMenu.line.label: Line
-*wrapMenu.word.label: Word
-*editMenu.autoFill.label: Auto Fill
-*editMenu.justifyMenuItem.label: Justification
-*editMenu.justifyMenuItem.leftBitmap: menu12
-*justifyMenu.left.label: Left
-*justifyMenu.right.label: Right
-*justifyMenu.center.label: Center
-*justifyMenu.full.label: Full
-*editMenu.breakColumns.label: Break Columns...
-*editMenu.scrollMenuItem.label: Scrollbars
-*editMenu.scrollMenuItem.leftBitmap: menu12
-*scrollMenu.vertical.label: Vertical
-*scrollMenu.horizontal.label: Horizontal
-*editMenu.modeMenuItem.leftBitmap: menu12
-*editMenu.modeMenuItem.label: Edit Mode
-*editModes.none.label: Plain/None
-
-*TransientShell*Text.translations: #override \
-c<Key>S: no-op(r)\n\
-c<Key>R: no-op(r)\n\
-m<Key>I: no-op(r)
-
-*search.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
- set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*insertFile.title: Insert File
-*insertFile.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
- set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*baseTranslations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>P:print-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Key>Escape: line-edit()
-
-*messageWindow.Translations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>P:print-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Enter>: no-op()\n\
-<Leave>: no-op()\n\
-<Btn1Down>: set-keyboard-focus() select-start()
-
-*searchText.Translations: #override \
-<Enter>: no-op()\n\
-<Leave>: no-op()\n\
-<Btn1Down>: set-keyboard-focus() select-start()
-
-*replaceText.Translations: #override \
-<Enter>: no-op()\n\
-<Leave>: no-op()\n\
-<Btn1Down>: set-keyboard-focus() select-start()
-
-*editWindow.translations: #override \
-<Ctrl>X,<Ctrl>E:lisp-eval()\n\
-<Ctrl>X,<Key>Tab:indent()\n\
-<Ctrl>X,:<Key>0:delete-window(current)\n\
-<Ctrl>X,:<Key>1:delete-window(other)\n\
-<Ctrl>X,:<Key>2:split-window(vertical)\n\
-<Ctrl>X,:<Key>3:split-window(horizontal)\n\
-<Ctrl>X,!l @Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!l <Key>b:switch-source()\n\
-<Ctrl>X,!@Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!<Key>b:switch-source()\n\
-<Ctrl>X,!l @Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!l <Key>d:dir-window()\n\
-<Ctrl>X,!@Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!<Key>d:dir-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!l <Key>k:kill-file()\n\
-<Ctrl>X,!@Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!<Key>k:kill-file()\n\
-<Ctrl>X,!l @Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!l <Key>o:other-window()\n\
-<Ctrl>X,!@Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!<Key>o:other-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!l <Key>u:undo()\n\
-<Ctrl>X,!@Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!<Key>u:undo()\n\
-<Ctrl>G: xedit-keyboard-reset()\n\
-<Ctrl>J: xedit-print-lisp-eval()\n\
-<Key>Tab: insert-char()\n\
-!l @Num_Lock<Key>b:insert-char()\n\
-!l <Key>b: insert-char()\n\
-!@Num_Lock<Key>b:insert-char()\n\
-!<Key>b: insert-char()\n\
-!l @Num_Lock<Key>d:insert-char()\n\
-!l <Key>d: insert-char()\n\
-!@Num_Lock<Key>d:insert-char()\n\
-!<Key>d: insert-char()\n\
-!l <Key>k: insert-char()\n\
-!l @Num_Lock<Key>k:insert-char()\n\
-!@Num_Lock<Key>k:insert-char()\n\
-!<Key>k: insert-char()\n\
-!l @Num_Lock<Key>o:insert-char()\n\
-!l <Key>o: insert-char()\n\
-!@Num_Lock<Key>o:insert-char()\n\
-!<Key>o: insert-char()\n\
-!l @Num_Lock<Key>u:insert-char()\n\
-!l <Key>u: insert-char()\n\
-!@Num_Lock<Key>u:insert-char()\n\
-!<Key>u: insert-char()\n\
-~s <Key>Insert: toggle-overwrite()\n\
-c l @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c l<Btn1Down>: xedit-focus() popup-menu(fileMenu)\n\
-c<Btn1Down>: xedit-focus() popup-menu(fileMenu)\n\
-c l @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c l<Btn2Down>: xedit-focus() popup-menu(editMenu)\n\
-c<Btn2Down>: xedit-focus() popup-menu(editMenu)\n\
-c l @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c l<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c<Btn3Down>: xedit-focus() popup-menu(optionsMenu)\n\
-<Btn1Down>: xedit-focus() select-start()\n\
-<Btn4Down>: scroll-one-line-down()\n\
-<Btn5Down>: scroll-one-line-up()
-
-*filename.?.pieceSize: 256
-*filename.translations: #override \
-c<Key>S: no-op(r)\n\
-c<Key>R: no-op(r)\n\
-m<Key>I: no-op(r)\n\
-c<Key>G: cancel-find-file()\n\
-<Key>Return: load-file()\n\
-<Key>Tab: file-completion(h)\n\
-<Key>Escape: cancel-find-file()\n\
-<Enter>: no-op()\n\
-<Leave>: no-op()\n\
-<Btn1Down>: set-keyboard-focus() select-start()
-
-*ispell.translations: #override \
-<Message>WM_PROTOCOLS: ispell(end)
-
-! Sample dictionary, word chars and text mode resources setup
-!*ispell.dictionary: br
-!*ispell.dictionaries: br american americanmed+ english
-!*ispell*br.wordChars: áéíóúçÁÉÍÓÚÇàÀâêôÂÊÔüÜãõÃÕ-
-*ispell.ispellCommand: /usr/bin/aspell -B -m
-*ispell.lookCommand: /bin/egrep
-!*ispell*text.skipLines: .#
-
-*ispell.geometry: 0x0
-*ispell.minWidth: 320
-*ispell.minHeight: 245
-*ispell*Label.borderWidth: 0
-*ispell*Label.internalHeight: 4
-*ispell*Label.justify: right
-*ispell*Label.width: 112
-*ispell*Label.left: chainLeft
-*ispell*Label.right: chainLeft
-*ispell*Label.top: chainTop
-*ispell*Label.bottom: chainTop
-*ispell*mispelled.label: Misspelled word:
-*ispell*mispelled.top: chainTop
-*ispell*mispelled.bottom: chainTop
-*ispell*mispelled.internalWidth: 0
-*ispell*repeated.label: Repeated words:
-*ispell*repeated.internalWidth: 0
-*ispell*replacement.label: Replace with:
-*ispell*word.fromHoriz: mispelled
-*ispell*word.justify: left
-*ispell*word.borderWidth: 1
-*ispell*word.internalWidth: 4
-*ispell*word.internalHeight: 3
-*ispell*word.width: 194
-*ispell*word.left: chainLeft
-*ispell*word.right: chainRight
-*ispell*word.top: chainTop
-*ispell*word.bottom: chainTop
-*ispell*word.label:
-*ispell*word.tip: Press here to select this text
-*ispell*word.highlightThickness: 0
-*ispell*text.fromHoriz: replacement
-*ispell*replacement.fromVert: mispelled
-*ispell*replacement.internalWidth: 0
-*ispell*form.text.fromVert: word
-*ispell*form.text.width: 194
-*ispell*form.text.top: chainTop
-*ispell*form.text.bottom: chainTop
-*ispell*form.text.left: chainLeft
-*ispell*form.text.right: chainRight
-*ispell*form.text.leftMargin: 4
-*ispell*form.text.?.pieceSize: 256
-*ispell*suggestions.label: Suggestions:
-*ispell*suggestions.fromVert: replacement
-*ispell*suggestions.internalWidth: 0
-*ispell*viewport.fromHoriz: suggestions
-*ispell*viewport.fromVert: text
-*ispell*viewport.width: 194
-*ispell*viewport.height: 143
-*ispell*viewport.top: chainTop
-*ispell*viewport.bottom: chainBottom
-*ispell*viewport.left: chainLeft
-*ispell*viewport.right: chainRight
-*ispell*viewport.forceBars: 1
-*ispell*viewport.allowVert: 1
-*ispell*list.defaultColumns: 1
-*ispell*list.longest: 16384
-*ispell*commands.vertDistance: 5
-*ispell*commands.fromVert: suggestions
-*ispell*commands.top: chainBottom
-*ispell*commands.bottom: chainBottom
-*ispell*commands.right: chainLeft
-*ispell*commands.left: chainLeft
-*ispell*check.label: Check
-*ispell*check.width: 54
-*ispell*check.tip: Ask ispell about the word in the text field
-*ispell*look.label: Look
-*ispell*look.fromHoriz: check
-*ispell*look.horizDistance: 0
-*ispell*look.width: 46
-*ispell*look.tip: Runs the look command
-*ispell*undo.fromVert: check
-*ispell*undo.label: Undo
-*ispell*undo.width: 102
-*ispell*undo.tip: Undo last action
-*ispell*replace.fromVert: undo
-*ispell*replace.label: Replace
-*ispell*replace.tip: Replace occurence of the word
-*ispell*replaceAll.fromVert: undo
-*ispell*replaceAll.fromHoriz: replace
-*ispell*replaceAll.label: All
-*ispell*replaceAll.tip: Replace all occurences of the word
-*ispell*ignore.fromVert: replace
-*ispell*ignore.label: Ignore
-*ispell*ignore.tip: Ignore this word
-*ispell*ignoreAll.fromVert: replaceAll
-*ispell*ignoreAll.fromHoriz: ignore
-*ispell*ignoreAll.label: All
-*ispell*ignoreAll.tip: Ignore all ocurrences of the word
-*ispell*add.fromVert: ignore
-*ispell*add.label: Add
-*ispell*add.width: 50
-*ispell*add.tip: Add word to your private dictionary
-*ispell*addUncap.fromVert: ignoreAll
-*ispell*addUncap.fromHoriz: add
-*ispell*addUncap.label: Uncap
-*ispell*addUncap.horizDistance: 0
-*ispell*addUncap.width: 50
-*ispell*addUncap.tip: Add word uncapitalized, to your private dictionary
-*ispell*suspend.fromVert: add
-*ispell*suspend.label: Suspend
-*ispell*suspend.width: 57
-*ispell*suspend.tip: Suspend ispell execution
-*ispell*cancel.fromHoriz: suspend
-*ispell*cancel.fromVert: addUncap
-*ispell*cancel.label: Close
-*ispell*cancel.width: 43
-*ispell*cancel.horizDistance: 0
-*ispell*cancel.tip: Terminates ispell process
-*ispell*replace.width: 65
-*ispell*ignore.width: 65
-*ispell*replaceAll.width: 35
-*ispell*replaceAll.horizDistance: 0
-*ispell*ignoreAll.width: 35
-*ispell*ignoreAll.horizDistance: 0
-*ispell*terse.fromVert: cancel
-*ispell*terse.Label: Terse Mode
-*ispell*terse.width: 104
-*ispell*terse.borderWidth: 0
-*ispell*terse.tip: Switch terse mode
-*ispell*status.fromVert: viewport
-*ispell*status.fromHoriz: suggestions
-*ispell*status.top: chainBottom
-*ispell*status.bottom: chainBottom
-*ispell*status.left: chainLeft
-*ispell*status.right: chainRight
-*ispell*status.width: 194
-*ispell*status.borderWidth: 1
-*ispell*status.justify: left
-*ispell*status.internalHeight: 2
-*ispell*status.vertDistance: 2
-*ispell*options.fromVert: status
-*ispell*options.fromHoriz: commands
-*ispell*options.bottom: chainBottom
-*ispell*options.top: chainBottom
-*ispell*options.left: chainLeft
-*ispell*options.right: chainRight
-*ispell*options.dict.width: 121
-*ispell*options.horizDistance: 2
-*ispell*options.vertDistance: 2
-*ispell*options.defaultDistance: 2
-*ispell*dict.highlightThickness: 0
-*ispell*dict.justify: left
-*ispell*dict.resizable: False
-*ispell*dict.leftBitmap: menu12
-*ispell*dict.label: Dictionary
-*ispell*dict.tip: Change dictionary
-*ispell*options.format.width: 65
-*ispell*format.highlightThickness: 0
-*ispell*format.justify: left
-*ispell*format.resizable: False
-*ispell*format.leftBitmap: menu12
-*ispell*format.fromHoriz: dict
-*ispell*format.horizDistance: 0
-*ispell*format.tip: Select text type
-
-*columns.minWidth: 140
-*columns.minHeight: 76
-*columns.maxWidth: 140
-*columns.maxHeight: 76
-*columns.form*defaultDistance: 4
-*columns*left: chainLeft
-*columns*right: chainLeft
-*columns*top: chainTop
-*columns*bottom: chainTop
-*columns*Label.width: 96
-*columns*Label.borderWidth: 0
-*columns*Label.internalHeight: 4
-*columns*Label.internalWidth: 2
-*columns*Label.justify: right
-*columns*Text.width: 30
-*columns*Command.width: 58
-*columns*leftLabel.label: Left Column:
-*columns*left.fromHoriz: leftLabel
-*columns*rightLabel.label: Right Column:
-*columns*rightLabel.fromVert: leftLabel
-*columns*right.fromHoriz: rightLabel
-*columns*right.fromVert: left
-*columns*ok.fromVert: rightLabel
-*columns*cancel.fromHoriz: ok
-*columns*cancel.fromVert: rightLabel
-*columns*cancel.horizDistance: 12
-*columns*Text.?.pieceSize: 8
-
-*columns*Text.translations: #override \
-c<Key>S: no-op(r)\n\
-c<Key>R: no-op(r)\n\
-m<Key>I: no-op(r)\n\
-<Key>Return: set-columns(ok)\n\
-<Key>Tab: change-field()\n\
-c<Key>G: set-columns(cancel)\n\
-<Key>Escape: set-columns(cancel)\n\
-<Enter>: no-op()\n\
-<Leave>: no-op()\n\
-<Btn1Down>: set-keyboard-focus() select-start()
-
-*columns.translations: #override \
-<Message>WM_PROTOCOLS: set-columns(cancel)
-
-! Use "white" as background for printing
-*printshell*background: white
-
-! Print dialog
-*printdialogshell*geometry: 600x120
-*printdialogshell*title: Print
-*printdialogshell*main*ok.fromVert: innerform
-*printdialogshell*main*ok.label: Print
-*printdialogshell*main*ok.tip: Print
-*printdialogshell*main*setup.fromHoriz: ok
-*printdialogshell*main*setup.fromVert: innerform
-*printdialogshell*main*setup.label: Setup...
-*printdialogshell*main*setup.tip: Configure print job options (page size, orientation, etc.)
-*printdialogshell*main*cancel.fromHoriz: setup
-*printdialogshell*main*cancel.fromVert: innerform
-*printdialogshell*main*cancel.label: Cancel
-*printdialogshell*main*cancel.tip: Cancel printing
-*printdialogshell*main*desclabel.label: Printer Description:
-*printdialogshell*main*desclabel.tip: Short description of printer
-*printdialogshell*main*desc.fromHoriz: desclabel
-*printdialogshell*main*desc.tip: Short description of printer
-*printdialogshell*main*info.fromHoriz: desc
-*printdialogshell*main*info.label: Printer info...
-*printdialogshell*main*info.tip: Display additional information about this printer
-*printdialogshell*main*namelabel.fromVert: desclabel
-*printdialogshell*main*namelabel.label: Printer Name:
-*printdialogshell*main*namelabel.tip: Name of selected printer
-*printdialogshell*main*name.fromHoriz: namelabel
-*printdialogshell*main*name.fromVert: desclabel
-*printdialogshell*main*name.tip: Name of selected printer
-*printdialogshell*main*selectprinter.fromHoriz: name
-*printdialogshell*main*selectprinter.fromVert: desclabel
-*printdialogshell*main*selectprinter.label: Select Printer...
-*printdialogshell*main*selectprinter.label: Select Printer...
-*printdialogshell*main*selectprinter.tip: Select a different printer
-*printdialogshell*main*filenamelabel.fromVert: namelabel
-*printdialogshell*main*filenamelabel.label: File Name:
-*printdialogshell*main*filenamelabel.tip: File where the output should be stored
-*printdialogshell*main*filename.fromHoriz: filenamelabel
-*printdialogshell*main*filename.fromVert: namelabel
-*printdialogshell*main*filename.tip: File where the output should be stored
-*printdialogshell*main*selectfile.fromHoriz: filename
-*printdialogshell*main*selectfile.fromVert: namelabel
-*printdialogshell*main*selectfile.label: Select File...
-*printdialogshell*main*selectfile.tip: Select file where the output should be stored
-*printdialogshell*main*printtoprinter.fromVert: filenamelabel
-*printdialogshell*main*printtoprinter.label: Print to Printer
-*printdialogshell*main*printtoprinter.tip: Send print job to printer
-*printdialogshell*main*printtofile.fromVert: filenamelabel
-*printdialogshell*main*printtofile.fromHoriz: printtoprinter
-*printdialogshell*main*printtofile.label: Print to File
-*printdialogshell*main*printtofile.tip: Save print job in a file
-
-! Print job options dialog
-*printdialogshell*setup*geometry: 600x400
-*printdialogshell*setup*title: Print: Print job options
-*printdialogshell*setup*ok.fromVert: list
-*printdialogshell*setup*ok.label: OK
-*printdialogshell*setup*ok.tip: Commit changes
-*printdialogshell*setup*cancel.fromHoriz: ok
-*printdialogshell*setup*cancel.fromVert: list
-*printdialogshell*setup*cancel.label: Cancel
-*printdialogshell*setup*cancel.tip: Cancel and reset to defaults
-*printdialogshell*setup*paperlist.tip: Select paper size
-*printdialogshell*setup*resolutionlist.fromHoriz: paperlist
-*printdialogshell*setup*resolutionlist.tip: Select page resolution
-*printdialogshell*setup*orientationlist.fromHoriz: resolutionlist
-*printdialogshell*setup*orientationlist.tip: Select page orientation
-*printdialogshell*setup*plexlist.fromHoriz: orientationlist
-*printdialogshell*setup*plexlist.tip: Select page plex mode (simplex, duplex, etc.)
-*printdialogshell*setup*colorspacelist.fromHoriz: plexlist
-*printdialogshell*setup*colorspacelist.tip: Select color space (color, grayscale, CYMK, etc.)
-*printdialogshell*setup*jobcopieslabel.fromVert: paperlist
-*printdialogshell*setup*jobcopieslabel.tip: Set number of job copies
-*printdialogshell*setup*jobcopieslabel.label: Job Copies:
-*printdialogshell*setup*jobcopies.fromHoriz: jobcopieslabel
-*printdialogshell*setup*jobcopies.fromVert: paperlist
-*printdialogshell*setup*jobcopies.tip: Set number of job copies
-
-! Printer selection
-*printdialogshell*printerselection*geometry: 400x150
-*printdialogshell*printerselection*title: Print: Select printer
-*printdialogshell*printerselection*ok.fromVert: list
-*printdialogshell*printerselection*ok.label: OK
-*printdialogshell*printerselection*ok.tip: Switch printer
-*printdialogshell*printerselection*cancel.fromHoriz: ok
-*printdialogshell*printerselection*cancel.fromVert: list
-*printdialogshell*printerselection*cancel.label: Cancel
-*printdialogshell*printerselection*cancel.tip: Cancel printer selection
-*printdialogshell*printerselection*list.tip: Select printer name from list
-
-! Select job file
-*printdialogshell*selectfile*geometry: 400x80
-*printdialogshell*selectfile*title: Print: Select job file
-*printdialogshell*selectfile*dialog.label: Select Filename:
-
-! EOF.
diff --git a/app/xedit/commands.c b/app/xedit/commands.c
index 44612189d..90a64ec35 100644
--- a/app/xedit/commands.c
+++ b/app/xedit/commands.c
@@ -29,10 +29,6 @@
#include <X11/Xfuncs.h>
#include <X11/Xos.h>
#include "xedit.h"
-#ifdef INCLUDE_XPRINT_SUPPORT
-#include "printdialog.h"
-#include "print.h"
-#endif /* INCLUDE_XPRINT_SUPPORT */
#ifdef CRAY
#include <unistd.h>
#endif
@@ -54,12 +50,6 @@
#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
#define Log(x) { if (True) printf x; }
-#ifdef INCLUDE_XPRINT_SUPPORT
-static Widget printdialog_shell = NULL;
-static Widget printdialog = NULL;
-static char printJobNameBuffer[PATH_MAX+256];
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
void ResetSourceChanged(xedit_flist_item*);
static void ResetDC(Widget, XtPointer, XtPointer);
@@ -523,110 +513,6 @@ ReallyDoLoad(char *name, char *filename)
return (True);
}
-#ifdef INCLUDE_XPRINT_SUPPORT
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- XawPrintDialogClosePrinterConnection(printdialog, False);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
- Cardinal n;
- Arg args[2];
- Widget textsource;
-
- Log(("printOKXtProc: OK.\n"));
-
- /* Get TextSource object */
- n = 0;
- XtSetArg(args[n], XtNtextSource, &textsource); n++;
- XtGetValues(textwindow, args, n);
-
- Assertion(textsource != NULL, (("printOKXtProc: textsource == NULL.\n")));
-
- /* ||printJobNameBuffer| must live as long the print job prints
- * because it is used for the job title AND the page headers... */
- sprintf(printJobNameBuffer, "Xedit print job");
-
- DoPrintTextSource("Xedit",
- textsource, topwindow,
- pdcs->pdpy, pdcs->pcontext, pdcs->colorspace,
- printshellDestroyXtProc,
- printJobNameBuffer,
- pdcs->printToFile?pdcs->printToFileName:NULL);
-
- XtPopdown(printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- Log(("printCancelXtProc: cancel.\n"));
- XtPopdown(printdialog_shell);
-
- Log(("destroying print dialog shell...\n"));
- XtDestroyWidget(printdialog_shell);
- printdialog_shell = NULL;
- printdialog = NULL;
- Log(("... done\n"));
-}
-
-
-/*ARGSUSED*/
-void
-PrintFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
- DoPrint(w, NULL, NULL);
-}
-
-/*ARGSUSED*/
-void
-DoPrint(Widget w, XtPointer client_data, XtPointer call_data)
-{
- Dimension width, height;
- Position x, y;
- Widget parent = topwindow;
- Log(("print!\n"));
-
- if (!printdialog) {
- int n;
- Arg args[20];
-
- n = 0;
- XtSetArg(args[n], XtNallowShellResize, True); n++;
- printdialog_shell = XtCreatePopupShell("printdialogshell",
- transientShellWidgetClass,
- topwindow, args, n);
- n = 0;
- printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
- printdialog_shell, args, n);
- XtAddCallback(printdialog, XawNOkCallback, printOKXtProc, NULL);
- XtAddCallback(printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
- XtRealizeWidget(printdialog_shell);
- }
-
- /* Center dialog */
- XtVaGetValues(printdialog_shell,
- XtNwidth, &width,
- XtNheight, &height,
- NULL);
-
- x = (Position)(XWidthOfScreen( XtScreen(parent)) - width) / 2;
- y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
- XtVaSetValues(printdialog_shell,
- XtNx, x,
- XtNy, y,
- NULL);
-
- XtPopup(printdialog_shell, XtGrabNonexclusive);
-}
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
/* Function Name: SourceChanged
* Description: A callback routine called when the source has changed.
* Arguments: w - the text source that has changed.
@@ -734,6 +620,7 @@ FindFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
XawTextPosition end = XawTextSourceScan(XawTextGetSource(filenamewindow),
0, XawstAll, XawsdRight, 1, True);
+ slash = NULL;
if (!line_edit) {
string = GetString(filenamewindow);
if (string)
@@ -741,7 +628,6 @@ FindFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
else {
string = "";
- slash = NULL;
line_edit = False;
}
@@ -1189,7 +1075,7 @@ DirWindowCB(Widget w, XtPointer user_data, XtPointer call_data)
Feep();
}
else {
- (void)ReallyDoLoad(path, path);
+ (void)ReallyDoLoad(path, ResolveName(path));
SwitchDirWindow(False);
XtSetKeyboardFocus(topwindow, textwindow);
}
diff --git a/app/xedit/config.h.in b/app/xedit/config.h.in
index 630752401..04e9894b2 100644
--- a/app/xedit/config.h.in
+++ b/app/xedit/config.h.in
@@ -1,5 +1,32 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* 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 <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
+
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
@@ -30,5 +57,8 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Version number of package */
#undef VERSION
diff --git a/app/xedit/configure b/app/xedit/configure
index 39d236498..399660fe9 100644
--- a/app/xedit/configure
+++ b/app/xedit/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for xedit 1.1.2.
+# Generated by GNU Autoconf 2.62 for xedit 1.2.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -596,10 +596,46 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xedit'
PACKAGE_TARNAME='xedit'
-PACKAGE_VERSION='1.1.2'
-PACKAGE_STRING='xedit 1.1.2'
+PACKAGE_VERSION='1.2.0'
+PACKAGE_STRING='xedit 1.2.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
ac_subst_vars='SHELL
PATH_SEPARATOR
PACKAGE_NAME
@@ -677,22 +713,13 @@ AMDEPBACKSLASH
CCDEPMODE
am__fastdepCC_TRUE
am__fastdepCC_FALSE
-RANLIB
+CPP
+GREP
+EGREP
+CWARNFLAGS
+CHANGELOG_CMD
PKG_CONFIG
-USE_XPRINT_TRUE
-USE_XPRINT_FALSE
-PKGDEPS_CFLAGS
-PKGDEPS_LIBS
-LISPDIR
-NEED_REALPATH_TRUE
-NEED_REALPATH_FALSE
-NEED_STRCASECMP_TRUE
-NEED_STRCASECMP_FALSE
-NEED_UNSETENV_TRUE
-NEED_UNSETENV_FALSE
-APPDEFS_CFLAGS
-APPDEFS_LIBS
-appdefaultdir
+INSTALL_CMD
build
build_cpu
build_vendor
@@ -701,6 +728,7 @@ host
host_cpu
host_vendor
host_os
+SED
APP_MAN_SUFFIX
LIB_MAN_SUFFIX
FILE_MAN_SUFFIX
@@ -713,6 +741,22 @@ FILE_MAN_DIR
MISC_MAN_DIR
DRIVER_MAN_DIR
ADMIN_MAN_DIR
+XORG_MAN_PAGE
+MAN_SUBSTS
+AM_DEFAULT_VERBOSITY
+RANLIB
+PKGDEPS_CFLAGS
+PKGDEPS_LIBS
+LISPDIR
+NEED_REALPATH_TRUE
+NEED_REALPATH_FALSE
+NEED_STRCASECMP_TRUE
+NEED_STRCASECMP_FALSE
+NEED_UNSETENV_TRUE
+NEED_UNSETENV_FALSE
+APPDEFS_CFLAGS
+APPDEFS_LIBS
+appdefaultdir
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -720,9 +764,9 @@ ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_dependency_tracking
-enable_xprint
+enable_strict_compilation
with_lispdir
-with_release_version
+with_appdefaultdir
'
ac_precious_vars='build_alias
host_alias
@@ -732,6 +776,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
+CPP
PKG_CONFIG
PKGDEPS_CFLAGS
PKGDEPS_LIBS
@@ -1289,7 +1334,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xedit 1.1.2 to adapt to many kinds of systems.
+\`configure' configures xedit 1.2.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1359,7 +1404,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xedit 1.1.2:";;
+ short | recursive ) echo "Configuration of xedit 1.2.0:";;
esac
cat <<\_ACEOF
@@ -1371,15 +1416,18 @@ Optional Features:
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-xprint Compile with xprint support (default: disabled)
+ --enable-strict-compilation
+ Enable all warnings from compiler and make them
+ errors (default: disabled)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-lispdir=PATH Directory to install lisp files (default:
$libdir/X11/xedit/lisp)
- --with-release-version=STRING
- Use release version string in package name
+ --with-appdefaultdir=<pathname>
+ specify directory for app-defaults files (default is
+ autodetected)
Some influential environment variables:
CC C compiler command
@@ -1389,6 +1437,7 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
PKG_CONFIG path to pkg-config utility
PKGDEPS_CFLAGS
C compiler flags for PKGDEPS, overriding pkg-config
@@ -1465,7 +1514,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xedit configure 1.1.2
+xedit configure 1.2.0
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1479,7 +1528,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xedit $as_me 1.1.2, which was
+It was created by xedit $as_me 1.2.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2128,7 +2177,7 @@ fi
# Define the identity of the package.
PACKAGE='xedit'
- VERSION='1.1.2'
+ VERSION='1.2.0'
cat >>confdefs.h <<_ACEOF
@@ -2299,7 +2348,81 @@ fi
-ac_config_headers="$ac_config_headers config.h"
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
ac_ext=c
@@ -3232,71 +3355,6 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- am__include=.include
- am__quote="\""
- _am_result=BSD
- fi
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
depcc="$CC" am_compiler_list=
@@ -3407,6 +3465,1461 @@ else
fi
+ { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c99=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ $as_unset ac_script || ac_script=
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+
+
+
+if test "x$GCC" = xyes ; then
+ CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+ case `$CC -dumpversion` in
+ 3.4.* | 4.*)
+ CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+ ;;
+ esac
+else
+ { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
+$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
+if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __SUNPRO_C
+ (void) __SUNPRO_C;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___SUNPRO_C=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___SUNPRO_C=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
+$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
+if test $ac_cv_have_decl___SUNPRO_C = yes; then
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+ if test "x$SUNCC" = "xyes"; then
+ CWARNFLAGS="-v"
+ fi
+fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then
+ enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+ STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+ { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
+$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
+if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __SUNPRO_C
+ (void) __SUNPRO_C;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___SUNPRO_C=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___SUNPRO_C=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
+$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
+if test $ac_cv_have_decl___SUNPRO_C = yes; then
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+ { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
+$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
+if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef __INTEL_COMPILER
+ (void) __INTEL_COMPILER;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl___INTEL_COMPILER=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl___INTEL_COMPILER=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
+$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
+if test $ac_cv_have_decl___INTEL_COMPILER = yes; then
+ INTELCC="yes"
+else
+ INTELCC="no"
+fi
+
+ if test "x$GCC" = xyes ; then
+ STRICT_CFLAGS="-pedantic -Werror"
+ elif test "x$SUNCC" = "xyes"; then
+ STRICT_CFLAGS="-errwarn"
+ elif test "x$INTELCC" = "xyes"; then
+ STRICT_CFLAGS="-Werror"
+ fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x ; then
+ APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x ; then
+ APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x ; then
+ LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x ; then
+ LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
+ esac
+fi
+if test x$FILE_MAN_DIR = x ; then
+ FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
+ esac
+fi
+if test x$MISC_MAN_DIR = x ; then
+ MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
+ esac
+fi
+if test x$DRIVER_MAN_DIR = x ; then
+ DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x ; then
+ case $host_os in
+ solaris*) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
+ esac
+fi
+if test x$ADMIN_MAN_DIR = x ; then
+ ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+AM_DEFAULT_VERBOSITY=1
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
if test "x$CC" != xcc; then
{ $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
@@ -3537,99 +5050,6 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
CC="$am_aux_dir/compile $CC"
fi
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -3847,24 +5267,6 @@ $as_echo "no" >&6; }
fi
-# Check whether --enable-xprint was given.
-if test "${enable_xprint+set}" = set; then
- enableval=$enable_xprint; enable_xprint=$enableval
-else
- enable_xprint=no
-fi
-
-
-
-if test x$enable_xprint = xyes; then
- USE_XPRINT_TRUE=
- USE_XPRINT_FALSE='#'
-else
- USE_XPRINT_TRUE='#'
- USE_XPRINT_FALSE=
-fi
-
-if test x$enable_xprint = xyes; then
pkg_failed=no
{ $as_echo "$as_me:$LINENO: checking for PKGDEPS" >&5
@@ -3875,12 +5277,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_PKGDEPS_CFLAGS="$PKGDEPS_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp xaw8\"") >&5
- ($PKG_CONFIG --exists --print-errors "xprintutil xp xaw8") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_PKGDEPS_CFLAGS=`$PKG_CONFIG --cflags "xprintutil xp xaw8" 2>/dev/null`
+ pkg_cv_PKGDEPS_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -3893,12 +5295,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_PKGDEPS_LIBS="$PKGDEPS_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp xaw8\"") >&5
- ($PKG_CONFIG --exists --print-errors "xprintutil xp xaw8") 2>&5
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_PKGDEPS_LIBS=`$PKG_CONFIG --libs "xprintutil xp xaw8" 2>/dev/null`
+ pkg_cv_PKGDEPS_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -3917,14 +5319,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp xaw8"`
+ PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7 xmu xt x11"`
else
- PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp xaw8"`
+ PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7 xmu xt x11"`
fi
# Put the nasty error message in config.log where it belongs
echo "$PKGDEPS_PKG_ERRORS" >&5
- { { $as_echo "$as_me:$LINENO: error: Package requirements (xprintutil xp xaw8) were not met:
+ { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7 xmu xt x11) were not met:
$PKGDEPS_PKG_ERRORS
@@ -3935,7 +5337,7 @@ Alternatively, you may set the environment variables PKGDEPS_CFLAGS
and PKGDEPS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-$as_echo "$as_me: error: Package requirements (xprintutil xp xaw8) were not met:
+$as_echo "$as_me: error: Package requirements (xaw7 xmu xt x11) were not met:
$PKGDEPS_PKG_ERRORS
@@ -3976,119 +5378,6 @@ else
$as_echo "yes" >&6; }
:
fi
-else
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for PKGDEPS" >&5
-$as_echo_n "checking for PKGDEPS... " >&6; }
-
-if test -n "$PKG_CONFIG"; then
- if test -n "$PKGDEPS_CFLAGS"; then
- pkg_cv_PKGDEPS_CFLAGS="$PKGDEPS_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
- ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_PKGDEPS_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$PKGDEPS_LIBS"; then
- pkg_cv_PKGDEPS_LIBS="$PKGDEPS_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
- ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_PKGDEPS_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7"`
- else
- PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$PKGDEPS_PKG_ERRORS" >&5
-
- { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7) were not met:
-
-$PKGDEPS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xaw7) were not met:
-
-$PKGDEPS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
- { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
- { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-else
- PKGDEPS_CFLAGS=$pkg_cv_PKGDEPS_CFLAGS
- PKGDEPS_LIBS=$pkg_cv_PKGDEPS_LIBS
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- :
-fi
-fi
# Check whether --with-lispdir was given.
@@ -4101,7 +5390,6 @@ fi
LISPDIR=$lispdir
-
{ $as_echo "$as_me:$LINENO: checking for realpath" >&5
$as_echo_n "checking for realpath... " >&6; }
if test "${ac_cv_func_realpath+set}" = set; then
@@ -4407,9 +5695,6 @@ fi
-
-
-
pkg_failed=no
{ $as_echo "$as_me:$LINENO: checking for APPDEFS" >&5
$as_echo_n "checking for APPDEFS... " >&6; }
@@ -4520,203 +5805,18 @@ else
$as_echo "yes" >&6; }
:
fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then
+ withval=$with_appdefaultdir; appdefaultdir="$withval"
else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
+ appdefaultdir="${xt_appdefaultdir}"
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-if test x$APP_MAN_SUFFIX = x ; then
- APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x ; then
- APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x ; then
- LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x ; then
- LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
- esac
-fi
-if test x$FILE_MAN_DIR = x ; then
- FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
- esac
-fi
-if test x$MISC_MAN_DIR = x ; then
- MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
- esac
-fi
-if test x$DRIVER_MAN_DIR = x ; then
- DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
- esac
-fi
-if test x$ADMIN_MAN_DIR = x ; then
- ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
- withval=$with_release_version; RELEASE_VERSION="$withval"
-else
- RELEASE_VERSION=""
-fi
-
- if test "x$RELEASE_VERSION" != "x"; then
- PACKAGE="$PACKAGE-$RELEASE_VERSION"
- PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
- { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
- fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
- if test "x$PVM" = "x"; then
- PVM="0"
- fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
-
- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
- if test "x$PVP" = "x"; then
- PVP="0"
- fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
-
-
-
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -4837,13 +5937,6 @@ $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${USE_XPRINT_TRUE}" && test -z "${USE_XPRINT_FALSE}"; then
- { { $as_echo "$as_me:$LINENO: error: conditional \"USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
if test -z "${NEED_REALPATH_TRUE}" && test -z "${NEED_REALPATH_FALSE}"; then
{ { $as_echo "$as_me:$LINENO: error: conditional \"NEED_REALPATH\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -5187,7 +6280,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xedit $as_me 1.1.2, which was
+This file was extended by xedit $as_me 1.2.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5240,7 +6333,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-xedit config.status 1.1.2
+xedit config.status 1.2.0
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -5362,8 +6455,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
diff --git a/app/xedit/configure.ac b/app/xedit/configure.ac
index 64fc0b18b..ab8bb36d3 100644
--- a/app/xedit/configure.ac
+++ b/app/xedit/configure.ac
@@ -21,29 +21,25 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
-AC_PREREQ([2.57])
-AC_INIT(xedit,[1.1.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xedit)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xedit], [1.2.0],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xedit])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
+# 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
+
AM_CONFIG_HEADER(config.h)
-AC_PROG_CC
AM_PROG_CC_C_O
-AC_PROG_INSTALL
AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG
-AC_ARG_ENABLE(xprint,
- AS_HELP_STRING([--enable-xprint],
- [Compile with xprint support (default: disabled)]),
- [enable_xprint=$enableval], [enable_xprint=no])
-AM_CONDITIONAL(USE_XPRINT, test x$enable_xprint = xyes)
-if test x$enable_xprint = xyes; then
- PKG_CHECK_MODULES(PKGDEPS, xprintutil xp xaw8)
-else
- PKG_CHECK_MODULES(PKGDEPS, xaw7)
-fi
+PKG_CHECK_MODULES(PKGDEPS, xaw7 xmu xt x11)
AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir=PATH],
[Directory to install lisp files (default: $libdir/X11/xedit/lisp)]),
@@ -59,14 +55,13 @@ AM_CONDITIONAL(NEED_STRCASECMP, test x$have_strcasecmp = xyes)
AC_CHECK_FUNC(unsetenv, [], [have_unsetenv=yes])
AM_CONDITIONAL(NEED_UNSETENV, test x$have_unsetenv = xyes)
-AC_SUBST(PKGDEPS_CFLAGS)
-AC_SUBST(PKGDEPS_LIBS)
-
PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+AC_ARG_WITH(appdefaultdir,
+ AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+ [specify directory for app-defaults files (default is autodetected)]),
+ [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
AC_SUBST(appdefaultdir)
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
AC_OUTPUT([Makefile])
diff --git a/app/xedit/lisp/io.c b/app/xedit/lisp/io.c
index 3a338558e..9db73ee84 100644
--- a/app/xedit/lisp/io.c
+++ b/app/xedit/lisp/io.c
@@ -107,13 +107,15 @@ LispUnget(int ch)
{
LispUngetInfo *unget = lisp__data.unget[lisp__data.iunget];
- if (unget->offset == sizeof(unget->buffer)) {
- LispWarning("character %c lost at LispUnget()", unget->buffer[0]);
- memmove(unget->buffer, unget->buffer + 1, unget->offset - 1);
- unget->buffer[unget->offset - 1] = ch;
+ if ((ch & 0xff) == ch) {
+ if (unget->offset == sizeof(unget->buffer)) {
+ LispWarning("character %c lost at LispUnget()", unget->buffer[0]);
+ memmove(unget->buffer, unget->buffer + 1, unget->offset - 1);
+ unget->buffer[unget->offset - 1] = ch;
+ }
+ else
+ unget->buffer[unget->offset++] = ch;
}
- else
- unget->buffer[unget->offset++] = ch;
return (ch);
}
diff --git a/app/xedit/lisp/modules/progmodes/auto.lsp b/app/xedit/lisp/modules/progmodes/auto.lsp
index aa4543ef9..5c3eab0a7 100644
--- a/app/xedit/lisp/modules/progmodes/auto.lsp
+++ b/app/xedit/lisp/modules/progmodes/auto.lsp
@@ -85,19 +85,20 @@
;; allow nesting
(syntoken "[" :nospec t :property *prop-separator* :begin :quoted)
(syntoken "]" :nospec t :property *prop-separator* :switch -1)
- (synaugment :shared :variables))
+ (synaugment :shared :comments :variables))
(syntoken ")" :nospec t :property *prop-macro* :switch -1)
- (synaugment :shared :variables :comments))
+ (synaugment :shared :quotes :variables :comments))
(syntable :shared nil nil
(syntoken "[a-zA-Z0-9_]+\\(" :property *prop-macro* :begin :macro)
;; variable assignment
- (syntoken "[a-zA-Z0-9_-]+=" :property *prop-keyword*)
+ (syntoken "[a-zA-Z0-9_-]+=" :property *prop-keyword*))
+
+ (syntable :quotes nil nil
(syntoken "\"" :nospec t :begin :string :contained t)
(syntoken "'" :nospec t :begin :constant :contained t)
(syntoken "`" :nospec t :begin :escape :contained t)
- (syntoken "\\\"" :nospec t :begin :quoted-string :contained t)
- )
+ (syntoken "\\\"" :nospec t :begin :quoted-string :contained t))
(syntable :variables nil nil
(syntoken "\\$[a-zA-Z0-9_-]+" :property *prop-variable*)
@@ -107,4 +108,4 @@
(syntable :comments nil nil
(syntoken "(#.*|\\<dnl($|\\>.*))" :property *prop-comment*))
- (synaugment :shared :variables))
+ (synaugment :shared :quotes :variables))
diff --git a/app/xedit/print.c b/app/xedit/print.c
deleted file mode 100644
index fbb260bbd..000000000
--- a/app/xedit/print.c
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * $Xorg: print.c,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-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.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
- *
- */
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x) { if(True) printf x; }
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "print.h"
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/AsciiText.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-static Widget
-CreatePrintShell(Widget videoshell,
- Screen *pscreen,
- Visual *pvisual,
- String printshell_name,
- ArgList args,
- Cardinal numargs)
-{
- String videoname,
- videoclass;
- Widget pappshell,
- printshell;
- Display *pdpy = XDisplayOfScreen(pscreen);
- int dummyc = 0;
- String dummys = "";
- Cardinal shell_n;
- Arg shell_args[5];
-
- XtGetApplicationNameAndClass(XtDisplay(videoshell),
- &videoname, &videoclass);
-
- /* XXX: Why is the |dummyc|&&|dummys| stuff needed here ? */
- XtDisplayInitialize(XtWidgetToApplicationContext(videoshell), pdpy,
- videoname, videoclass,
- NULL, 0,
- &dummyc, &dummys);
-
- shell_n = 0;
- XtSetArg(shell_args[shell_n], XtNscreen, pscreen); shell_n++;
- if (pvisual) {
- XtSetArg(shell_args[shell_n], XtNvisual, pvisual); shell_n++;
- }
- pappshell = XtAppCreateShell(videoname, videoclass,
- applicationShellWidgetClass,
- pdpy,
- shell_args, shell_n);
- printshell = XtCreatePopupShell(printshell_name,
- xawPrintShellWidgetClass,
- pappshell, args, numargs);
-
-
- /* we're mapping/unmapping at start/end page time */
- XtSetMappedWhenManaged(printshell, False);
-
- /* We realise the widget when we're done with building the widget tree... */
-
- return printshell;
-}
-
-typedef struct
-{
- const char *programname;
- Widget toplevel;
- Bool isPrinting;
- Widget printshell;
- struct
- {
- Widget form;
- Widget pageheaderlabel;
- Widget text;
- } content; /* content to print */
- int numpages;
- Display *pdpy;
- Screen *pscreen;
- XPContext pcontext;
- XtCallbackProc pdpyDestroyCallback;
- void *printtofile_handle;
- const char *jobtitle;
-} AppPrintData;
-
-static AppPrintData apdx;
-static AppPrintData *apd = &apdx;
-
-/* Count pages in a text widget
- * WARNING: This will reset the current position of the text widget
- * back to the beginning */
-static
-long CountPages(Widget textWidget)
-{
- long numpages = 0;
-
- XawTextPosition prevpagepos = -1,
- currpos = 0;
-
- /* Move to the top of the file... */
- XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-
- /* ... count pages ...*/
- do
- {
- prevpagepos = XawTextTopPosition(textWidget);
- XtCallActionProc(textWidget, "next-page", NULL, NULL, 0);
- currpos = XawTextTopPosition(textWidget);
- numpages++;
- } while(prevpagepos != currpos);
-
- /* ... and move to the top of the file... */
- XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-
- Log(("CountPages() found %ld pages.\n", numpages))
-
- return numpages;
-}
-
-static void
-PageSetupCB(Widget widget, XtPointer client_data, XtPointer call_data)
-{
- Widget pshell = widget;
- XawPrintShellCallbackStruct *psp = (XawPrintShellCallbackStruct *)call_data;
- AppPrintData *p = (AppPrintData *)client_data;
-
- Log(("--> PageSetupCB\n"));
-
- if (!psp->last_page_in_job) {
- int currpage;
- char buffer[256];
-
- XtVaGetValues(pshell, XawNcurrPageNumInJob, &currpage, NULL);
-
- sprintf(buffer, "Title: %s / Page: %d/%d", p->jobtitle, currpage, p->numpages);
- XtVaSetValues(apd->content.pageheaderlabel, XtNlabel, buffer, NULL);
-
- /* Note: XawPrintShell's pagecount starts with '1'
- * (=first page is page no. '1') */
- if (currpage > 1) {
- Log(("pagedown %d\n", currpage));
- XtCallActionProc(p->content.text, "next-page", NULL, NULL, 0);
- }
- else
- {
- Log(("first page\n"));
- }
-
- if (currpage >= p->numpages) {
- psp->last_page_in_job = True;
- }
- }
-}
-
-static
-void FinishPrinting(AppPrintData *p)
-{
- char *scr;
-
- if (p->printtofile_handle) {
- if (XpuWaitForPrintFileChild(p->printtofile_handle) != XPGetDocFinished) {
- PrintMsg(("Error while printing to file.\n"));
- }
- p->printtofile_handle = NULL;
- }
-
- /* Job completed, check if there are any messages from the spooler command */
- scr = XpGetOneAttribute(p->pdpy, p->pcontext, XPJobAttr, "xp-spooler-command-results");
- if( scr )
- {
- if( strlen(scr) > 0 )
- {
- const char *msg = XpuCompoundTextToXmb(p->pdpy, scr);
- if( msg )
- {
- PrintMsg(("Spooler command returned:\n%s", msg));
- XpuFreeXmbString(msg);
- }
- else
- {
- PrintMsg(("Spooler command returned (unconverted):\n%s", scr));
- }
- }
-
- XFree((void *)scr);
- }
-
- if (p->printshell) {
- XtDestroyWidget(p->printshell);
- p->printshell = NULL;
- }
-
- /* Two issues here:
- * 1. The print display connection is owned by the print dialog
- * To avoid any problems with that use a callback back to the main
- * application which calls
- * |XawPrintDialogClosePrinterConnection(w, False)| to ask the
- * print dialog widget to close all print display resources and
- * disown the object.
- * 2. We have to use XpDestroyContext() and XtCloseDisplay()
- * instead of XpuClosePrinterDisplay() to make libXt happy...
- *
- * Call callback... */
- (*apd->pdpyDestroyCallback)(NULL, NULL, NULL); /* HACK! */
-
- /* ... and then get rid of the display */
- if (p->pcontext != None) {
- XpDestroyContext(p->pdpy, p->pcontext);
- }
- XtCloseDisplay(p->pdpy);
-
- p->toplevel = NULL;
- p->isPrinting = False;
- p->pdpy = NULL;
- p->pscreen = NULL;
- p->pcontext = None;
-}
-
-static
-void PrintEndJobCB(Widget pshell, XtPointer client_data, XtPointer call_data)
-{
- AppPrintData *p = (AppPrintData *)client_data;
-
- Log(("--> PrintEndJobCB\n"));
-
- /* Finish printing and destroy print shell (it's legal to destroy Xt
- * widgets from within it's own callbacks) */
- FinishPrinting(p);
-}
-
-static
-XFontSet GetPrintTextFontSet(const char *appname, Display *pdpy, long dpi_x, long dpi_y)
-{
- XFontSet fontset;
- char fontname[1024];
- char **missing_charset_list_return;
- int missing_charset_count_return;
- char *def_string_return;
- int i;
-
- sprintf(fontname, /* Default font for CDE */
- "-dt-interface user-medium-r-normal-s*-*-120-%ld-%ld-*-*,"
- /* Default font */
- "-adobe-courier-medium-r-normal--*-120-%ld-%ld-*-*,"
- /* Default font for Linux/Japanese locales (ja_JP.SJIS) */
- "-watanabe-mincho-medium-r-normal--*-120-%ld-%ld-*-*,"
- "-wadalab-gothic-medium-r-normal--*-120-%ld-%ld-*-*,"
- /* Fallback */
- "-*-*-*-*-*--*-120-%ld-%ld-*-*",
- dpi_x, dpi_y,
- dpi_x, dpi_y,
- dpi_x, dpi_y,
- dpi_x, dpi_y,
- dpi_x, dpi_y);
- fontset = XCreateFontSet(pdpy, fontname,
- &missing_charset_list_return,
- &missing_charset_count_return,
- &def_string_return);
-
- for( i=0 ; i < missing_charset_count_return ; i++ ) {
- fprintf(stderr, "%s: warning: font for charset %s is lacking.\n",
- appname, missing_charset_list_return[i]);
- }
-
- if (!fontset)
- Error(("GetPrintTextFontSet: XCreateFontSet() failure.\n"));
- return fontset;
-}
-
-void DoPrintTextSource(const char *programname,
- Widget textsource, Widget toplevel,
- Display *pdpy, XPContext pcontext,
- XpuColorspaceRec *colorspace,
- XtCallbackProc pdpyDestroyCB,
- const char *jobtitle, const char *toFile)
-{
- long dpi_x = 0L,
- dpi_y = 0L;
- int n;
- Arg args[20];
- XFontSet textfontset = NULL;
- XFontSetExtents *font_extents;
-
- apd->programname = programname;
- apd->pdpyDestroyCallback = pdpyDestroyCB;
-
- if (apd->isPrinting) {
- PrintMsg(("Already busy with printing.\n"));
- return;
- }
-
- /* Configure the print context (paper size, title etc.)
- * We must do this before creating any Xt widgets - otherwise they will
- * make wrong assuptions about fonts, resultions etc. ...
- */
- XpuSetJobTitle(pdpy, pcontext, jobtitle);
-
- /* Configuration done, set the context */
- XpSetContext(pdpy, pcontext);
-
- /* Get default printer resolution */
- if (XpuGetResolution(pdpy, pcontext, &dpi_x, &dpi_y) != 1) {
- PrintMsg(("No default resolution for printer.\n"));
- XpuClosePrinterDisplay(pdpy, pcontext);
- return;
- }
-
- apd->toplevel = toplevel;
- apd->pdpy = pdpy;
- apd->pcontext = pcontext;
- apd->pscreen = XpGetScreenOfContext(pdpy, pcontext);
- apd->jobtitle = jobtitle;
-
- n = 0;
- /* Override any geometry resource settings as XawPrintShell adjusts it's size
- * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
- * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
- XtSetArg(args[n], XtNgeometry, "+0+0"); n++;
- XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
- if (colorspace) {
- printf("Setting visual to id=0x%lx.\n", colorspace->visualinfo.visualid);
- }
- apd->printshell = CreatePrintShell(toplevel, apd->pscreen,
- (colorspace?(colorspace->visualinfo.visual):(NULL)),
- "printshell", args, n);
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNright, XtChainRight); n++;
- apd->content.form = XtCreateManagedWidget("form", formWidgetClass, apd->printshell, args, n);
-
- textfontset = GetPrintTextFontSet(apd->programname, pdpy, dpi_x, dpi_y);
-
- n = 0;
- XtSetArg(args[n], XtNinternational, True); n++;
- XtSetArg(args[n], XtNfromHoriz, NULL); n++;
- XtSetArg(args[n], XtNfromVert, NULL); n++;
- XtSetArg(args[n], XtNtop, XtChainTop); n++;
- XtSetArg(args[n], XtNright, XtChainRight); n++;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNfontSet, textfontset); n++;
- XtSetArg(args[n], XtNlabel, "Page: n/n"); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyRight); n++;
- apd->content.pageheaderlabel = XtCreateManagedWidget("pageinfo", labelWidgetClass, apd->content.form, args, n);
-
- font_extents = XExtentsOfFontSet(textfontset);
-
- n = 0;
- XtSetArg(args[n], XtNinternational, True); n++;
- XtSetArg(args[n], XtNtextSource, textsource); n++;
- XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollNever); n++;
- XtSetArg(args[n], XtNscrollVertical, XawtextScrollNever); n++;
-
-/* Usually I would expect that using |XtNfromVert, apd->content.pageheaderlabel|
- * would be the correct way to place the text widget with the main content below
- * the page header widget - but for an unknown reason this doesn not work: The
- * text widget squishes itself into the bottom half of the page and only occupies
- * 1/2 of the page's with... ;-(( */
-#define WORKAROUND_FOR_SOMETHING_IS_WRONG 1
-#ifdef WORKAROUND_FOR_SOMETHING_IS_WRONG
- XtSetArg(args[n], XtNtop, XtChainTop); n++;
- XtSetArg(args[n], XtNright, XtChainRight); n++;
- XtSetArg(args[n], XtNvertDistance, (font_extents->max_logical_extent.height+2)*2); n++;
-#else
- XtSetArg(args[n], XtNfromHoriz, NULL); n++;
- XtSetArg(args[n], XtNfromVert, apd->content.pageheaderlabel); n++;
-#endif
- XtSetArg(args[n], XtNfontSet, textfontset); n++;
- apd->content.text = XtCreateManagedWidget("text", asciiTextWidgetClass, apd->content.form, args, n);
-
- /* Disable the caret - that is not needed for printing */
- XawTextDisplayCaret(apd->content.text, False);
-
- XtAddCallback(apd->printshell, XawNpageSetupCallback, PageSetupCB, (XtPointer)apd);
- XtAddCallback(apd->printshell, XawNendJobCallback, PrintEndJobCB, (XtPointer)apd);
-
- /* Realise print shell (which will set position+size of the child
- * widgets based on the current page size) */
- XtRealizeWidget(apd->printshell);
-
- /* Count number of pages in the text widget */
- apd->numpages = CountPages(apd->content.text);
-
- /* Make sure that the Xt machinery is really using the right screen (assertion) */
- if (XpGetScreenOfContext(XtDisplay(apd->printshell), apd->pcontext) != XtScreen(apd->printshell))
- Error(("Widget's screen != print screen. BAD.\n"));
-
- apd->isPrinting = True;
-
- if (toFile) {
- PrintMsg(("Printing to file '%s'...\n", toFile));
- apd->printtofile_handle = XpuStartJobToFile(pdpy, pcontext, toFile);
- if (!apd->printtofile_handle) {
- perror("XpuStartJobToFile failure");
- PrintMsg(("Printing failed: XpuStartJobToFile\n"));
- apd->isPrinting = False;
- return;
- }
- }
- else
- {
- PrintMsg(("Printing to printer...\n"));
- XpuStartJobToSpooler(pdpy);
- }
-}
-
-
diff --git a/app/xedit/print.h b/app/xedit/print.h
deleted file mode 100644
index a87779c9c..000000000
--- a/app/xedit/print.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * $Xorg: print.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-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.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
- *
- */
-
-#ifndef XMORE_PRINT_H
-#define XMORE_PRINT_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-#if defined(XMORE)
-#define PrintMsg(x) { printf("xmore: "); printf x ; }
-#elif defined(XEDIT)
-#define PrintMsg(x) { XeditPrintf x ; }
-#else
-#error unknown application
-#endif
-
-/* Prototypes */
-void DoPrintTextSource(const char *programname,
- Widget textsource,
- Widget toplevel,
- Display *pdpy, XPContext pcontext,
- XpuColorspaceRec *colorspace,
- XtCallbackProc printDisplayDestroyCallback,
- const char *jobTitle,
- const char *toFile);
-
-#endif /* !XMORE_PRINT_H */
diff --git a/app/xedit/printdialog.c b/app/xedit/printdialog.c
deleted file mode 100644
index 50d2a880b..000000000
--- a/app/xedit/printdialog.c
+++ /dev/null
@@ -1,1396 +0,0 @@
-/*
- * $Xorg: printdialog.c,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-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.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
- *
- */
-
-/* Force ANSI C prototypes from X11 headers */
-#ifndef FUNCPROTO
-#define FUNCPROTO 15
-#endif /* !FUNCPROTO */
-
-#include <X11/StringDefs.h>
-#include <X11/Intrinsic.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Dialog.h>
-
-#ifdef XKB
-#include <X11/extensions/XKBbells.h>
-#endif /* XKB */
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "printdialog.h"
-#include "printdialogprivates.h"
-#include "print.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#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 */
-
-/* Local prototypes */
-static void do_beep(PrintDialogWidget pdw);
-static void center_popup(Widget parent, Widget popup);
-static void updateWidgetStates(PrintDialogWidget pdw);
-static void printSetupClose(PrintDialogWidget pdw);
-static void printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void buildFileDialog(PrintDialogWidget pdw);
-static void closePrinterConnection(PrintDialogWidget pdw, Bool closeDisplay);
-static Bool openPrinterConnection(PrintDialogWidget pdw);
-static void destroyPrintSetupDialog(PrintDialogWidget pdw);
-static Widget buildPrintSetupDialog(PrintDialogWidget pdw);
-static String *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers);
-static String *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers);
-static String *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions);
-static String *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations);
-static String *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex);
-static String *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces);
-static void printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printerSelectionClose(PrintDialogWidget pdw);
-static void printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static Bool buildPrinterSelectionDialog(PrintDialogWidget pdw);
-static void destroyPrinterSelectionDialog(PrintDialogWidget pdw);
-static void createprintdialogchildren(Widget w);
-
-static
-void do_beep(PrintDialogWidget pdw)
-{
- Log(("*** Beep!\n"));
-#ifdef XKB
- XkbStdBell(XtDisplay((Widget)pdw), XtWindow((Widget)pdw), 0, XkbBI_MinorError);
-#else
- XBell(XtDisplay((Widget)pdw), 0);
-#endif /* XKB */
-}
-
-/* Center popup (on parent, not on screen - which would be a bad idea
- * in the Xinerama case) */
-static
-void center_popup(Widget parent, Widget popup)
-{
- Dimension width,
- height;
- Position x,
- y;
-
- XtVaGetValues(parent,
- XtNx, &x,
- XtNy, &y,
- NULL);
- XtVaGetValues(popup,
- XtNwidth, &width,
- XtNheight, &height,
- NULL);
-
- x += (Position)width / 2;
- y += (Position)height / 3;
-
- XtVaSetValues(popup,
- XtNx, x,
- XtNy, y,
- NULL);
-}
-
-static
-void updateWidgetStates(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- /* Do not update anything if we will be destroyed */
- if (pdw->core.being_destroyed)
- return;
-
- if (pdp->printToFile == False) {
- XtVaSetValues(pdp->main.printtoprinter, XtNstate, True, NULL);
- XtVaSetValues(pdp->main.printtofile, XtNstate, False, NULL);
- /* Disable the widgets which depend on print-to-file */
- XtVaSetValues(pdp->main.filenamelabel, XtNsensitive, False, NULL);
- XtVaSetValues(pdp->main.filename, XtNsensitive, False, NULL);
- XtVaSetValues(pdp->main.selectfile, XtNsensitive, False, NULL);
- }
- else
- {
- XtVaSetValues(pdp->main.printtoprinter, XtNstate, False, NULL);
- XtVaSetValues(pdp->main.printtofile, XtNstate, True, NULL);
- /* Enable the widgets which depend on print-to-file */
- XtVaSetValues(pdp->main.filenamelabel, XtNsensitive, True, NULL);
- XtVaSetValues(pdp->main.filename, XtNsensitive, True, NULL);
- XtVaSetValues(pdp->main.selectfile, XtNsensitive, True, NULL);
- }
-
- /* Update file name */
- XtVaSetValues(pdp->main.filename, XtNlabel, pdp->filename?pdp->filename:"-", NULL);
-
- /* General check whether we can print... */
- pdp->canPrint = True;
- if (pdp->printer_name == NULL) {
- pdp->canPrint = False;
- }
- else if (strlen(pdp->printer_name) == 0) {
- pdp->canPrint = False;
- }
-
- pdp->canReallyPrint = pdp->canPrint;
-
- /* Some extra checks for print-to-file */
- if (pdp->printToFile) {
- if (pdp->filename == NULL) {
- pdp->canReallyPrint = False;
- }
- else if (strlen(pdp->filename) == 0) {
- pdp->canReallyPrint = False;
- }
- }
-
- XtVaSetValues(pdp->main.ok, XtNsensitive, pdp->canReallyPrint, NULL);
- XtVaSetValues(pdp->main.setup, XtNsensitive, pdp->canPrint, NULL);
-}
-
-static void
-printSetupClose(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
- if (pdp->setup.popup) {
- XtPopdown(pdp->setup.popup);
- }
-}
-
-static void
-printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- char *s;
- XawListReturnStruct *lrs;
- Log(("## printSetupOK: closing print setup!\n"));
-
- /* Set copy count (if the value is invalid beep and return to the user ) */
- XtVaGetValues(pdp->setup.jobcopies, XtNstring, &s, NULL);
- if (s) {
- int c = atoi(s);
- if (c < 1 || c > 999) {
- do_beep(pdw);
- XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
- Log(("## printSetupOKXtProc: not a valid copy count value\n"));
- return;
- }
-
- /* Fix me: We should set the number of _job_ copies here, not _doc_ copies */
- XpuSetDocumentCopies(pdp->pdpy, pdp->pcontext, c);
- }
-
- /* Set paper size */
- lrs = XawListShowCurrent(pdp->setup.paperlist);
- if (lrs->list_index != XAW_LIST_NONE) {
- Log(("selected paper is '%s'/'%d'\n", lrs->string, lrs->list_index));
- Assertion(lrs->list_index < pdp->num_papers, (("Error: lrs->list_index < pdp->num_papers\n")));
- XpuSetDocMediumSourceSize(pdp->pdpy, pdp->pcontext, &pdp->paperlist[lrs->list_index]);
- }
- XtFree((char *)lrs);
-
- /* Set resolution */
- lrs = XawListShowCurrent(pdp->setup.resolutionlist);
- if (lrs->list_index != XAW_LIST_NONE) {
- Log(("selected resolution is '%s'/'%d'\n", lrs->string, lrs->list_index));
- Assertion(lrs->list_index < pdp->num_resolutions, (("Error: lrs->list_index < pdp->num_resolutions\n")));
- XpuSetDocResolution(pdp->pdpy, pdp->pcontext, &pdp->resolutionlist[lrs->list_index]);
- }
- XtFree((char *)lrs);
-
- /* Set orientation */
- lrs = XawListShowCurrent(pdp->setup.orientationlist);
- if (lrs->list_index != XAW_LIST_NONE) {
- Log(("selected orientation is '%s'/'%d'\n", lrs->string, lrs->list_index));
- Assertion(lrs->list_index < pdp->num_orientations, (("Error: lrs->list_index < pdp->num_orientations\n")));
- XpuSetDocOrientation(pdp->pdpy, pdp->pcontext, &pdp->orientationlist[lrs->list_index]);
- }
- XtFree((char *)lrs);
-
- /* Set plex mode */
- lrs = XawListShowCurrent(pdp->setup.plexlist);
- if (lrs->list_index != XAW_LIST_NONE) {
- Log(("selected plex is '%s'/'%d'\n", lrs->string, lrs->list_index));
- Assertion(lrs->list_index < pdp->num_plex, (("Error: lrs->list_index < pdp->num_plex\n")));
- XpuSetDocPlex(pdp->pdpy, pdp->pcontext, &pdp->plexlist[lrs->list_index]);
- }
- XtFree((char *)lrs);
-
- /* Set colorspace */
- lrs = XawListShowCurrent(pdp->setup.colorspacelist);
- if (lrs->list_index != XAW_LIST_NONE) {
- Log(("selected colorspace is '%s'/'%d'\n", lrs->string, lrs->list_index));
- Assertion(lrs->list_index < pdp->num_colorspaces, (("Error: lrs->list_index < pdp->num_colorspaces\n")));
- pdp->selected_colorspace = &pdp->colorspacelist[lrs->list_index];
- }
- XtFree((char *)lrs);
-
- printSetupClose(pdw);
-}
-
-static void
-printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- Log(("## printSetupCancel: closing print setup!\n"));
-
- printSetupClose(pdw);
-}
-
-static void
-printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- char *string = NULL;
-
- Log(("## printSetupJobCopiesXtProc!\n"));
-
- /* Check whether the input is a valid number - and in the case of invalid input reset the value */
- XtVaGetValues(pdp->setup.jobcopies, XtNstring, &string, NULL);
- if (string) {
- char *s;
- int i;
- Bool isValidNumber = True;
-
- /* First check for invalid characters... */
- for( s = string ; *s != '\0' ; s++ ) {
- if (!isdigit(*s)) {
- isValidNumber = False;
- break;
- }
- }
-
- /* .. and the do a range check... */
- i = atoi(string);
- if (i < 1 || i > 999) {
- isValidNumber = False;
- }
-
- if (!isValidNumber) {
- do_beep(pdw);
- XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
- Log(("## printSetupJobCopiesXtProc: not a valid number\n"));
- }
- }
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
-
- printSetupClose(pdw);
-
- if (pdp->cancel_callback) {
- Log(("printCancelXtProc: calling callback\n"));
- XtCallCallbackList((Widget)pdw, pdp->cancel_callback, NULL);
- }
-}
-
-static void
-printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
-
- if (w == pdp->main.printtoprinter) {
- pdp->printToFile = False;
- }
- else if (w == pdp->main.printtofile) {
- pdp->printToFile = True;
- }
- else
- {
- Log(("printDialogDestXtProc: ERROR: Unknown widget.\n"));
- }
-
- updateWidgetStates(pdw);
-}
-
-static void
-printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
-
- Log(("## printSelectFileXtProc!\n"));
-
- if (!pdp->selectFile.shell) {
- buildFileDialog(pdw);
- }
-
- center_popup((Widget)pdw, pdp->selectFile.shell);
-
- XtPopup(pdp->selectFile.shell, XtGrabExclusive);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- Log(("## printing!\n"));
-
- if (!pdp->pdpy) {
- Log(("printOKXtProc: no printer connection, opening one....\n"));
- openPrinterConnection(pdw);
-
- if (!pdp->pdpy) {
- Log(("printOKXtProc: still no printer connection - BAD (this should never happen).\n"));
- do_beep(pdw);
- return;
- }
- }
-
- if (pdp->ok_callback) {
- XawPrintDialogCallbackStruct pdcs;
-
- Log(("printOKXtProc: calling callbacks...\n"));
- memset(&pdcs, 0, sizeof(pdcs));
- pdcs.pdpy = pdp->pdpy;
- pdcs.pcontext = pdp->pcontext;
- pdcs.printToFile = pdp->printToFile;
- pdcs.printToFileName = (const char *)pdp->filename;
- pdcs.colorspace = pdp->selected_colorspace;
- XtCallCallbackList((Widget)pdw, pdp->ok_callback, &pdcs);
- }
-
- printSetupClose(pdw);
-}
-
-static void
-printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
-
- Log(("## setup!\n"));
-
- if (!pdp->setup.popup) {
- if (buildPrintSetupDialog(pdw) == NULL) {
- Log(("printSetupXtProc: buildPrintSetupDialog failure.\n"));
- return;
- }
- }
-
- center_popup((Widget)pdw, pdp->setup.popup);
-
- XtPopup(pdp->setup.popup, XtGrabExclusive);
-}
-
-static void
-printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- const char *filename;
-
- Log(("printFileSelectedXtProc: User selected file.\n"));
- filename = XawDialogGetValueString(pdp->selectFile.dialog);
-
- if (pdp->filename)
- free(pdp->filename);
- pdp->filename = strdup(filename);
-
- XtPopdown(pdp->selectFile.shell);
-
- updateWidgetStates(pdw);
-}
-
-static
-void buildFileDialog(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
- int n;
- Arg args[20];
-
- pdp->selectFile.shell = XtCreatePopupShell("selectfile",
- transientShellWidgetClass,
- (Widget)pdw, NULL, 0);
- n = 0;
- XtSetArg(args[n], XtNvalue, pdp->filename?pdp->filename:""); n++;
- pdp->selectFile.dialog = XtCreateManagedWidget("dialog", dialogWidgetClass,
- pdp->selectFile.shell, args, n);
- XawDialogAddButton(pdp->selectFile.dialog, "Accept", printFileSelectedXtProc, pdw);
-
- XtRealizeWidget(pdp->selectFile.shell);
-}
-
-static
-void closePrinterConnection(PrintDialogWidget pdw, Bool closeDisplay)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- Log(("# closePrinterConnection\n"));
-
- destroyPrintSetupDialog(pdw);
-
- if (pdp->paperlist) {
- XpuFreeMediumSourceSizeList(pdp->paperlist);
- pdp->paperlist = NULL;
- }
-
- if (pdp->widget_paperlist) {
- free(pdp->widget_paperlist);
- pdp->widget_paperlist = NULL;
- }
-
- if (pdp->resolutionlist) {
- XpuFreeResolutionList(pdp->resolutionlist);
- pdp->resolutionlist = NULL;
- }
-
- if (pdp->widget_resolutionlist) {
- free(pdp->widget_resolutionlist);
- pdp->widget_resolutionlist = NULL;
- }
-
-
- if (pdp->orientationlist) {
- XpuFreeOrientationList(pdp->orientationlist);
- pdp->orientationlist = NULL;
- }
-
- if (pdp->widget_orientationlist) {
- free(pdp->widget_orientationlist);
- pdp->widget_orientationlist = NULL;
- }
-
- if (pdp->plexlist) {
- XpuFreePlexList(pdp->plexlist);
- pdp->plexlist = NULL;
- }
-
- if (pdp->widget_plexlist) {
- free(pdp->widget_plexlist);
- pdp->widget_plexlist = NULL;
- }
-
- if (pdp->colorspacelist) {
- XpuFreeColorspaceList(pdp->colorspacelist);
- pdp->colorspacelist = NULL;
- }
-
- if (pdp->widget_colorspacelist) {
- free(pdp->widget_colorspacelist);
- pdp->widget_colorspacelist = NULL;
- }
- pdp->selected_colorspace = NULL;
-
- if (pdp->pdpy) {
- if (closeDisplay) {
- XpuClosePrinterDisplay(pdp->pdpy, pdp->pcontext);
- }
- pdp->pdpy = NULL;
- pdp->pcontext = None;
- }
-
- updateWidgetStates(pdw);
-}
-
-static
-Bool openPrinterConnection(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- Log(("# openPrinterConnection\n"));
-
- /* Close any outstanding connection first... */
- closePrinterConnection(pdw, True);
-
- if (!pdp->printer_name) {
- Log(("# error: openPrinterConnection: No printer name.\n"));
- return False;
- }
-
- if (XpuGetPrinter(pdp->printer_name, &pdp->pdpy, &pdp->pcontext) == False) {
- Log(("openPrinterConnection: could not open printer.\n"));
- return False;
- }
-
- pdp->paperlist = XpuGetMediumSourceSizeList(pdp->pdpy, pdp->pcontext, &pdp->num_papers);
- pdp->resolutionlist = XpuGetResolutionList(pdp->pdpy, pdp->pcontext, &pdp->num_resolutions);
- pdp->orientationlist = XpuGetOrientationList(pdp->pdpy, pdp->pcontext, &pdp->num_orientations);
- pdp->plexlist = XpuGetPlexList(pdp->pdpy, pdp->pcontext, &pdp->num_plex);
- pdp->colorspacelist = XpuGetColorspaceList(pdp->pdpy, pdp->pcontext, &pdp->num_colorspaces);
-
- pdp->widget_paperlist = xppaperlist_to_widget_paperlist(pdp->paperlist, pdp->num_papers);
- pdp->widget_resolutionlist = xpresolutionlist_to_widget_resolutionlist(pdp->resolutionlist, pdp->num_resolutions);
- pdp->widget_orientationlist = xporientationlist_to_widget_orientationlist(pdp->orientationlist, pdp->num_orientations);
- pdp->widget_plexlist = xpplexlist_to_widget_plexlist(pdp->plexlist, pdp->num_plex);
- pdp->widget_colorspacelist = xpcolorspacelist_to_widget_colorspacelist(pdp->colorspacelist, pdp->num_colorspaces);
-
- updateWidgetStates(pdw);
-
- return True;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 120
-#undef DEFAULT_INFOLABEL_WIDTH
-#define DEFAULT_INFOLABEL_WIDTH 250
-
-static
-void destroyPrintSetupDialog(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- if (pdp->setup.popup) {
- XtDestroyWidget(pdp->setup.popup);
- }
-
- /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
- * all children so we only have to reset the pointers here... */
- pdp->setup.popup = NULL;
- pdp->setup.form = NULL;
- pdp->setup.paperlist = NULL;
- pdp->setup.resolutionlist = NULL;
- pdp->setup.orientationlist = NULL;
- pdp->setup.plexlist = NULL;
- pdp->setup.colorspacelist = NULL;
- pdp->setup.ok = NULL;
- pdp->setup.cancel = NULL;
-}
-
-static
-Widget buildPrintSetupDialog(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
- int n;
- Arg args[20];
- Widget listform;
- XpuSupportedFlags jobflags,
- docflags;
- Bool canChangeJobCopies,
- canChangePaperSize,
- canChangeResolution,
- canChangeOrientation,
- canChangePlex;
-
- if (!pdp->pdpy) {
- Log(("buildPrintSetupDialog: no printer connection, opening one....\n"));
- openPrinterConnection(pdw);
-
- if (!pdp->pdpy) {
- Log(("buildPrintSetupDialog: still no printer connection - BAD.\n"));
- do_beep(pdw);
- return NULL;
- }
- }
-
- /* Get flags which types of attributes can be modified */
- jobflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
- docflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
- canChangeJobCopies = (jobflags & XPUATTRIBUTESUPPORTED_COPY_COUNT) == XPUATTRIBUTESUPPORTED_COPY_COUNT;
- canChangePaperSize = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM) == XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM;
- canChangeResolution = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION) == XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION;
- canChangeOrientation = (docflags & XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION) == XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION;
- canChangePlex = (docflags & XPUATTRIBUTESUPPORTED_PLEX) == XPUATTRIBUTESUPPORTED_PLEX;
-
- n = 0;
- XtSetArg(args[n], XtNallowShellResize, True); n++;
- pdp->setup.popup = XtCreatePopupShell("setup", transientShellWidgetClass, (Widget)pdw, args, n);
-
- n = 0;
- pdp->setup.form = XtCreateManagedWidget("form", formWidgetClass, pdp->setup.popup, args, n);
-
- n = 0;
- listform = XtCreateManagedWidget("list", formWidgetClass, pdp->setup.form, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNsensitive, canChangePaperSize); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_paperlist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->setup.paperlist = XtCreateManagedWidget("paperlist", listWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNsensitive, canChangeResolution); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_resolutionlist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->setup.resolutionlist = XtCreateManagedWidget("resolutionlist", listWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNsensitive, canChangeOrientation); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_orientationlist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->setup.orientationlist = XtCreateManagedWidget("orientationlist", listWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNsensitive, canChangePlex); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_plexlist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->setup.plexlist = XtCreateManagedWidget("plexlist", listWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNsensitive, True); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_colorspacelist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->setup.colorspacelist = XtCreateManagedWidget("colorspacelist", listWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyRight); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- XtSetArg(args[n], XtNsensitive, canChangeJobCopies); n++;
- pdp->setup.jobcopieslabel = XtCreateManagedWidget("jobcopieslabel", labelWidgetClass, listform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNstring, "1"); n++;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNeditType, XawtextEdit); n++;
- XtSetArg(args[n], XtNsensitive, canChangeJobCopies); n++;
- pdp->setup.jobcopies = XtCreateManagedWidget("jobcopies", asciiTextWidgetClass, listform, args, n);
- XtAddCallback(pdp->setup.jobcopies, XtNpositionCallback, printSetupJobCopiesXtProc, pdw);
-
- n = 0;
- pdp->setup.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->setup.form, args, n);
- XtAddCallback(pdp->setup.ok, XtNcallback, printSetupOKXtProc, pdw);
-
- n = 0;
- pdp->setup.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->setup.form, args, n);
- XtAddCallback(pdp->setup.cancel, XtNcallback, printSetupCancelXtProc, pdw);
-
- XtRealizeWidget(pdp->setup.popup);
-
- return pdp->setup.popup;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 150
-
-static
-String *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_printers+1));
- if(!names)
- return NULL;
-
- for(i = 0 ; i < num_printers ; i++)
- names[i] = printerlist[i].name;
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static
-String *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_papers+1));
- if (!names)
- return NULL;
-
- for(i = 0 ; i < num_papers ; i++)
- names[i] = (char *)paperlist[i].medium_name; /* FixMe: tray selection missing */
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static
-String *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_resolutions+1));
- if (!names)
- return NULL;
-
- for(i = 0 ; i < num_resolutions ; i++)
- names[i] = (char *)reslist[i].name;
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static
-String *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_orientations+1));
- if (!names)
- return NULL;
-
- for(i = 0 ; i < num_orientations ; i++)
- names[i] = (char *)orientationlist[i].orientation;
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static
-String *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_plex+1));
- if(!names)
- return NULL;
-
- for(i = 0 ; i < num_plex ; i++)
- names[i] = (char *)plexlist[i].plex;
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static
-String *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces)
-{
- int i;
- String *names;
-
- names = malloc(sizeof(String *) * (num_colorspaces+1));
- if(!names)
- return NULL;
-
- for(i = 0 ; i < num_colorspaces ; i++)
- names[i] = (char *)colorspacelist[i].name;
-
- names[i] = NULL; /* Terminate the list */
-
- return names;
-}
-
-static void
-printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- XawListReturnStruct *lrs = (XawListReturnStruct *)callData;
- int list_index;
-
- Log(("## user selected a printer\n"));
-
- list_index = lrs->list_index;
- if (list_index == XAW_LIST_NONE) {
- Log(("printerSelectionPrinterSelectedXtProc: Nothing selected.\n"));
- return;
- }
-
- Log(("selected printer is '%d'/'%s'/'%s'\n",
- list_index, lrs->string, NULLSTR(pdp->printerlist[list_index].name)));
-
- /* Enable OK button */
- XtVaSetValues(pdp->selectPrinter.ok, XtNsensitive, True, NULL);
-}
-
-static void
-printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
-
- Log(("## select printer!\n"));
-
- if (!pdp->selectPrinter.popup) {
- if (!buildPrinterSelectionDialog(pdw)) {
- Log(("printSelectPrinterXtProc: buildPrinterSelectionDialog failure.\n"));
- return;
- }
- }
-
- center_popup((Widget)pdw, pdp->selectPrinter.popup);
-
- XtPopup(pdp->selectPrinter.popup, XtGrabExclusive);
-}
-
-static void
-printerSelectionClose(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- if (pdp->selectPrinter.popup) {
- XtPopdown(pdp->selectPrinter.popup);
- }
-}
-
-static void
-printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- PrintDialogPart *pdp = &pdw->printdialog;
- XawListReturnStruct *lrs;
- int list_index;
-
- Log(("## printerSelectionOKXtProc: closing printer selection!\n"));
-
- /* Copy current selection in printer list widget and open a printer connection */
- lrs = XawListShowCurrent(pdp->selectPrinter.list);
- if (!lrs) {
- Log(("printerSelectionOKXtProc: |lrs|==NULL\n"));
- return;
- }
-
- list_index = lrs->list_index;
- if (lrs->list_index == XAW_LIST_NONE) {
- Log(("printerSelectionOKXtProc: rs->list_index == XAW_LIST_NONE\n"));
- XtFree((char *)lrs);
- return;
- }
-
- /* Set printer name and description in main dialog */
- XtVaSetValues(pdp->main.name, XtNlabel, NULLSTR(pdp->printerlist[list_index].name), NULL);
- XtVaSetValues(pdp->main.desc, XtNlabel, NULLSTR(pdp->printerlist[list_index].desc), NULL);
-
- if (pdp->printer_name)
- free(pdp->printer_name);
- pdp->printer_name = strdup(lrs->string);
-
- /* Close any outstanding printer connection since user has selected
- * a different printer */
- closePrinterConnection(pdw, True);
-
- printerSelectionClose(pdw);
-
- XtFree((char *)lrs);
-}
-
-static void
-printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)client_data;
- Log(("## printerSelectionCancelXtProc: closing printer selection!\n"));
-
- printerSelectionClose(pdw);
-}
-
-static
-Bool buildPrinterSelectionDialog(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- int n;
- Arg args[20];
-
- n = 0;
- XtSetArg(args[n], XtNallowShellResize, True); n++;
- pdp->selectPrinter.popup = XtCreatePopupShell("printerselection", transientShellWidgetClass, (Widget)pdw, args, n);
-
- n = 0;
- pdp->selectPrinter.form = XtCreateManagedWidget("form", formWidgetClass, pdp->selectPrinter.popup, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNresizable, True); n++;
- XtSetArg(args[n], XtNforceColumns, True); n++;
- XtSetArg(args[n], XtNdefaultColumns, 1); n++;
- XtSetArg(args[n], XtNlist, pdp->widget_printerlist); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->selectPrinter.list = XtCreateManagedWidget("list", listWidgetClass, pdp->selectPrinter.form, args, n);
- XtAddCallback(pdp->selectPrinter.list, XtNcallback, printerSelectionPrinterSelectedXtProc, pdw);
-
- n = 0;
- XtSetArg(args[n], XtNsensitive, False); n++;
- pdp->selectPrinter.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->selectPrinter.form, args, n);
- XtAddCallback(pdp->selectPrinter.ok, XtNcallback, printerSelectionOKXtProc, pdw);
-
- n = 0;
- pdp->selectPrinter.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->selectPrinter.form, args, n);
- XtAddCallback(pdp->selectPrinter.cancel, XtNcallback, printerSelectionCancelXtProc, pdw);
-
- XtRealizeWidget(pdp->selectPrinter.popup);
-
- return True;
-}
-
-static
-void destroyPrinterSelectionDialog(PrintDialogWidget pdw)
-{
- PrintDialogPart *pdp = &pdw->printdialog;
-
- if (pdp->selectPrinter.popup) {
- XtDestroyWidget(pdp->selectPrinter.popup);
- }
-
- /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
- * all children so we only have to reset the pointers here... */
- pdp->selectPrinter.popup = NULL;
- pdp->selectPrinter.form = NULL;
- pdp->selectPrinter.list = NULL;
- pdp->selectPrinter.popup = NULL;
- pdp->selectPrinter.cancel = NULL;
-}
-
-/*
- * Function:
- * createprintdialogchildren
- *
- * Parameters:
- * w - print dialog widget
- *
- * Description:
- * Creates the print dialog widgets.
- *
- * Note
- * -
- */
-static void
-createprintdialogchildren(Widget w)
-{
- int n;
- Arg args[20];
- PrintDialogWidget pdw = (PrintDialogWidget)w;
- PrintDialogPart *pdp = &pdw->printdialog;
- const char *default_printername = NULL,
- *default_printerdesc = NULL;
- Bool has_default_printer = False;
-
- pdp->printerlist = XpuGetPrinterList(NULL, &pdp->num_printers);
- pdp->widget_printerlist = xpprinterlist_to_widget_printerlist(pdp->printerlist, pdp->num_printers);
-
- if (pdp->num_printers > 0) {
- if (pdp->printerlist[0].name && strlen(pdp->printerlist[0].name)) {
- /* XprintUtils moves the default printer to the top */
- default_printername = pdp->printerlist[0].name;
- default_printerdesc = pdp->printerlist[0].desc;
- pdp->printer_name = strdup(pdp->printerlist[0].name);
- has_default_printer = True;
- }
- }
- else
- {
- PrintMsg(("No Xprint servers could be found.\n"
- "Check whether the XPSERVERLIST environment variable contains any valid Xprint server(s).\n"));
- }
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- pdp->main.form = XtCreateManagedWidget("main", formWidgetClass, (Widget)pdw, args, n);
-
- n = 0;
- pdp->main.innerform = XtCreateManagedWidget("innerform", formWidgetClass, pdp->main.form, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyRight); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->main.desclabel = XtCreateManagedWidget("desclabel", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyLeft); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_INFOLABEL_WIDTH); n++;
- XtSetArg(args[n], XtNlabel, default_printerdesc?default_printerdesc:"-"); n++;
- pdp->main.desc = XtCreateManagedWidget("desc", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNsensitive, has_default_printer); n++;
- pdp->main.info = XtCreateManagedWidget("info", commandWidgetClass, pdp->main.innerform, args, n);
- /*
- XtAddCallback(pdp->main.info, XtNcallback, printerInfoXtProc, pdw);
- */
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyRight); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- pdp->main.namelabel = XtCreateManagedWidget("namelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyLeft); n++;
- XtSetArg(args[n], XtNlabel, default_printername?default_printername:"-"); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_INFOLABEL_WIDTH); n++;
- pdp->main.name = XtCreateManagedWidget("name", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- pdp->main.selectprinter = XtCreateManagedWidget("selectprinter", commandWidgetClass, pdp->main.innerform, args, n);
- XtAddCallback(pdp->main.selectprinter, XtNcallback, printSelectPrinterXtProc, pdw);
-
- /* Line: "File selection" */
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyRight); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_WIDTH); n++;
- XtSetArg(args[n], XtNsensitive, False); n++;
- pdp->main.filenamelabel = XtCreateManagedWidget("filenamelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNborderWidth, 0); n++;
- XtSetArg(args[n], XtNresizable, False); n++;
- XtSetArg(args[n], XtNjustify, XtJustifyLeft); n++;
- XtSetArg(args[n], XtNlabel, "-"); n++;
- XtSetArg(args[n], XtNwidth, DEFAULT_INFOLABEL_WIDTH); n++;
- XtSetArg(args[n], XtNsensitive, False); n++;
- pdp->main.filename = XtCreateManagedWidget("filename", labelWidgetClass, pdp->main.innerform, args, n);
-
- n = 0;
- XtSetArg(args[n], XtNsensitive, False); n++;
- pdp->main.selectfile = XtCreateManagedWidget("selectfile", commandWidgetClass, pdp->main.innerform, args, n);
- XtAddCallback(pdp->main.selectfile, XtNcallback, printSelectFileXtProc, pdw);
-
- /* Line: Misc (Print destination toggles, copy-count etc.)*/
- n = 0;
- XtSetArg(args[n], XtNstate, True); n++;
- pdp->main.printtoprinter = XtCreateManagedWidget("printtoprinter", toggleWidgetClass, pdp->main.innerform, args, n);
- XtAddCallback(pdp->main.printtoprinter, XtNcallback, printDialogDestXtProc, pdw);
-
- n = 0;
- XtSetArg(args[n], XtNstate, False); n++;
- pdp->main.printtofile = XtCreateManagedWidget("printtofile", toggleWidgetClass, pdp->main.innerform, args, n);
- XtAddCallback(pdp->main.printtofile, XtNcallback, printDialogDestXtProc, pdw);
-
- /* End-of-Inner-Form-Content */
-
- n = 0;
- XtSetArg(args[n], XtNsensitive, has_default_printer); n++;
- pdp->main.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->main.form, args, n);
- XtAddCallback(pdp->main.ok, XtNcallback, printOKXtProc, pdw);
-
- n = 0;
- XtSetArg(args[n], XtNsensitive, has_default_printer); n++;
- pdp->main.setup = XtCreateManagedWidget("setup", commandWidgetClass, pdp->main.form, args, n);
- XtAddCallback(pdp->main.setup, XtNcallback, printSetupXtProc, pdw);
-
- n = 0;
- pdp->main.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->main.form, args, n);
- XtAddCallback(pdp->main.cancel, XtNcallback, printCancelXtProc, pdw);
-}
-
-/*
- * Class Methods
- */
-static void XawPrintDialogConstraintInitialize(Widget, Widget, ArgList, Cardinal *);
-static void XawPrintDialogGetValuesHook(Widget, ArgList, Cardinal*);
-static void XawPrintDialogInitialize(Widget, Widget, ArgList, Cardinal*);
-static void XawPrintDialogDestroy(Widget);
-static Boolean XawPrintDialogSetValues(Widget, Widget, Widget, ArgList, Cardinal *);
-
-/*
- * Initialization
- */
-static XtResource resources[] = {
- {
- XtNicon,
- XtCIcon,
- XtRBitmap,
- sizeof(Pixmap),
- XtOffsetOf(PrintDialogRec, printdialog.icon),
- XtRImmediate,
- 0
- },
- {
- XawNOkCallback, XtCCallback, XtRCallback,
- sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.ok_callback),
- XtRImmediate, (XtPointer)NULL
- },
- {
- XawNCancelCallback, XtCCallback, XtRCallback,
- sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.cancel_callback),
- XtRImmediate, (XtPointer)NULL
- },
-};
-
-PrintDialogClassRec printdialogClassRec = {
- /* core */
- {
- (WidgetClass)&formClassRec, /* superclass */
- "PrintDialog", /* class_name */
- sizeof(PrintDialogRec), /* widget_size */
- XawInitializeWidgetSet, /* class_initialize */
- NULL, /* class_part init */
- False, /* class_inited */
- XawPrintDialogInitialize, /* initialize */
- NULL, /* initialize_hook */
- XtInheritRealize, /* realize */
- NULL, /* actions */
- 0, /* num_actions */
- resources, /* resources */
- XtNumber(resources), /* num_resources */
- NULLQUARK, /* xrm_class */
- True, /* compress_motion */
- True, /* compress_exposure */
- True, /* compress_enterleave */
- False, /* visible_interest */
- XawPrintDialogDestroy, /* destroy */
- XtInheritResize, /* resize */
- XtInheritExpose, /* expose */
- XawPrintDialogSetValues, /* set_values */
- NULL, /* set_values_hook */
- XtInheritSetValuesAlmost, /* set_values_almost */
- XawPrintDialogGetValuesHook, /* get_values_hook */
- NULL, /* accept_focus */
- XtVersion, /* version */
- NULL, /* callback_private */
- NULL, /* tm_table */
- XtInheritQueryGeometry, /* query_geometry */
- XtInheritDisplayAccelerator, /* display_accelerator */
- NULL, /* extension */
- },
- /* composite */
- {
- XtInheritGeometryManager, /* geometry_manager */
- XtInheritChangeManaged, /* change_managed */
- XtInheritInsertChild, /* insert_child */
- XtInheritDeleteChild, /* delete_child */
- NULL, /* extension */
- },
- /* constraint */
- {
- NULL, /* subresourses */
- 0, /* subresource_count */
- sizeof(PrintDialogConstraintsRec), /* constraint_size */
- XawPrintDialogConstraintInitialize, /* initialize */
- NULL, /* destroy */
- NULL, /* set_values */
- NULL, /* extension */
- },
- /* form */
- {
- XtInheritLayout, /* layout */
- },
- /* printdialog */
- {
- NULL, /* extension */
- }
-};
-
-WidgetClass printDialogWidgetClass = (WidgetClass)&printdialogClassRec;
-
-/*
- * Implementation
- */
-/*ARGSUSED*/
-static void
-XawPrintDialogInitialize(Widget request, Widget cnew, ArgList args, Cardinal *num_args)
-{
- PrintDialogWidget dw = (PrintDialogWidget)cnew;
- Arg arglist[9];
- Cardinal arg_cnt = 0;
-
- XtSetArg(arglist[arg_cnt], XtNborderWidth, 0); arg_cnt++;
- XtSetArg(arglist[arg_cnt], XtNleft, XtChainLeft); arg_cnt++;
-
- if (dw->printdialog.icon != (Pixmap)0) {
- XtSetArg(arglist[arg_cnt], XtNbitmap, dw->printdialog.icon); arg_cnt++;
- XtSetArg(arglist[arg_cnt], XtNright, XtChainLeft); arg_cnt++;
- dw->printdialog.iconW = XtCreateManagedWidget("icon", labelWidgetClass,
- cnew, arglist, arg_cnt);
- arg_cnt = 2;
- XtSetArg(arglist[arg_cnt], XtNfromHoriz, dw->printdialog.iconW); arg_cnt++;
- }
- else {
- dw->printdialog.iconW = NULL;
- }
-
- createprintdialogchildren((Widget)dw);
-}
-
-/*ARGSUSED*/
-static void
-XawPrintDialogConstraintInitialize(Widget request, Widget cnew,
- ArgList args, Cardinal *num_args)
-{
- PrintDialogWidget dw = (PrintDialogWidget)cnew->core.parent;
- PrintDialogConstraints constraint = (PrintDialogConstraints)cnew->core.constraints;
-
- if (!XtIsSubclass(cnew, commandWidgetClass)) /* if not a button */
- return; /* then just use defaults */
-
- constraint->form.left = constraint->form.right = XtChainLeft;
- constraint->form.vert_base = dw->printdialog.main.form;
-
- if (dw->composite.num_children > 1) {
- WidgetList children = dw->composite.children;
- Widget *childP;
-
- for (childP = children + dw->composite.num_children - 1;
- childP >= children; childP-- ) {
- if (*childP == dw->printdialog.main.form)
- break;
- if (XtIsManaged(*childP) &&
- XtIsSubclass(*childP, commandWidgetClass)) {
- constraint->form.horiz_base = *childP;
- break;
- }
- }
- }
-}
-
-#define ICON 0
-#define NUM_CHECKS 1
-/*ARGSUSED*/
-static Boolean
-XawPrintDialogSetValues(Widget current, Widget request, Widget cnew,
- ArgList in_args, Cardinal *in_num_args)
-{
- PrintDialogWidget w = (PrintDialogWidget)cnew;
- PrintDialogWidget old = (PrintDialogWidget)current;
- Arg args[5];
- unsigned int i;
- Bool checks[NUM_CHECKS];
-
- for (i = 0; i < NUM_CHECKS; i++)
- checks[i] = False;
-
- for (i = 0; i < *in_num_args; i++) {
- if (!strcmp(XtNicon, in_args[i].name))
- checks[ICON] = True;
- }
-
- if (checks[ICON]) {
- if (w->printdialog.icon != 0) {
- XtSetArg(args[0], XtNbitmap, w->printdialog.icon);
- if (old->printdialog.iconW != NULL) {
- XtSetValues(old->printdialog.iconW, args, 1);
- }
- else {
- XtSetArg(args[1], XtNborderWidth, 0);
- XtSetArg(args[2], XtNleft, XtChainLeft);
- XtSetArg(args[3], XtNright, XtChainLeft);
- w->printdialog.iconW = XtCreateWidget("icon", labelWidgetClass,
- cnew, args, 4);
- XtManageChild(w->printdialog.iconW);
- }
- }
- else if (old->printdialog.icon != 0) {
- XtDestroyWidget(old->printdialog.iconW);
- w->printdialog.iconW = NULL;
- }
- }
-
- return True;
-}
-
-/*
- * Function:
- * XawPrintDialogGetValuesHook
- *
- * Parameters:
- * w - Print Dialog Widget
- * args - argument list
- * num_args - number of args
- *
- * Description:
- * This is a get values hook routine that gets the values in the dialog.
- */
-static void
-XawPrintDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
-{
- /* NO-OP for now */
-}
-
-static void
-XawPrintDialogDestroy(Widget w)
-{
- PrintDialogWidget pdw = (PrintDialogWidget)w;
- Log(("# XawPrintDialogDestroy: start.\n"));
-
- destroyPrintSetupDialog(pdw);
- destroyPrinterSelectionDialog(pdw);
- closePrinterConnection(pdw, True);
-
- Log(("# XawPrintDialogDestroy: done.\n"));
-}
-
-/*
- * Function:
- * XawPrintDialogClosePrinterConnection
- *
- * Parameters:
- * w - Print Dialog Widget
- * closeDisplay - Boolean which decides whether |Display *|
- * and |XPContext| should be disposed, too.
- *
- * Description:
- * The print display connection is owned by the print dialog
- * by default.
- * If the application wishes to close the display connection
- * to the print server, either to close it itself or force
- * a disconnection for other reasons this function can be used.
- *
- * Notes
- * 1. PUBLIC API
- * 2. After this function returns all resources returned by the
- * print dialog which are related to the status of the printer
- * connection are stale.
- */
-void
-XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay)
-{
- closePrinterConnection((PrintDialogWidget)w, closeDisplay);
-}
-
diff --git a/app/xedit/printdialog.h b/app/xedit/printdialog.h
deleted file mode 100644
index f166a27a6..000000000
--- a/app/xedit/printdialog.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $Xorg: printdialog.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-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.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
- *
- */
-
-#ifndef XMORE_PRINTDIALOG_H
-#define XMORE_PRINTDIALOG_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Form.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-/* Resources:
- NOT WRITTEN YET
-*/
-
-#define XtCIcon "Icon"
-#define XtNicon "icon"
-
-#define XawNOkCallback "okCallback"
-#define XawNCancelCallback "cancelCallback"
-
-typedef struct
-{
- Display *pdpy;
- XPContext pcontext;
- const char *printToFileName;
- Boolean printToFile;
- XpuColorspaceRec *colorspace;
-} XawPrintDialogCallbackStruct;
-
-typedef struct _PrintDialogClassRec *PrintDialogWidgetClass;
-typedef struct _PrintDialogRec *PrintDialogWidget;
-
-extern WidgetClass printDialogWidgetClass;
-
-_XFUNCPROTOBEGIN
-
-/* Prototypes */
-void XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay);
-
-_XFUNCPROTOEND
-
-#endif /* !XMORE_PRINTDIALOG_H */
diff --git a/app/xedit/printdialogprivates.h b/app/xedit/printdialogprivates.h
deleted file mode 100644
index 1e66eb85b..000000000
--- a/app/xedit/printdialogprivates.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * $Xorg: printdialogprivates.h,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-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.
-
-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
-OPEN GROUP 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 Open Group 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 Open Group.
- *
- */
-
-#ifndef _XawPrintDialogP_h
-#define _XawPrintDialogP_h 1
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xos.h>
-#include <X11/Xmu/Misc.h>
-#include <X11/CoreP.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/DialogP.h>
-#include <X11/Xaw/XawInit.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/FormP.h>
-
-/* From Xaw/Privates.h */
-#ifndef XtWidth
-#define XtWidth(w) (((RectObj)w)->rectangle.width)
-#endif
-#ifndef XtHeight
-#define XtHeight(w) (((RectObj)w)->rectangle.height)
-#endif
-
-
-typedef struct {
- XtPointer extension;
-} PrintDialogClassPart;
-
-typedef struct _PrintDialogClassRec {
- CoreClassPart core_class;
- CompositeClassPart composite_class;
- ConstraintClassPart constraint_class;
- FormClassPart form_class;
- PrintDialogClassPart print_dialog_class;
-} PrintDialogClassRec;
-
-extern PrintDialogClassRec printDialogClassRec;
-
-typedef struct _PrintDialogPart {
- /* resources */
- String label; /* description of the dialog */
- String value; /* for the user response */
- Pixmap icon; /* icon bitmap */
- XtCallbackList ok_callback,
- cancel_callback;
-
- /* private */
- Widget iconW; /* widget to display the icon */
-
- struct
- {
- Widget form,
- innerform,
- desclabel,
- desc,
- info,
- namelabel,
- name,
- selectprinter,
- filenamelabel,
- filename,
- selectfile,
- printtoprinter,
- printtofile,
- ok,
- setup,
- cancel;
- } main;
-
- Bool printToFile;
- char *filename;
- Bool canPrint, /* can we print ? */
- canReallyPrint; /* is it really save to print ? */
- XpuColorspaceRec *selected_colorspace;
-
- struct
- {
- Widget popup,
- form,
- list,
- ok,
- cancel;
- } selectPrinter;
-
- struct
- {
- Widget popup,
- form,
- paperlist,
- resolutionlist,
- orientationlist,
- plexlist,
- colorspacelist,
- jobcopieslabel,
- jobcopies,
- ok,
- cancel;
- } setup;
-
- struct
- {
- Widget dialog,
- shell;
- } selectFile;
-
- XPPrinterList printerlist;
- int num_printers;
- String *widget_printerlist;
-
- String printer_name;
- Display *pdpy;
- XPContext pcontext;
-
- XpuMediumSourceSizeList paperlist;
- int num_papers;
- String *widget_paperlist;
-
- XpuResolutionList resolutionlist;
- int num_resolutions;
- String *widget_resolutionlist;
-
- XpuOrientationList orientationlist;
- int num_orientations;
- String *widget_orientationlist;
-
- XpuPlexList plexlist;
- int num_plex;
- String *widget_plexlist;
-
- XpuColorspaceList colorspacelist;
- int num_colorspaces;
- String *widget_colorspacelist;
-} PrintDialogPart;
-
-typedef struct _PrintDialogRec {
- CorePart core;
- CompositePart composite;
- ConstraintPart constraint;
- FormPart form;
- PrintDialogPart printdialog;
-} PrintDialogRec;
-
-typedef struct {
- XtPointer extension;
-} PrintDialogConstraintsPart;
-
-typedef struct _PrintDialogConstraintsRec {
- FormConstraintsPart form;
- PrintDialogConstraintsPart printdialog;
-} PrintDialogConstraintsRec, *PrintDialogConstraints;
-
-#endif /* !_XawPrintDialogP_h */
-
diff --git a/app/xedit/tags.c b/app/xedit/tags.c
index b8f397092..0c9e65b17 100644
--- a/app/xedit/tags.c
+++ b/app/xedit/tags.c
@@ -116,7 +116,7 @@ TagsAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
char buffer[1024];
XawTextPosition position, left, right;
XawTextBlock block;
- int length;
+ int length, bytes;
Widget source;
source = XawTextGetSource(w);
@@ -128,14 +128,20 @@ TagsAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
position = XawTextGetInsertionPoint(w);
XawTextGetSelectionPos(w, &left, &right);
if (right > left) {
- XawTextSourceRead(source, left, &block, right - left);
- length = block.length + 1;
- if (length >= sizeof(buffer))
- length = sizeof(buffer);
- XmuSnprintf(buffer, length, "%s", block.ptr);
+ length = 0;
+ do {
+ bytes = right - left;
+ left = XawTextSourceRead(source, left, &block, bytes);
+ if (block.length < bytes)
+ bytes = block.length;
+ if (length + bytes + 1 >= sizeof(buffer))
+ bytes = sizeof(buffer) - length - 1;
+ XmuSnprintf(buffer + length, bytes + 1, "%s", block.ptr);
+ length += bytes;
+ } while (left < right);
item->tags->textwindow = w;
item->tags->position = position;
- FindTagFirst(item->tags, buffer, length - 1);
+ FindTagFirst(item->tags, buffer, length);
}
else
FindTagNext(item->tags, w, position);
diff --git a/app/xedit/xedit.c b/app/xedit/xedit.c
index 0b49226b6..f7a8b68c1 100644
--- a/app/xedit/xedit.c
+++ b/app/xedit/xedit.c
@@ -40,9 +40,6 @@ static XtActionsRec actions[] = {
{"quit", QuitAction},
{"save-file", SaveFile},
{"load-file", LoadFile},
-#ifdef INCLUDE_XPRINT_SUPPORT
-{"print-file", PrintFile},
-#endif /* INCLUDE_XPRINT_SUPPORT */
{"find-file", FindFile},
{"cancel-find-file", CancelFindFile},
{"file-completion", FileCompletion},
@@ -118,13 +115,6 @@ static XtResource resources[] = {
#undef Offset
-#ifdef INCLUDE_XPRINT_SUPPORT
-String fallback_resources[] = {
- "*international: True", /* set this globally for ALL widgets to avoid wiered crashes */
- NULL
-};
-#endif
-
int
main(int argc, char *argv[])
{
@@ -133,19 +123,16 @@ main(int argc, char *argv[])
FileAccess file_access;
Widget source;
XtAppContext appcon;
- unsigned int i, num_loaded, lineno;
+ Boolean show_dir;
+ xedit_flist_item *first_item;
+ unsigned int i, lineno;
- num_loaded = lineno = 0;
+ lineno = 0;
+ show_dir = FALSE;
+ first_item = NULL;
-#ifdef INCLUDE_XPRINT_SUPPORT
- XtSetLanguageProc(NULL, NULL, NULL);
-#endif
topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv,
-#ifdef INCLUDE_XPRINT_SUPPORT
- fallback_resources,
-#else
NULL,
-#endif
NULL, 0);
XtAppAddActions(appcon, actions, XtNumber(actions));
@@ -205,7 +192,7 @@ main(int argc, char *argv[])
char *endptr;
lineno = strtol(argv[i], &endptr, 10);
- /* Don't warn or anything about incorrect input? */
+ /* Don't warn about incorrect input? */
if (*endptr)
lineno = 0;
continue;
@@ -218,7 +205,7 @@ main(int argc, char *argv[])
num_args = 0;
if (stat(filename, &st) == 0 && !S_ISREG(st.st_mode)) {
if (S_ISDIR(st.st_mode)) {
- if (!num_loaded) {
+ if (!first_item) {
char path[BUFSIZ + 1];
strncpy(path, filename, sizeof(path) - 2);
@@ -233,7 +220,7 @@ main(int argc, char *argv[])
XtSetValues(dirlabel, args, 1);
SwitchDirWindow(True);
DirWindowCB(dirwindow, path, NULL);
- ++num_loaded;
+ show_dir = True;
}
continue;
}
@@ -283,9 +270,8 @@ main(int argc, char *argv[])
item->mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
item->mtime = st.st_mtime;
}
- if (!num_loaded)
- SwitchTextSource(item);
- ++num_loaded;
+ if (!first_item && !show_dir)
+ first_item = item;
ResetSourceChanged(item);
}
}
@@ -302,11 +288,12 @@ main(int argc, char *argv[])
XtConvertAndStore(flist.popup, XtRString, &from, XtRBitmap, &to);
}
- if (num_loaded == 0) {
+ if (first_item == NULL) {
XtSetKeyboardFocus(topwindow, filenamewindow);
XtVaSetValues(textwindow, XtNwrap, XawtextWrapLine, NULL);
}
else {
+ SwitchTextSource(first_item);
XtSetKeyboardFocus(topwindow, textwindow);
if (lineno) {
XawTextPosition position;
@@ -341,9 +328,6 @@ makeButtonsAndBoxes(Widget parent)
MakeCommandButton(b_row, "quit", DoQuit);
MakeCommandButton(b_row, "save", DoSave);
MakeCommandButton(b_row, "load", DoLoad);
-#ifdef INCLUDE_XPRINT_SUPPORT
- MakeCommandButton(b_row, "print", DoPrint);
-#endif /* INCLUDE_XPRINT_SUPPORT */
filenamewindow = MakeStringBox(b_row, "filename", NULL);
}
hintswindow = XtCreateManagedWidget("bc_label", labelWidgetClass,
@@ -389,14 +373,10 @@ makeButtonsAndBoxes(Widget parent)
textwindow = XtCreateManagedWidget(editWindow, asciiTextWidgetClass,
vpanes[0], arglist, num_args);
-#ifdef INCLUDE_XPRINT_SUPPORT
- international = True;
-#else
/* Get international resource value form the textwindow */
num_args = 0;
XtSetArg(arglist[num_args], XtNinternational, &international); ++num_args;
XtGetValues(textwindow, arglist, num_args);
-#endif
num_args = 0;
XtSetArg(arglist[num_args], XtNtype, XawAsciiFile); ++num_args;
diff --git a/app/xedit/xedit.h b/app/xedit/xedit.h
index 0abda4c86..4a9a468e0 100644
--- a/app/xedit/xedit.h
+++ b/app/xedit/xedit.h
@@ -143,16 +143,10 @@ void QuitAction(Widget, XEvent*, String*, Cardinal*);
void DoSave(Widget, XtPointer, XtPointer);
void SaveFile(Widget, XEvent*, String*, Cardinal*);
void DoLoad(Widget, XtPointer, XtPointer);
-#ifdef INCLUDE_XPRINT_SUPPORT
-void DoPrint(Widget, XtPointer, XtPointer);
-#endif /* INCLUDE_XPRINT_SUPPORT */
void CancelFindFile(Widget, XEvent*, String*, Cardinal*);
void FindFile(Widget, XEvent*, String*, Cardinal*);
void LoadFile(Widget, XEvent*, String*, Cardinal*);
Bool LoadFileInTextwindow(char *name, char *resolved_name);
-#ifdef INCLUDE_XPRINT_SUPPORT
-void PrintFile(Widget, XEvent*, String*, Cardinal*);
-#endif /* INCLUDE_XPRINT_SUPPORT */
void FileCompletion(Widget, XEvent*, String*, Cardinal*);
void KillFile(Widget, XEvent*, String*, Cardinal*);
void DirWindowCB(Widget, XtPointer, XtPointer);
diff --git a/app/xedit/xedit.man b/app/xedit/xedit.man
index 3491bd129..58abe5c90 100644
--- a/app/xedit/xedit.man
+++ b/app/xedit/xedit.man
@@ -299,7 +299,7 @@ the file being edited is changed.
.B autoReplace (\fPClass \fBReplace)
This resource is useful to automatically correct common misspelling errors, but
can also be used to create simple macros. The format is
-\fI{non-blanks}{blanks}[{string}]\fP. Fields are separeted by newlines.
+\fI{non-blanks}{blanks}[{string}]\fP. Fields are separated by newlines.
Example of use:
\"
.br
@@ -316,7 +316,7 @@ by \fIsome long string with
when you type that words.
.TP 8
.B ispell.dictionaries (\fPClass \fBispell.Dictionary)
-Specifies a list of dictionary names, separeted by spaces, available to the
+Specifies a list of dictionary names, separated by spaces, available to the
ispell program. The default value is \fI"american americamed+ english"\fP.
.TP 8
.B ispell.dictionary (\fPClass \fBispell.Dictionary)