Update to xedit 1.2.2
This commit is contained in:
parent
882509e84e
commit
99a72825ec
@ -1,3 +1,108 @@
|
||||
commit 436a71e7390c51134f4fac629bf8d4a98b0592c5
|
||||
Author: Matt Turner <mattst88@gmail.com>
|
||||
Date: Sat Feb 21 13:43:04 2015 -0800
|
||||
|
||||
xedit 1.2.2
|
||||
|
||||
commit b8a142f798be57cd7f0d41b502f6960a9ffbae19
|
||||
Author: Ted Tanberry <ted.tanberry@gmail.com>
|
||||
Date: Sun Aug 10 22:25:08 2014 +0200
|
||||
|
||||
Include AM_PROG_AR to detect 'ar' instead of hard-coding it
|
||||
|
||||
see Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=486470
|
||||
|
||||
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 46a906557fcf321592d543d818bc8054aad0ee89
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Sep 9 20:32:53 2014 -0700
|
||||
|
||||
Use automake subdir-objects option
|
||||
|
||||
Stops automake from issuing a ton of warnings about how this will be the
|
||||
default soon.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 4c63319d249cb796b735ec56904c088c56a5171f
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Sep 9 20:26:15 2014 -0700
|
||||
|
||||
Check for pagesize options via autoconf instead of per-platform #ifdefs
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 9f0f4a2c5495eec2d81a4381fb962fad93b2ddde
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Sep 9 20:05:27 2014 -0700
|
||||
|
||||
Copious const cleanup
|
||||
|
||||
Removes 1554 gcc warnings of "discards ‘const’ qualifier"
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 40615f52b8fe7478599ce4948ccc751aa0a34397
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Tue Sep 9 19:23:59 2014 -0700
|
||||
|
||||
Require OS to provide rename(2), as all POSIX.1-1990 & later OS'es do
|
||||
|
||||
Sorry SVR1-SVR3.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 28fa5649850622482d068b56ff46a023bc14c264
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat May 31 21:39:32 2014 -0700
|
||||
|
||||
autogen.sh: Honor NOCONFIGURE=1
|
||||
|
||||
See http://people.gnome.org/~walters/docs/build-api.txt
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 79ade2eda265d40c1485c3578e3b8e65e37daeae
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat May 31 21:38:41 2014 -0700
|
||||
|
||||
configure: Drop AM_MAINTAINER_MODE
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b79cac135ca7b788892ff199231be2bfce62a4a3
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat May 3 00:21:27 2014 -0700
|
||||
|
||||
Fix man page tbl markup
|
||||
|
||||
'\" t is needed to work with Solaris man/nroff commands
|
||||
Other changes fix issues found on all platforms
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 24b3001f0d857fa40225efc1db169b29e88b4b4d
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Tue Dec 17 11:28:21 2013 -0500
|
||||
|
||||
Remove obsolete Imake SIGNALRETURNSINT
|
||||
|
||||
Assume signal handlers return void, as C89 requires
|
||||
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit 505fc48999ca2c7040a47900697d95c6ab78d009
|
||||
Author: Stéphane Aulery <lkppo@free.fr>
|
||||
Date: Sat Jul 6 15:40:00 2013 +0200
|
||||
|
||||
Drop CRAY support
|
||||
|
||||
Signed-off-by: Stéphane Aulery <lkppo@free.fr>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit bde5fc6b3c493365139eb4451cd1829bf48f7ac2
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sat Jan 12 17:01:02 2013 -0800
|
||||
|
@ -1,11 +1,13 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
@ -13,7 +15,11 @@ 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.
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
@ -42,7 +48,7 @@ may remove or edit it.
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
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.
|
||||
@ -53,12 +59,22 @@ The simplest way to compile this package is:
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
@ -67,8 +83,15 @@ The simplest way to compile this package is:
|
||||
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.
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
@ -93,7 +116,8 @@ 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 `..'.
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
@ -120,7 +144,8 @@ 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'.
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
@ -131,15 +156,46 @@ 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.
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
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
|
||||
@ -152,6 +208,13 @@ find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
@ -159,10 +222,15 @@ Particular systems
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae"
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
@ -174,6 +242,16 @@ and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
@ -189,7 +267,8 @@ type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
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
|
||||
@ -277,7 +356,7 @@ operates.
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *Note Installation Names::
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
312
app/xedit/aclocal.m4
vendored
312
app/xedit/aclocal.m4
vendored
@ -1,4 +1,4 @@
|
||||
# generated automatically by aclocal 1.12.5 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.12.6 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
|
||||
@ -20,6 +20,7 @@ If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
@ -46,8 +47,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
@ -60,7 +65,6 @@ if test -n "$PKG_CONFIG"; then
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
@ -69,34 +73,32 @@ fi[]dnl
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
else
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
@ -138,16 +140,17 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
@ -155,28 +158,67 @@ $$1_PKG_ERRORS
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[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.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
|
||||
[$4])
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
|
||||
# PKG_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable pkgconfigdir as the location where a module
|
||||
# should install pkg-config .pc files. By default the directory is
|
||||
# $libdir/pkgconfig, but the default can be changed by passing
|
||||
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
# parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
# module should install arch-independent pkg-config .pc files. By
|
||||
# default the directory is $datadir/pkgconfig, but the default can be
|
||||
# changed by passing DIRECTORY. The user can override through the
|
||||
# --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
@ -192,7 +234,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.12'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.12.5], [],
|
||||
m4_if([$1], [1.12.6], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
@ -208,11 +250,70 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.12.5])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.12.6])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_AR([ACT-IF-FAIL])
|
||||
# -------------------------
|
||||
# Try to determine the archiver interface, and trigger the ar-lib wrapper
|
||||
# if it is needed. If the detection of archiver interface fails, run
|
||||
# ACT-IF-FAIL (default is to abort configure with a proper error message).
|
||||
AC_DEFUN([AM_PROG_AR],
|
||||
[AC_BEFORE([$0], [LT_INIT])dnl
|
||||
AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
|
||||
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([ar-lib])dnl
|
||||
AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
|
||||
: ${AR=ar}
|
||||
|
||||
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
|
||||
[am_cv_ar_interface=ar
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
|
||||
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
||||
AC_TRY_EVAL([am_ar_try])
|
||||
if test "$ac_status" -eq 0; then
|
||||
am_cv_ar_interface=ar
|
||||
else
|
||||
am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
||||
AC_TRY_EVAL([am_ar_try])
|
||||
if test "$ac_status" -eq 0; then
|
||||
am_cv_ar_interface=lib
|
||||
else
|
||||
am_cv_ar_interface=unknown
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.lib libconftest.a
|
||||
])
|
||||
])
|
||||
|
||||
case $am_cv_ar_interface in
|
||||
ar)
|
||||
;;
|
||||
lib)
|
||||
# Microsoft lib, so override with the ar-lib wrapper script.
|
||||
# FIXME: It is wrong to rewrite AR.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__AR in this case,
|
||||
# and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
|
||||
# similar.
|
||||
AR="$am_aux_dir/ar-lib $AR"
|
||||
;;
|
||||
unknown)
|
||||
m4_default([$1],
|
||||
[AC_MSG_ERROR([could not determine $AR interface])])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([AR])dnl
|
||||
])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
@ -757,44 +858,6 @@ fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
@ -845,38 +908,6 @@ AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_CC_C_O
|
||||
# --------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake.
|
||||
AC_DEFUN([AM_PROG_CC_C_O],
|
||||
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||
# FIXME: we rely on the cache variable name because
|
||||
# there is no other way.
|
||||
set dummy $CC
|
||||
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
||||
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
|
||||
if test "$am_t" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
dnl Make sure AC_PROG_CC is never called again, or it will override our
|
||||
dnl setting of CC.
|
||||
m4_define([AC_PROG_CC],
|
||||
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
||||
@ -1233,7 +1264,7 @@ AC_SUBST([am__untar])
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
dnl
|
||||
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"),
|
||||
dnl to deal in the Software without restriction, including without limitation
|
||||
@ -1266,10 +1297,10 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# 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.17])
|
||||
m4_define([vers_have], [1.19.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,,
|
||||
@ -1289,7 +1320,7 @@ m4_undefine([maj_needed])
|
||||
# such as man pages and config files
|
||||
AC_DEFUN([XORG_PROG_RAWCPP],[
|
||||
AC_REQUIRE([AC_PROG_CPP])
|
||||
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
|
||||
|
||||
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
||||
@ -1319,6 +1350,7 @@ if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
TRADITIONALCPPFLAGS="-traditional"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
@ -1327,6 +1359,7 @@ else
|
||||
fi
|
||||
rm -f conftest.$ac_ext
|
||||
AC_SUBST(RAWCPPFLAGS)
|
||||
AC_SUBST(TRADITIONALCPPFLAGS)
|
||||
]) # XORG_PROG_RAWCPP
|
||||
|
||||
# XORG_MANPAGE_SECTIONS()
|
||||
@ -1851,9 +1884,10 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
]) # XORG_WITH_ASCIIDOC
|
||||
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
||||
# --------------------------------
|
||||
# -------------------------------------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
# Minimum version for optional DOT checking: 1.18.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
|
||||
@ -1873,6 +1907,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||
AC_ARG_VAR([DOT], [Path to the dot graphics utility])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(doxygen,
|
||||
AS_HELP_STRING([--with-doxygen],
|
||||
@ -1916,6 +1951,20 @@ m4_ifval([$1],
|
||||
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
|
||||
dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
|
||||
dnl HAVE_DOT = @HAVE_DOT@
|
||||
HAVE_DOT=no
|
||||
if test "x$have_doxygen" = "xyes"; then
|
||||
AC_PATH_PROG([DOT], [dot])
|
||||
if test "x$DOT" != "x"; then
|
||||
HAVE_DOT=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([HAVE_DOT])
|
||||
AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
]) # XORG_WITH_DOXYGEN
|
||||
|
||||
@ -2098,6 +2147,29 @@ fi])
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
# XORG_WITH_M4([MIN-VERSION])
|
||||
# ---------------------------
|
||||
# Minimum version: 1.19.0
|
||||
#
|
||||
# This macro attempts to locate an m4 macro processor which supports
|
||||
# -I option and is only useful for modules relying on M4 in order to
|
||||
# expand macros in source code files.
|
||||
#
|
||||
# Interface to module:
|
||||
# M4: returns the path of the m4 program found
|
||||
# returns the path set by the user in the environment
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_M4], [
|
||||
AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
|
||||
[AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
|
||||
[[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
|
||||
ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
|
||||
[AC_MSG_ERROR([could not find m4 that supports -I option])],
|
||||
[$PATH:/usr/gnu/bin])])
|
||||
|
||||
AC_SUBST([M4], [$ac_cv_path_M4])
|
||||
]) # XORG_WITH_M4
|
||||
|
||||
# XORG_WITH_PS2PDF([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
@ -2552,7 +2624,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
|
||||
|
||||
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
],[
|
||||
char *m0, *r0, *c0, *p;
|
||||
@ -2562,9 +2635,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
c0 = calloc(0,10);
|
||||
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
|
||||
])],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
||||
[MALLOC_ZERO_RETURNS_NULL=no],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes])
|
||||
[xorg_cv_malloc0_returns_null=yes],
|
||||
[xorg_cv_malloc0_returns_null=no])])
|
||||
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
|
||||
fi
|
||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||
|
||||
@ -2775,18 +2848,18 @@ fi
|
||||
found="no"
|
||||
m4_foreach([flag], m4_cdr($@), [
|
||||
if test $found = "no" ; then
|
||||
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
fi
|
||||
|
||||
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||
fi
|
||||
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
|
||||
|
||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
|
||||
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
|
||||
AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
|
||||
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
|
||||
AC_CACHE_VAL($cacheid,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
|
||||
@ -2853,7 +2926,7 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
||||
]
|
||||
)
|
||||
@ -2862,16 +2935,17 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
|
||||
# These are currently disabled because they are noisy. They will be enabled
|
||||
# in the future once the codebase is sufficiently modernized to silence
|
||||
# them. For now, I don't want them to drown out the other warnings.
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
|
||||
# Turn some warnings into errors, so we don't accidently get successful builds
|
||||
# when there are problems that should be fixed.
|
||||
@ -3045,7 +3119,7 @@ dnl
|
||||
# XORG_RELEASE_VERSION
|
||||
# --------------------
|
||||
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
||||
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
|
270
app/xedit/ar-lib
Normal file
270
app/xedit/ar-lib
Normal file
@ -0,0 +1,270 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
|
||||
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
@ -29,9 +29,6 @@
|
||||
#include <X11/Xfuncs.h>
|
||||
#include <X11/Xos.h>
|
||||
#include "xedit.h"
|
||||
#ifdef CRAY
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
@ -161,20 +158,6 @@ makeBackupName(String buf, String filename, unsigned len)
|
||||
|
||||
return (strcmp(filename, buf) ? buf : NULL);
|
||||
}
|
||||
|
||||
#if defined(USG) && !defined(CRAY)
|
||||
int rename (from, to)
|
||||
char *from, *to;
|
||||
{
|
||||
(void) unlink (to);
|
||||
if (link (from, to) == 0) {
|
||||
unlink (from);
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
@ -204,7 +187,7 @@ DoSave(Widget w, XtPointer client_data, XtPointer call_data)
|
||||
Widget source = XawTextGetSource(textwindow);
|
||||
char buffer[BUFSIZ];
|
||||
struct stat st;
|
||||
static char *nothing_saved = " -- nothing saved.\n";
|
||||
static const char *nothing_saved = " -- nothing saved.\n";
|
||||
|
||||
if (!filename) {
|
||||
XmuSnprintf(buffer, sizeof(buffer), "%s%s",
|
||||
|
@ -1,347 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
@ -1,5 +1,12 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the declaration of `_SC_PAGESIZE', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL__SC_PAGESIZE
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@ -27,9 +34,6 @@
|
||||
/* 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
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
8
app/xedit/config.sub
vendored
8
app/xedit/config.sub
vendored
@ -4,7 +4,7 @@
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-10-10'
|
||||
timestamp='2012-12-06'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@ -1026,7 +1026,11 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
1129
app/xedit/configure
vendored
1129
app/xedit/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -22,10 +22,9 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([xedit], [1.2.1],
|
||||
AC_INIT([xedit], [1.2.2],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xedit])
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
|
||||
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
@ -35,7 +34,7 @@ XORG_DEFAULT_OPTIONS
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
AC_PROG_RANLIB
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
@ -48,6 +47,9 @@ AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir=PATH],
|
||||
LISPDIR=$lispdir
|
||||
AC_SUBST(LISPDIR)
|
||||
|
||||
AC_CHECK_DECLS([_SC_PAGESIZE])
|
||||
AC_CHECK_FUNCS([getpagesize])
|
||||
|
||||
AC_CHECK_FUNC(realpath, [], [have_realpath=yes])
|
||||
AM_CONDITIONAL(NEED_REALPATH, test x$have_realpath = xyes)
|
||||
AC_CHECK_FUNC(strcasecmp, [], [have_strcasecmp=yes])
|
||||
|
@ -53,7 +53,6 @@
|
||||
* Prototypes
|
||||
*/
|
||||
static int hash_equal(hash_table *hash, hash_key *left, hash_key *right);
|
||||
static unsigned int hash_data(char *value, unsigned int length);
|
||||
static unsigned int hash_value(hash_key *key);
|
||||
|
||||
|
||||
@ -75,9 +74,9 @@ hash_equal(hash_table *hash, hash_key *left, hash_key *right)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
hash_data(char *value, unsigned int length)
|
||||
hash_data(const char *value, unsigned int length)
|
||||
{
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
unsigned int i, key;
|
||||
|
||||
for (i = key = 0, ptr = value; i < length; i++)
|
||||
@ -181,7 +180,7 @@ hash_get(hash_table *hash, hash_key *name)
|
||||
}
|
||||
|
||||
hash_entry *
|
||||
hash_check(hash_table *hash, char *name, unsigned int length)
|
||||
hash_check(hash_table *hash, const char *name, unsigned int length)
|
||||
{
|
||||
unsigned int key;
|
||||
hash_entry *entry;
|
||||
|
@ -1142,59 +1142,60 @@ print:
|
||||
|
||||
fail:
|
||||
if (etype != T_NONE) {
|
||||
const char *errptr;
|
||||
switch (etype) {
|
||||
case T_OPTION:
|
||||
ptr = "Option needs a command";
|
||||
errptr = "Option needs a command";
|
||||
break;
|
||||
case T_ICASE:
|
||||
ptr = "Icase needs an command defined or none for search";
|
||||
errptr = "Icase needs an command defined or none for search";
|
||||
break;
|
||||
case T_COMMAND:
|
||||
ptr = "Command incorrectly specified";
|
||||
errptr = "Command incorrectly specified";
|
||||
break;
|
||||
case T_REPLACE:
|
||||
ptr = "Can only search backwards";
|
||||
errptr = "Can only search backwards";
|
||||
break;
|
||||
case T_SEARCH:
|
||||
ptr = "Badly placed search/replace specifier";
|
||||
errptr = "Badly placed search/replace specifier";
|
||||
break;
|
||||
case T_BACKSLASH:
|
||||
ptr = "A single backslash cannot be the last command character";
|
||||
errptr = "A single backslash cannot be the last command character";
|
||||
break;
|
||||
case T_DIRECTION:
|
||||
ptr = "Regular expression must be separeted by / or ? not both";
|
||||
errptr = "Regular expression must be separeted by / or ? not both";
|
||||
break;
|
||||
case T_COMMA:
|
||||
ptr = "Badly placed comma";
|
||||
errptr = "Badly placed comma";
|
||||
break;
|
||||
case T_OFFSET:
|
||||
ptr = "Badly placed line offset specifier";
|
||||
errptr = "Badly placed line offset specifier";
|
||||
break;
|
||||
case T_INCREMENT:
|
||||
ptr = "Badly placed line offset increment specifier";
|
||||
errptr = "Badly placed line offset increment specifier";
|
||||
break;
|
||||
case T_NUMBER:
|
||||
ptr = "Numeric argument not expected";
|
||||
errptr = "Numeric argument not expected";
|
||||
break;
|
||||
case T_UNFINISHED:
|
||||
ptr = "Unfinished command";
|
||||
errptr = "Unfinished command";
|
||||
break;
|
||||
case T_RANGE:
|
||||
ptr = "Bad line range";
|
||||
errptr = "Bad line range";
|
||||
break;
|
||||
case T_BACKREF:
|
||||
/* This may be an internal re error, but most likely the
|
||||
* user asked for something like "s/re0(re1)re2/\2/" */
|
||||
ptr = "Bad backreference";
|
||||
errptr = "Bad backreference";
|
||||
break;
|
||||
case T_EDIT:
|
||||
ptr = "Failed to replace text";
|
||||
errptr = "Failed to replace text";
|
||||
break;
|
||||
default:
|
||||
ptr = "Unknown error";
|
||||
errptr = "Unknown error";
|
||||
break;
|
||||
}
|
||||
XeditPrintf("Error: %s.\n", ptr);
|
||||
XeditPrintf("Error: %s.\n", errptr);
|
||||
}
|
||||
if (redisplay)
|
||||
XawTextEnableRedisplay(w);
|
||||
|
@ -181,13 +181,8 @@ static void ReplaceIspell(Widget, XtPointer, XtPointer);
|
||||
static void RevertIspell(Widget, XtPointer, XtPointer);
|
||||
static void SelectIspell(Widget, XtPointer, XtPointer);
|
||||
static void ToggleTerseIspell(Widget, XtPointer, XtPointer);
|
||||
#ifndef SIGNALRETURNSINT
|
||||
static void timeout_signal(int);
|
||||
static void (*old_timeout)(int);
|
||||
#else
|
||||
static int timeout_signal(int);
|
||||
static int (*old_timeout)(int);
|
||||
#endif
|
||||
static void UndoIspell(Widget, XtPointer, XtPointer);
|
||||
|
||||
Bool _XawTextSrcUndo(TextSrcObject, XawTextPosition*);
|
||||
@ -312,7 +307,6 @@ IsUpper(int ch)
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
#ifndef SIGNALRETURNSINT
|
||||
static void
|
||||
timeout_signal(int unused)
|
||||
{
|
||||
@ -322,19 +316,6 @@ timeout_signal(int unused)
|
||||
kill(ispell.pid, SIGTERM);
|
||||
errno = olderrno;
|
||||
}
|
||||
#else
|
||||
static int
|
||||
timeout_signal(int unused)
|
||||
{
|
||||
int olderrno = errno;
|
||||
|
||||
WRITES("Warning: Timeout waiting ispell process to die.\n");
|
||||
kill(ispell.pid, SIGTERM);
|
||||
|
||||
errno = olderrno;
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
IspellSetSelection(XawTextPosition left, XawTextPosition right)
|
||||
|
@ -144,7 +144,7 @@ Com_C_r(LispCom *com, LispBuiltin *builtin)
|
||||
*/
|
||||
{
|
||||
LispObj *list;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
|
||||
list = ARGUMENT(0);
|
||||
|
||||
|
@ -1853,7 +1853,8 @@ Lisp_Gensym(LispBuiltin *builtin)
|
||||
gensym &optional arg
|
||||
*/
|
||||
{
|
||||
char *preffix = "G", name[132];
|
||||
const char *preffix = "G";
|
||||
char name[132];
|
||||
long counter = LONGINT_VALUE(Ogensym_counter->data.atom->property->value);
|
||||
LispObj *symbol;
|
||||
|
||||
|
@ -64,9 +64,9 @@ static void LispDebuggerCommand(LispObj *obj);
|
||||
* Initialization
|
||||
*/
|
||||
static struct {
|
||||
char *name;
|
||||
const char *name;
|
||||
int action;
|
||||
} commands[] = {
|
||||
} const commands[] = {
|
||||
{"help", DebuggerHelp},
|
||||
{"abort", DebuggerAbort},
|
||||
{"backtrace", DebuggerBacktrace},
|
||||
@ -91,15 +91,15 @@ static struct {
|
||||
};
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
const char *name;
|
||||
int subaction;
|
||||
} info_commands[] = {
|
||||
} const info_commands[] = {
|
||||
{"breakpoints", DebuggerInfoBreakpoints},
|
||||
{"stack", DebuggerInfoBacktrace},
|
||||
{"watchpoints", DebuggerInfoBreakpoints},
|
||||
};
|
||||
|
||||
static char debugger_help[] =
|
||||
static const char *debugger_help =
|
||||
"Available commands are:\n\
|
||||
\n\
|
||||
help - This message.\n\
|
||||
@ -120,7 +120,7 @@ up - Set environment to frame that called the current one.\n\
|
||||
\n\
|
||||
Commands may be abbreviated.\n";
|
||||
|
||||
static char debugger_info_help[] =
|
||||
static const char *debugger_info_help =
|
||||
"Available subcommands are:\n\
|
||||
\n\
|
||||
breakpoints - List and prints status of breakpoints, and watchpoints.\n\
|
||||
@ -407,7 +407,7 @@ LispDebuggerCommand(LispObj *args)
|
||||
else {
|
||||
for (i = matches = 0; i < sizeof(commands) / sizeof(commands[0]);
|
||||
i++) {
|
||||
char *str = commands[i].name;
|
||||
const char *str = commands[i].name;
|
||||
|
||||
ptr = cmd;
|
||||
while (*ptr && *ptr == *str) {
|
||||
@ -450,7 +450,7 @@ LispDebuggerCommand(LispObj *args)
|
||||
for (i = matches = 0;
|
||||
i < sizeof(info_commands) / sizeof(info_commands[0]);
|
||||
i++) {
|
||||
char *str = info_commands[i].name;
|
||||
const char *str = info_commands[i].name;
|
||||
|
||||
ptr = arg;
|
||||
while (*ptr && *ptr == *str) {
|
||||
|
@ -118,12 +118,12 @@ typedef struct {
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
static void merge_arguments(FmtArgs*, FmtDefs*, int*);
|
||||
static void merge_arguments(FmtArgs*, const FmtDefs*, int*);
|
||||
static char *parse_arguments(char*, FmtArgs*, int*, LispObj**, int*);
|
||||
static void merge_error(FmtArgs*, int);
|
||||
static void parse_error(FmtArgs*, int);
|
||||
static void generic_error(FmtArgs*, int);
|
||||
static void format_error(FmtArgs*, char*);
|
||||
static void format_error(FmtArgs*, const char*);
|
||||
|
||||
static int format_object(LispObj*, LispObj*);
|
||||
|
||||
@ -155,7 +155,7 @@ static void LispFormat(LispObj*, FmtInfo*);
|
||||
/*
|
||||
* Initialization
|
||||
*/
|
||||
static FmtDefs AsciiDefs = {
|
||||
static const FmtDefs AsciiDefs = {
|
||||
4,
|
||||
{
|
||||
{0, 0}, /* mincol */
|
||||
@ -165,7 +165,7 @@ static FmtDefs AsciiDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs IntegerDefs = {
|
||||
static const FmtDefs IntegerDefs = {
|
||||
4,
|
||||
{
|
||||
{0, 0}, /* mincol */
|
||||
@ -175,7 +175,7 @@ static FmtDefs IntegerDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs RadixDefs = {
|
||||
static const FmtDefs RadixDefs = {
|
||||
5,
|
||||
{
|
||||
{0, 10}, /* radix */
|
||||
@ -186,11 +186,11 @@ static FmtDefs RadixDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs NoneDefs = {
|
||||
static const FmtDefs NoneDefs = {
|
||||
0,
|
||||
};
|
||||
|
||||
static FmtDefs FixedFloatDefs = {
|
||||
static const FmtDefs FixedFloatDefs = {
|
||||
5,
|
||||
{
|
||||
{0, 0}, /* w */
|
||||
@ -201,7 +201,7 @@ static FmtDefs FixedFloatDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs ExponentialFloatDefs = {
|
||||
static const FmtDefs ExponentialFloatDefs = {
|
||||
7,
|
||||
{
|
||||
{0, 0}, /* w */
|
||||
@ -216,7 +216,7 @@ static FmtDefs ExponentialFloatDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs DollarFloatDefs = {
|
||||
static const FmtDefs DollarFloatDefs = {
|
||||
4,
|
||||
{
|
||||
{0, 2}, /* d */
|
||||
@ -226,14 +226,14 @@ static FmtDefs DollarFloatDefs = {
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs OneDefs = {
|
||||
static const FmtDefs OneDefs = {
|
||||
1,
|
||||
{
|
||||
{0, 1},
|
||||
},
|
||||
};
|
||||
|
||||
static FmtDefs TabulateDefs = {
|
||||
static const FmtDefs TabulateDefs = {
|
||||
2,
|
||||
{
|
||||
{0, 0}, /* colnum */
|
||||
@ -247,10 +247,10 @@ extern LispObj *Oprint_escape;
|
||||
* Implementation
|
||||
*/
|
||||
static void
|
||||
merge_arguments(FmtArgs *arguments, FmtDefs *defaults, int *code)
|
||||
merge_arguments(FmtArgs *arguments, const FmtDefs *defaults, int *code)
|
||||
{
|
||||
int count;
|
||||
FmtDef *defaul;
|
||||
const FmtDef *defaul;
|
||||
FmtArg *argument;
|
||||
|
||||
defaul = &(defaults->defaults[0]);
|
||||
@ -428,7 +428,7 @@ parse_arguments(char *format, FmtArgs *arguments,
|
||||
static void
|
||||
parse_error(FmtArgs *args, int code)
|
||||
{
|
||||
static char *errors[] = {
|
||||
static const char * const errors[] = {
|
||||
NULL,
|
||||
"too many parameters to directive",
|
||||
"too many @ parameters",
|
||||
@ -445,7 +445,7 @@ parse_error(FmtArgs *args, int code)
|
||||
static void
|
||||
merge_error(FmtArgs *args, int code)
|
||||
{
|
||||
static char *errors[] = {
|
||||
static const char * const errors[] = {
|
||||
NULL,
|
||||
"too many parameters to directive",
|
||||
"argument must be a character",
|
||||
@ -458,7 +458,7 @@ merge_error(FmtArgs *args, int code)
|
||||
static void
|
||||
generic_error(FmtArgs *args, int code)
|
||||
{
|
||||
static char *errors[] = {
|
||||
static const char * const errors[] = {
|
||||
NULL,
|
||||
"radix must be in the range 2 to 36, inclusive",
|
||||
"parameter must be positive",
|
||||
@ -470,7 +470,7 @@ generic_error(FmtArgs *args, int code)
|
||||
}
|
||||
|
||||
static void
|
||||
format_error(FmtArgs *args, char *str)
|
||||
format_error(FmtArgs *args, const char *str)
|
||||
{
|
||||
char *message;
|
||||
int errorlen, formatlen;
|
||||
@ -565,7 +565,7 @@ format_ascii(LispObj *stream, LispObj *object, FmtArgs *args)
|
||||
length = format_object(stream, object);
|
||||
else {
|
||||
int size;
|
||||
char *str = LispGetSstring(SSTREAMP(string), &size);
|
||||
const char *str = LispGetSstring(SSTREAMP(string), &size);
|
||||
|
||||
LispWriteStr(stream, str, size);
|
||||
}
|
||||
@ -1499,7 +1499,8 @@ format_justify(LispObj *stream, FmtInfo *info)
|
||||
{
|
||||
GC_ENTER();
|
||||
FmtInfo justify_info;
|
||||
char **formats, *format, *next_format, *str;
|
||||
char **formats, *format, *next_format;
|
||||
const char *str;
|
||||
LispObj *string, *strings = NIL, *cons;
|
||||
int atsign = info->args.atsign,
|
||||
collon = info->args.collon,
|
||||
@ -1723,7 +1724,7 @@ static void
|
||||
LispFormat(LispObj *stream, FmtInfo *info)
|
||||
{
|
||||
FmtArgs *args;
|
||||
FmtDefs *defs = NULL;
|
||||
const FmtDefs *defs = NULL;
|
||||
LispObj *object, *arguments;
|
||||
char stk[256], *format, *next_format;
|
||||
int length, num_arguments, code, need_update, need_argument, hash, head;
|
||||
@ -2109,7 +2110,7 @@ Lisp_Format(LispBuiltin *builtin)
|
||||
/* else if printing to string-stream, return a string */
|
||||
else if (stream->data.stream.type == LispStreamString) {
|
||||
int length;
|
||||
char *string;
|
||||
const char *string;
|
||||
|
||||
string = LispGetSstring(SSTREAMP(stream), &length);
|
||||
stream = LSTRING(string, length);
|
||||
|
@ -78,13 +78,13 @@ typedef struct _LispMac LispMac;
|
||||
/* make a gc never released variable with a static string argument */
|
||||
#define STATIC_ATOM(string) LispNewStaticAtom(string)
|
||||
|
||||
#define STRING(str) LispNewString(str, strlen(str), 0)
|
||||
#define LSTRING(str, size) LispNewString(str, size, 0)
|
||||
#define STRING(str) LispNewString(str, strlen(str))
|
||||
#define LSTRING(str, size) LispNewString(str, size)
|
||||
|
||||
/* string must be from the LispXXX allocation functions,
|
||||
* and LispMused not yet called on it */
|
||||
#define STRING2(str) LispNewString(str, strlen(str), 1)
|
||||
#define LSTRING2(str, size) LispNewString(str, size, 1)
|
||||
#define STRING2(str) LispNewStringAlloced(str, strlen(str))
|
||||
#define LSTRING2(str, size) LispNewStringAlloced(str, size)
|
||||
|
||||
#define VECTOR(objects) LispNewVector(objects)
|
||||
|
||||
@ -92,13 +92,13 @@ typedef struct _LispMac LispMac;
|
||||
* string be allocated from the LispXXX allocation functions,
|
||||
* and LispMused not yet called on it */
|
||||
#define STRINGSTREAM(str, flag) \
|
||||
LispNewStringStream(str, flag, strlen(str), 0)
|
||||
LispNewStringStream(str, flag, strlen(str))
|
||||
#define STRINGSTREAM2(str, flag) \
|
||||
LispNewStringStream(str, flag, strlen(str), 1)
|
||||
LispNewStringStreamAlloced(str, flag, strlen(str))
|
||||
#define LSTRINGSTREAM(str, flag, length) \
|
||||
LispNewStringStream(str, flag, length, 0)
|
||||
LispNewStringStream(str, flag, length)
|
||||
#define LSTRINGSTREAM2(str, flag, length) \
|
||||
LispNewStringStream(str, flag, length, 1)
|
||||
LispNewStringStreamAlloced(str, flag, length)
|
||||
|
||||
#define FILESTREAM(file, path, flag) \
|
||||
LispNewFileStream(file, path, flag)
|
||||
@ -664,7 +664,7 @@ struct _LispBuiltin {
|
||||
/* these fields must be set */
|
||||
LispFunType type;
|
||||
LispFunPtr function;
|
||||
char *declaration;
|
||||
const char *declaration;
|
||||
|
||||
/* this field is optional, set if the function returns multiple values */
|
||||
int multiple_values;
|
||||
@ -700,12 +700,13 @@ LispObj *LispApply3(LispObj*, LispObj*, LispObj*, LispObj*);
|
||||
|
||||
LispObj *LispNew(LispObj*, LispObj*);
|
||||
LispObj *LispNewSymbol(LispAtom*);
|
||||
LispObj *LispNewAtom(char*, int);
|
||||
LispObj *LispNewAtom(const char*, int);
|
||||
LispObj *LispNewFunction(LispObj*);
|
||||
LispObj *LispNewFunctionQuote(LispObj*);
|
||||
LispObj *LispNewStaticAtom(char*);
|
||||
LispObj *LispNewStaticAtom(const char*);
|
||||
LispObj *LispNewDFloat(double);
|
||||
LispObj *LispNewString(char*, long, int);
|
||||
LispObj *LispNewString(const char*, long);
|
||||
LispObj *LispNewStringAlloced(char*, long);
|
||||
LispObj *LispNewInteger(long);
|
||||
LispObj *LispNewRatio(long, long);
|
||||
LispObj *LispNewVector(LispObj*);
|
||||
@ -717,24 +718,25 @@ LispObj *LispNewLambda(LispObj*, LispObj*, LispObj*, LispFunType);
|
||||
LispObj *LispNewStruct(LispObj*, LispObj*);
|
||||
LispObj *LispNewComplex(LispObj*, LispObj*);
|
||||
LispObj *LispNewOpaque(void*, int);
|
||||
LispObj *LispNewKeyword(char*);
|
||||
LispObj *LispNewKeyword(const char*);
|
||||
LispObj *LispNewPathname(LispObj*);
|
||||
LispObj *LispNewStringStream(char*, int, long, int);
|
||||
LispObj *LispNewStringStream(const char*, int, long);
|
||||
LispObj *LispNewStringStreamAlloced(char*, int, long);
|
||||
LispObj *LispNewFileStream(LispFile*, LispObj*, int);
|
||||
LispObj *LispNewPipeStream(LispPipe*, LispObj*, int);
|
||||
LispObj *LispNewBignum(mpi*);
|
||||
LispObj *LispNewBigratio(mpr*);
|
||||
|
||||
LispAtom *LispGetAtom(char*);
|
||||
LispAtom *LispGetAtom(const char*);
|
||||
|
||||
/* This function does not allocate a copy of it's argument, but the argument
|
||||
* itself. The argument string should never change. */
|
||||
LispAtom *LispGetPermAtom(char*);
|
||||
LispAtom *LispGetPermAtom(const char*);
|
||||
|
||||
void *LispMalloc(size_t);
|
||||
void *LispCalloc(size_t, size_t);
|
||||
void *LispRealloc(void*, size_t);
|
||||
char *LispStrdup(char*);
|
||||
char *LispStrdup(const char*);
|
||||
void LispFree(void*);
|
||||
/* LispMused means memory is now safe from LispDestroy, and should not be
|
||||
* freed in case of an error */
|
||||
@ -749,18 +751,16 @@ char *LispStrObj(LispObj*);
|
||||
#else
|
||||
#define PRINTF_FORMAT /**/
|
||||
#endif
|
||||
void LispDestroy(char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispDestroy(const char *fmt, ...) PRINTF_FORMAT;
|
||||
/* continuable error */
|
||||
void LispContinuable(char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispMessage(char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispWarning(char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispContinuable(const char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispMessage(const char *fmt, ...) PRINTF_FORMAT;
|
||||
void LispWarning(const char *fmt, ...) PRINTF_FORMAT;
|
||||
#undef PRINTF_FORMAT
|
||||
|
||||
LispObj *LispSetVariable(LispObj*, LispObj*, char*, int);
|
||||
LispObj *LispSetVariable(LispObj*, LispObj*, const char*, int);
|
||||
|
||||
int LispRegisterOpaqueType(char*);
|
||||
|
||||
int LispPrintString(LispObj*, char*);
|
||||
int LispRegisterOpaqueType(const char*);
|
||||
|
||||
void LispProtect(LispObj*, LispObj*);
|
||||
void LispUProtect(LispObj*, LispObj*);
|
||||
|
@ -44,11 +44,6 @@
|
||||
#define UNBUFFERED_BIT 0x10
|
||||
#define BINARY_BIT 0x20
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
static int calculate_line(void*, int);
|
||||
static int calculate_column(void*, int, int);
|
||||
|
||||
/*
|
||||
* Initialization
|
||||
@ -160,12 +155,13 @@ LispPopInput(LispObj *stream)
|
||||
* Low level functions
|
||||
*/
|
||||
static int
|
||||
calculate_line(void *data, int size)
|
||||
calculate_line(const void *data, int size)
|
||||
{
|
||||
int line = 0;
|
||||
char *str, *ptr;
|
||||
const char *str, *ptr;
|
||||
|
||||
for (str = (char*)data, ptr = (char*)data + size; str < ptr; str++)
|
||||
for (str = (const char *)data, ptr = (const char *)data + size;
|
||||
str < ptr; str++)
|
||||
if (*ptr == '\n')
|
||||
++line;
|
||||
|
||||
@ -173,12 +169,13 @@ calculate_line(void *data, int size)
|
||||
}
|
||||
|
||||
static int
|
||||
calculate_column(void *data, int size, int column)
|
||||
calculate_column(const void *data, int size, int column)
|
||||
{
|
||||
char *str, *ptr;
|
||||
const char *str, *ptr;
|
||||
|
||||
/* search for newline in data */
|
||||
for (str = (char*)data, ptr = (char*)data + size - 1; ptr >= str; ptr--)
|
||||
for (str = (const char *)data, ptr = (const char *)data + size - 1;
|
||||
ptr >= str; ptr--)
|
||||
if (*ptr == '\n')
|
||||
break;
|
||||
|
||||
@ -225,7 +222,7 @@ LispFdopen(int descriptor, int mode)
|
||||
}
|
||||
|
||||
LispFile *
|
||||
LispFopen(char *path, int mode)
|
||||
LispFopen(const char *path, int mode)
|
||||
{
|
||||
LispFile *file;
|
||||
int descriptor;
|
||||
@ -467,13 +464,13 @@ LispFgets(LispFile *file, char *string, int size)
|
||||
}
|
||||
|
||||
int
|
||||
LispFputs(LispFile *file, char *buffer)
|
||||
LispFputs(LispFile *file, const char *buffer)
|
||||
{
|
||||
return (LispFwrite(file, buffer, strlen(buffer)));
|
||||
}
|
||||
|
||||
int
|
||||
LispSputs(LispString *string, char *buffer)
|
||||
LispSputs(LispString *string, const char *buffer)
|
||||
{
|
||||
return (LispSwrite(string, buffer, strlen(buffer)));
|
||||
}
|
||||
@ -557,7 +554,7 @@ LispFread(LispFile *file, void *data, int size)
|
||||
}
|
||||
|
||||
int
|
||||
LispFwrite(LispFile *file, void *data, int size)
|
||||
LispFwrite(LispFile *file, const void *data, int size)
|
||||
{
|
||||
if (!file->writable || size < 0)
|
||||
return (EOF);
|
||||
@ -567,7 +564,7 @@ LispFwrite(LispFile *file, void *data, int size)
|
||||
|
||||
if (file->buffered) {
|
||||
int length, bytes;
|
||||
char *buffer = (char*)data;
|
||||
const char *buffer = (const char *)data;
|
||||
|
||||
length = 0;
|
||||
if (size + file->length > pagesize) {
|
||||
@ -633,7 +630,7 @@ LispFwrite(LispFile *file, void *data, int size)
|
||||
}
|
||||
|
||||
int
|
||||
LispSwrite(LispString *string, void *data, int size)
|
||||
LispSwrite(LispString *string, const void *data, int size)
|
||||
{
|
||||
int bytes;
|
||||
|
||||
@ -676,7 +673,7 @@ LispSwrite(LispString *string, void *data, int size)
|
||||
return (size);
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
LispGetSstring(LispString *string, int *length)
|
||||
{
|
||||
if (string->string == NULL || string->length <= 0) {
|
||||
@ -707,13 +704,13 @@ LispGetSstring(LispString *string, int *length)
|
||||
}
|
||||
|
||||
int
|
||||
LispRename(char *from, char *to)
|
||||
LispRename(const char *from, const char *to)
|
||||
{
|
||||
return (rename(from, to));
|
||||
}
|
||||
|
||||
int
|
||||
LispUnlink(char *name)
|
||||
LispUnlink(const char *name)
|
||||
{
|
||||
return (unlink(name));
|
||||
}
|
||||
|
@ -88,18 +88,18 @@ void LispPopInput(LispObj*);
|
||||
|
||||
/* functions that read/write using the LispFile structure */
|
||||
LispFile *LispFdopen(int, int);
|
||||
LispFile *LispFopen(char*, int);
|
||||
LispFile *LispFopen(const char*, int);
|
||||
void LispFclose(LispFile*);
|
||||
int LispFflush(LispFile*);
|
||||
int LispFungetc(LispFile*, int);
|
||||
int LispFgetc(LispFile*);
|
||||
int LispFputc(LispFile*, int);
|
||||
char *LispFgets(LispFile*, char*, int);
|
||||
int LispFputs(LispFile*, char*);
|
||||
int LispFputs(LispFile*, const char*);
|
||||
int LispFread(LispFile*, void*, int);
|
||||
int LispFwrite(LispFile*, void*, int);
|
||||
int LispRename(char*, char*);
|
||||
int LispUnlink(char*);
|
||||
int LispFwrite(LispFile*, const void*, int);
|
||||
int LispRename(const char*, const char*);
|
||||
int LispUnlink(const char*);
|
||||
|
||||
/* io wrappers */
|
||||
io_write_fn LispSetFileWrite(LispFile*, io_write_fn);
|
||||
@ -107,9 +107,9 @@ io_write_fn LispSetFileWrite(LispFile*, io_write_fn);
|
||||
/* functions that read/write using the LispString structure */
|
||||
int LispSgetc(LispString*);
|
||||
int LispSputc(LispString*, int);
|
||||
int LispSputs(LispString*, char*);
|
||||
int LispSwrite(LispString*, void*, int);
|
||||
int LispSputs(LispString*, const char*);
|
||||
int LispSwrite(LispString*, const void*, int);
|
||||
|
||||
char *LispGetSstring(LispString*, int*);
|
||||
const char *LispGetSstring(LispString*, int*);
|
||||
|
||||
#endif /* Lisp_io_h */
|
||||
|
@ -29,6 +29,10 @@
|
||||
|
||||
/* $XFree86: xc/programs/xedit/lisp/lisp.c,v 1.87tsi Exp $ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef sun
|
||||
@ -45,27 +49,6 @@
|
||||
#include <unistd.h> /* for sysconf(), and getpagesize() */
|
||||
#endif
|
||||
|
||||
#if defined(linux)
|
||||
#define HAS_GETPAGESIZE
|
||||
#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
|
||||
#endif
|
||||
|
||||
#if defined(CSRG_BASED)
|
||||
#define HAS_GETPAGESIZE
|
||||
#endif
|
||||
|
||||
#if defined(sun)
|
||||
#define HAS_GETPAGESIZE
|
||||
#endif
|
||||
|
||||
#if defined(QNX4)
|
||||
#define HAS_GETPAGESIZE
|
||||
#endif
|
||||
|
||||
#if defined(__QNXNTO__)
|
||||
#define HAS_SC_PAGESIZE
|
||||
#endif
|
||||
|
||||
#include "lisp/bytecode.h"
|
||||
|
||||
#include "lisp/read.h"
|
||||
@ -158,13 +141,7 @@ static INLINE void LispProt(LispObj*);
|
||||
|
||||
static LispObj *LispCheckNeedProtect(LispObj*);
|
||||
|
||||
static
|
||||
#ifdef SIGNALRETURNSINT
|
||||
int
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
LispSignalHandler(int);
|
||||
static void LispSignalHandler(int);
|
||||
|
||||
/*
|
||||
* Initialization
|
||||
@ -642,7 +619,7 @@ LispGetPageSize(void)
|
||||
|
||||
/* Try each supported method in the preferred order */
|
||||
|
||||
#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE)
|
||||
#if defined(_SC_PAGESIZE) || defined(HAVE_DECL__SC_PAGESIZE)
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
#endif
|
||||
|
||||
@ -651,7 +628,7 @@ LispGetPageSize(void)
|
||||
pagesize = sysconf(_SC_PAGE_SIZE);
|
||||
#endif
|
||||
|
||||
#ifdef HAS_GETPAGESIZE
|
||||
#ifdef HAVE_GETPAGESIZE
|
||||
if (pagesize == -1)
|
||||
pagesize = getpagesize();
|
||||
#endif
|
||||
@ -668,7 +645,7 @@ LispGetPageSize(void)
|
||||
}
|
||||
|
||||
void
|
||||
LispDestroy(char *fmt, ...)
|
||||
LispDestroy(const char *fmt, ...)
|
||||
{
|
||||
static char Error[] = "*** ";
|
||||
|
||||
@ -726,7 +703,7 @@ LispDestroy(char *fmt, ...)
|
||||
LispTopLevel();
|
||||
|
||||
if (!lisp__data.running) {
|
||||
static char Fatal[] = "*** Fatal: nowhere to longjmp.\n";
|
||||
static const char *Fatal = "*** Fatal: nowhere to longjmp.\n";
|
||||
|
||||
LispFputs(Stderr, Fatal);
|
||||
LispFflush(Stderr);
|
||||
@ -737,11 +714,11 @@ LispDestroy(char *fmt, ...)
|
||||
}
|
||||
|
||||
void
|
||||
LispContinuable(char *fmt, ...)
|
||||
LispContinuable(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char string[128];
|
||||
static char Error[] = "*** Error: ";
|
||||
static const char *Error = "*** Error: ";
|
||||
|
||||
if (Stderr->column)
|
||||
LispFputc(Stderr, '\n');
|
||||
@ -763,7 +740,7 @@ LispContinuable(char *fmt, ...)
|
||||
}
|
||||
|
||||
void
|
||||
LispMessage(char *fmt, ...)
|
||||
LispMessage(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char string[128];
|
||||
@ -779,11 +756,11 @@ LispMessage(char *fmt, ...)
|
||||
}
|
||||
|
||||
void
|
||||
LispWarning(char *fmt, ...)
|
||||
LispWarning(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char string[128];
|
||||
static char Warning[] = "*** Warning: ";
|
||||
static const char *Warning = "*** Warning: ";
|
||||
|
||||
if (Stderr->column)
|
||||
LispFputc(Stderr, '\n');
|
||||
@ -1235,7 +1212,7 @@ index_found:
|
||||
}
|
||||
|
||||
char *
|
||||
LispStrdup(char *str)
|
||||
LispStrdup(const char *str)
|
||||
{
|
||||
char *ptr = LispMalloc(strlen(str) + 1);
|
||||
|
||||
@ -1270,7 +1247,7 @@ free_done:
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispSetVariable(LispObj *var, LispObj *val, char *fname, int eval)
|
||||
LispSetVariable(LispObj *var, LispObj *val, const char *fname, int eval)
|
||||
{
|
||||
if (!SYMBOLP(var))
|
||||
LispDestroy("%s: %s is not a symbol", fname, STROBJ(var));
|
||||
@ -1281,7 +1258,7 @@ LispSetVariable(LispObj *var, LispObj *val, char *fname, int eval)
|
||||
}
|
||||
|
||||
int
|
||||
LispRegisterOpaqueType(char *desc)
|
||||
LispRegisterOpaqueType(const char *desc)
|
||||
{
|
||||
int length;
|
||||
LispOpaque *opaque;
|
||||
@ -1323,7 +1300,7 @@ LispIntToOpaqueType(int type)
|
||||
}
|
||||
|
||||
hash_key *
|
||||
LispGetAtomKey(char *string, int perm)
|
||||
LispGetAtomKey(const char *string, int perm)
|
||||
{
|
||||
int length;
|
||||
hash_entry *entry;
|
||||
@ -1334,7 +1311,7 @@ LispGetAtomKey(char *string, int perm)
|
||||
entry = LispCalloc(1, sizeof(hash_entry));
|
||||
entry->key = LispCalloc(1, sizeof(hash_key));
|
||||
if (perm)
|
||||
entry->key->value = string;
|
||||
entry->key->value = (char *) string;
|
||||
else
|
||||
entry->key->value = LispStrdup(string);
|
||||
entry->key->length = length;
|
||||
@ -1350,7 +1327,7 @@ LispGetAtomKey(char *string, int perm)
|
||||
}
|
||||
|
||||
LispAtom *
|
||||
LispDoGetAtom(char *str, int perm)
|
||||
LispDoGetAtom(const char *str, int perm)
|
||||
{
|
||||
int length;
|
||||
LispAtom *atom;
|
||||
@ -1624,13 +1601,13 @@ LispRemAtomStructProperty(LispAtom *atom)
|
||||
}
|
||||
|
||||
LispAtom *
|
||||
LispGetAtom(char *str)
|
||||
LispGetAtom(const char *str)
|
||||
{
|
||||
return (LispDoGetAtom(str, 0));
|
||||
}
|
||||
|
||||
LispAtom *
|
||||
LispGetPermAtom(char *str)
|
||||
LispGetPermAtom(const char *str)
|
||||
{
|
||||
return (LispDoGetAtom(str, 1));
|
||||
}
|
||||
@ -1869,15 +1846,15 @@ LispListProtectedArguments(LispArgList *alist)
|
||||
}
|
||||
|
||||
LispArgList *
|
||||
LispCheckArguments(LispFunType type, LispObj *list, char *name, int builtin)
|
||||
LispCheckArguments(LispFunType type, LispObj *list, const char *name, int builtin)
|
||||
{
|
||||
static char *types[4] = {"LAMBDA-LIST", "FUNCTION", "MACRO", "SETF-METHOD"};
|
||||
static char *fnames[4] = {"LAMBDA", "DEFUN", "DEFMACRO", "DEFSETF"};
|
||||
static const char *types[4] = {"LAMBDA-LIST", "FUNCTION", "MACRO", "SETF-METHOD"};
|
||||
static const char *fnames[4] = {"LAMBDA", "DEFUN", "DEFMACRO", "DEFSETF"};
|
||||
#define IKEY 0
|
||||
#define IOPTIONAL 1
|
||||
#define IREST 2
|
||||
#define IAUX 3
|
||||
static char *keys[4] = {"&KEY", "&OPTIONAL", "&REST", "&AUX"};
|
||||
static const char *keys[4] = {"&KEY", "&OPTIONAL", "&REST", "&AUX"};
|
||||
int rest, optional, key, aux, count;
|
||||
LispArgList *alist;
|
||||
LispObj *spec, *sform, *defval, *default_value;
|
||||
@ -2639,7 +2616,7 @@ LispNew(LispObj *car, LispObj *cdr)
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewAtom(char *str, int intern)
|
||||
LispNewAtom(const char *str, int intern)
|
||||
{
|
||||
LispObj *object;
|
||||
LispAtom *atom = LispDoGetAtom(str, 0);
|
||||
@ -2667,7 +2644,7 @@ LispNewAtom(char *str, int intern)
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewStaticAtom(char *str)
|
||||
LispNewStaticAtom(const char *str)
|
||||
{
|
||||
LispObj *object;
|
||||
LispAtom *atom = LispDoGetAtom(str, 1);
|
||||
@ -2784,9 +2761,17 @@ LispNewDFloat(double value)
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewString(char *str, long length, int alloced)
|
||||
LispNewString(const char *str, long length)
|
||||
{
|
||||
char *cstring = LispMalloc(length + 1);
|
||||
memcpy(cstring, str, length);
|
||||
cstring[length] = '\0';
|
||||
return LispNewStringAlloced(cstring, length);
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewStringAlloced(char *cstring, long length)
|
||||
{
|
||||
char *cstring;
|
||||
LispObj *string = objseg.freeobj;
|
||||
|
||||
if (string == NIL)
|
||||
@ -2795,13 +2780,6 @@ LispNewString(char *str, long length, int alloced)
|
||||
objseg.freeobj = CDR(string);
|
||||
--objseg.nfree;
|
||||
}
|
||||
if (alloced)
|
||||
cstring = str;
|
||||
else {
|
||||
cstring = LispMalloc(length + 1);
|
||||
memcpy(cstring, str, length);
|
||||
cstring[length] = '\0';
|
||||
}
|
||||
LispMused(cstring);
|
||||
string->type = LispString_t;
|
||||
THESTR(string) = cstring;
|
||||
@ -2982,7 +2960,7 @@ LispNewOpaque(void *data, int type)
|
||||
|
||||
/* string argument must be static, or allocated */
|
||||
LispObj *
|
||||
LispNewKeyword(char *string)
|
||||
LispNewKeyword(const char *string)
|
||||
{
|
||||
LispObj *keyword;
|
||||
|
||||
@ -3033,18 +3011,22 @@ LispNewPathname(LispObj *obj)
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewStringStream(char *string, int flags, long length, int alloced)
|
||||
LispNewStringStream(const char *string, int flags, long length)
|
||||
{
|
||||
char *newstring = LispMalloc(length + 1);
|
||||
memcpy(newstring, string, length);
|
||||
newstring[length] = '\0';
|
||||
|
||||
return LispNewStringStreamAlloced(newstring, flags, length);
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispNewStringStreamAlloced(char *string, int flags, long length)
|
||||
{
|
||||
LispObj *stream = LispNew(NIL, NIL);
|
||||
|
||||
SSTREAMP(stream) = LispCalloc(1, sizeof(LispString));
|
||||
if (alloced)
|
||||
SSTREAMP(stream)->string = string;
|
||||
else {
|
||||
SSTREAMP(stream)->string = LispMalloc(length + 1);
|
||||
memcpy(SSTREAMP(stream)->string, string, length);
|
||||
SSTREAMP(stream)->string[length] = '\0';
|
||||
}
|
||||
SSTREAMP(stream)->string = string;
|
||||
|
||||
stream->type = LispStream_t;
|
||||
|
||||
@ -5009,23 +4991,16 @@ LispUpdateResults(LispObj *cod, LispObj *res)
|
||||
LispSetVar(RES[0], res);
|
||||
}
|
||||
|
||||
#ifdef SIGNALRETURNSINT
|
||||
int
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
LispSignalHandler(int signum)
|
||||
{
|
||||
LispSignal(signum);
|
||||
#ifdef SIGNALRETURNSINT
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
LispSignal(int signum)
|
||||
{
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
char buffer[32];
|
||||
|
||||
if (lisp__disable_int) {
|
||||
@ -5400,15 +5375,15 @@ LispBegin(void)
|
||||
#ifdef LISPDIR
|
||||
{
|
||||
int length;
|
||||
char *pathname = LISPDIR;
|
||||
const char *pathname = LISPDIR;
|
||||
|
||||
length = strlen(pathname);
|
||||
if (length && pathname[length - 1] != '/') {
|
||||
pathname = LispMalloc(length + 2);
|
||||
char *fixed_pathname = LispMalloc(length + 2);
|
||||
|
||||
strcpy(pathname, LISPDIR);
|
||||
strcpy(pathname + length, "/");
|
||||
path = LSTRING2(pathname, length + 1);
|
||||
strcpy(fixed_pathname, LISPDIR);
|
||||
strcpy(fixed_pathname + length, "/");
|
||||
path = LSTRING2(fixed_pathname, length + 1);
|
||||
}
|
||||
else
|
||||
path = LSTRING(pathname, length);
|
||||
@ -5460,7 +5435,7 @@ LispEnd(void)
|
||||
}
|
||||
|
||||
void
|
||||
LispSetPrompt(char *prompt)
|
||||
LispSetPrompt(const char *prompt)
|
||||
{
|
||||
lisp__data.prompt = prompt;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ void LispBegin(void);
|
||||
void LispEnd(void);
|
||||
void *LispExecute(char*);
|
||||
void LispMachine(void);
|
||||
void LispSetPrompt(char*);
|
||||
void LispSetPrompt(const char*);
|
||||
void LispSetInteractive(int);
|
||||
void LispSetExitOnError(int);
|
||||
void LispDebug(int); /* argument is boolean to enable/disable */
|
||||
|
@ -436,7 +436,7 @@ static INLINE int cmp_br_br(mpr*, mpr*);
|
||||
*/
|
||||
static n_real zero, one, two;
|
||||
|
||||
static char *fatal_error_strings[] = {
|
||||
static const char *fatal_error_strings[] = {
|
||||
#define DIVIDE_BY_ZERO 0
|
||||
"divide by zero",
|
||||
#define FLOATING_POINT_OVERFLOW 1
|
||||
@ -445,7 +445,7 @@ static char *fatal_error_strings[] = {
|
||||
"floating point exception"
|
||||
};
|
||||
|
||||
static char *fatal_object_error_strings[] = {
|
||||
static const char *fatal_object_error_strings[] = {
|
||||
#define NOT_A_NUMBER 0
|
||||
"is not a number",
|
||||
#define NOT_A_REAL_NUMBER 1
|
||||
|
@ -61,7 +61,7 @@ LispPackageInit(void)
|
||||
}
|
||||
|
||||
LispObj *
|
||||
LispFindPackageFromString(char *string)
|
||||
LispFindPackageFromString(const char *string)
|
||||
{
|
||||
LispObj *list, *package, *nick;
|
||||
|
||||
@ -97,9 +97,9 @@ LispFindPackage(LispObj *name)
|
||||
}
|
||||
|
||||
int
|
||||
LispCheckAtomString(char *string)
|
||||
LispCheckAtomString(const char *string)
|
||||
{
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
|
||||
if (*string == '\0')
|
||||
return (0);
|
||||
|
@ -36,9 +36,9 @@
|
||||
|
||||
void LispPackageInit(void);
|
||||
LispObj *LispFindPackage(LispObj*);
|
||||
LispObj *LispFindPackageFromString(char*);
|
||||
LispObj *LispFindPackageFromString(const char*);
|
||||
/* returns 1 if string can safely be read back */
|
||||
int LispCheckAtomString(char*);
|
||||
int LispCheckAtomString(const char*);
|
||||
|
||||
LispObj *Lisp_DoAllSymbols(LispBuiltin*);
|
||||
LispObj *Lisp_DoExternalSymbols(LispBuiltin*);
|
||||
|
@ -484,7 +484,8 @@ Lisp_ParseNamestring(LispBuiltin *builtin)
|
||||
if (STRINGP(object)) {
|
||||
LispObj *cons, *cdr;
|
||||
char *name = THESTR(object), *ptr, *str, data[PATH_MAX + 1],
|
||||
string[PATH_MAX + 1], *namestr, *typestr, *send;
|
||||
string[PATH_MAX + 1], *send;
|
||||
const char *namestr, *typestr;
|
||||
long start, end, length, alength, namelen, typelen;
|
||||
|
||||
LispCheckSequenceStartEnd(builtin, object, ostart, oend,
|
||||
|
@ -68,6 +68,7 @@
|
||||
(LispObj *)lisp__data.features->data.atom->property->value : \
|
||||
NIL)
|
||||
#define PACK lisp__data.packlist
|
||||
#undef PACKAGE /* avoid conflicts with autoconf's #define in config.h */
|
||||
#define PACKAGE lisp__data.package->data.atom->property->value
|
||||
#define MOD lisp__data.modlist
|
||||
#define COD lisp__data.codlist
|
||||
@ -373,7 +374,7 @@ struct _LispMac {
|
||||
} mem; /* memory from Lisp*Alloc, to be release in error */
|
||||
LispModule *module;
|
||||
LispObj *modules;
|
||||
char *prompt;
|
||||
const char *prompt;
|
||||
|
||||
LispObj *features;
|
||||
|
||||
@ -388,13 +389,8 @@ struct _LispMac {
|
||||
#endif
|
||||
LispObj *prolist; /* protect objects list */
|
||||
|
||||
#ifdef SIGNALRETURNSINT
|
||||
int (*sigint)(int);
|
||||
int (*sigfpe)(int);
|
||||
#else
|
||||
void (*sigint)(int);
|
||||
void (*sigfpe)(int);
|
||||
#endif
|
||||
|
||||
int destroyed; /* reached LispDestroy, used by unwind-protect */
|
||||
int running; /* there is somewhere to siglongjmp */
|
||||
@ -412,7 +408,7 @@ struct _LispMac {
|
||||
};
|
||||
|
||||
struct _LispCharInfo {
|
||||
char **names;
|
||||
const char * const *names;
|
||||
};
|
||||
|
||||
|
||||
@ -421,7 +417,7 @@ struct _LispCharInfo {
|
||||
*/
|
||||
void LispUseArgList(LispArgList*);
|
||||
void LispFreeArgList(LispArgList*);
|
||||
LispArgList *LispCheckArguments(LispFunType, LispObj*, char*, int);
|
||||
LispArgList *LispCheckArguments(LispFunType, LispObj*, const char*, int);
|
||||
LispObj *LispListProtectedArguments(LispArgList*);
|
||||
|
||||
LispObj *LispGetDoc(LispObj*);
|
||||
@ -446,8 +442,7 @@ void LispExportSymbol(LispObj*);
|
||||
void LispImportSymbol(LispObj*);
|
||||
|
||||
/* always returns the same string */
|
||||
hash_key *LispGetAtomKey(char*, int);
|
||||
char *LispGetAtomString(char*, int);
|
||||
hash_key *LispGetAtomKey(const char*, int);
|
||||
|
||||
/* destructive fast reverse, note that don't receive a LispMac* argument */
|
||||
LispObj *LispReverse(LispObj *list);
|
||||
@ -469,7 +464,7 @@ void LispBlockUnwind(LispBlock*);
|
||||
void LispUpdateResults(LispObj*, LispObj*);
|
||||
void LispTopLevel(void);
|
||||
|
||||
LispAtom *LispDoGetAtom(char *str, int);
|
||||
LispAtom *LispDoGetAtom(const char *str, int);
|
||||
/* get value from atom's property list */
|
||||
LispObj *LispGetAtomProperty(LispAtom*, LispObj*);
|
||||
/* put value in atom's property list */
|
||||
@ -520,7 +515,7 @@ void LispMoreProtects(void);
|
||||
|
||||
/* Initialization */
|
||||
extern int LispArgList_t;
|
||||
extern LispCharInfo LispChars[256];
|
||||
extern const LispCharInfo LispChars[256];
|
||||
|
||||
/* This function will return if the interpreter cannot be stopped */
|
||||
extern void LispSignal(int);
|
||||
|
@ -1665,7 +1665,7 @@ done:
|
||||
int
|
||||
reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size)
|
||||
{
|
||||
static char *errors[] = {
|
||||
static const char *errors[] = {
|
||||
"No error",
|
||||
"Failed to match", /* NOMATCH */
|
||||
|
||||
@ -1687,7 +1687,7 @@ reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size)
|
||||
"Assertion error - you found a bug", /* ASSERT */
|
||||
"Invalid argument" /* INVARG */
|
||||
};
|
||||
char *str;
|
||||
const char *str;
|
||||
|
||||
if (ecode >= 0 && ecode < sizeof(errors) / sizeof(errors[0]))
|
||||
str = errors[ecode];
|
||||
|
@ -106,7 +106,7 @@ static int LispGetLine(LispObj*);
|
||||
#else
|
||||
#define PRINTF_FORMAT /**/
|
||||
#endif
|
||||
static void LispReadError(LispObj*, int, char*, ...);
|
||||
static void LispReadError(LispObj*, int, const char*, ...);
|
||||
#undef PRINTF_FORMAT
|
||||
static void LispReadFixCircle(LispObj*, read_info*);
|
||||
static LispObj *LispReadLabelCircle(LispObj*, read_info*);
|
||||
@ -140,42 +140,42 @@ static LispObj *LispEvalFeature(LispObj*);
|
||||
/*
|
||||
* Initialization
|
||||
*/
|
||||
static char *Char_Nul[] = {"Null", "Nul", NULL};
|
||||
static char *Char_Soh[] = {"Soh", NULL};
|
||||
static char *Char_Stx[] = {"Stx", NULL};
|
||||
static char *Char_Etx[] = {"Etx", NULL};
|
||||
static char *Char_Eot[] = {"Eot", NULL};
|
||||
static char *Char_Enq[] = {"Enq", NULL};
|
||||
static char *Char_Ack[] = {"Ack", NULL};
|
||||
static char *Char_Bel[] = {"Bell", "Bel", NULL};
|
||||
static char *Char_Bs[] = {"Backspace", "Bs", NULL};
|
||||
static char *Char_Tab[] = {"Tab", NULL};
|
||||
static char *Char_Nl[] = {"Newline", "Nl", "Lf", "Linefeed", NULL};
|
||||
static char *Char_Vt[] = {"Vt", NULL};
|
||||
static char *Char_Np[] = {"Page", "Np", NULL};
|
||||
static char *Char_Cr[] = {"Return", "Cr", NULL};
|
||||
static char *Char_Ff[] = {"So", "Ff", NULL};
|
||||
static char *Char_Si[] = {"Si", NULL};
|
||||
static char *Char_Dle[] = {"Dle", NULL};
|
||||
static char *Char_Dc1[] = {"Dc1", NULL};
|
||||
static char *Char_Dc2[] = {"Dc2", NULL};
|
||||
static char *Char_Dc3[] = {"Dc3", NULL};
|
||||
static char *Char_Dc4[] = {"Dc4", NULL};
|
||||
static char *Char_Nak[] = {"Nak", NULL};
|
||||
static char *Char_Syn[] = {"Syn", NULL};
|
||||
static char *Char_Etb[] = {"Etb", NULL};
|
||||
static char *Char_Can[] = {"Can", NULL};
|
||||
static char *Char_Em[] = {"Em", NULL};
|
||||
static char *Char_Sub[] = {"Sub", NULL};
|
||||
static char *Char_Esc[] = {"Escape", "Esc", NULL};
|
||||
static char *Char_Fs[] = {"Fs", NULL};
|
||||
static char *Char_Gs[] = {"Gs", NULL};
|
||||
static char *Char_Rs[] = {"Rs", NULL};
|
||||
static char *Char_Us[] = {"Us", NULL};
|
||||
static char *Char_Sp[] = {"Space", "Sp", NULL};
|
||||
static char *Char_Del[] = {"Rubout", "Del", "Delete", NULL};
|
||||
static const char * const Char_Nul[] = {"Null", "Nul", NULL};
|
||||
static const char * const Char_Soh[] = {"Soh", NULL};
|
||||
static const char * const Char_Stx[] = {"Stx", NULL};
|
||||
static const char * const Char_Etx[] = {"Etx", NULL};
|
||||
static const char * const Char_Eot[] = {"Eot", NULL};
|
||||
static const char * const Char_Enq[] = {"Enq", NULL};
|
||||
static const char * const Char_Ack[] = {"Ack", NULL};
|
||||
static const char * const Char_Bel[] = {"Bell", "Bel", NULL};
|
||||
static const char * const Char_Bs[] = {"Backspace", "Bs", NULL};
|
||||
static const char * const Char_Tab[] = {"Tab", NULL};
|
||||
static const char * const Char_Nl[] = {"Newline", "Nl", "Lf", "Linefeed", NULL};
|
||||
static const char * const Char_Vt[] = {"Vt", NULL};
|
||||
static const char * const Char_Np[] = {"Page", "Np", NULL};
|
||||
static const char * const Char_Cr[] = {"Return", "Cr", NULL};
|
||||
static const char * const Char_Ff[] = {"So", "Ff", NULL};
|
||||
static const char * const Char_Si[] = {"Si", NULL};
|
||||
static const char * const Char_Dle[] = {"Dle", NULL};
|
||||
static const char * const Char_Dc1[] = {"Dc1", NULL};
|
||||
static const char * const Char_Dc2[] = {"Dc2", NULL};
|
||||
static const char * const Char_Dc3[] = {"Dc3", NULL};
|
||||
static const char * const Char_Dc4[] = {"Dc4", NULL};
|
||||
static const char * const Char_Nak[] = {"Nak", NULL};
|
||||
static const char * const Char_Syn[] = {"Syn", NULL};
|
||||
static const char * const Char_Etb[] = {"Etb", NULL};
|
||||
static const char * const Char_Can[] = {"Can", NULL};
|
||||
static const char * const Char_Em[] = {"Em", NULL};
|
||||
static const char * const Char_Sub[] = {"Sub", NULL};
|
||||
static const char * const Char_Esc[] = {"Escape", "Esc", NULL};
|
||||
static const char * const Char_Fs[] = {"Fs", NULL};
|
||||
static const char * const Char_Gs[] = {"Gs", NULL};
|
||||
static const char * const Char_Rs[] = {"Rs", NULL};
|
||||
static const char * const Char_Us[] = {"Us", NULL};
|
||||
static const char * const Char_Sp[] = {"Space", "Sp", NULL};
|
||||
static const char * const Char_Del[] = {"Rubout", "Del", "Delete", NULL};
|
||||
|
||||
LispCharInfo LispChars[256] = {
|
||||
const LispCharInfo LispChars[256] = {
|
||||
{Char_Nul},
|
||||
{Char_Soh},
|
||||
{Char_Stx},
|
||||
@ -597,9 +597,10 @@ LispGetLine(LispObj *stream)
|
||||
}
|
||||
|
||||
static void
|
||||
LispReadError(LispObj *stream, int line, char *fmt, ...)
|
||||
LispReadError(LispObj *stream, int line, const char *fmt, ...)
|
||||
{
|
||||
char string[128], *buffer_string;
|
||||
char string[128];
|
||||
const char *buffer_string;
|
||||
LispObj *buffer = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
|
||||
int length;
|
||||
va_list ap;
|
||||
@ -1721,7 +1722,7 @@ LispReadCharacter(read_info *info)
|
||||
stk[len++] = ch;
|
||||
}
|
||||
if (len > 1) {
|
||||
char **names;
|
||||
const char * const *names;
|
||||
int found = 0;
|
||||
stk[len] = '\0';
|
||||
|
||||
|
@ -613,7 +613,7 @@ Lisp_GetOutputStreamString(LispBuiltin *builtin)
|
||||
*/
|
||||
{
|
||||
int length;
|
||||
char *string;
|
||||
const char *string;
|
||||
LispObj *string_output_stream, *result;
|
||||
|
||||
string_output_stream = ARGUMENT(0);
|
||||
|
@ -90,7 +90,7 @@ static int LispWriteCharacter(LispObj*, LispObj*, write_info*);
|
||||
static int LispWriteString(LispObj*, LispObj*, write_info*);
|
||||
static int LispWriteFloat(LispObj*, LispObj*);
|
||||
static int LispWriteAtom(LispObj*, LispObj*, write_info*);
|
||||
static int LispDoWriteAtom(LispObj*, char*, int, int);
|
||||
static int LispDoWriteAtom(LispObj*, const char*, int, int);
|
||||
static int LispWriteList(LispObj*, LispObj*, write_info*, int);
|
||||
static int LispWriteArray(LispObj*, LispObj*, write_info*);
|
||||
static int LispWriteStruct(LispObj*, LispObj*, write_info*);
|
||||
@ -861,7 +861,8 @@ LispDoWriteObject(LispObj *stream, LispObj *object, write_info *info, int paren)
|
||||
{
|
||||
long print_level;
|
||||
int length = 0;
|
||||
char stk[64], *string = NULL;
|
||||
char stk[64];
|
||||
const char *string = NULL;
|
||||
|
||||
write_again:
|
||||
switch (OBJECT_TYPE(object)) {
|
||||
@ -1195,7 +1196,7 @@ LispWriteChars(LispObj *stream, int character, int count)
|
||||
|
||||
/* write a string to stream */
|
||||
int
|
||||
LispWriteStr(LispObj *stream, char *buffer, long length)
|
||||
LispWriteStr(LispObj *stream, const char *buffer, long length)
|
||||
{
|
||||
LispFile *file;
|
||||
LispString *string;
|
||||
@ -1207,7 +1208,7 @@ LispWriteStr(LispObj *stream, char *buffer, long length)
|
||||
}
|
||||
|
||||
static int
|
||||
LispDoWriteAtom(LispObj *stream, char *string, int length, int print_case)
|
||||
LispDoWriteAtom(LispObj *stream, const char *string, int length, int print_case)
|
||||
{
|
||||
int bytes = 0, cap = 0;
|
||||
char buffer[128], *ptr;
|
||||
@ -1653,30 +1654,30 @@ LispFormatRomanInteger(LispObj *stream, long value, int new_roman)
|
||||
int
|
||||
LispFormatEnglishInteger(LispObj *stream, long number, int ordinal)
|
||||
{
|
||||
static char *ds[] = {
|
||||
static const char *ds[] = {
|
||||
"", "one", "two", "three", "four",
|
||||
"five", "six", "seven", "eight", "nine",
|
||||
"ten", "eleven", "twelve", "thirteen", "fourteen",
|
||||
"fifteen", "sixteen", "seventeen", "eighteen", "nineteen"
|
||||
};
|
||||
static char *dsth[] = {
|
||||
static const char *dsth[] = {
|
||||
"", "first", "second", "third", "fourth",
|
||||
"fifth", "sixth", "seventh", "eighth", "ninth",
|
||||
"tenth", "eleventh", "twelfth", "thirteenth", "fourteenth",
|
||||
"fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth"
|
||||
};
|
||||
static char *hs[] = {
|
||||
static const char *hs[] = {
|
||||
"", "", "twenty", "thirty", "forty",
|
||||
"fifty", "sixty", "seventy", "eighty", "ninety"
|
||||
};
|
||||
static char *hsth[] = {
|
||||
static const char *hsth[] = {
|
||||
"", "", "twentieth", "thirtieth", "fortieth",
|
||||
"fiftieth", "sixtieth", "seventieth", "eightieth", "ninetieth"
|
||||
};
|
||||
static char *ts[] = {
|
||||
static const char *ts[] = {
|
||||
"", "thousand", "million"
|
||||
};
|
||||
static char *tsth[] = {
|
||||
static const char *tsth[] = {
|
||||
"", "thousandth", "millionth"
|
||||
};
|
||||
char stk[256];
|
||||
@ -1704,7 +1705,7 @@ LispFormatEnglishInteger(LispObj *stream, long number, int ordinal)
|
||||
}
|
||||
for (;;) {
|
||||
int count, temp;
|
||||
char *t, *h, *d;
|
||||
const char *t, *h, *d;
|
||||
long value = number;
|
||||
|
||||
for (count = 0; value >= 1000; value /= 1000, count++)
|
||||
@ -1811,7 +1812,7 @@ LispFormatCharacter(LispObj *stream, LispObj *object,
|
||||
if (atsign && !collon)
|
||||
length += LispWriteStr(stream, "#\\", 2);
|
||||
if ((atsign || collon) && (ch <= ' ' || ch == 0177)) {
|
||||
char *name = LispChars[ch].names[0];
|
||||
const char *name = LispChars[ch].names[0];
|
||||
|
||||
length += LispWriteStr(stream, name, strlen(name));
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ int LispGetColumn(LispObj*);
|
||||
|
||||
int LispWriteChar(LispObj*, int);
|
||||
int LispWriteChars(LispObj*, int, int);
|
||||
int LispWriteStr(LispObj*, char*, long);
|
||||
int LispWriteStr(LispObj*, const char*, long);
|
||||
|
||||
/* write any lisp object to stream */
|
||||
int LispWriteObject(LispObj*, LispObj*);
|
||||
|
@ -98,11 +98,7 @@ static LispObj *XeditSearch(LispBuiltin*, XawTextScanDirection);
|
||||
/*
|
||||
* Initialization
|
||||
*/
|
||||
#ifdef SIGNALRETURNSINT
|
||||
static int (*old_sigalrm)(int);
|
||||
#else
|
||||
static void (*old_sigalrm)(int);
|
||||
#endif
|
||||
|
||||
EditModeInfo *mode_infos;
|
||||
Cardinal num_mode_infos;
|
||||
@ -177,12 +173,7 @@ ControlGPredicate(Display *display, XEvent *event, XPointer arguments)
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static
|
||||
#ifdef SIGNALRETURNSINT
|
||||
int
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
static void
|
||||
SigalrmHandler(int signum)
|
||||
{
|
||||
XEvent event;
|
||||
@ -201,9 +192,6 @@ SigalrmHandler(int signum)
|
||||
}
|
||||
else
|
||||
alarm(1);
|
||||
#ifdef SIGNALRETURNSINT
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Makefile.in generated by automake 1.12.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
@ -118,6 +118,7 @@ APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
|
||||
APPDEFS_LIBS = @APPDEFS_LIBS@
|
||||
APP_MAN_DIR = @APP_MAN_DIR@
|
||||
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -156,7 +157,6 @@ LIB_MAN_DIR = @LIB_MAN_DIR@
|
||||
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LISPDIR = @LISPDIR@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
@ -174,6 +174,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKGDEPS_CFLAGS = @PKGDEPS_CFLAGS@
|
||||
PKGDEPS_LIBS = @PKGDEPS_LIBS@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -186,6 +188,7 @@ abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
@ -243,7 +246,7 @@ all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -268,9 +271,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
|
@ -184,7 +184,7 @@ GetString(Widget w)
|
||||
*/
|
||||
|
||||
FileAccess
|
||||
MaybeCreateFile(char *file)
|
||||
MaybeCreateFile(const char *file)
|
||||
{
|
||||
Boolean exists;
|
||||
int fd;
|
||||
@ -200,7 +200,7 @@ MaybeCreateFile(char *file)
|
||||
|
||||
|
||||
FileAccess
|
||||
CheckFilePermissions(char *file, Boolean *exists)
|
||||
CheckFilePermissions(const char *file, Boolean *exists)
|
||||
{
|
||||
char temp[BUFSIZ], *ptr;
|
||||
|
||||
@ -230,7 +230,7 @@ CheckFilePermissions(char *file, Boolean *exists)
|
||||
}
|
||||
|
||||
xedit_flist_item *
|
||||
AddTextSource(Widget source, char *name, char *filename, int flags,
|
||||
AddTextSource(Widget source, const char *name, const char *filename, int flags,
|
||||
FileAccess file_access)
|
||||
{
|
||||
xedit_flist_item *item;
|
||||
@ -367,7 +367,7 @@ KillTextSource(xedit_flist_item *item)
|
||||
}
|
||||
|
||||
xedit_flist_item *
|
||||
FindTextSource(Widget source, char *filename)
|
||||
FindTextSource(Widget source, const char *filename)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
@ -64,7 +64,7 @@ struct _hash_table {
|
||||
hash_table *hash_new(unsigned int length, hash_compare compare);
|
||||
hash_entry *hash_put(hash_table *hash, hash_entry *entry);
|
||||
hash_entry *hash_get(hash_table *hash, hash_key *name);
|
||||
hash_entry * hash_check(hash_table *hash, char *name, unsigned int length);
|
||||
hash_entry * hash_check(hash_table *hash, const char *name, unsigned int length);
|
||||
void hash_rem(hash_table *hash, hash_entry *entry);
|
||||
/* Removes from hash table but doesn't release any memory */
|
||||
hash_entry *hash_rem_no_free(hash_table *hash, hash_entry *entry);
|
||||
|
@ -122,9 +122,9 @@ void XeditPrintf(const char *format, ...);
|
||||
Widget MakeCommandButton(Widget, char*, XtCallbackProc);
|
||||
Widget MakeStringBox(Widget, String, String);
|
||||
String GetString(Widget);
|
||||
FileAccess MaybeCreateFile(char*), CheckFilePermissions(char*, Boolean*);
|
||||
xedit_flist_item *AddTextSource(Widget, String, String, int, FileAccess);
|
||||
xedit_flist_item *FindTextSource(Widget, char*);
|
||||
FileAccess MaybeCreateFile(const char*), CheckFilePermissions(const char*, Boolean*);
|
||||
xedit_flist_item *AddTextSource(Widget, const char *, const char *, int, FileAccess);
|
||||
xedit_flist_item *FindTextSource(Widget, const char*);
|
||||
Bool KillTextSource(xedit_flist_item*);
|
||||
char *ResolveName(char*);
|
||||
void DeleteWindow(Widget, XEvent*, String*, Cardinal*);
|
||||
|
Loading…
Reference in New Issue
Block a user