sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-10 12:51:13 +00:00
parent 81739016d9
commit 48226b7c51
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
178 changed files with 76551 additions and 36405 deletions

View file

@ -1,3 +1,382 @@
commit f14ba54e9c7e415a05e33dd0b3b5f96e5de05c8b
Author: Thomas E. Dickey <dickey@his.com>
Date: Sun Mar 10 16:25:47 2024 +0000
libXaw 1.0.16: amends XawListChange() prototype, plus code-cleanup
commit 254e1f657496d21aef0c5e0a14ecca076a9ebcd5
Author: Thomas E. Dickey <dickey@his.com>
Date: Sun Mar 10 14:31:35 2024 +0000
delete code which is never used
commit c07b1728e38529ff8177e2075c2bae4724d3abe7
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 10 10:03:25 2024 -0400
make the examples configurable as (interactive) unit-tests
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit d0fcbd9722ad691ca0b5873c98e8e9c236fa718b
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 3 20:21:40 2024 -0500
amend change to XawListChange()
My previous commit in July 2019
build-fixes when _CONST_X_STRING is defined
modified the interface of XawListChange() to use "_Xconst char *"
to fix builds when the Xt symbol _CONST_X_STRING is defined (which
makes the String typedef "const").
While this fixed building Xaw, clients which use Xaw were impacted.
Changing that function to use String resolves both problems.
(report by Karl Berry).
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit b116d033a5b4daf75a10ad959e42aac398036ef9
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 3 19:04:21 2024 -0500
clang/gcc warnings about undefined behavior (minor bug-fix)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit fd4b2ce63feae01744a850fa6f1809ff15361a8b
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 3 18:51:46 2024 -0500
fix clang/gcc warnings for undefined behavior, also fix a bug
XtConvertAndStore may update the XrmValue value, changing its size.
clang and gcc warn about undefined behavior in the case-statement
following the call (which uses the size), but do not explain what
the problem is. Since this code is not intended to handle changes
of the size, simply reject that case. That quiets the gcc warnings
and is actually all that is needed for correctness. clang still
complains (neither knows what the call does), but can be quieted
by initializing the variable before calling the function.
The code happens to work without the fix as long as it is not
used to convert between resource types which would increase the
size.
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit d33708e30f102f6ab278d6f809eeaa18e65d0716
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 3 15:13:27 2024 -0500
scan-build(clang-17) reports possible null dereference, add checks
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 9aba0a9212e0bb3ad010fff569bce95c20c3ebfa
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Sun Mar 3 14:50:21 2024 -0500
split-up assignments which give unnecessary compiler-warnings
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit ce94a168f6a10455e98e2be7bd905bb9fb7f7fc1
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:32:17 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 95e93cfd56c8dec57a3bb2627d7714944713c37a
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:32:01 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 28b5ce87555b5c85f240895c64818015d134b3b7
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:31:43 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 96e4ac3ae1afdeafb16ea0e147364d15e7bfd549
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:31:26 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 5815fc38a12e5ac7f8bd391ce8f04f13b8178e69
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:31:09 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit a3fb321330ccb6d9dcd6fd3d41971cda3987527a
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:30:50 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 3841474f3ba6914b6909e29c5cf0c5e7207a69a7
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 20:30:28 2024 -0500
add check for null pointer, avoid dereferencing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit f4906b8a4fc09eb3ce971272f993be81885f602f
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 19:30:22 2024 -0500
delete unused assignments
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 1b1d164cdcd3b30d1effb4a07a40ae1cf08d0419
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 18:47:16 2024 -0500
reduce variable-length argument lists to match the existing code
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit ff9312d99940be2d81d91601ad6c1688da1016bd
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Fri Mar 1 17:01:07 2024 -0500
fix references to uninitialized data when constructing argument-lists
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit cc1e73a85d437ebd0d5c8efbe14a7f398c1b9fcc
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Thu Feb 29 20:19:25 2024 -0500
manpage: improve formatting consistency of bold/italics
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 080e6e49825c2e03adb0c5dd8dad53767ec41ce6
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Thu Feb 29 18:12:40 2024 -0500
manpage: assume .EX/.EE macros
Branden Robinson says macros have to go after ".TH"; the existing macros did
not match the format used in groff, etc., and can be simply removed. The
".TQ" macro is used only without a parameter, causing an extra space to be
emitted (and fixed that by dropping the parameter).
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit d696cf912efb884af1a73952f3bd70bd28a9a942
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Thu Feb 29 17:54:04 2024 -0500
manpage: adjust line-breaks to avoid embedded full-stops
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 6ded4c0487220253a2cb2fefc4983ff31e486dd4
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Thu Feb 29 16:45:23 2024 -0500
cppcheck scope and assignment warnings
commit f181d10b934c85a30f27de6aa0b71c94e68d2293
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Wed Feb 28 20:46:24 2024 -0500
reduce compiler-warnings using casts
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 785ba6f4ee7677f395252daf9c1de30fb80a179d
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Wed Feb 28 20:18:34 2024 -0500
provide fallback for deprecated isascii/toascii
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 36ac433450b7e0b260e44b4320c4b6af0ba12a8f
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Wed Feb 28 19:43:50 2024 -0500
quiet conversion-warnings with casts
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit eb5cbbd6f8056b3008c0f8e7e603b10a3ff4cbb2
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Wed Feb 28 18:04:28 2024 -0500
fix missing-initializer warnings
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 5c23a1f5e5b0961a0938a8f3da1c9ad01fe67af7
Author: Thomas E. Dickey <dickey@invisible-island.net>
Date: Wed Feb 28 16:30:11 2024 -0500
build-fix
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
commit 239a9d1f8fa2655a5ebc53de00e3311ae1413e33
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Feb 17 14:48:34 2024 -0800
unifdef ISC
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 6bbdea682c9c0064895e1619815a8d116f197c3f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:59:23 2024 -0800
Remove unused sharedlib.c
It was only built by Imake if SUNSHLIB was defined.
SUNSHLIB was only set in the Imake configs for SunOS versions < 5
(i.e. before Solaris 2.0).
It has never been used in the autoconf builds.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 84f62d9c2a37366661332b8218c842f5af98356d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:54:47 2024 -0800
unifdef __UNIXOS2__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit bce0fc281e883f4ffa53e47cd5fa96ea04ea4227
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:53:49 2024 -0800
unifdef __osf__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit b6de2199357cdbde852a9caea1ed752d3c236d65
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:51:04 2024 -0800
unifdef AIXV3 || __SCO__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit dbd28c703175051e0d20df664c4423317ed556a3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:48:19 2024 -0800
unifdef QNX4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 04a5e1a7d8cb1446e4fe2bb4a823d9795254fecb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:47:21 2024 -0800
unifdef sony
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit a6cd58c90cf5e47678fd50932d6fc2fdbffb2605
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 13 17:46:44 2024 -0800
unifdef NCR
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 1b5fe7cf8b5e7ed3f214b43b9f7e081c82df5b1d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 23 09:46:16 2023 -0700
gitlab CI: add xz-utils to container for "make distcheck"
Also update to latest ci-templates
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit e1b030770a2d489ff832b619ba646aa96e0bfb5c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 28 19:19:13 2023 -0800
Use C99 designated initializers where appropriate
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 77533b88018c2923075562e106ef2970c7e6c6a9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 28 17:49:59 2023 -0800
Handle redundantInitialization warnings from cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit c5a5fcea941e4ee7c4c68ae090601d6282f0a5cb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Feb 28 16:10:19 2023 -0800
Variable scope reductions as suggested by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 571c764ace3d4415531641db3dee0c2b066edc10
Author: Walter Harms <wharms@bfs.de>
Date: Sun Jun 18 21:05:34 2023 +0200
expand for simple widget demo
commit 55c2ab7cd46efb17f59f18d22307fcf5b26f3692
Author: Walter Harms <wharms@bfs.de>
Date: Sun Jun 18 21:04:43 2023 +0200
add simple widget demo
commit e67c7ff2bd6bff84edd70c224bc672535e4b41a4
Author: Walter Harms <wharms@bfs.de>
Date: Sat May 13 19:08:12 2023 +0200
add xawhisto
commit 2f99a415913b6be4ed2955a3e30694c2216aafbd
Author: Walter Harms <wharms@bfs.de>
Date: Fri May 12 23:03:32 2023 +0200
add examples
provide some examples to support the documentation
commit 324358180ddeaae482c5f66bb5647a4918710296
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Mar 28 12:08:41 2023 -0700
Set close-on-exec when opening files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 78eb3c75688a1e92ec435e5bc3ded063cd339a73 commit 78eb3c75688a1e92ec435e5bc3ded063cd339a73
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Mar 15 16:29:53 2023 -0700 Date: Wed Mar 15 16:29:53 2023 -0700

View file

@ -1,4 +1,4 @@
SUBDIRS = include src man specs SUBDIRS = include src examples man specs
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig_DATA =

View file

@ -265,6 +265,7 @@ XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@ XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@ XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@ XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@ -322,7 +323,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
SUBDIRS = include src man specs SUBDIRS = include src examples man specs
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(am__append_1) $(am__append_2) pkgconfig_DATA = $(am__append_1) $(am__append_2)
@BUILD_XAW6_TRUE@@PLATFORM_DARWIN_FALSE@DEFAULT_LIB = libXaw6.@LIBEXT@ @BUILD_XAW6_TRUE@@PLATFORM_DARWIN_FALSE@DEFAULT_LIB = libXaw6.@LIBEXT@

24
lib/libXaw/aclocal.m4 vendored
View file

@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then if test -n "$RANLIB"; then
case $host_os in case $host_os in
openbsd* | secbsd*) openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;; ;;
*) *)
@ -1651,7 +1651,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192; lt_cv_sys_max_cmd_len=8192;
;; ;;
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*) netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further. # This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@ -2734,7 +2734,7 @@ newsos6)
dynamic_linker='ldqnx.so' dynamic_linker='ldqnx.so'
;; ;;
openbsd* | secbsd*) openbsd*)
version_type=sunos version_type=sunos
sys_lib_dlsearch_path_spec="/usr/lib" sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no need_lib_prefix=no
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
i*86 ) i*86 )
# Not sure whether the presence of OpenBSD here was a mistake. # Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up. # Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|SecBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;; ;;
@ -3320,7 +3320,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
openbsd* | secbsd*) openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else else
@ -4650,7 +4650,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++) # we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes with_gnu_ld=yes
;; ;;
openbsd* | secbsd*) openbsd*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
esac esac
@ -5377,7 +5377,7 @@ _LT_EOF
*nto* | *qnx*) *nto* | *qnx*)
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -6581,7 +6581,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no _LT_TAGVAR(ld_shlibs, $1)=no
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -9974,7 +9974,7 @@ dnl DEALINGS IN THE SOFTWARE.
# 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. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.20.0]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 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_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -10021,10 +10021,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -11385,7 +11385,7 @@ AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
# Obtain platform specific info like program name and options # Obtain platform specific info like program name and options
# The lint program on FreeBSD and NetBSD is different from the one on Solaris # The lint program on FreeBSD and NetBSD is different from the one on Solaris
case $host_os in case $host_os in
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*) *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
lint_name=splint lint_name=splint
lint_options="-badflag" lint_options="-badflag"
;; ;;

1733
lib/libXaw/config.guess vendored

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,12 @@
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ /* Define to 1 if you have the `ws2_32' library (-lws2_32). */
#undef HAVE_LIBWS2_32 #undef HAVE_LIBWS2_32
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the `malloc_usable_size' function. */
#undef HAVE_MALLOC_USABLE_SIZE
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H

3112
lib/libXaw/config.sub vendored

File diff suppressed because it is too large Load diff

220
lib/libXaw/configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for libXaw 1.0.15. # Generated by GNU Autoconf 2.71 for libXaw 1.0.16.
# #
# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues>. # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues>.
# #
@ -682,8 +682,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libXaw' PACKAGE_NAME='libXaw'
PACKAGE_TARNAME='libXaw' PACKAGE_TARNAME='libXaw'
PACKAGE_VERSION='1.0.15' PACKAGE_VERSION='1.0.16'
PACKAGE_STRING='libXaw 1.0.15' PACKAGE_STRING='libXaw 1.0.16'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues'
PACKAGE_URL='' PACKAGE_URL=''
@ -724,6 +724,9 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE am__EXEEXT_TRUE
LTLIBOBJS LTLIBOBJS
LIBOBJS LIBOBJS
ENABLE_UNIT_TESTS_FALSE
ENABLE_UNIT_TESTS_TRUE
XORG_MALLOC_DEBUG_ENV
BUILD_XAW7_FALSE BUILD_XAW7_FALSE
BUILD_XAW7_TRUE BUILD_XAW7_TRUE
BUILD_XAW6_FALSE BUILD_XAW6_FALSE
@ -914,6 +917,7 @@ with_xsltproc
enable_xaw6 enable_xaw6
enable_xaw7 enable_xaw7
enable_const enable_const
enable_unit_tests
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
@ -932,7 +936,8 @@ XSLTPROC
XAW6_CFLAGS XAW6_CFLAGS
XAW6_LIBS XAW6_LIBS
XAW7_CFLAGS XAW7_CFLAGS
XAW7_LIBS' XAW7_LIBS
XORG_MALLOC_DEBUG_ENV'
# Initialize some variables set by options. # Initialize some variables set by options.
@ -1481,7 +1486,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libXaw 1.0.15 to adapt to many kinds of systems. \`configure' configures libXaw 1.0.16 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1552,7 +1557,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libXaw 1.0.15:";; short | recursive ) echo "Configuration of libXaw 1.0.16:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1584,6 +1589,7 @@ Optional Features:
--disable-xaw6 Disable building of libXaw.so.6 --disable-xaw6 Disable building of libXaw.so.6
--disable-xaw7 Disable building of libXaw.so.7 --disable-xaw7 Disable building of libXaw.so.7
--disable-const Disable const-support --disable-const Disable const-support
--enable-unit-tests Enable building unit test cases (default: no)
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1619,6 +1625,8 @@ Some influential environment variables:
XAW6_LIBS linker flags for XAW6, overriding pkg-config XAW6_LIBS linker flags for XAW6, overriding pkg-config
XAW7_CFLAGS C compiler flags for XAW7, overriding pkg-config XAW7_CFLAGS C compiler flags for XAW7, overriding pkg-config
XAW7_LIBS linker flags for XAW7, overriding pkg-config XAW7_LIBS linker flags for XAW7, overriding pkg-config
XORG_MALLOC_DEBUG_ENV
Environment variables to enable memory checking in tests
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
@ -1687,7 +1695,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libXaw configure 1.0.15 libXaw configure 1.0.16
generated by GNU Autoconf 2.71 generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc. Copyright (C) 2021 Free Software Foundation, Inc.
@ -1957,7 +1965,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libXaw $as_me 1.0.15, which was It was created by libXaw $as_me 1.0.16, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw $ $0$ac_configure_args_raw
@ -3195,7 +3203,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libXaw' PACKAGE='libXaw'
VERSION='1.0.15' VERSION='1.0.16'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -19643,7 +19651,190 @@ printf "%s\n" "#define _CONST_X_STRING 1" >>confdefs.h
fi fi
ac_config_files="$ac_config_files Makefile include/Makefile man/Makefile specs/Makefile specs/libXaw.ent src/Makefile" # --enable-unit-tests
# Check for different types of support on different platforms
case $host_os in
solaris*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5
printf %s "checking for umem_alloc in -lumem... " >&6; }
if test ${ac_cv_lib_umem_umem_alloc+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lumem $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char umem_alloc ();
int
main (void)
{
return umem_alloc ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_umem_umem_alloc=yes
else $as_nop
ac_cv_lib_umem_umem_alloc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5
printf "%s\n" "$ac_cv_lib_umem_umem_alloc" >&6; }
if test "x$ac_cv_lib_umem_umem_alloc" = xyes
then :
malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'
fi
;;
*-gnu*) # GNU libc - Value is used as a single byte bit pattern,
# both directly and inverted, so should not be 0 or 255.
malloc_debug_env='MALLOC_PERTURB_=15'
;;
darwin*)
malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
;;
*bsd*)
malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
;;
esac
# User supplied flags override default flags
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
fi
XORG_MALLOC_DEBUG_ENV=$malloc_debug_env
# Check whether --enable-unit-tests was given.
if test ${enable_unit_tests+y}
then :
enableval=$enable_unit_tests; enable_unit_tests=$enableval
else $as_nop
enable_unit_tests=no
fi
if test "x$enable_unit_tests" != xno; then
ENABLE_UNIT_TESTS_TRUE=
ENABLE_UNIT_TESTS_FALSE='#'
else
ENABLE_UNIT_TESTS_TRUE='#'
ENABLE_UNIT_TESTS_FALSE=
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build unit test cases" >&5
printf %s "checking whether to build unit test cases... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_unit_tests" >&5
printf "%s\n" "$enable_unit_tests" >&6; }
# Check for different types of support on different platforms
case $host_os in
solaris*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5
printf %s "checking for umem_alloc in -lumem... " >&6; }
if test ${ac_cv_lib_umem_umem_alloc+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lumem $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char umem_alloc ();
int
main (void)
{
return umem_alloc ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_umem_umem_alloc=yes
else $as_nop
ac_cv_lib_umem_umem_alloc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5
printf "%s\n" "$ac_cv_lib_umem_umem_alloc" >&6; }
if test "x$ac_cv_lib_umem_umem_alloc" = xyes
then :
malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'
fi
;;
*-gnu*) # GNU libc - Value is used as a single byte bit pattern,
# both directly and inverted, so should not be 0 or 255.
malloc_debug_env='MALLOC_PERTURB_=15'
;;
darwin*)
malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
;;
*bsd*)
malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
;;
esac
# User supplied flags override default flags
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
fi
XORG_MALLOC_DEBUG_ENV=$malloc_debug_env
if test "x$enable_unit_tests" != "xno" ; then
ac_fn_c_check_func "$LINENO" "malloc_usable_size" "ac_cv_func_malloc_usable_size"
if test "x$ac_cv_func_malloc_usable_size" = xyes
then :
printf "%s\n" "#define HAVE_MALLOC_USABLE_SIZE 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
if test "x$ac_cv_header_malloc_h" = xyes
then :
printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
fi
fi
ac_config_files="$ac_config_files Makefile examples/Makefile include/Makefile man/Makefile specs/Makefile specs/libXaw.ent src/Makefile"
if test "x$build_v6" = xyes; then if test "x$build_v6" = xyes; then
@ -19833,6 +20024,10 @@ if test -z "${BUILD_XAW7_TRUE}" && test -z "${BUILD_XAW7_FALSE}"; then
as_fn_error $? "conditional \"BUILD_XAW7\" was never defined. as_fn_error $? "conditional \"BUILD_XAW7\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi fi
if test -z "${ENABLE_UNIT_TESTS_TRUE}" && test -z "${ENABLE_UNIT_TESTS_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_UNIT_TESTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: "${CONFIG_STATUS=./config.status}" : "${CONFIG_STATUS=./config.status}"
ac_write_fail=0 ac_write_fail=0
@ -20223,7 +20418,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by libXaw $as_me 1.0.15, which was This file was extended by libXaw $as_me 1.0.16, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -20291,7 +20486,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped' ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\ ac_cs_version="\\
libXaw config.status 1.0.15 libXaw config.status 1.0.16
configured by $0, generated by GNU Autoconf 2.71, configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
@ -20702,6 +20897,7 @@ do
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"libtool_hack") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool_hack" ;; "libtool_hack") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool_hack" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"specs/Makefile") CONFIG_FILES="$CONFIG_FILES specs/Makefile" ;; "specs/Makefile") CONFIG_FILES="$CONFIG_FILES specs/Makefile" ;;

View file

@ -1,7 +1,7 @@
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([libXaw], [1.0.15], AC_INIT([libXaw], [1.0.16],
[https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues], [libXaw]) [https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues], [libXaw])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
@ -115,7 +115,16 @@ if test "x$USE_CONST" = "xyes" ; then
AC_DEFINE(_CONST_X_STRING, 1, [Define to 1 to use standard C const feature.]) AC_DEFINE(_CONST_X_STRING, 1, [Define to 1 to use standard C const feature.])
fi fi
# --enable-unit-tests
XORG_ENABLE_UNIT_TESTS(no)
XORG_MEMORY_CHECK_FLAGS
if test "x$enable_unit_tests" != "xno" ; then
AC_CHECK_FUNCS([malloc_usable_size])
AC_CHECK_HEADERS([malloc.h])
fi
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
examples/Makefile
include/Makefile include/Makefile
man/Makefile man/Makefile
specs/Makefile specs/Makefile

View file

@ -0,0 +1,15 @@
if ENABLE_UNIT_TESTS
check_PROGRAMS = list menu pane repeater scrollbar simple strip toggle viewport xawhisto
TESTS=$(check_PROGRAMS)
AM_CFLAGS = $(CWARNFLAGS) $(XAW_CFLAGS)
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_builddir)/include/X11
LDADD= $(top_builddir)/src/libXaw7.la $(XAW7_LIBS)
TESTS_ENVIRONMENT = $(MALLOC_DEBUG_ENV)
endif ENABLE_UNIT_TESTS

View file

@ -0,0 +1,774 @@
# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_UNIT_TESTS_TRUE@check_PROGRAMS = list$(EXEEXT) menu$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@ pane$(EXEEXT) repeater$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@ scrollbar$(EXEEXT) simple$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@ strip$(EXEEXT) toggle$(EXEEXT) \
@ENABLE_UNIT_TESTS_TRUE@ viewport$(EXEEXT) xawhisto$(EXEEXT)
subdir = examples
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
list_SOURCES = list.c
list_OBJECTS = list.$(OBJEXT)
list_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
@ENABLE_UNIT_TESTS_TRUE@list_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
menu_SOURCES = menu.c
menu_OBJECTS = menu.$(OBJEXT)
menu_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@menu_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
pane_SOURCES = pane.c
pane_OBJECTS = pane.$(OBJEXT)
pane_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@pane_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
repeater_SOURCES = repeater.c
repeater_OBJECTS = repeater.$(OBJEXT)
repeater_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@repeater_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
scrollbar_SOURCES = scrollbar.c
scrollbar_OBJECTS = scrollbar.$(OBJEXT)
scrollbar_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@scrollbar_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
simple_SOURCES = simple.c
simple_OBJECTS = simple.$(OBJEXT)
simple_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@simple_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
strip_SOURCES = strip.c
strip_OBJECTS = strip.$(OBJEXT)
strip_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@strip_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
toggle_SOURCES = toggle.c
toggle_OBJECTS = toggle.$(OBJEXT)
toggle_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@toggle_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
viewport_SOURCES = viewport.c
viewport_OBJECTS = viewport.$(OBJEXT)
viewport_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@viewport_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
xawhisto_SOURCES = xawhisto.c
xawhisto_OBJECTS = xawhisto.$(OBJEXT)
xawhisto_LDADD = $(LDADD)
@ENABLE_UNIT_TESTS_TRUE@xawhisto_DEPENDENCIES = \
@ENABLE_UNIT_TESTS_TRUE@ $(top_builddir)/src/libXaw7.la \
@ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = list.c menu.c pane.c repeater.c scrollbar.c simple.c strip.c \
toggle.c viewport.c xawhisto.c
DIST_SOURCES = list.c menu.c pane.c repeater.c scrollbar.c simple.c \
strip.c toggle.c viewport.c xawhisto.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = $(am__tty_colors_dummy)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
FOP = @FOP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBEXT = @LIBEXT@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
VERSION = @VERSION@
XAW6_CFLAGS = @XAW6_CFLAGS@
XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@
XSL_STYLESHEET = @XSL_STYLESHEET@
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@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@ENABLE_UNIT_TESTS_TRUE@TESTS = $(check_PROGRAMS)
@ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(CWARNFLAGS) $(XAW_CFLAGS)
@ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = \
@ENABLE_UNIT_TESTS_TRUE@ -I$(top_srcdir)/include \
@ENABLE_UNIT_TESTS_TRUE@ -I$(top_builddir)/include \
@ENABLE_UNIT_TESTS_TRUE@ -I$(top_builddir)/include/X11
@ENABLE_UNIT_TESTS_TRUE@LDADD = $(top_builddir)/src/libXaw7.la $(XAW7_LIBS)
@ENABLE_UNIT_TESTS_TRUE@TESTS_ENVIRONMENT = $(MALLOC_DEBUG_ENV)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
list$(EXEEXT): $(list_OBJECTS) $(list_DEPENDENCIES) $(EXTRA_list_DEPENDENCIES)
@rm -f list$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(list_OBJECTS) $(list_LDADD) $(LIBS)
menu$(EXEEXT): $(menu_OBJECTS) $(menu_DEPENDENCIES) $(EXTRA_menu_DEPENDENCIES)
@rm -f menu$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(menu_OBJECTS) $(menu_LDADD) $(LIBS)
pane$(EXEEXT): $(pane_OBJECTS) $(pane_DEPENDENCIES) $(EXTRA_pane_DEPENDENCIES)
@rm -f pane$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pane_OBJECTS) $(pane_LDADD) $(LIBS)
repeater$(EXEEXT): $(repeater_OBJECTS) $(repeater_DEPENDENCIES) $(EXTRA_repeater_DEPENDENCIES)
@rm -f repeater$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(repeater_OBJECTS) $(repeater_LDADD) $(LIBS)
scrollbar$(EXEEXT): $(scrollbar_OBJECTS) $(scrollbar_DEPENDENCIES) $(EXTRA_scrollbar_DEPENDENCIES)
@rm -f scrollbar$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(scrollbar_OBJECTS) $(scrollbar_LDADD) $(LIBS)
simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) $(EXTRA_simple_DEPENDENCIES)
@rm -f simple$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
strip$(EXEEXT): $(strip_OBJECTS) $(strip_DEPENDENCIES) $(EXTRA_strip_DEPENDENCIES)
@rm -f strip$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(strip_OBJECTS) $(strip_LDADD) $(LIBS)
toggle$(EXEEXT): $(toggle_OBJECTS) $(toggle_DEPENDENCIES) $(EXTRA_toggle_DEPENDENCIES)
@rm -f toggle$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(toggle_OBJECTS) $(toggle_LDADD) $(LIBS)
viewport$(EXEEXT): $(viewport_OBJECTS) $(viewport_DEPENDENCIES) $(EXTRA_viewport_DEPENDENCIES)
@rm -f viewport$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(viewport_OBJECTS) $(viewport_LDADD) $(LIBS)
xawhisto$(EXEEXT): $(xawhisto_OBJECTS) $(xawhisto_DEPENDENCIES) $(EXTRA_xawhisto_DEPENDENCIES)
@rm -f xawhisto$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(xawhisto_OBJECTS) $(xawhisto_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pane.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repeater.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrollbar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toggle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewport.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xawhisto.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
$(am__tty_colors); \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
col=$$red; res=XPASS; \
;; \
*) \
col=$$grn; res=PASS; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
col=$$lgn; res=XFAIL; \
;; \
*) \
failed=`expr $$failed + 1`; \
col=$$red; res=FAIL; \
;; \
esac; \
else \
skip=`expr $$skip + 1`; \
col=$$blu; res=SKIP; \
fi; \
echo "$${col}$$res$${std}: $$tst"; \
done; \
if test "$$all" -eq 1; then \
tests="test"; \
All=""; \
else \
tests="tests"; \
All="All "; \
fi; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="$$All$$all $$tests passed"; \
else \
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all $$tests failed"; \
else \
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
fi; \
fi; \
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
if test "$$skip" -eq 1; then \
skipped="($$skip test was not run)"; \
else \
skipped="($$skip tests were not run)"; \
fi; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
col="$$grn"; \
else \
col="$$red"; \
fi; \
echo "$${col}$$dashes$${std}"; \
echo "$${col}$$banner$${std}"; \
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
test -z "$$report" || echo "$${col}$$report$${std}"; \
echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
clean-checkPROGRAMS clean-generic clean-libtool cscopelist \
ctags distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,52 @@
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/List.h>
#include <Xaw/Viewport.h>
#include <Xaw/Command.h>
void quit_CB(Widget w, XtPointer closure, XtPointer call_data)
{
Widget lst=closure;
XawListReturnStruct *ret;
ret=XawListShowCurrent(lst);
if (ret->string[0] != 0)
printf("selected:%s\n",ret->string);
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
int main(int argc, char **argv)
{
Widget toplevel,box,list,cmd,view;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "Hello", NULL, 0,
&argc, argv, NULL,
NULL, 0);
char *items[]={ "the ","quick","brown", "fox ",
"jumps","Over","the","lazy","dog",
NULL};
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
cmd=XtCreateManagedWidget("exit", commandWidgetClass, box, NULL, 0);
view=XtVaCreateManagedWidget("viewport", viewportWidgetClass, box,
XtNallowVert, 1,
XtNforceBars,1,
NULL);
list= XtVaCreateManagedWidget("listbox", listWidgetClass,view,
XtNlist,items,
XtNdefaultColumns,1,
XtNnumberStrings,4,
XtNforceColumns,1,
NULL);
XawListChange(list,items,0,0,0);
XtAddCallback(cmd, XtNcallback, quit_CB , list);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,62 @@
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Command.h>
#include <Xaw/SimpleMenu.h>
#include <Xaw/MenuButton.h>
#include <Xaw/Sme.h>
#include <Xaw/SmeLine.h>
#include <Xaw/SmeBSB.h>
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
void setupmenu(Widget top)
{
Widget button, menu;
char buf[256];
int i;
button = XtVaCreateManagedWidget("menuButton", menuButtonWidgetClass, top,
NULL);
menu = XtVaCreatePopupShell("menu", simpleMenuWidgetClass,
button, NULL);
for (i = 1; i < 6; i++) {
sprintf(buf, "menuEntry%d", i );
(void) XtVaCreateManagedWidget(buf, smeBSBObjectClass, menu, NULL);
if (i == 2)
(void) XtVaCreateManagedWidget("menuButton", smeLineObjectClass,
menu, NULL);
}
}
int main(int argc, char **argv)
{
Widget toplevel,box,command;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
setupmenu(box);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,84 @@
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Label.h>
#include <Xaw/Paned.h>
#include <Xaw/Command.h>
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
static void
getnumsub_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
Widget p=XtParent(w);
char buf[80];
int min,max;
XawPanedGetMinMax(w,&min,&max);
sprintf(buf,"%d number\n%d min %d max\n",XawPanedGetNumSub(p),min,max);
XtVaSetValues(w,XtNlabel,buf,NULL);
}
static void
refigure_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
Widget p=XtParent(w);
XawPanedSetRefigureMode(p,False);
}
int main(int argc, char **argv)
{
Widget toplevel,pane,label,command;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
pane=XtVaCreateManagedWidget( "paned", panedWidgetClass, toplevel,
NULL);
label = XtVaCreateManagedWidget("Label",
labelWidgetClass,
pane, XtNlabel, "quick", NULL);
XawPanedAllowResize(label,False);
label = XtVaCreateManagedWidget("Label",
labelWidgetClass,
pane, XtNlabel, "brown", NULL);
label = XtVaCreateManagedWidget("Label",
labelWidgetClass,
pane, XtNlabel, "fox", NULL);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, pane,
XtNlabel, "stop resize",
NULL);
XtAddCallback(command, XtNcallback,refigure_cb, NULL);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, pane,
XtNlabel, "getnumsub",
NULL);
XtAddCallback(command, XtNcallback,getnumsub_cb, NULL);
XawPanedSetMinMax(command,50,100);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, pane,
XtNlabel, "EXIT",
NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,77 @@
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Command.h>
#include <Xaw/Repeater.h>
static int counter;
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
static void
start_cb(Widget w, XtPointer ptr, XtPointer arg)
{
#ifdef DEBUG
puts("Start");
#endif
}
static void
do_cb(Widget w, XtPointer ptr, XtPointer arg)
{
char buf[10];
Widget show= (Widget)ptr;
counter++;
snprintf(buf,10,"%d",counter);
XtVaSetValues(show,XtNlabel,buf,NULL);
#ifdef DEBUG
puts("counter");
#endif
}
static void
stop_cb(Widget w, XtPointer ptr, XtPointer arg)
{
counter=0;
#ifdef DEBUG
puts("reset counter");
#endif
}
int main(int argc, char **argv)
{
Widget toplevel,box,command,rep;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
rep=XtVaCreateManagedWidget("Repeater",
repeaterWidgetClass,
box, XtNlabel,"hitme",NULL);
XtAddCallback(rep,XtNstartCallback,start_cb,command);
XtAddCallback(rep,XtNcallback,do_cb,command);
XtAddCallback(rep,XtNstopCallback,stop_cb,command);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,72 @@
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Label.h>
#include <Xaw/Scrollbar.h>
#include <Xaw/Command.h>
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
static void
scroll_cb(Widget widget,XtPointer label_ptr, XtPointer value_ptr)
{
long value = (long)value_ptr;
Widget label = (Widget) label_ptr;
char *msg=NULL;
asprintf(&msg, "%ld", value);
XtVaSetValues( label, XtNlabel, msg, NULL);
free(msg);
}
static void
jump_cb(Widget widget,XtPointer label_ptr, XtPointer value_ptr)
{
float value = *(float *)value_ptr;
Widget label = (Widget) label_ptr;
char *msg=NULL;
asprintf(&msg, "%lf", value);
XtVaSetValues( label, XtNlabel, msg, NULL);
free(msg);
}
int main(int argc, char **argv)
{
Widget toplevel,box,label,scroll,command;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
label = XtVaCreateManagedWidget("Label",
labelWidgetClass,
box, XtNlabel, "hello", NULL);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
scroll = XtVaCreateManagedWidget("scroller",
scrollbarWidgetClass, box,
XtNorientation,XtorientHorizontal,
XtNlength,500,
XtNwidth,100,
NULL);
XtAddCallback(scroll, XtNscrollProc, scroll_cb, label);
XtAddCallback(scroll,XtNjumpProc,jump_cb,label);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,79 @@
#include <stdlib.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Simple.h>
#include <Xaw/Command.h>
#include <X11/Xmu/Drawing.h>
/*
this is the draw function. it uses two pencils (GC) with
different colors. one pencil is used to draw the logo,
the other is used to fill the background.
*/
static void ac_set ( Widget w, XEvent *event, String *params, Cardinal *num_params )
{
GC gc1,gc2;
XGCValues values;
Dimension wi,hi;
if (!XtIsRealized(w))
return ;
if (strcmp(XtName(w),"draw") != 0)
return ;
XtVaGetValues(w,XtNheight,&hi,XtNwidth,&wi,NULL);
values.foreground = 0xcf00fe; //purple
gc1 = XtGetGC(w, GCForeground, &values);
values.foreground = 0x00ff00; //green
gc2 = XtGetGC(w, GCForeground, &values);
XmuDrawLogo(XtDisplay(w), XtWindow(w), gc1, gc2, 0,0, wi, hi );
XtReleaseGC(w,gc1);
XtReleaseGC(w,gc2);
}
static void
quit_cb(Widget w, XtPointer data, XtPointer call_data)
{
XtAppSetExitFlag( XtWidgetToApplicationContext(w) );
};
int main(int argc, char **argv)
{
Widget toplevel,box,command,simple;
XtAppContext app;
static char translation[] =
"<Expose>:set()\n";
static XtActionsRec actionTable[] = {
{"set",ac_set }
};
toplevel = XtAppInitialize(&app, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
XtAppAddActions(app, actionTable, XtNumber(actionTable) );
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
simple=XtVaCreateManagedWidget("draw",
simpleWidgetClass, box,
XtNheight,250,
XtNwidth,250,
XtNbackground, 0xff0000,
XtNtranslations,XtParseTranslationTable(translation),
NULL);
XtAddCallback(command, XtNcallback, quit_cb, simple );
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
exit(0);
}

View file

@ -0,0 +1,51 @@
#include <stdio.h>
#include <stdlib.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Command.h>
#include <Xaw/StripChart.h>
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
static void
getvalue_cb(Widget widget,XtPointer label_ptr, XtPointer value_ptr)
{
static double dbl=0,delta=0.1;
double *ret = (double *)value_ptr;
dbl=dbl+delta;
if (dbl >= 1.0 || dbl <= 0 ) { delta = delta*-1.0 ; }
*ret=dbl;
}
int main(int argc, char **argv)
{
Widget toplevel,box,chart,command;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
chart = XtVaCreateManagedWidget("chart",
stripChartWidgetClass, box,
XtNupdate, 1,
NULL);
XtAddCallback(chart,XtNgetValue,getvalue_cb,NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,103 @@
#include <stdio.h>
#include <stdlib.h>
#include <X11/StringDefs.h>
#include <Xaw/Box.h>
#include <Xaw/Command.h>
#include <Xaw/Toggle.h>
static Widget toggle[3];
static Widget radio_group;
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
static void
getdata_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
char *radio_data=XawToggleGetCurrent(radio_group);
if (radio_data)
printf("radio_data=%s\n",radio_data);
else
printf("radio_data=%s\n","nodata");
}
static void
unset_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XawToggleUnsetCurrent(radio_group);
}
static void
reset_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XawToggleSetCurrent(radio_group,"3397");
}
int main(int argc, char **argv)
{
Widget toplevel,box,command;
XtAppContext app_con;
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, toplevel, NULL, 0);
command = XtVaCreateManagedWidget("cmd",
commandWidgetClass, box,
XtNlabel, "EXIT",
NULL);
toggle[0]=XtVaCreateManagedWidget("toggle",
toggleWidgetClass, box,
// XtNradioData,radioname,
XtNradioGroup,radio_group,
XtNlabel, "track",
NULL);
radio_group=toggle[0];
toggle[1]=XtVaCreateManagedWidget("toggle",
toggleWidgetClass, box,
// XtNradioData,radioname,
XtNradioGroup,radio_group,
XtNlabel, "trick",
NULL);
toggle[2]=XtVaCreateManagedWidget("toggle",
toggleWidgetClass, box,
XtNradioData,"3397",
XtNradioGroup,radio_group,
XtNlabel, "tick",
NULL);
XtAddCallback(command, XtNcallback, quit_cb, NULL);
command = XtVaCreateManagedWidget("getcurrent",
commandWidgetClass, box,
XtNlabel, "say ",
NULL);
XtAddCallback(command, XtNcallback, getdata_cb, NULL);
command = XtVaCreateManagedWidget("unsetcurrent",
commandWidgetClass, box,
XtNlabel, "unset ",
NULL);
XtAddCallback(command, XtNcallback, unset_cb, NULL);
command = XtVaCreateManagedWidget("setnew",
commandWidgetClass, box,
XtNlabel, "setnew",
NULL);
XtAddCallback(command, XtNcallback, reset_cb, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,45 @@
#include <stdlib.h>
#include <stdio.h>
#include <X11/StringDefs.h>
#include <Xaw/Viewport.h>
#include <Xaw/Command.h>
#include <Xaw/Box.h>
static void
quit_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
int main(int argc, char **argv)
{
Widget toplevel,viewport,box,cmd;
XtAppContext app_con;
int i;
char buf[80];
toplevel = XtAppInitialize(&app_con, "demo", NULL, 0,
&argc, argv, NULL,
NULL, 0);
viewport = XtVaCreateManagedWidget("view", viewportWidgetClass, toplevel,
XtNforceBars,True,
XtNallowVert,True,
NULL);
box = XtVaCreateManagedWidget("box", boxWidgetClass, viewport,
XtNvSpace,10,
NULL);
for (i=0;i<10;i++){
sprintf(buf,"label%02d",i);
cmd=XtVaCreateManagedWidget("cmd",
commandWidgetClass,
box, XtNlabel, buf, NULL);
XtAddCallback(cmd, XtNcallback, quit_cb, NULL);
}
XtRealizeWidget(toplevel);
XtAppMainLoop(app_con);
exit(0);
}

View file

@ -0,0 +1,81 @@
#include <stdio.h>
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Scrollbar.h>
static XtAppContext app_context;
static Widget scrollbar;
static Widget command;
static XtIntervalId timerId;
static void update(XtPointer client_data, XtIntervalId * id)
{
char buf[28];
static int i = 1;
sprintf(buf, "% 2d%%", i);
XtVaSetValues(command, XtNlabel, buf, NULL);
XawScrollbarSetThumb(scrollbar, 0.0, (i / 100.0));
i ++;
i %= 100;
timerId = XtAppAddTimeOut(app_context, 500 , update, app_context);
}
static void cmd_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XtAppSetExitFlag(XtWidgetToApplicationContext(w));
}
int main(int argc, char **argv)
{
Widget form;
Widget topLevel;
topLevel = XtVaAppInitialize(&app_context, "demo",
NULL, 0,
&argc, argv, NULL, NULL);
form = XtVaCreateManagedWidget("form",
formWidgetClass, topLevel,
XtNorientation, XtorientHorizontal,
XtNborderWidth, 0,
XtNdefaultDistance, 2,
NULL);
command = XtVaCreateManagedWidget("command",
commandWidgetClass, form,
XtNleft, XtChainLeft,
XtNhighlightThickness, 0,
XtNborderWidth, 2,
XtNlabel, "start",
XtNresize, FALSE,
NULL);
scrollbar = XtVaCreateManagedWidget("scrollbar",
scrollbarWidgetClass, form,
XtNhorizDistance, 3,
XtNfromHoriz, command,
XtNorientation, XtorientHorizontal,
NULL);
XawScrollbarSetThumb(scrollbar, 0.0, 0.0);
/*
* disable interaction from scrollbar
*/
XtVaSetValues(scrollbar,
XtNtranslations, XtParseTranslationTable(""), NULL);
XtAddCallback(command, XtNcallback, cmd_cb, NULL);
XtRealizeWidget(topLevel);
timerId = XtAppAddTimeOut(app_context, 0, update, app_context);
XtAppMainLoop(app_context);
return 0;
}

View file

@ -203,6 +203,7 @@ XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@ XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@ XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@ XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@

View file

@ -167,7 +167,7 @@ _XFUNCPROTOBEGIN
void XawListChange void XawListChange
( (
Widget w, Widget w,
_Xconst char **list, String *list,
int nitems, int nitems,
int longest, int longest,
#if NeedWidePrototypes #if NeedWidePrototypes

View file

@ -730,7 +730,6 @@ _LT_CONFIG_SAVE_COMMANDS([
cat <<_LT_EOF >> "$cfgfile" cat <<_LT_EOF >> "$cfgfile"
#! $SHELL #! $SHELL
# Generated automatically by $as_me ($PACKAGE) $VERSION # Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# Provide generalized library-building support services. # Provide generalized library-building support services.
@ -2907,6 +2906,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
dynamic_linker='GNU/Linux ld.so' dynamic_linker='GNU/Linux ld.so'
;; ;;
netbsdelf*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='NetBSD ld.elf_so'
;;
netbsd*) netbsd*)
version_type=sunos version_type=sunos
need_lib_prefix=no need_lib_prefix=no
@ -3566,7 +3577,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
netbsd*) netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else else
@ -4072,7 +4083,8 @@ _LT_EOF
if AC_TRY_EVAL(ac_compile); then if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols. # Now try to grab the symbols.
nlist=conftest.nm nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist" mv -f "$nlist"T "$nlist"
@ -4444,7 +4456,7 @@ m4_if([$1], [CXX], [
;; ;;
esac esac
;; ;;
netbsd*) netbsd* | netbsdelf*-gnu)
;; ;;
*qnx* | *nto*) *qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise # QNX uses GNU C++, but need to define -shared option too, otherwise
@ -4712,6 +4724,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;; ;;
# flang / f18. f95 an alias for gfortran or flang on Debian
flang* | f18* | f95*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
# icc used to be incompatible with GCC. # icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more. # ICC 10 doesn't accept -KPIC any more.
icc* | ifort*) icc* | ifort*)
@ -4956,6 +4974,9 @@ m4_if([$1], [CXX], [
;; ;;
esac esac
;; ;;
linux* | k*bsd*-gnu | gnu*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
*) *)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;; ;;
@ -5018,6 +5039,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
openbsd* | bitrig* | secbsd*) openbsd* | bitrig* | secbsd*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
linux* | k*bsd*-gnu | gnu*)
_LT_TAGVAR(link_all_deplibs, $1)=no
;;
esac esac
_LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(ld_shlibs, $1)=yes
@ -5253,6 +5277,7 @@ _LT_EOF
case $cc_basename in case $cc_basename in
tcc*) tcc*)
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
;; ;;
xlf* | bgf* | bgxlf* | mpixlf*) xlf* | bgf* | bgxlf* | mpixlf*)
@ -5273,7 +5298,7 @@ _LT_EOF
fi fi
;; ;;
netbsd*) netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc= wlarc=
@ -5794,6 +5819,7 @@ _LT_EOF
if test yes = "$lt_cv_irix_exported_symbol"; then if test yes = "$lt_cv_irix_exported_symbol"; then
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi fi
_LT_TAGVAR(link_all_deplibs, $1)=no
else else
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
@ -5811,11 +5837,12 @@ _LT_EOF
# Fabrice Bellard et al's Tiny C Compiler # Fabrice Bellard et al's Tiny C Compiler
_LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(ld_shlibs, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;; ;;
esac esac
;; ;;
netbsd*) netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else else
@ -6442,7 +6469,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
# linking a shared library. # linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else else
GXX=no GXX=no
@ -6818,7 +6845,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them # explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library # from the output so that they don't get included in the library
# dependencies. # dependencies.
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;; ;;
*) *)
if test yes = "$GXX"; then if test yes = "$GXX"; then
@ -6883,7 +6910,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them # explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library # from the output so that they don't get included in the library
# dependencies. # dependencies.
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;; ;;
*) *)
if test yes = "$GXX"; then if test yes = "$GXX"; then
@ -7222,7 +7249,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
# linking a shared library. # linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else else
# FIXME: insert proper C++ library support # FIXME: insert proper C++ library support
@ -7306,7 +7333,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
# linking a shared library. # linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
else else
# g++ 2.7 appears to require '-G' NOT '-shared' on this # g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform. # platform.
@ -7317,7 +7344,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
# linking a shared library. # linking a shared library.
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
fi fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'

View file

@ -225,6 +225,7 @@ XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@ XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@ XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@ XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@

View file

@ -26,29 +26,24 @@
.\" .\"
.\" Author: Paulo César Pereira de Andrade .\" Author: Paulo César Pereira de Andrade
.\" .\"
.de EX
.sp
.nf
.ft CW
..
.de EE
.ft R
.fi
.sp
..
.de TQ
.\".br
.ns
.TP \\$1
..
.TH Xaw __libmansuffix__ __vendorversion__ .TH Xaw __libmansuffix__ __vendorversion__
.de TQ
.ns
.TP
..
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.SH NAME .SH NAME
Xaw \- X Athena Widgets Xaw \-
X Athena Widgets
.SH DESCRIPTION .SH DESCRIPTION
.B Xaw .B Xaw
is a widget set based on the X Toolkit Intrinsics (Xt) Library. This is a widget set based on the X Toolkit Intrinsics (Xt) Library.
release by the X.Org Foundation includes additions and modifications This release by the X.Org Foundation includes additions and modifications
originally made for The XFree86 Project, Inc. This manual page describes originally made for The XFree86 Project, Inc.
This manual page describes
these changes as well as some of the common interfaces between its version these changes as well as some of the common interfaces between its version
and the previous X Consortium release (Xaw6). and the previous X Consortium release (Xaw6).
.PP .PP
@ -57,425 +52,549 @@ which may be installed in __docdir__, or found on the X.Org website.
.SH ACTIONS .SH ACTIONS
All of the \fIXaw\fR widgets now have the additional translations All of the \fIXaw\fR widgets now have the additional translations
.B call-proc, declare, get-values .B call-proc, declare, get-values
and \fBset-values\fP. The syntax for these actions is: and \fBset-values\fP.
The syntax for these actions is:
.PP .PP
.I action-name \fP(\fIboolean-expression\fP, \fIarguments\fP) .I action-name \fP(\fIboolean-expression\fP, \fIarguments\fP)
.PP .PP
\fBAction-name\fP is one of \fIcall-proc\fP, \fIdeclare\fP, \fIaction-name\fP is one of \fBcall-proc\fP, \fBdeclare\fP,
\fIget-values\fP or \fIset-values\fP. \fBget-values\fP or \fBset-values\fP.
.PP .PP
\fBBoolean-expression\fP is composed with the operators \fI|\fR (or), \fI&\fR \fIboolean-expression\fP is composed with the operators
(and), \fI^\fR (xor), and \fI~\fR (not). The operands can be a variable name, .RS
which starts with a \fI$\fR; a resource name without the bindings \fI.\fP .TP
or \fI*\fP; or a constant name, including \fImine\fP (event->xany.window \fB|\fR (or),
== XtWindow(widget)), \fIfaked\fP (event->xany.send_event != 0), \fItrue\fP (1) .TP
and \fIfalse\fP (0). \fB&\fR (and),
.TP
\fB^\fR (xor), and
.TP
\fB~\fR (not).
.RE
.IP
Its operands can be
.RS
.bP
a variable name, which starts with a \fI$\fR,
.bP
a resource name without the bindings \fI.\fP or \fI*\fP, or
.bP
a constant name, including
.RS
.bP
\fImine\fP (event->xany.window == XtWindow(widget)),
.bP
\fIfaked\fP (event->xany.send_event != 0),
.bP
\fItrue\fP (1) and
.bP
\fIfalse\fP (0).
.RE
.RE
.PP .PP
\fBArguments\fP are self-explanatory; when starting with a \fI$\fP they name \fIarguments\fP are self-explanatory:
a variable, otherwise, they indicate a resource name. .RS
.bP
when starting with a \fI$\fP they name a variable,
.bP
otherwise they indicate a resource name.
.RE
.TP 8 .TP 8
.B call-proc \fP(\fIboolean-expression\fP, \fIprocedure-name\fP) .B call-proc \fP(\fIboolean-expression\fP, \fIprocedure-name\fP)
This action allows the evaluation of a boolean expression in the first This action allows the evaluation of a boolean expression in the first
parameter before calling a action procedure. The procedure is only called parameter before calling a action procedure.
if the expression evaluates as true. Example: The procedure is only called if the expression evaluates as true.
Example:
.EX .EX
call-proc("$inside & $pressed", notify) \fBcall-proc\fP("$inside & $pressed", notify)
.EE .EE
.TP 8 .TP 8
.B declare \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) .B declare \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
This action is used to create new variables or change their values. Any This action is used to create new variables or change their values.
number of variable-value tuples may be specified. Example: Any number of variable-value tuples may be specified.
Example:
.EX .EX
declare(1, $pressed, 1) \fBdeclare\fP(1, $pressed, 1)
.EE .EE
.TP 8 .TP 8
.B get-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) .B get-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
This action reads a widget resource value into a variable. Any number of This action reads a widget resource value into a variable.
variable-value tuples may be specified. Example: Any number of variable-value tuples may be specified.
Example:
.EX .EX
get-values(1, $fg, foreground, $bg, background) \fBget-values\fP(1, $fg, foreground, $bg, background)
.EE .EE
.TP 8 .TP 8
.B set-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) .B set-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
This action sets a widget resource to the given value, which may be a This action sets a widget resource to the given value, which may be a
variable. Any number of variable-value tuples may be specified. Example: variable.
Any number of variable-value tuples may be specified.
Example:
.EX .EX
set-values(1, foreground, $bg, background, $fg) \fBset-values\fP(1, foreground, $bg, background, $fg)
.EE .EE
.ne 5
.PP .PP
Here is a sample translation to make a label widget behave like a button: Here is a sample translation to make a label widget behave like a button:
.PP .PP
.nf .EX
<Map>: get-values(1, $fg, foreground, $bg, background)\en\e <Map>: get-values(1, $fg, foreground, $bg, background)\en\e
<Btn1Down>: set-values(1, foreground, yellow, background, gray30)\en\e <Btn1Down>: set-values(1, foreground, yellow, background, gray30)\en\e
<Btn1Up>: set-values(1, foreground, $fg, background, $bg) <Btn1Up>: set-values(1, foreground, $fg, background, $bg)
.fi .EE
.SH DISPLAY LISTS .SH DISPLAY LISTS
All of the \fBXaw\fP widgets have now the additional resource All of the \fBXaw\fP widgets have now the additional resource
\fIdisplayList\fP. This resource allows drawing the widget decorations \fIdisplayList\fP.
using commands embedded in a resource string. The displayList resource has This resource allows drawing the widget decorations
the syntax: using commands embedded in a resource string.
The displayList resource has the syntax:
.PP .PP
\fI[class-name:]function-name arguments[[{;\en}]...]\fP \fI[class-name:]function-name arguments[[{;\en}]...]\fP
.PP .PP
\fBClass-name\fP is any registered set of functions to draw in the widget. \fIclass-name\fP is any registered set of functions to draw in the widget.
Currently the only existing class is \fIxlib\fP, which provides access to Currently the only existing class is \fBxlib\fP, which provides access to
the Xlib drawing primitives. the Xlib drawing primitives.
.PP .PP
\fBFunction-name\fP is the drawing or configuration function to be called, \fIfunction-name\fP is the drawing or configuration function to be called,
described below. described below.
.PP .PP
\fBArguments\fP may be anything suitable to the displayList function being \fIarguments\fP may be anything suitable to the displayList function being
called. When the function requires a coordinate, the syntax is called.
\fI{+-}<integer>\fP or \fI<integer>/<integer>\fP. Examples: When the function requires a coordinate, the syntax is
.nf .IP
+0,+0 top, left
-0,-0 bottom, right
-+10,-+10 bottom+10, right+10
+0,1/2 left, vertical-center
.fi
.TP 8
.B arc-mode \fPmode
Sets the arc mode. Accepted \fImode\fPs are "pieslice" and "chord", which
set the arc to ArcPieSlice or ArcChord, respectively. Example:
.EX .EX
arc-mode chord \fI{+-}<integer>\fP or
\fI<integer>/<integer>\fP.
.EE
.ne 6
.IP
Examples:
.RS
.EX
+0,+0 top, left
-0,-0 bottom, right
-+10,-+10 bottom+10, right+10
+0,1/2 left, vertical-center
.EE
.RE
.TP 8
.B arc-mode \fImode
Sets the arc mode.
Accepted \fImode\fPs are "pieslice" and "chord", which
set the arc to ArcPieSlice or ArcChord, respectively.
Example:
.EX
\fBarc-mode\fP chord
.EE .EE
.TP 8 .TP 8
.B bg \fPcolor-spec .B bg \fIcolor-spec
.TQ .TQ
.B background \fPcolor-spec .B background \fIcolor-spec
Sets the background color. \fIcolor-spec\fP must a valid color Sets the background color.
specification. Example: \fIcolor-spec\fP must a valid color
specification.
Example:
.EX .EX
background red \fBbackground\fP red
.EE .EE
.TP 8 .TP 8
.B cap-style \fPstyle .B cap-style \fIstyle
Sets the cap style. Accepted \fIstyle\fPs are "notlast", "butt", "round", Sets the cap style.
Accepted \fIstyle\fPs are "notlast", "butt", "round",
and "projecting", which set the cap style to CapNotLast, CapBut, CapRound and "projecting", which set the cap style to CapNotLast, CapBut, CapRound
or CapProjecting, respectively. Example: or CapProjecting, respectively.
Example:
.EX .EX
cap-style round \fBcap-style\fP round
.EE .EE
.TP 8 .TP 8
.B clip-mask \fPpixmap-spec .B clip-mask \fIpixmap-spec
Sets the pixmap for the clip mask. Requires a pixmap parameter, as Sets the pixmap for the clip mask.
described in the \fBPIXMAPS\fP section below. Example: Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
Example:
.EX .EX
clip-mask xlogo11 \fBclip-mask\fP xlogo11
.EE .EE
.TP 8 .TP 8
.B clip-origin \fPx,y .B clip-origin \fIx,y
Sets the clip x and y origin. Requires two arguments, the x and y Sets the clip x and y origin.
coordinates. Example: Requires two arguments, the x and y coordinates.
Example:
.EX .EX
clip-origin 10,10 \fBclip-origin\fP 10,10
.EE .EE
.TP 8 .TP 8
.B clip-rects \fPx1,y1,x2,y2 [...,xn,yn] .B clip-rects \fPx1,y1,x2,y2 [...,xn,yn]
.TQ .TQ
.B clip-rectangles \fPx1,y1,x2,y2 [...,xn,yn] .B clip-rectangles \fPx1,y1,x2,y2 [...,xn,yn]
Sets a list of rectangles to the clip mask. The number of arguments must Sets a list of rectangles to the clip mask.
be a multiple of four. The arguments are coordinates. The parser The number of arguments must be a multiple of four.
calculates the width and height of the rectangles. Example: The arguments are coordinates.
The parser calculates the width and height of the rectangles.
Example:
.EX .EX
clip-rects 0,0,10,20, 20,10,30,30 \fBclip-rects\fP 0,0,10,20, 20,10,30,30
.EE .EE
.TP 8 .TP 8
.B coord-mode \fPmode .B coord-mode \fPmode
Changes the coord mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and Changes the coordinate mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and
\fIdraw-points\fP. Accepted parameters are "modeorigin" and "previous", \fIdraw-points\fP.
that sets the coord mode to CoordModeOrigin or CoordModePrevious, Accepted parameters are "modeorigin" and "previous",
respectively. Example: that sets the coord mode to CoordModeOrigin or CoordModePrevious, respectively.
Example:
.EX .EX
coord-mode previous \fBcoord-mode\fP previous
.EE .EE
.TP 8 .TP 8
.B copy-area \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy] .B copy-area \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy]
Calls XCopyArea. The character \fI.\fP means copy the window contents; Calls XCopyArea.
pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and The character \fI.\fP means copy the window contents;
\fIy2\fP are the coordinates of the end copy, not the width and height; if pixmap-spec is as defined in the \fBPIXMAPS\fP section below.
not defined, the parser calculates them. \fIsrc_x\fP and \fIsrc_y\fP \fIX2\fP and
default to zero. Example: \fIy2\fP are the coordinates of the end copy, not the width and height;
if not defined, the parser calculates them.
\fIsrc_x\fP and \fIsrc_y\fP default to zero.
Example:
.EX .EX
copy-area Term,10,10 \fBcopy-area\fP Term,10,10
.EE .EE
.TP 8 .TP 8
.B copy-plane \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy,plane] .B copy-plane \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy,plane]
Calls XCopyPlane. The character \fI.\fP means copy the window contents; Calls XCopyPlane.
pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and The character \fI.\fP means copy the window contents;
\fIy2\fP are the coordinates of the end copy, not the width and height; if pixmap-spec is as defined in the \fBPIXMAPS\fP section below.
not defined, the parser calculates them. \fIsrc_x\fP and \fIsrc_y\fP \fIX2\fP and
default to zero. \fIPlane\fP defaults to one. Example: \fIy2\fP are the coordinates of the end copy, not the width and height;
if not defined, the parser calculates them.
\fIsrc_x\fP and \fIsrc_y\fP default to zero.
\fIPlane\fP defaults to one.
Example:
.EX .EX
copy-plane star,10,10 \fBcopy-plane\fP star,10,10
.EE .EE
.TP 8 .TP 8
.B dashes \fPi1[...,in] .B dashes \fPi1[...,in]
Sets the dashes for line drawing. Accepts up to 127 arguments. Example: Sets the dashes for line drawing.
Accepts up to 127 arguments.
Example:
.EX .EX
dashes 3,7 9,10 \fBdashes\fP 3,7 9,10
.EE .EE
.TP 8 .TP 8
.B draw-arc \fPx1,y1,x2,y2[,start-angle,end-angle] .B draw-arc \fPx1,y1,x2,y2[,start-angle,end-angle]
Draws an arc. The four first arguments are the rectangle enclosing the Draws an arc.
arc. The two remaining arguments, if specified, are the start and end The four first arguments are the rectangle enclosing the arc.
angle, in degrees. Example: The two remaining arguments, if specified,
are the start and end angle, in degrees.
Example:
.EX .EX
draw-arc +0,+0,-1,-1,0,90 \fBdraw-arc\fP +0,+0,-1,-1,0,90
.EE .EE
.TP 8 .TP 8
.B draw-rect \fPx1,y1,x2,y2 .B draw-rect \fPx1,y1,x2,y2
.TQ .TQ
.B draw-rectangle \fPx1,y1,x2,y2 .B draw-rectangle \fPx1,y1,x2,y2
Draws a rectangle. Requires four arguments, which are the start and end Draws a rectangle.
coordinate pairs. Example: Requires four arguments, which are the start and end coordinate pairs.
Example:
.EX .EX
draw-rect +1,+1,-5,-5 \fBdraw-rect\fP +1,+1,-5,-5
.EE .EE
.TP 8 .TP 8
.B draw-string \fPx,y,"string" .B draw-string \fPx,y,"string"
Draws a text string. Requires three arguments, a x coordinate, a y Draws a text string.
coordinate, and a string. Strings that have white space can be quoted with Requires three arguments, a x coordinate, a y coordinate, and a string.
Strings that have white space can be quoted with
the \fI"\fP character; the backslash character \fI\e\fP can also be used, the \fI"\fP character; the backslash character \fI\e\fP can also be used,
but it will be necessary escape it twice. Example: but it will be necessary escape it twice.
Example:
.EX .EX
draw-string 10,10, "Hello world!"\fP \fBdraw-string\fP 10,10, "Hello world!"\fP
.EE .EE
.TP 8 .TP 8
.B exposures \fPboolean .B exposures \fPboolean
Sets graphics exposures in the GC. Allowed parameters are a integer or the Sets graphics exposures in the GC.
strings "true", "false", "on" and "off". Example: Allowed parameters are a integer
or the strings "true", "false", "on" and "off".
Example:
.EX .EX
exposures true \fBexposures\fP true
.EE .EE
.TP 8 .TP 8
.B fill-arc \fPx1,y1,x2,y2[,start-angle,end-angle] .B fill-arc \fPx1,y1,x2,y2[,start-angle,end-angle]
Like \fIdraw-arc\fP, but fills the contents of the arc with the currently Like \fIdraw-arc\fP, but fills the contents of the arc with the currently
selected foreground. Example: selected foreground.
Example:
.EX .EX
fill-arc +0,+0,-1,-1,0,180 \fBfill-arc\fP +0,+0,-1,-1,0,180
.EE .EE
.TP 8 .TP 8
.B fill-poly \fPx1,y1 [...,xn,yn] .B fill-poly \fPx1,y1 [...,xn,yn]
.TQ .TQ
.B fill-polygon \fPx1,y1 [...,xn,yn] .B fill-polygon \fPx1,y1 [...,xn,yn]
Like \fIdraw-lines\fP, but fills the enclosed polygon and joins the first Like \fIdraw-lines\fP, but fills the enclosed polygon and joins the first
and last point, if they are not at the same position. Example: and last point, if they are not at the same position.
Example:
.EX .EX
fill-poly +0,+10, +10,+20, +30,+0 \fBfill-poly\fP +0,+10, +10,+20, +30,+0
.EE .EE
.TP .TP
.B fill-rect \fPx1,y1,x2,y2 .B fill-rect \fPx1,y1,x2,y2
.TQ .TQ
.B fill-rectangle \fPx1,y1,x2,y2 .B fill-rectangle \fPx1,y1,x2,y2
Like \fIdraw-rect\fP, but fills the contents of the rectangle with the Like \fIdraw-rect\fP, but fills the contents of the rectangle with the
selected foreground color. Example: selected foreground color.
Example:
.EX .EX
fill-rect +10,+10,-20,-20 \fBfill-rect\fP +10,+10,-20,-20
.EE .EE
.TP 8 .TP 8
.B fill-rule \fPrule .B fill-rule \fPrule
Sets the fill rule. Accepted parameters are "evenodd" and "winding", which Sets the fill rule.
set the fill rule to EvenOddRule or WindingRule, respectively. Example: Accepted parameters are "evenodd" and "winding", which
set the fill rule to EvenOddRule or WindingRule, respectively.
Example:
.EX .EX
fill-rule winding \fBfill-rule\fP winding
.EE .EE
.TP 8 .TP 8
.B fill-style \fPstyle .B fill-style \fPstyle
Sets the fill style. Allowed parameters are "solid", "tiled", "stippled" and Sets the fill style.
Allowed parameters are "solid", "tiled", "stippled" and
"opaquestippled", which set the fill style to FillSolid, FillTiled, "opaquestippled", which set the fill style to FillSolid, FillTiled,
FillStippled or FillOpaqueStippled, respectively. Example: FillStippled or FillOpaqueStippled, respectively.
Example:
.EX .EX
fill-style tiled \fBfill-style\fP tiled
.EE .EE
.TP 8 .TP 8
.B font \fPfont-spec .B font \fPfont-spec
Sets the font for text functions. Example: Sets the font for text functions.
Example:
.EX .EX
font -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1 \fBfont\fP -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
.EE .EE
.TP 8 .TP 8
.B fg \fPcolor-spec .B fg \fPcolor-spec
.TQ .TQ
.B foreground \fPcolor-spec .B foreground \fPcolor-spec
Like \fIbackground\fP, but sets the current foreground color. Example: Like \fIbackground\fP, but sets the current foreground color.
Example:
.EX .EX
foreground blue \fBforeground\fP blue
.EE .EE
.TP 8 .TP 8
.B mask .B mask
This command is useful when you want to draw only in the region that really This command is useful when you want to draw only in the region that really
needs to be repainted. Requires no arguments. needs to be repainted.
It requires no arguments.
.TP 8 .TP 8
.B function \fPfunction-spec .B function \fPfunction-spec
Sets the specific GC function. Allowed parameters are "set", "clear", "and", Sets the specific GC function.
Allowed parameters are "set", "clear", "and",
"andreverse", "copy", "andinverted", "noop", "xor", "or", "nor", "equiv", "andreverse", "copy", "andinverted", "noop", "xor", "or", "nor", "equiv",
"invert", "orreverse", "copyinverted" and "nand", which set the function to "invert", "orreverse", "copyinverted" and "nand", which set the function to
GXset, GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor, GXset, GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor,
GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand, GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand,
respectively. Example: respectively.
Example:
.EX .EX
function xor \fBfunction\fP xor
.EE .EE
.TP 8 .TP 8
.B join-style \fPstyle .B join-style \fPstyle
Sets the join style. Allowed parameters are "miter", "round" and "bevel", Sets the join style.
Allowed parameters are "miter", "round" and "bevel",
which set the join style to JoinMiter, JoinRound and JoinBevel, which set the join style to JoinMiter, JoinRound and JoinBevel,
respectively. Example: respectively.
Example:
.EX .EX
join-style round \fBjoin-style\fP round
.EE .EE
.TP 8 .TP 8
.B image \fP{pixmap-spec},xs,ys,[xe,ye] .B image \fP{pixmap-spec},xs,ys,[xe,ye]
This function is implemented as a way to quickly compose complex This function is implemented as a way to quickly compose complex
decorations in widgets. \fIPixmap-spec\fP is as defined in the decorations in widgets.
\fBPIXMAPS\fP section below. \fIxs\fP and \fIys\fP are the coordinates from \fIPixmap-spec\fP is as defined in the
where to start copying the pixmap; \fIxe\fP and \fIye\fP are optional (they \fBPIXMAPS\fP section below.
default to xs + pixmap.width and ys + pixmap.height, respectively). If the \fIxs\fP and \fIys\fP are the coordinates from
pixmap has a mask, the copy is masked accordingly. Example: where to start copying the pixmap; \fIxe\fP and \fIye\fP are optional
(they default to xs + pixmap.width and ys + pixmap.height, respectively).
If the pixmap has a mask, the copy is masked accordingly.
Example:
.EX .EX
image pixmap.xpm,0,0,20,20 \fBimage\fP pixmap.xpm,0,0,20,20
.EE .EE
.TP 8 .TP 8
.B line \fPx1,y1,x2,y2 .B line \fPx1,y1,x2,y2
.TQ .TQ
.B draw-line \fPx1,y1,x2,y2 .B draw-line \fPx1,y1,x2,y2
Draws a line with the current foreground color. Requires four arguments, Draws a line with the current foreground color.
the starting and ending coordinate pairs. Example: Requires four arguments, the starting and ending coordinate pairs.
Example:
.EX .EX
line +0,+0, -1,-1 \fBline\fP +0,+0, -1,-1
.EE .EE
.TP 8 .TP 8
.B line-width \fPinteger .B line-width \fPinteger
Selects a line width for drawing. Example: Selects a line width for drawing.
Example:
.EX .EX
line-width 2 \fBline-width\fP 2
.EE .EE
.TP 8 .TP 8
.B line-style \fPstyle .B line-style \fPstyle
Sets the line style. Accepted parameters are "solid", "onoffdash" and Sets the line style.
Accepted parameters are "solid", "onoffdash" and
"doubledash", which set the line style to LineSolid, LineOnOffDash or "doubledash", which set the line style to LineSolid, LineOnOffDash or
LineDoubleDash, respectively. Example: LineDoubleDash, respectively.
Example:
.EX .EX
line-style onoffdash \fBline-style\fP onoffdash
.EE .EE
.TP 8 .TP 8
.B lines \fPx1,y1,x2,y2 [...,xn,yn] .B lines \fPx1,y1,x2,y2 [...,xn,yn]
.TQ .TQ
.B draw-lines \fPx1,y1,x2,y2 [...,xn,yn] .B draw-lines \fPx1,y1,x2,y2 [...,xn,yn]
Draws a list of lines. Any number of argument pairs may be supplied. Draws a list of lines.
Any number of argument pairs may be supplied.
Example: Example:
.EX .EX
lines +0,-1, -1,-1, -1,+0 \fBlines\fP +0,-1, -1,-1, -1,+0
.EE .EE
.TP 8 .TP 8
.B paint-string \fPx,y,"string" .B paint-string \fPx,y,"string"
Identical to draw-string, but also uses the background color. Example: Identical to draw-string, but also uses the background color.
Example:
.EX .EX
paint-string 10,20, "Sample text"\fP \fBpaint-string\fP 10,20, "Sample text"\fP
.EE .EE
.TP 8 .TP 8
.B point \fPx,y .B point \fPx,y
.TQ .TQ
.B draw-point \fPx,y .B draw-point \fPx,y
Draws a point. Requires two arguments, a coordinate pair. Example: Draws a point.
Requires two arguments, a coordinate pair.
Example:
.EX .EX
point +10,+10 \fBpoint\fP +10,+10
.EE .EE
.TP 8 .TP 8
.B plane-mask \fPinteger .B plane-mask \fPinteger
Sets the plane mask. Requires an integer parameter. Example: Sets the plane mask.
Requires an integer parameter.
Example:
.EX .EX
plane-mask -1 \fBplane-mask\fP -1
.EE .EE
.TP 8 .TP 8
.B points \fPx1,y1 [...,xn,yn] .B points \fPx1,y1 [...,xn,yn]
.TQ .TQ
.B draw-points \fPx1,y1 [...,xn,yn] .B draw-points \fPx1,y1 [...,xn,yn]
Draws a list of points at the specified coordinates. Example: Draws a list of points at the specified coordinates.
Example:
.EX .EX
points +1,+2, +1,+4, +1,+6 \fBpoints\fP +1,+2, +1,+4, +1,+6
.EE .EE
.TP 8 .TP 8
.B segments \fPx1,y1,x2,y2 [...,xn,yn] .B segments \fPx1,y1,x2,y2 [...,xn,yn]
.TQ .TQ
.B draw-segments \fPx1,y1,x2,y2 [...,xn,yn] .B draw-segments \fPx1,y1,x2,y2 [...,xn,yn]
Draws a list of segment lines. The number of parameters must be multiple Draws a list of segment lines.
of 4. Example: The number of parameters must be multiple of 4.
Example:
.EX .EX
segments +1,+2,+1,-3, +2,-2,-3,-2 \fBsegments\fP +1,+2,+1,-3, +2,-2,-3,-2
.EE .EE
.TP 8 .TP 8
.B shape-mode \fPmode .B shape-mode \fPmode
Sets the shape mode used in \fIfill-polygon\fP. Accepted parameters are Sets the shape mode used in \fIfill-polygon\fP.
Accepted parameters are
"complex", "convex" or "nonconvex", which set the shape mode to Complex, "complex", "convex" or "nonconvex", which set the shape mode to Complex,
Convex or Nonconvex, accordingly. Example: Convex or Nonconvex, accordingly.
Example:
.EX .EX
shape-mode convex \fBshape-mode\fP convex
.EE .EE
.TP 8 .TP 8
.B stipple \fPpixmap-spec .B stipple \fPpixmap-spec
Sets the pixmap for a stipple. Requires a pixmap parameter, as described Sets the pixmap for a stipple.
in the \fBPIXMAPS\fP section below. Example: Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
Example:
.EX .EX
stipple plaid \fBstipple\fP plaid
.EE .EE
.TP 8 .TP 8
.B subwindow-mode \fPmode .B subwindow-mode \fPmode
Sets the subwindow mode in the GC. Accepted parameters are Sets the subwindow mode in the GC.
"includeinferiors" and "clipbychildren", which set the subwindow mode to Accepted parameters are
IncludeInferiors or ClipByChildren, respectively. Example: "includeinferiors" and "clipbychildren",
which set the subwindow mode to
IncludeInferiors or ClipByChildren, respectively.
Example:
.EX .EX
subwindow-mode includeinferiors \fBsubwindow-mode\fP includeinferiors
.EE .EE
.TP 8 .TP 8
.B tile \fPpixmap-spec .B tile \fPpixmap-spec
Sets the pixmap for a tile. Requires a pixmap parameter, as described Sets the pixmap for a tile.
in the \fBPIXMAPS\fP section below. Example: Requires a pixmap parameter, as described
in the \fBPIXMAPS\fP section below.
Example:
.EX .EX
tile xlogo11?foreground=red&background=gray80 \fBtile\fP xlogo11?foreground=red&background=gray80
.EE .EE
.TP 8 .TP 8
.B ts-origin \fPx,y .B ts-origin \fPx,y
Sets the tile stipple x and y origin. Requires two arguments, a x and y Sets the tile stipple x and y origin.
coordinate. Example: Requires two arguments, a x and y coordinate.
Example:
.EX .EX
ts-origin 10,10 \fBts-origin\fP 10,10
.EE .EE
.TP 8 .TP 8
.B umask .B umask
Disables the GC mask, if it has been set with the command \fImask\fP. Disables the GC mask, if it has been set with the command \fImask\fP.
Requires no arguments. Requires no arguments.
.ne 7
.PP .PP
Example for drawing a shadow effect in a widget: Example for drawing a shadow effect in a widget:
.PP
.EX .EX
foreground gray30;\e \fBforeground\fP gray30;\e
draw-lines +1,-1,-1,-1,-1,+1;\e \fBdraw-lines\fP +1,-1,-1,-1,-1,+1;\e
foreground gray85;\e \fBforeground\fP gray85;\e
draw-lines -1,+0,+0,+0,+0,-1 \fBdraw-lines\fP -1,+0,+0,+0,+0,-1
.EE .EE
.SH PIXMAPS .SH PIXMAPS
A String to Pixmap converter has been added to \fBXaw\fP. This converter A String to Pixmap converter has been added to \fBXaw\fP.
is meant to be extended, and has enough abstraction to allow loading This converter is meant to be extended,
several image formats. It uses a format that resembles a \fIURL\fP, with and has enough abstraction to allow loading several image formats.
the syntax: It uses a format that resembles a \fIURL\fP, with the syntax:
.PP .PP
.I [type:]name[?arg=val[{&}...]] .I [type:]name[?arg=val[{&}...]]
.PP .TP
\fBType\fP can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP. \fItype\fP
.PP can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP.
\fBName\fP may be a file name, or, in the case of type \fIgradient\fP, may be .TP
\fIname\fP
may be a file name, or, in the case of type \fIgradient\fP, may be
either \fIvertical\fP or \fIhorizontal\fP. either \fIvertical\fP or \fIhorizontal\fP.
.PP .TP
\fBArg=val\fP is a list of arguments to the converter. An argument list is \fIarg=val\fP
preceded by a question mark, and multiple arguments are separated by is a list of arguments to the converter.
ampersands. The most common arguments are \fIforeground\fP and .IP
\fIbackground\fP. Gradients also support the arguments \fIstart\fP and An argument list is preceded by a question mark,
\fIend\fP (colors with which to start and end the gradient); the and multiple arguments are separated by ampersands.
\fPsteps\fP argument, to allow using less colors; and the \fIdimension\fP .IP
argument to specify the size of the gradient. The \fIxpm\fP converter The most common arguments are \fIforeground\fP and \fIbackground\fP.
.IP
Gradients also support the arguments \fIstart\fP and \fIend\fP
(colors with which to start and end the gradient),
the \fPsteps\fP argument (to allow using fewer colors),
and the \fIdimension\fP argument (to specify the size of the gradient).
.IP
The \fIxpm\fP converter
understands the \fIcloseness\fP argument, which aids in using fewer colors understands the \fIcloseness\fP argument, which aids in using fewer colors
(useful if you have a limited colormap). (useful if you have a limited colormap).
.SH TEXT WIDGET .SH TEXT WIDGET
@ -486,65 +605,83 @@ A couple of highly visible changes in the Text widget are due to many bugs
in the Xaw6 implementation involving scrollbars and auto-resizing. in the Xaw6 implementation involving scrollbars and auto-resizing.
Scrollbars being added or removed caused several problems in keeping the Scrollbars being added or removed caused several problems in keeping the
text cursor visible, and in Xaw6 it was very easy to have a widget thinking text cursor visible, and in Xaw6 it was very easy to have a widget thinking
the cursor was visible, when it was not. Also, permitting automatic the cursor was visible, when it was not.
Also, permitting automatic
resizing of the widget to a larger geometry created other problems, making resizing of the widget to a larger geometry created other problems, making
it difficult to have a consistent layout in the application, and, if the it difficult to have a consistent layout in the application, and, if the
window manager did not interfere, windows larger than the screen could window manager did not interfere, windows larger than the screen could
result. Therefore, some functionality involving scrollbars and result.
Therefore, some functionality involving scrollbars and
auto-resizing has been disabled; see the section on new and modified auto-resizing has been disabled; see the section on new and modified
Text widget resources below. Text widget resources below.
.PP .PP
The Text widget's default key bindings were originally based on the Emacs The Text widget's default key bindings were originally based on the Emacs
text editor. In this release, even more operations familiar to Emacs users text editor.
have been added. New text actions include: In this release, even more operations familiar to Emacs users have been added.
New text actions include:
.TP 8 .TP 8
.B indent .B indent
Indents text blocks. Not bound by default. The Text widget also does not Indents text blocks.
Not bound by default.
The Text widget also does not
attempt to perform auto-indentation of its source object by default. attempt to perform auto-indentation of its source object by default.
.TP 8 .TP 8
.B keyboard-reset .B keyboard-reset
Resets the keyboard state. Reverts the action multiplier to 1, and if undo Resets the keyboard state.
is enabled, toggles between undo and redo. Bound by default to Reverts the action multiplier to 1, and if undo
is enabled, toggles between undo and redo.
Bound by default to
\fIControl<Key>G\fP. \fIControl<Key>G\fP.
.TP 8 .TP 8
.B kill-ring-yank .B kill-ring-yank
In this version of Xaw, text killed in any text field is kept in memory, In this version of Xaw, text killed in any text field is kept in memory,
allowing cut and paste operations internally to the program between text allowing cut and paste operations internally to the program between text
fields. Bound by default to \fIMeta<Key>Y\fP. fields.
Bound by default to \fIMeta<Key>Y\fP.
.TP 8 .TP 8
.B numeric .B numeric
Listed here only for purposes of documentation. Called by default when one Listed here only for purposes of documentation.
Called by default when one
of the characters \fI1, 2, 3, 4, 5, 6, 7, 8, 9, 0,\fP or \fI-\fP is typed, of the characters \fI1, 2, 3, 4, 5, 6, 7, 8, 9, 0,\fP or \fI-\fP is typed,
allowing composition of the multiplication number of text actions. allowing composition of the multiplication number of text actions.
.TP 8 .TP 8
.B set-keyboard-focus .B set-keyboard-focus
Sets the input focus of the top level widget to the text field. Not Sets the input focus of the top level widget to the text field.
Not
enabled by default, but bound to the \fI<Btn1Down>\fP event. enabled by default, but bound to the \fI<Btn1Down>\fP event.
.TP 8 .TP 8
.B toggle-overwrite .B toggle-overwrite
Toggles overwrite mode. In overwrite mode, any text inserted in a text Toggles overwrite mode.
field will replace existing text. Bound by default to \fI<Key>Insert\fP. In overwrite mode, any text inserted in a text field will replace existing text.
Bound by default to \fI<Key>Insert\fP.
.TP 8 .TP 8
.B undo .B undo
Sets the \fIenableUndo\fP resource of the textSrcObject. Not enabled by Sets the \fIenableUndo\fP resource of the textSrcObject.
Not enabled by
default, but bound to \fIControl<Key>_\fP. default, but bound to \fIControl<Key>_\fP.
.PP .PP
New and modified Text widget resources include: New and modified Text widget resources include:
.TP 8 .TP 8
.B justify (\fPClass\fB Justify) .B justify (\fPClass\fB Justify)
Sets the text justification. Can be one of \fIleft, right, center\fP, or Sets the text justification.
\fIfull\fP. Only enabled when the \fIautoFill\fP resource is set, and the Can be one of \fIleft, right, center\fP, or
\fIfull\fP.
Only enabled when the \fIautoFill\fP resource is set, and the
resources \fIleftColumn\fP and \fIrightColumn\fP are correctly set. resources \fIleftColumn\fP and \fIrightColumn\fP are correctly set.
.TP 8 .TP 8
.B leftColumn (\fPClass\fB Column) .B leftColumn (\fPClass\fB Column)
Specifies the left column at which to break text. Text lines started with Specifies the left column at which to break text.
Text lines started with
an alphanumeric character will automatically start at this column. an alphanumeric character will automatically start at this column.
.TP 8 .TP 8
.B positionCallback (\fPClass\fB Callback) .B positionCallback (\fPClass\fB Callback)
Allows installation of a callback to be called every time the cursor is Allows installation of a callback to be called every time the cursor is
moved, and/or the file changes its size. The callback is called with a moved, and/or the file changes its size.
The callback is called with a
pointer to a structure containing the following data: pointer to a structure containing the following data:
.nf .RS
.PP
.EX
typedef struct { typedef struct {
int line_number; int line_number;
int column_number; int column_number;
@ -552,7 +689,9 @@ typedef struct {
XawTextPosition last_position; XawTextPosition last_position;
Boolean overwrite_mode; Boolean overwrite_mode;
} XawTextPositionInfo; } XawTextPositionInfo;
.fi .EE
.RE
.IP
This callback is intended to help programmers write text editors based This callback is intended to help programmers write text editors based
on the Xaw widget set. on the Xaw widget set.
.TP 8 .TP 8
@ -561,46 +700,54 @@ No longer supported, but recognized for backward compatibility with
resource specifications written for the Xaw6 Text widget. resource specifications written for the Xaw6 Text widget.
.TP 8 .TP 8
.B rightColumn (\fPClass\fB Column) .B rightColumn (\fPClass\fB Column)
Specifies the right column at which to break text. Text lines started with Specifies the right column at which to break text.
Text lines started with
an alphanumeric character will automatically end at this column. an alphanumeric character will automatically end at this column.
.TP 8 .TP 8
.B scrollHorizontal (\fPClass\fB Scroll) .B scrollHorizontal (\fPClass\fB Scroll)
.TQ .TQ
.B scrollVertical (\fPClass\fB Scroll) .B scrollVertical (\fPClass\fB Scroll)
These resources control the placement of scrollbars on the left and bottom These resources control the placement of scrollbars on the left and bottom
edges of the Text widget. They accept the values \fIXawtextScrollAlways\fP edges of the Text widget.
and \fIXawtextScrollNever\fP. A converter is registered for this resource They accept the values \fIXawtextScrollAlways\fP and \fIXawtextScrollNever\fP.
that will convert the following strings: \fIalways\fP and \fInever\fP. The A converter is registered for this resource
that will convert the following strings: \fIalways\fP and \fInever\fP.
The
value \fIXawtextScrollWhenNeeded\fP (and \fIwhenNeeded\fP, recognized by value \fIXawtextScrollWhenNeeded\fP (and \fIwhenNeeded\fP, recognized by
the converter), is accepted for backwards compatibility with resource the converter), is accepted for backwards compatibility with resource
specifications written for the Xaw6 Text widget, but ignored (effectively specifications written for the Xaw6 Text widget, but ignored (effectively
treated as \fIXawtextScrollNever\fP). treated as \fIXawtextScrollNever\fP).
.SH TEXT SOURCE OBJECT .SH TEXT SOURCE OBJECT
The textSrcObject allows display of its contents to more than one window, The textSrcObject allows display of its contents to more than one window,
and also stores undo information. The new resources for the textSrcObject and also stores undo information.
The new resources for the textSrcObject
are: are:
.TP 8 .TP 8
.B callback (\fPClass\fB Callback) .B callback (\fPClass\fB Callback)
Previous versions of Xaw had this resource in subclasses of the TextSource Previous versions of Xaw had this resource in subclasses of the TextSource
object. This was changed to make it possible to tell the callback the object.
This was changed to make it possible to tell the callback the
state of the text when undo is enabled. state of the text when undo is enabled.
.TP 8 .TP 8
.B enableUndo (\fPClass\fB Undo) .B enableUndo (\fPClass\fB Undo)
A boolean resource that enables or disables the undo function. The default A boolean resource that enables or disables the undo function.
value is False. The default value is False.
.TP 8 .TP 8
.B sourceChanged (\fPClass\fB Changed) .B sourceChanged (\fPClass\fB Changed)
Like the callback resource, this resource was previously in subclasses of Like the callback resource, this resource was previously in subclasses of
the TextSource object. It is now in the textSrcObject to control the the TextSource object.
It is now in the textSrcObject to control the
changed/unchanged state when undo is enabled. changed/unchanged state when undo is enabled.
.SH TEXT SINK OBJECT .SH TEXT SINK OBJECT
The textSinkObject subclasses asciiSinkObject and multiSinkObject have been The textSinkObject subclasses asciiSinkObject and multiSinkObject have been
changed slightly to use a new cursor shape (no longer a caret at the changed slightly to use a new cursor shape (no longer a caret at the
baseline) that indicates the input focus of the text widget, and allow baseline) that indicates the input focus of the text widget, and allow
specification of the cursor color. The new resource is: specification of the cursor color.
The new resource is:
.TP 8 .TP 8
.B cursorColor (\fPClass\fB Color) .B cursorColor (\fPClass\fB Color)
Sets the cursor color of the text. This color is also used to draw Sets the cursor color of the text.
This color is also used to draw
selected text. selected text.
.SH SIMPLE MENU WIDGET .SH SIMPLE MENU WIDGET
The simpleMenuWidget algorithm to lay out menu entries has been changed to The simpleMenuWidget algorithm to lay out menu entries has been changed to
@ -608,11 +755,13 @@ enable multiple columns when a single column does not fit on the screen.
It was also modified to enable submenus. It was also modified to enable submenus.
.SH SME BSB OBJECT .SH SME BSB OBJECT
A new resource has been added to the smeBSBObject to allow binding submenus A new resource has been added to the smeBSBObject to allow binding submenus
to it. The new resource is: to it.
The new resource is:
.TP 8 .TP 8
.B menuName (\fPClass\fB MenuName) .B menuName (\fPClass\fB MenuName)
Specifies the name of the popup widget to be popped up when the pointer is Specifies the name of the popup widget to be popped up when the pointer is
over the menu entry, or NULL. Note that the named menu must be a child of over the menu entry, or NULL.
Note that the named menu must be a child of
the popup parent of the smeBSBObject. the popup parent of the smeBSBObject.
.SH AUTHORS .SH AUTHORS
The original X Consortium version of the Athena Widget Set and its The original X Consortium version of the Athena Widget Set and its

View file

@ -237,6 +237,7 @@ XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@ XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@ XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@ XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@

View file

@ -151,15 +151,17 @@ static Cardinal num_variable_list;
Bool Bool
XawParseBoolean(Widget w, String param, XEvent *event, Bool *succeed) XawParseBoolean(Widget w, String param, XEvent *event, Bool *succeed)
{ {
char *tmp = (char *)param;
int value;
if (!param) if (!param)
return (False); return (False);
else
{
char *tmp = (char *)param;
double dd = strtod(param, &tmp);
int value = (int) dd;
value = (int)strtod(param, &tmp);
if (*tmp == '\0') if (*tmp == '\0')
return (value); return (value);
}
if (XmuCompareISOLatin1(param, "true") == 0 if (XmuCompareISOLatin1(param, "true") == 0
|| XmuCompareISOLatin1(param, "yes") == 0 || XmuCompareISOLatin1(param, "yes") == 0
@ -188,7 +190,6 @@ Bool
XawBooleanExpression(Widget w, String param, XEvent *event) XawBooleanExpression(Widget w, String param, XEvent *event)
{ {
XawEvalInfo info; XawEvalInfo info;
Bool retval;
if (!param) if (!param)
return (False); return (False);
@ -215,16 +216,18 @@ XawBooleanExpression(Widget w, String param, XEvent *event)
(void)get_token(&info); (void)get_token(&info);
if (info.token == ERROR) if (info.token == ERROR)
return (False); return (False);
retval = expr(&info); else
{
Bool retval = expr(&info);
return (info.token != ERROR ? retval : False); return (info.token != ERROR ? retval : False);
}
} }
static int static int
get_token(XawEvalInfo *info) get_token(XawEvalInfo *info)
{ {
int ch; int ch;
char *p, name[256];
info->lp = info->cp; info->lp = info->cp;
@ -248,7 +251,8 @@ get_token(XawEvalInfo *info)
{ {
Bool succeed = True; Bool succeed = True;
p = info->cp - 1; char *p = info->cp - 1;
char name[256];
while ((ch = *info->cp) && (isalnum(ch) || ch == '_')) while ((ch = *info->cp) && (isalnum(ch) || ch == '_'))
++info->cp; ++info->cp;
@ -409,6 +413,7 @@ XawSetValuesAction(Widget w, XEvent *event,
#ifdef LONG64 #ifdef LONG64
long c_8; long c_8;
#endif #endif
unsigned use_size;
if (!(*num_params & 1)) if (!(*num_params & 1))
{ {
@ -440,13 +445,14 @@ XawSetValuesAction(Widget w, XEvent *event,
from.size = (Cardinal) strlen(value) + 1; from.size = (Cardinal) strlen(value) + 1;
from.addr = (char *)value; from.addr = (char *)value;
to.size = resource->size; to.size = resource->size;
switch (to.size) use_size = resource->size;
switch (use_size)
{ {
case 1: to.addr = (XPointer)&c_1; break; case 1: to.addr = (XPointer)&c_1; c_1 = 0; break;
case 2: to.addr = (XPointer)&c_2; break; case 2: to.addr = (XPointer)&c_2; c_2 = 0; break;
case 4: to.addr = (XPointer)&c_4; break; case 4: to.addr = (XPointer)&c_4; c_4 = 0; break;
#ifdef LONG64 #ifdef LONG64
case 8: to.addr = (XPointer)&c_8; break; case 8: to.addr = (XPointer)&c_8; c_8 = 0; break;
#endif #endif
default: default:
{ {
@ -466,10 +472,11 @@ XawSetValuesAction(Widget w, XEvent *event,
c_4 = (int)from.addr; c_4 = (int)from.addr;
#endif #endif
else if (!XtConvertAndStore(w, XtRString, &from, else if (!XtConvertAndStore(w, XtRString, &from,
XrmQuarkToString(resource->qtype), &to)) XrmQuarkToString(resource->qtype), &to)
|| to.size != use_size)
continue; continue;
switch (to.size) switch (use_size)
{ {
case 1: case 1:
XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_1); XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_1);
@ -499,7 +506,6 @@ XawGetValuesAction(Widget w, XEvent *event,
{ {
XawActionResList *rlist; XawActionResList *rlist;
XawActionVarList *vlist; XawActionVarList *vlist;
String value;
Cardinal count; Cardinal count;
if (!(*num_params & 1)) if (!(*num_params & 1))
@ -515,7 +521,8 @@ XawGetValuesAction(Widget w, XEvent *event,
for (count = 1; count < *num_params; count += 2) for (count = 1; count < *num_params; count += 2)
{ {
if ((value = XawConvertActionRes(rlist, w, params[count + 1])) == NULL) String value = XawConvertActionRes(rlist, w, params[count + 1]);
if (value == NULL)
continue; continue;
XawDeclareActionVar(vlist, params[count], value); XawDeclareActionVar(vlist, params[count], value);
} }
@ -865,11 +872,9 @@ _XawFindActionRes(XawActionResList *list, Widget detail, String name)
static char * static char *
_XawEscapeActionVarValue(String value) _XawEscapeActionVarValue(String value)
{ {
char * escape;
if (value[0] == '$' || value[0] == '\\') if (value[0] == '$' || value[0] == '\\')
{ {
escape = XtMalloc((Cardinal)strlen(value) + 2); char *escape = XtMalloc((Cardinal)strlen(value) + 2);
escape[0] = '\\'; escape[0] = '\\';
strcpy(escape + 1, value); strcpy(escape + 1, value);
return (escape); return (escape);
@ -881,11 +886,9 @@ _XawEscapeActionVarValue(String value)
static char * static char *
_XawUnescapeActionVarValue(String value) _XawUnescapeActionVarValue(String value)
{ {
char * unescape;
if (value[0] == '\\') if (value[0] == '\\')
{ {
unescape = XtMalloc((Cardinal)strlen(value)); char *unescape = XtMalloc((Cardinal)strlen(value));
strcpy(unescape, value + 1); strcpy(unescape, value + 1);
return (unescape); return (unescape);
} }
@ -918,7 +921,7 @@ XawDeclareActionVar(XawActionVarList *list, String name, String value)
{ {
String val = escape ? escape : value; String val = escape ? escape : value;
if (strcmp(XrmQuarkToString(variable->qvalue), val) == 0) if (val != NULL && strcmp(XrmQuarkToString(variable->qvalue), val) == 0)
{ {
if (escape) if (escape)
XtFree(escape); XtFree(escape);

View file

@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/Tree.h> #include <X11/Xaw/Tree.h>
#include <X11/Xaw/Viewport.h> #include <X11/Xaw/Viewport.h>
#define DATA(name,class) { (char *)name, class } #define DATA(name,class) { (char *)name, class, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
XmuWidgetNode XawWidgetArray[] = { XmuWidgetNode XawWidgetArray[] = {
DATA( "applicationShell", &applicationShellWidgetClass ), DATA( "applicationShell", &applicationShellWidgetClass ),
DATA( "asciiSink", &asciiSinkObjectClass ), DATA( "asciiSink", &asciiSinkObjectClass ),

View file

@ -296,12 +296,13 @@ static int
GetTextWidth(TextWidget ctx, int current_width, XFontStruct *font, GetTextWidth(TextWidget ctx, int current_width, XFontStruct *font,
XawTextPosition from, int length) XawTextPosition from, int length)
{ {
int i, width = 0; int width = 0;
XawTextBlock block;
XawTextPosition pos = from;
while (length > 0) { while (length > 0) {
pos = XawTextSourceRead(ctx->text.source, from, &block, length); int i;
XawTextBlock block;
XawTextPosition pos = XawTextSourceRead(ctx->text.source, from, &block, length);
length = (int)(length - (pos - from)); length = (int)(length - (pos - from));
from = pos; from = pos;
for (i = 0; i < block.length; i++) for (i = 0; i < block.length; i++)
@ -340,7 +341,6 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y,
XawTextAnchor *anchor; XawTextAnchor *anchor;
XawTextEntity *entity; XawTextEntity *entity;
XawTextProperty *property; XawTextProperty *property;
XawTextPaintStruct *paint;
XawTextBlock block; XawTextBlock block;
XFontStruct *font; XFontStruct *font;
@ -373,7 +373,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y,
rbearing = font->per_char[c - font->min_char_or_byte2].rbearing - rbearing = font->per_char[c - font->min_char_or_byte2].rbearing -
font->per_char[c - font->min_char_or_byte2].width; font->per_char[c - font->min_char_or_byte2].width;
if (rbearing > 0) { if (rbearing > 0) {
paint = XtNew(XawTextPaintStruct); XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
paint->next = sink->text_sink.paint->bearings; paint->next = sink->text_sink.paint->bearings;
sink->text_sink.paint->bearings = paint; sink->text_sink.paint->bearings = paint;
paint->x = x - (paint->width = CharWidth(sink, font, 0, c)); paint->x = x - (paint->width = CharWidth(sink, font, 0, c));
@ -408,7 +408,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y,
(c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2)) (c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2))
lbearing = font->per_char[c - font->min_char_or_byte2].lbearing; lbearing = font->per_char[c - font->min_char_or_byte2].lbearing;
if (lbearing < 0) { if (lbearing < 0) {
paint = XtNew(XawTextPaintStruct); XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
paint->next = sink->text_sink.paint->bearings; paint->next = sink->text_sink.paint->bearings;
sink->text_sink.paint->bearings = paint; sink->text_sink.paint->bearings = paint;
paint->x = x; paint->x = x;
@ -438,14 +438,13 @@ AsciiPreparePaint(Widget w, int y, int line,
TextWidget ctx = (TextWidget)XtParent(w); TextWidget ctx = (TextWidget)XtParent(w);
AsciiSinkObject sink = (AsciiSinkObject)ctx->text.sink; AsciiSinkObject sink = (AsciiSinkObject)ctx->text.sink;
XawTextPosition left, right, pos, pos2, tmp, length; XawTextPosition left, right, pos, tmp, length;
XawTextAnchor *anchor; XawTextAnchor *anchor;
XawTextEntity *entity; XawTextEntity *entity;
XawTextProperty *property; XawTextProperty *property;
int i, ascent = 0, descent = 0, xl, xr, x = ctx->text.left_margin, bufsiz; int i, ascent = 0, descent = 0, xl, xr, x = ctx->text.left_margin;
XawTextBlock block; XawTextBlock block;
XFontStruct *font; XFontStruct *font;
XawTextPaintStruct *paint;
if (!sink->ascii_sink.echo) if (!sink->ascii_sink.echo)
return; return;
@ -455,7 +454,7 @@ AsciiPreparePaint(Widget w, int y, int line,
/* XXX the x coordinate can be a parameter, but since it is required /* XXX the x coordinate can be a parameter, but since it is required
to calculate the ascent/descent, do it here to avoid an extra to calculate the ascent/descent, do it here to avoid an extra
search in the entities */ search in the entities */
pos = tmp = left = ctx->text.lt.info[line].position; pos = left = ctx->text.lt.info[line].position;
right = ctx->text.lt.info[line + 1].position; right = ctx->text.lt.info[line + 1].position;
right = XawMin(right, ctx->text.lastPos + 1); right = XawMin(right, ctx->text.lastPos + 1);
while (pos < right) { while (pos < right) {
@ -530,7 +529,9 @@ AsciiPreparePaint(Widget w, int y, int line,
/* pass 2: feed the XawTextPaintStruct lists */ /* pass 2: feed the XawTextPaintStruct lists */
pos = from; pos = from;
while (pos < to) { while (pos < to) {
paint = XtNew(XawTextPaintStruct); int bufsiz;
XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
paint->next = sink->text_sink.paint->paint; paint->next = sink->text_sink.paint->paint;
sink->text_sink.paint->paint = paint; sink->text_sink.paint->paint = paint;
paint->x = x; paint->x = x;
@ -572,9 +573,8 @@ AsciiPreparePaint(Widget w, int y, int line,
paint->length = 0; paint->length = 0;
segment.x1 = x; segment.x1 = x;
pos2 = tmp;
while (length > 0) { while (length > 0) {
pos2 = XawTextSourceRead(ctx->text.source, tmp, &block, (int)length); XawTextPosition pos2 = XawTextSourceRead(ctx->text.source, tmp, &block, (int)length);
length = pos - pos2; length = pos - pos2;
tmp = pos2; tmp = pos2;
for (i = 0; i < block.length; i++) { for (i = 0; i < block.length; i++) {
@ -736,9 +736,6 @@ AsciiDoPaint(Widget w)
XmuScanline *scan; XmuScanline *scan;
XmuSegment *seg; XmuSegment *seg;
XawTextPaintList *list = sink->text_sink.paint; XawTextPaintList *list = sink->text_sink.paint;
#if 0
XawTextPaintStruct *base, *head;
#endif
XawTextPaintStruct *paint = list->paint; XawTextPaintStruct *paint = list->paint;
XawTextProperty *property; XawTextProperty *property;
XFontStruct *font = NULL; XFontStruct *font = NULL;
@ -762,26 +759,6 @@ AsciiDoPaint(Widget w)
(unsigned)(seg->x2 - seg->x1), (unsigned)(seg->x2 - seg->x1),
(unsigned)(scan->next->y - scan->y)); (unsigned)(scan->next->y - scan->y));
/* pass 2: optimize drawing list to avoid too much GC change requests */
/* XXX this assumes there will not exist entities drawn over other
entities. */
#if 0
while (paint) {
base = paint;
head = paint->next;
while (head) {
if (head->property == paint->property) {
base->next = head->next;
head->next = paint->next;
paint->next = head;
paint = head;
}
base = head;
head = head->next;
}
paint = paint->next;
}
#endif
if (paint && paint->next) { if (paint && paint->next) {
XawTextPaintStruct **paints; XawTextPaintStruct **paints;
int i = 0, n_paints = 0; int i = 0, n_paints = 0;
@ -982,8 +959,6 @@ AsciiDoPaint(Widget w)
/* dont care on order of drawing or caching of state (by now) */ /* dont care on order of drawing or caching of state (by now) */
paint = list->bearings; paint = list->bearings;
while (paint) { while (paint) {
XRectangle rect2;
if (paint->highlight) if (paint->highlight)
XSetForeground(XtDisplay(ctx), gc, sink->text_sink.background); XSetForeground(XtDisplay(ctx), gc, sink->text_sink.background);
if (!paint->property || !(paint->property->mask & XAW_TPROP_FONT)) if (!paint->property || !(paint->property->mask & XAW_TPROP_FONT))
@ -999,10 +974,13 @@ AsciiDoPaint(Widget w)
XSetForeground(XtDisplay(ctx), gc, paint->property->foreground); XSetForeground(XtDisplay(ctx), gc, paint->property->foreground);
} }
if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) { if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) {
rect2.x = (short)(paint->x + paint->width); XRectangle rect2 = {
rect2.width = (XawAbs(paint->width)); /* more than enough */ .x = (short)(paint->x + paint->width),
rect2.y = (short)(paint->y - font->ascent); .width = (unsigned short)(XawAbs(paint->width)), /* more than enough */
rect2.height = (unsigned short)(rect2.y + font->ascent + font->descent); .y = (short)(paint->y - font->ascent),
.height = (unsigned short)((paint->y - font->ascent) +
font->ascent + font->descent)
};
XSetClipRectangles(XtDisplay((Widget)ctx), gc, XSetClipRectangles(XtDisplay((Widget)ctx), gc,
0, 0, &rect2, 1, Unsorted); 0, 0, &rect2, 1, Unsorted);
XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y, XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y,
@ -1387,7 +1365,7 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
#ifndef OLDXAW #ifndef OLDXAW
AsciiSinkObject sink = (AsciiSinkObject)w; AsciiSinkObject sink = (AsciiSinkObject)w;
TextWidget ctx = (TextWidget)XtParent(w); TextWidget ctx = (TextWidget)XtParent(w);
XFontStruct *font = sink->ascii_sink.font; XFontStruct *font;
Widget source = ctx->text.source; Widget source = ctx->text.source;
XawTextPosition idx, pos; XawTextPosition idx, pos;
unsigned char c; unsigned char c;
@ -1401,12 +1379,11 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
pos = idx = fromPos; pos = idx = fromPos;
rWidth = 0; rWidth = 0;
c = 0;
while (!done) { while (!done) {
if (XawTextSourceAnchorAndEntity(source, pos, &anchor, &entity)) { if (XawTextSourceAnchorAndEntity(source, pos, &anchor, &entity)) {
length = (Cardinal)(anchor->position + entity->offset + entity->length); length = (Cardinal)(anchor->position + entity->offset + entity->length);
length = (XawMin(toPos, length) - pos); length = (Cardinal)(XawMin(toPos, length) - pos);
if ((property = XawTextSinkGetProperty((Widget)sink, if ((property = XawTextSinkGetProperty((Widget)sink,
entity->property)) != NULL && entity->property)) != NULL &&
(property->mask & XAW_TPROP_FONT)) (property->mask & XAW_TPROP_FONT))
@ -1420,13 +1397,13 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
entity = entity->next; entity = entity->next;
if (entity) { if (entity) {
length = (Cardinal)(anchor->position + entity->offset); length = (Cardinal)(anchor->position + entity->offset);
length = (XawMin(toPos, length) - pos); length = (Cardinal)(XawMin(toPos, length) - pos);
} }
else else
length = (XawMin(toPos - pos, 4096)); length = (Cardinal)(XawMin(toPos - pos, 4096));
} }
else else
length = (XawMin(toPos - pos, 4096)); length = (Cardinal)(XawMin(toPos - pos, 4096));
font = sink->ascii_sink.font; font = sink->ascii_sink.font;
} }
@ -1462,16 +1439,17 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
XFontStruct *font = sink->ascii_sink.font; XFontStruct *font = sink->ascii_sink.font;
Widget source = ctx->text.source; Widget source = ctx->text.source;
XawTextPosition idx, pos; XawTextPosition idx, pos;
unsigned char c;
XawTextBlock blk; XawTextBlock blk;
int i, rWidth; int i, rWidth;
pos = XawTextSourceRead(source, fromPos, &blk, toPos - fromPos); pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos));
rWidth = 0; rWidth = 0;
for (i = 0, idx = fromPos; idx < toPos; i++, idx++) { for (i = 0, idx = fromPos; idx < toPos; i++, idx++) {
unsigned char c;
if (i >= blk.length) { if (i >= blk.length) {
i = 0; i = 0;
pos = XawTextSourceRead(source, pos, &blk, toPos - pos); pos = XawTextSourceRead(source, pos, &blk, (int)(toPos - pos));
if (blk.length == 0) if (blk.length == 0)
break; break;
} }
@ -1498,7 +1476,7 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width,
AsciiSinkObject sink = (AsciiSinkObject)w; AsciiSinkObject sink = (AsciiSinkObject)w;
TextWidget ctx = (TextWidget)XtParent(w); TextWidget ctx = (TextWidget)XtParent(w);
Widget source = ctx->text.source; Widget source = ctx->text.source;
XFontStruct *font = sink->ascii_sink.font; XFontStruct *font;
XawTextPosition idx, pos, whiteSpacePosition = 0; XawTextPosition idx, pos, whiteSpacePosition = 0;
int i, lastWidth, whiteSpaceWidth, rWidth, ascent = 0, descent = 0; int i, lastWidth, whiteSpaceWidth, rWidth, ascent = 0, descent = 0;
Boolean whiteSpaceSeen; Boolean whiteSpaceSeen;
@ -1653,16 +1631,16 @@ GetGC(AsciiSinkObject sink)
{ {
XtGCMask valuemask = (GCFont | GCGraphicsExposures | GCClipXOrigin | XtGCMask valuemask = (GCFont | GCGraphicsExposures | GCClipXOrigin |
GCForeground | GCBackground); GCForeground | GCBackground);
XGCValues values; XGCValues values = {
/* XXX We dont want to share a gc that will change the clip-mask */
.clip_x_origin = (int)(long)sink,
.clip_mask = None,
.font = sink->ascii_sink.font->fid,
.graphics_exposures = False,
/* XXX We dont want do share a gc that will change the clip-mask */ .foreground = sink->text_sink.foreground,
values.clip_x_origin = (int)(long)sink; .background = sink->text_sink.background
values.clip_mask = None; };
values.font = sink->ascii_sink.font->fid;
values.graphics_exposures = False;
values.foreground = sink->text_sink.foreground;
values.background = sink->text_sink.background;
sink->ascii_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values, sink->ascii_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values,
GCClipMask | GCFont | GCForeground | GCClipMask | GCFont | GCForeground |
GCBackground, 0); GCBackground, 0);

View file

@ -55,6 +55,10 @@ in this Software without prior written authorization from The Open Group.
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#if (defined(ASCII_STRING) || defined(ASCII_DISK)) #if (defined(ASCII_STRING) || defined(ASCII_DISK))
#include <X11/Xaw/AsciiText.h> /* for Widget Classes */ #include <X11/Xaw/AsciiText.h> /* for Widget Classes */
#endif #endif
@ -240,6 +244,9 @@ AsciiSrcClassRec asciiSrcClassRec = {
Search, /* Search */ Search, /* Search */
XtInheritSetSelection, /* SetSelection */ XtInheritSetSelection, /* SetSelection */
XtInheritConvertSelection, /* ConvertSelection */ XtInheritConvertSelection, /* ConvertSelection */
#ifndef OLDXAW
NULL,
#endif
}, },
/* ascii_src */ /* ascii_src */
{ {
@ -389,7 +396,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length)
text->format = XawFmt8Bit; text->format = XawFmt8Bit;
if (length == 0) { if (length == 0) {
text->firstPos = (int)(end = (offset + entity->length)); text->firstPos = (int)(end = (offset + entity->length));
text->ptr = ""; text->ptr = (char*)"";
} }
else { else {
text->firstPos = (int)pos; text->firstPos = (int)pos;
@ -411,7 +418,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length)
text->firstPos = (int)pos; text->firstPos = (int)pos;
text->ptr = piece->text + (pos - start); text->ptr = piece->text + (pos - start);
count = piece->used - (pos - start); count = piece->used - (pos - start);
text->length = (Max(0, (length > count) ? count : length)); text->length = (int)(Max(0, (length > count) ? count : length));
text->format = XawFmt8Bit; text->format = XawFmt8Bit;
return (pos + text->length); return (pos + text->length);
@ -449,8 +456,10 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
if (src->text_src.edit_mode == XawtextRead) if (src->text_src.edit_mode == XawtextRead)
return (XawEditError); return (XawEditError);
start_piece = FindPiece(src, startPos, &start_first); if ((start_piece = FindPiece(src, startPos, &start_first)) == NULL)
end_piece = FindPiece(src, endPos, &end_first); return XawEditError;
if ((end_piece = FindPiece(src, endPos, &end_first)) == NULL)
return XawEditError;
#ifndef OLDXAW #ifndef OLDXAW
/* /*
@ -461,7 +470,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
if (start_piece->used) { if (start_piece->used) {
int i; int i;
for (i = 0; i < src->text_src.num_text; i++) { for (i = 0; i < (int)src->text_src.num_text; i++) {
int line; int line;
TextWidget ctx = (TextWidget)src->text_src.text[i]; TextWidget ctx = (TextWidget)src->text_src.text[i];
@ -514,7 +523,8 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
* Remove Old Stuff * Remove Old Stuff
*/ */
if (start_piece != end_piece) { if (start_piece != end_piece) {
temp_piece = start_piece->next; if ((temp_piece = start_piece->next) == NULL)
return XawEditError;
/* /*
* If empty and not the only piece then remove it. * If empty and not the only piece then remove it.
@ -973,8 +983,7 @@ XawAsciiSrcSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
AsciiSrcObject src = (AsciiSrcObject)cnew; AsciiSrcObject src = (AsciiSrcObject)cnew;
AsciiSrcObject old_src = (AsciiSrcObject)current; AsciiSrcObject old_src = (AsciiSrcObject)current;
Bool total_reset = False, string_set = False; Bool total_reset = False, string_set = False;
FILE *file; Cardinal i;
unsigned int i;
if (old_src->ascii_src.use_string_in_place if (old_src->ascii_src.use_string_in_place
!= src->ascii_src.use_string_in_place) { != src->ascii_src.use_string_in_place) {
@ -992,6 +1001,8 @@ XawAsciiSrcSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
} }
if (string_set || (old_src->ascii_src.type != src->ascii_src.type)) { if (string_set || (old_src->ascii_src.type != src->ascii_src.type)) {
FILE *file;
RemoveOldStringOrFile(old_src, string_set); /* remove old info */ RemoveOldStringOrFile(old_src, string_set); /* remove old info */
file = InitStringOrFile(src, string_set); /* Init new info */ file = InitStringOrFile(src, string_set); /* Init new info */
LoadPieces(src, file, NULL); /* load new info into internal buffers */ LoadPieces(src, file, NULL); /* load new info into internal buffers */
@ -1039,7 +1050,7 @@ static void
XawAsciiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args) XawAsciiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
{ {
AsciiSrcObject src = (AsciiSrcObject)w; AsciiSrcObject src = (AsciiSrcObject)w;
unsigned int i; Cardinal i;
if (src->ascii_src.type == XawAsciiString) { if (src->ascii_src.type == XawAsciiString) {
for (i = 0; i < *num_args ; i++) for (i = 0; i < *num_args ; i++)
@ -1280,7 +1291,7 @@ WriteToFile(String string, String name, unsigned length)
{ {
int fd; int fd;
if ((fd = creat(name, 0666)) == -1) if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666)) == -1)
return (False); return (False);
if (write(fd, string, length) == -1) { if (write(fd, string, length) == -1) {
@ -1317,14 +1328,13 @@ WritePiecesToFile(AsciiSrcObject src, String name)
int fd; int fd;
if (src->ascii_src.data_compression) { if (src->ascii_src.data_compression) {
Piece *tmp;
piece = src->ascii_src.first_piece; piece = src->ascii_src.first_piece;
while (piece) { while (piece) {
int bytes = (int)(src->ascii_src.piece_size - piece->used); int bytes = (int)(src->ascii_src.piece_size - piece->used);
Piece *tmp;
if (bytes > 0 && (tmp = piece->next) != NULL) { if (bytes > 0 && (tmp = piece->next) != NULL) {
bytes = (XawMin(bytes, tmp->used)); bytes = (int)(XawMin(bytes, tmp->used));
memcpy(piece->text + piece->used, tmp->text, (size_t)bytes); memcpy(piece->text + piece->used, tmp->text, (size_t)bytes);
memmove(tmp->text, tmp->text + bytes, (size_t)(tmp->used - bytes)); memmove(tmp->text, tmp->text + bytes, (size_t)(tmp->used - bytes));
piece->used += bytes; piece->used += bytes;
@ -1337,7 +1347,7 @@ WritePiecesToFile(AsciiSrcObject src, String name)
} }
} }
if ((fd = creat(name, 0666)) == -1) if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666)) == -1)
return (False); return (False);
for (piece = src->ascii_src.first_piece; piece; piece = piece->next) for (piece = src->ascii_src.first_piece; piece; piece = piece->next)
@ -1403,8 +1413,6 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
{ {
mode_t open_mode = 0; mode_t open_mode = 0;
const char *fdopen_mode = NULL; const char *fdopen_mode = NULL;
int fd;
FILE *file;
if (src->ascii_src.type == XawAsciiString) { if (src->ascii_src.type == XawAsciiString) {
if (src->ascii_src.string == NULL) if (src->ascii_src.string == NULL)
@ -1443,19 +1451,19 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
XtErrorMsg("NoFile", "asciiSourceCreate", "XawError", XtErrorMsg("NoFile", "asciiSourceCreate", "XawError",
"Creating a read only disk widget and no file specified.", "Creating a read only disk widget and no file specified.",
NULL, NULL); NULL, NULL);
open_mode = O_RDONLY; open_mode = O_RDONLY | O_CLOEXEC;
fdopen_mode = "r"; fdopen_mode = "r";
break; break;
case XawtextAppend: case XawtextAppend:
case XawtextEdit: case XawtextEdit:
if (src->ascii_src.string == NULL) { if (src->ascii_src.string == NULL) {
src->ascii_src.string = "*ascii-src*"; src->ascii_src.string = (char*)"*ascii-src*";
src->ascii_src.is_tempfile = True; src->ascii_src.is_tempfile = True;
} }
else { else {
/* O_NOFOLLOW is a FreeBSD & Linux extension */ /* O_NOFOLLOW was a FreeBSD & Linux extension, now adopted by POSIX */
#ifdef O_NOFOLLOW #ifdef O_NOFOLLOW
open_mode = O_RDWR | O_NOFOLLOW; open_mode = O_RDWR | O_NOFOLLOW | O_CLOEXEC;
#else #else
open_mode = O_RDWR; /* unsafe; subject to race conditions */ open_mode = O_RDWR; /* unsafe; subject to race conditions */
#endif /* O_NOFOLLOW */ #endif /* O_NOFOLLOW */
@ -1477,8 +1485,12 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
} }
if (!src->ascii_src.is_tempfile) { if (!src->ascii_src.is_tempfile) {
if ((fd = open(src->ascii_src.string, (int)open_mode, 0666)) != -1) { int fd = open(src->ascii_src.string, (int)open_mode, 0666);
if ((file = fdopen(fd, fdopen_mode))) {
if (fd != -1) {
FILE *file = fdopen(fd, fdopen_mode);
if (file != NULL) {
(void)fseek(file, 0, SEEK_END); (void)fseek(file, 0, SEEK_END);
src->ascii_src.length = (XawTextPosition)ftell(file); src->ascii_src.length = (XawTextPosition)ftell(file);
return (file); return (file);
@ -1511,11 +1523,11 @@ LoadPieces(AsciiSrcObject src, FILE *file, char *string)
if (string == NULL) { if (string == NULL) {
if (src->ascii_src.type == XawAsciiFile) { if (src->ascii_src.type == XawAsciiFile) {
if (src->ascii_src.length != 0) { if (src->ascii_src.length != 0) {
int len;
left = 0; left = 0;
fseek(file, 0, SEEK_SET); fseek(file, 0, SEEK_SET);
while (left < src->ascii_src.length) { while (left < src->ascii_src.length) {
int len;
ptr = XtMalloc((unsigned)src->ascii_src.piece_size); ptr = XtMalloc((unsigned)src->ascii_src.piece_size);
if ((len = (int)fread(ptr, sizeof(unsigned char), if ((len = (int)fread(ptr, sizeof(unsigned char),
(size_t)src->ascii_src.piece_size, file)) < 0) (size_t)src->ascii_src.piece_size, file)) < 0)

View file

@ -123,10 +123,15 @@ AsciiTextClassRec asciiTextClassRec = {
NULL, /* callback_private */ NULL, /* callback_private */
XtInheritTranslations, /* tm_table */ XtInheritTranslations, /* tm_table */
XtInheritQueryGeometry, /* query_geometry */ XtInheritQueryGeometry, /* query_geometry */
NULL, /* display_accelerator */
NULL, /* extension */
}, },
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* text */ /* text */
{ {

View file

@ -208,7 +208,6 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height,
Dimension lw, lh; /* Width and height needed for current line */ Dimension lw, lh; /* Width and height needed for current line */
Dimension bw, bh; /* Width and height needed for current widget */ Dimension bw, bh; /* Width and height needed for current widget */
Dimension h_space; /* Local copy of bbw->box.h_space */ Dimension h_space; /* Local copy of bbw->box.h_space */
Widget widget; /* Current widget */
unsigned int num_mapped_children = 0; unsigned int num_mapped_children = 0;
/* Box width and height */ /* Box width and height */
@ -230,7 +229,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height,
lw = h_space; lw = h_space;
for (i = 0; i < bbw->composite.num_children; i++) { for (i = 0; i < bbw->composite.num_children; i++) {
widget = bbw->composite.children[i]; Widget widget = bbw->composite.children[i]; /* Current widget */
if (widget->core.managed) { if (widget->core.managed) {
if (widget->core.mapped_when_managed) if (widget->core.mapped_when_managed)
num_mapped_children++; num_mapped_children++;
@ -498,10 +497,12 @@ TryNewLayout(BoxWidget bbw)
proposed_height = preferred_height; proposed_height = preferred_height;
} }
else { /* proposed_height != preferred_height */ else { /* proposed_height != preferred_height */
XtWidgetGeometry constraints, reply; XtWidgetGeometry constraints = {
.request_mode = CWHeight,
.height = proposed_height
};
XtWidgetGeometry reply;
constraints.request_mode = CWHeight;
constraints.height = proposed_height;
(void)XawBoxQueryGeometry((Widget)bbw, &constraints, &reply); (void)XawBoxQueryGeometry((Widget)bbw, &constraints, &reply);
proposed_width = preferred_width; proposed_width = preferred_width;
} }
@ -525,9 +526,6 @@ static XtGeometryResult
XawBoxGeometryManager(Widget w, XtWidgetGeometry *request, XawBoxGeometryManager(Widget w, XtWidgetGeometry *request,
XtWidgetGeometry *reply _X_UNUSED) XtWidgetGeometry *reply _X_UNUSED)
{ {
Dimension width, height, borderWidth;
BoxWidget bbw;
/* Position request always denied */ /* Position request always denied */
if (((request->request_mode & CWX) && request->x != XtX(w)) if (((request->request_mode & CWX) && request->x != XtX(w))
|| ((request->request_mode & CWY) && request->y != XtY(w))) || ((request->request_mode & CWY) && request->y != XtY(w)))
@ -535,6 +533,9 @@ XawBoxGeometryManager(Widget w, XtWidgetGeometry *request,
/* Size changes must see if the new size can be accommodated */ /* Size changes must see if the new size can be accommodated */
if (request->request_mode & (CWWidth | CWHeight | CWBorderWidth)) { if (request->request_mode & (CWWidth | CWHeight | CWBorderWidth)) {
Dimension width, height, borderWidth;
BoxWidget bbw;
/* Make all three fields in the request valid */ /* Make all three fields in the request valid */
if ((request->request_mode & CWWidth) == 0) if ((request->request_mode & CWWidth) == 0)
request->width = XtWidth(w); request->width = XtWidth(w);

View file

@ -200,6 +200,9 @@ CommandClassRec commandClassRec = {
/* simple */ /* simple */
{ {
ChangeSensitive, /* change_sensitive */ ChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* label */ /* label */
{ {
@ -219,17 +222,16 @@ WidgetClass commandWidgetClass = (WidgetClass)&commandClassRec;
static GC static GC
Get_GC(CommandWidget cbw, Pixel fg, Pixel bg) Get_GC(CommandWidget cbw, Pixel fg, Pixel bg)
{ {
XGCValues values; XGCValues values = {
.foreground = fg,
values.foreground = fg; .background = bg,
values.background = bg; .font = cbw->label.font->fid,
values.font = cbw->label.font->fid; .cap_style = CapProjecting,
values.cap_style = CapProjecting; .line_width = 0
};
if (cbw->command.highlight_thickness > 1) if (cbw->command.highlight_thickness > 1)
values.line_width = cbw->command.highlight_thickness; values.line_width = cbw->command.highlight_thickness;
else
values.line_width = 0;
if (cbw->simple.international == True) if (cbw->simple.international == True)
return (XtAllocateGC((Widget)cbw, 0, return (XtAllocateGC((Widget)cbw, 0,
@ -296,8 +298,8 @@ HighlightRegion(CommandWidget cbw)
rect.height = XtHeight(cbw); rect.height = XtHeight(cbw);
XUnionRectWithRegion(&rect, emptyRegion, outerRegion); XUnionRectWithRegion(&rect, emptyRegion, outerRegion);
rect.x = rect.y = (short)cbw->command.highlight_thickness; rect.x = rect.y = (short)cbw->command.highlight_thickness;
rect.width = (rect.width - cbw->command.highlight_thickness * 2); rect.width = (unsigned short)(rect.width - cbw->command.highlight_thickness * 2);
rect.height = (rect.height - cbw->command.highlight_thickness * 2); rect.height = (unsigned short)(rect.height - cbw->command.highlight_thickness * 2);
XUnionRectWithRegion(&rect, emptyRegion, innerRegion); XUnionRectWithRegion(&rect, emptyRegion, innerRegion);
XSubtractRegion(outerRegion, innerRegion, outerRegion); XSubtractRegion(outerRegion, innerRegion, outerRegion);
@ -563,7 +565,7 @@ static void
XawCommandGetValuesHook(Widget w, ArgList args, Cardinal *num_args) XawCommandGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
{ {
CommandWidget cbw = (CommandWidget)w; CommandWidget cbw = (CommandWidget)w;
unsigned int i; Cardinal i;
for (i = 0; i < *num_args; i++) { for (i = 0; i < *num_args; i++) {
if (STR_EQUAL(args[i].name, XtNforeground)) if (STR_EQUAL(args[i].name, XtNforeground))

View file

@ -174,6 +174,9 @@ DialogClassRec dialogClassRec = {
/* form */ /* form */
{ {
XtInheritLayout, /* layout */ XtInheritLayout, /* layout */
#ifndef OLDXAW
NULL,
#endif
}, },
/* dialog */ /* dialog */
{ {
@ -271,7 +274,6 @@ XawDialogSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
DialogWidget w = (DialogWidget)cnew; DialogWidget w = (DialogWidget)cnew;
DialogWidget old = (DialogWidget)current; DialogWidget old = (DialogWidget)current;
Arg args[5]; Arg args[5];
Cardinal num_args;
unsigned int i; unsigned int i;
Bool checks[NUM_CHECKS]; Bool checks[NUM_CHECKS];
@ -310,7 +312,8 @@ XawDialogSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
} }
if (checks[LABEL]) { if (checks[LABEL]) {
num_args = 0; Cardinal num_args = 0;
XtSetArg(args[num_args], XtNlabel, w->dialog.label); num_args++; XtSetArg(args[num_args], XtNlabel, w->dialog.label); num_args++;
if (w->dialog.iconW != NULL && if (w->dialog.iconW != NULL &&
XtHeight(w->dialog.labelW) <= XtHeight(w->dialog.iconW)) { XtHeight(w->dialog.labelW) <= XtHeight(w->dialog.iconW)) {
@ -359,9 +362,9 @@ XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
Arg a[1]; Arg a[1];
char * s; char * s;
DialogWidget src = (DialogWidget)w; DialogWidget src = (DialogWidget)w;
unsigned int i; Cardinal i;
for (i = 0; i < *num_args; i++) for (i = 0; i < *num_args; i++) {
if (streq(args[i].name, XtNvalue)) { if (streq(args[i].name, XtNvalue)) {
XtSetArg(a[0], XtNstring, &s); XtSetArg(a[0], XtNstring, &s);
XtGetValues(src->dialog.valueW, a, 1); XtGetValues(src->dialog.valueW, a, 1);
@ -372,6 +375,7 @@ XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
XtGetValues(src->dialog.labelW, a, 1); XtGetValues(src->dialog.labelW, a, 1);
*((char **)args[i].value) = s; *((char **)args[i].value) = s;
} }
}
} }
/* /*

View file

@ -122,7 +122,6 @@ void
XawRunDisplayList(Widget w, _XawDisplayList *list, XawRunDisplayList(Widget w, _XawDisplayList *list,
XEvent *event, Region region) XEvent *event, Region region)
{ {
XawDLProc *proc;
Cardinal i; Cardinal i;
if (!XtIsRealized(w)) if (!XtIsRealized(w))
@ -130,7 +129,7 @@ XawRunDisplayList(Widget w, _XawDisplayList *list,
for (i = 0; i < list->num_procs; i++) for (i = 0; i < list->num_procs; i++)
{ {
proc = list->procs[i]; XawDLProc *proc = list->procs[i];
proc->proc(w, proc->args, proc->data->data, event, region); proc->proc(w, proc->args, proc->data->data, event, region);
} }
} }
@ -236,8 +235,6 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen,
char cname[64], fname[64], aname[1024]; char cname[64], fname[64], aname[1024];
Cardinal i; Cardinal i;
String cp; String cp;
String fp;
String lp;
int status; int status;
xlibc = XawGetDisplayListClass(xlib); xlibc = XawGetDisplayListClass(xlib);
@ -264,6 +261,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen,
status = 0; status = 0;
while (status != DLEOF) while (status != DLEOF)
{ {
String fp, lp;
lp = cp; lp = cp;
cp = read_token(cp, fname, sizeof(fname), &status); cp = read_token(cp, fname, sizeof(fname), &status);
@ -449,16 +448,14 @@ void
XawDestroyDisplayList(_XawDisplayList *dlist) XawDestroyDisplayList(_XawDisplayList *dlist)
{ {
Cardinal i, j; Cardinal i, j;
XawDLProc *proc;
XawDLData *data;
if (!dlist) if (!dlist)
return; return;
for (i = 0; i < dlist->num_procs; i++) for (i = 0; i < dlist->num_procs; i++)
{ {
proc = dlist->procs[i]; XawDLProc *proc = dlist->procs[i];
data = proc->data; XawDLData *data = proc->data;
if (data) if (data)
{ {
@ -707,7 +704,6 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id)
{ {
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args; XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
XawXlibData *xdata = (XawXlibData *)data; XawXlibData *xdata = (XawXlibData *)data;
XawDLPosition *pos;
XPoint points_buf[16]; XPoint points_buf[16];
XPoint *points; XPoint *points;
Display *display; Display *display;
@ -719,7 +715,7 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id)
for (i = j = 0; i < num_points; i++, j = i << 1) for (i = j = 0; i < num_points; i++, j = i << 1)
{ {
pos = &pos_ptr->pos[j]; XawDLPosition *pos = &pos_ptr->pos[j];
points[i].x = X_ARG(pos[0]); points[i].x = X_ARG(pos[0]);
points[i].y = Y_ARG(pos[1]); points[i].y = Y_ARG(pos[1]);
} }
@ -738,7 +734,7 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id)
points[i].y = (short)(points[i].y + ypad); points[i].y = (short)(points[i].y + ypad);
} }
} }
else else if (num_points != 0)
{ {
points[0].x = (short)(points[0].x + xpad); points[0].x = (short)(points[0].x + xpad);
points[0].y = (short)(points[0].y + ypad); points[0].y = (short)(points[0].y + ypad);
@ -888,12 +884,14 @@ DlMask(Widget w, XtPointer args _X_UNUSED, XtPointer data,
XSetRegion(display, xdata->gc, region); XSetRegion(display, xdata->gc, region);
else if (event) else if (event)
{ {
XRectangle rect; XRectangle rect =
{
.x = (short)event->xexpose.x,
.y = (short)event->xexpose.y,
.width = (unsigned short)event->xexpose.width,
.height = (unsigned short)event->xexpose.height
};
rect.x = (short)event->xexpose.x;
rect.y = (short)event->xexpose.y;
rect.width = (unsigned short)event->xexpose.width;
rect.height = (unsigned short)event->xexpose.height;
XSetClipRectangles(display, xdata->gc, 0, 0, &rect, 1, Unsorted); XSetClipRectangles(display, xdata->gc, 0, 0, &rect, 1, Unsorted);
} }
} }
@ -916,7 +914,7 @@ DlLineWidth(Widget w, XtPointer args, XtPointer data,
XawXlibData *xdata = (XawXlibData *)data; XawXlibData *xdata = (XawXlibData *)data;
unsigned line_width = (unsigned)(unsigned long)args; unsigned line_width = (unsigned)(unsigned long)args;
if (xdata->values.line_width != line_width) if ((unsigned)xdata->values.line_width != line_width)
{ {
xdata->mask |= GCLineWidth; xdata->mask |= GCLineWidth;
xdata->values.line_width = (int)line_width; xdata->values.line_width = (int)line_width;
@ -938,7 +936,6 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data,
{ {
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args; XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
XawXlibData *xdata = (XawXlibData *)data; XawXlibData *xdata = (XawXlibData *)data;
XawDLPosition *pos;
XSegment *segments; XSegment *segments;
XSegment segments_buf[8]; XSegment segments_buf[8];
Display *display; Display *display;
@ -950,7 +947,7 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data,
for (i = j = 0; i < num_segments; i++, j = i << 2) for (i = j = 0; i < num_segments; i++, j = i << 2)
{ {
pos = &pos_ptr->pos[j]; XawDLPosition *pos = &pos_ptr->pos[j];
segments[i].x1 = X_ARG(pos[0]); segments[i].x1 = X_ARG(pos[0]);
segments[i].y1 = Y_ARG(pos[1]); segments[i].y1 = Y_ARG(pos[1]);
segments[i].x2 = X_ARG(pos[2]); segments[i].x2 = X_ARG(pos[2]);
@ -1323,10 +1320,8 @@ DlClipRectangles(Widget w, XtPointer args, XtPointer data,
{ {
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args; XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
XawXlibData *xdata = (XawXlibData *)data; XawXlibData *xdata = (XawXlibData *)data;
XawDLPosition *pos;
XRectangle *rects; XRectangle *rects;
XRectangle rects_buf[8]; XRectangle rects_buf[8];
Position x1, y1, x2, y2;
Cardinal num_rects, i, j; Cardinal num_rects, i, j;
num_rects = pos_ptr->num_pos>>2; num_rects = pos_ptr->num_pos>>2;
@ -1334,11 +1329,11 @@ DlClipRectangles(Widget w, XtPointer args, XtPointer data,
for (i = j = 0; i < num_rects; i++, j = i << 2) for (i = j = 0; i < num_rects; i++, j = i << 2)
{ {
pos = &pos_ptr->pos[j]; XawDLPosition *pos = &pos_ptr->pos[j];
x1 = X_ARG(pos[0]); Position x1 = X_ARG(pos[0]);
y1 = Y_ARG(pos[1]); Position y1 = Y_ARG(pos[1]);
x2 = X_ARG(pos[2]); Position x2 = X_ARG(pos[2]);
y2 = Y_ARG(pos[3]); Position y2 = Y_ARG(pos[3]);
rects[i].x = XawMin(x1, x2); rects[i].x = XawMin(x1, x2);
rects[i].y = XawMin(y1, y2); rects[i].y = XawMin(y1, y2);
rects[i].width = (unsigned short)(XawMax(x1, x2) - rects[i].x); rects[i].width = (unsigned short)(XawMax(x1, x2) - rects[i].x);
@ -1751,7 +1746,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
break; break;
case LWIDTH: case LWIDTH:
if (*num_params == 1) if (*num_params == 1)
retval = (void *)read_int((char *)params[0], NULL); {
long x = read_int((char *)params[0], NULL);
retval = (void *)x;
}
break; break;
case ARCMODE: case ARCMODE:
if (*num_params == 1) if (*num_params == 1)
@ -1896,7 +1894,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
break; break;
case PLANEMASK: case PLANEMASK:
if (*num_params == 1) if (*num_params == 1)
retval = (void *)read_int((char *)params[0], NULL); {
long x = read_int((char *)params[0], NULL);
retval = (void *)x;
}
break; break;
case DSTRING: case DSTRING:
case PSTRING: case PSTRING:
@ -1914,7 +1915,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
break; break;
case FONT: case FONT:
if (*num_params == 1) if (*num_params == 1)
retval = (void *)XLoadFont(DisplayOfScreen(screen), params[0]); {
Font x = XLoadFont(DisplayOfScreen(screen), params[0]);
retval = (void *)x;
}
break; break;
case DASHES: case DASHES:
if (*num_params && *num_params < 127) if (*num_params && *num_params < 127)
@ -1942,7 +1946,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
if (*num_params == 1) if (*num_params == 1)
{ {
if (isdigit((unsigned char)params[0][0]) || params[0][0] == '+' || params[0][0] == '-') if (isdigit((unsigned char)params[0][0]) || params[0][0] == '+' || params[0][0] == '-')
retval = (void *)read_int((char *)params[0], NULL); {
long x = read_int((char *)params[0], NULL);
retval = (void *)x;
}
else if (XmuCompareISOLatin1(params[0], "true") == 0 || else if (XmuCompareISOLatin1(params[0], "true") == 0 ||
XmuCompareISOLatin1(params[0], "on") == 0) XmuCompareISOLatin1(params[0], "on") == 0)
retval = (void *)True; retval = (void *)True;
@ -2125,7 +2132,7 @@ Bool XawDeclareDisplayListProc(XawDLClass *lc, String name,
if (!lc || !proc || !name || name[0] == '\0') if (!lc || !proc || !name || name[0] == '\0')
return (False); return (False);
if ((info = _XawFindDLInfo(lc, name)) != NULL) if (_XawFindDLInfo(lc, name) != NULL)
/* Since the data structures to the displayList classes are(should be) /* Since the data structures to the displayList classes are(should be)
* opaque, it is not a good idea to allow overriding a displayList * opaque, it is not a good idea to allow overriding a displayList
* procedure; it's better to choose another name or class name! * procedure; it's better to choose another name or class name!

View file

@ -301,12 +301,11 @@ WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
static void static void
XawFormRealize(Widget w, Mask *mask, XSetWindowAttributes *attr) XawFormRealize(Widget w, Mask *mask, XSetWindowAttributes *attr)
{ {
XawPixmap *pixmap;
(*formWidgetClass->core_class.superclass->core_class.realize)(w, mask, attr); (*formWidgetClass->core_class.superclass->core_class.realize)(w, mask, attr);
if (w->core.background_pixmap > XtUnspecifiedPixmap) { if (w->core.background_pixmap > XtUnspecifiedPixmap) {
pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), XawPixmap *pixmap =
XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w),
w->core.colormap, (int)w->core.depth); w->core.colormap, (int)w->core.depth);
if (pixmap && pixmap->mask) if (pixmap && pixmap->mask)
XawReshapeWidget(w, pixmap); XawReshapeWidget(w, pixmap);
@ -781,8 +780,8 @@ XawFormResize(Widget w)
fw->form.old_height, XtHeight(fw), fw->form.old_height, XtHeight(fw),
form->form.bottom) - form->form.bottom) -
(y + (XtBorderWidth(*childP) << 1)); (y + (XtBorderWidth(*childP) << 1));
form->form.virtual_width = width; form->form.virtual_width = (short)width;
form->form.virtual_height = height; form->form.virtual_height = (short)height;
#endif #endif
width = width < 1 ? 1 : width; width = width < 1 ? 1 : width;
@ -1022,10 +1021,8 @@ static void
XawFormChangeManaged(Widget w) XawFormChangeManaged(Widget w)
{ {
FormWidget fw = (FormWidget)w; FormWidget fw = (FormWidget)w;
FormConstraints form;
WidgetList children, childP; WidgetList children, childP;
int num_children = (int)fw->composite.num_children; int num_children = (int)fw->composite.num_children;
Widget child;
(*((FormWidgetClass)w->core.widget_class)->form_class.layout) (*((FormWidgetClass)w->core.widget_class)->form_class.layout)
(fw, XtWidth(w), XtHeight(w), True); (fw, XtWidth(w), XtHeight(w), True);
@ -1035,7 +1032,8 @@ XawFormChangeManaged(Widget w)
for (children = childP = fw->composite.children; for (children = childP = fw->composite.children;
childP - children < num_children; childP - children < num_children;
childP++) { childP++) {
child = *childP; FormConstraints form;
Widget child = *childP;
if (!XtIsManaged(child)) if (!XtIsManaged(child))
continue; continue;
form = (FormConstraints)child->core.constraints; form = (FormConstraints)child->core.constraints;

View file

@ -160,6 +160,9 @@ GripClassRec gripClassRec = {
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* grip */ /* grip */
{ {
@ -175,11 +178,11 @@ WidgetClass gripWidgetClass = (WidgetClass)&gripClassRec;
static void static void
GripAction(Widget widget, XEvent *event, String *params, Cardinal *num_params) GripAction(Widget widget, XEvent *event, String *params, Cardinal *num_params)
{ {
XawGripCallDataRec call_data; XawGripCallDataRec call_data = {
.event = event,
call_data.event = event; .params = params,
call_data.params = params; .num_params = *num_params
call_data.num_params = *num_params; };
XtCallCallbacks(widget, XtNcallback, (XtPointer)&call_data); XtCallCallbacks(widget, XtNcallback, (XtPointer)&call_data);
} }

View file

@ -253,6 +253,9 @@ LabelClassRec labelClassRec = {
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* label */ /* label */
{ {
@ -355,10 +358,10 @@ SetTextWidthAndHeight(LabelWidget lw)
label = nl + 1; label = nl + 1;
if (*label) if (*label)
lw->label.label_height += lw->label.label_height +=
fs->max_bounds.ascent + fs->max_bounds.descent; (Dimension)(fs->max_bounds.ascent + fs->max_bounds.descent);
} }
if (*label) { if (*label) {
int width = XTextWidth(fs, label, (int)strlen(label)); int width;
if (lw->label.encoding) if (lw->label.encoding)
width = XTextWidth16(fs, (XChar2b *)label, (int)(strlen(label) / 2)); width = XTextWidth16(fs, (XChar2b *)label, (int)(strlen(label) / 2));
@ -384,12 +387,12 @@ SetTextWidthAndHeight(LabelWidget lw)
static void static void
GetNormalGC(LabelWidget lw) GetNormalGC(LabelWidget lw)
{ {
XGCValues values; XGCValues values = {
.foreground = lw->label.foreground,
values.foreground = lw->label.foreground; .background = lw->core.background_pixel,
values.background = lw->core.background_pixel; .font = lw->label.font->fid,
values.font = lw->label.font->fid; .graphics_exposures = False
values.graphics_exposures = False; };
if (lw->simple.international == True) if (lw->simple.international == True)
/* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC */ /* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC */
@ -406,17 +409,17 @@ GetNormalGC(LabelWidget lw)
static void static void
GetGrayGC(LabelWidget lw) GetGrayGC(LabelWidget lw)
{ {
XGCValues values; XGCValues values = {
.foreground = lw->label.foreground,
values.foreground = lw->label.foreground; .background = lw->core.background_pixel,
values.background = lw->core.background_pixel; .font = lw->label.font->fid,
values.font = lw->label.font->fid; .fill_style = FillTiled,
values.fill_style = FillTiled; .tile = XmuCreateStippledPixmap(XtScreen((Widget)lw),
values.tile = XmuCreateStippledPixmap(XtScreen((Widget)lw),
lw->label.foreground, lw->label.foreground,
lw->core.background_pixel, lw->core.background_pixel,
lw->core.depth); lw->core.depth),
values.graphics_exposures = False; .graphics_exposures = False
};
lw->label.stipple = values.tile; lw->label.stipple = values.tile;
if (lw->simple.international == True) if (lw->simple.international == True)
@ -492,8 +495,8 @@ XawLabelInitialize(Widget request _X_UNUSED, Widget cnew,
set_bitmap_info(lw); /* need core.height */ set_bitmap_info(lw); /* need core.height */
if (XtWidth(lw) == 0) /* need label.lbm_width */ if (XtWidth(lw) == 0) /* need label.lbm_width */
XtWidth(lw) = (lw->label.label_width XtWidth(lw) = (Dimension)(lw->label.label_width
+ (2 * lw->label.internal_width) + (unsigned)(2 * lw->label.internal_width)
+ LEFT_OFFSET(lw)); + LEFT_OFFSET(lw));
lw->label.label_x = lw->label.label_y = 0; lw->label.label_x = lw->label.label_y = 0;
@ -511,10 +514,6 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
(*Superclass->core_class.expose)(gw, event, region); (*Superclass->core_class.expose)(gw, event, region);
gc = XtIsSensitive(gw) ? w->label.normal_GC : w->label.gray_GC; gc = XtIsSensitive(gw) ? w->label.normal_GC : w->label.gray_GC;
#ifdef notdef
if (region != NULL)
XSetRegion(XtDisplay(gw), gc, region);
#endif /*notdef*/
if (w->label.pixmap == None) { if (w->label.pixmap == None) {
int len = w->label.label_len; int len = w->label.label_len;
@ -532,7 +531,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
if (w->simple.international == True) { if (w->simple.international == True) {
XFontSetExtents *ext = XExtentsOfFontSet(w->label.fontset); XFontSetExtents *ext = XExtentsOfFontSet(w->label.fontset);
ksy = (ksy + XawAbs(ext->max_ink_extent.y)); ksy = (Position) (ksy + XawAbs(ext->max_ink_extent.y));
if (len == MULTI_LINE_LABEL) { if (len == MULTI_LINE_LABEL) {
char *nl; char *nl;
@ -541,7 +540,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset, XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset,
gc, w->label.label_x, ksy, label, gc, w->label.label_x, ksy, label,
(int)(nl - label)); (int)(nl - label));
ksy = (ksy + ext->max_ink_extent.height); ksy = (Position) (ksy + ext->max_ink_extent.height);
label = nl + 1; label = nl + 1;
} }
len = (int)strlen(label); len = (int)strlen(label);
@ -562,7 +561,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
else else
XDrawString(XtDisplay(gw), XtWindow(gw), gc, XDrawString(XtDisplay(gw), XtWindow(gw), gc,
w->label.label_x, y, label, (int)(nl - label)); w->label.label_x, y, label, (int)(nl - label));
y += (w->label.font->max_bounds.ascent + y += (Position) (w->label.font->max_bounds.ascent +
w->label.font->max_bounds.descent); w->label.font->max_bounds.descent);
label = nl + 1; label = nl + 1;
} }
@ -586,11 +585,6 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
XCopyArea(XtDisplay(gw), w->label.pixmap, XtWindow(gw), gc, XCopyArea(XtDisplay(gw), w->label.pixmap, XtWindow(gw), gc,
0, 0, w->label.label_width, w->label.label_height, 0, 0, w->label.label_width, w->label.label_height,
w->label.label_x, w->label.label_y); w->label.label_x, w->label.label_y);
#ifdef notdef
if (region != NULL)
XSetClipMask(XtDisplay(gw), gc, (Pixmap)None);
#endif /* notdef */
} }
static void static void
@ -598,7 +592,7 @@ _Reposition(LabelWidget lw, unsigned int width, unsigned int height,
Position *dx, Position *dy) Position *dx, Position *dy)
{ {
Position newPos; Position newPos;
Position leftedge = (lw->label.internal_width + LEFT_OFFSET(lw)); Position leftedge = (Position)(lw->label.internal_width + LEFT_OFFSET(lw));
switch (lw->label.justify) { switch (lw->label.justify) {
case XtJustifyLeft: case XtJustifyLeft:
@ -644,8 +638,8 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew,
LabelWidget curlw = (LabelWidget)current; LabelWidget curlw = (LabelWidget)current;
LabelWidget reqlw = (LabelWidget)request; LabelWidget reqlw = (LabelWidget)request;
LabelWidget newlw = (LabelWidget)cnew; LabelWidget newlw = (LabelWidget)cnew;
unsigned int i;
Boolean was_resized = False, redisplay = False, checks[NUM_CHECKS]; Boolean was_resized = False, redisplay = False, checks[NUM_CHECKS];
Cardinal i;
for (i = 0; i < NUM_CHECKS; i++) for (i = 0; i < NUM_CHECKS; i++)
checks[i] = False; checks[i] = False;
@ -700,7 +694,7 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew,
set_bitmap_info(newlw); set_bitmap_info(newlw);
if (XtWidth(curlw) == XtWidth(reqlw) && !checks[WIDTH]) if (XtWidth(curlw) == XtWidth(reqlw) && !checks[WIDTH])
XtWidth(newlw) = (newlw->label.label_width XtWidth(newlw) = (Dimension)(newlw->label.label_width
+ LEFT_OFFSET(newlw) + LEFT_OFFSET(newlw)
+ (unsigned)(newlw->label.internal_width << 1)); + (unsigned)(newlw->label.internal_width << 1));
} }
@ -753,7 +747,7 @@ XawLabelQueryGeometry(Widget w, XtWidgetGeometry *intended,
LabelWidget lw = (LabelWidget)w; LabelWidget lw = (LabelWidget)w;
preferred->request_mode = CWWidth | CWHeight; preferred->request_mode = CWWidth | CWHeight;
preferred->width = (lw->label.label_width preferred->width = (Dimension)(lw->label.label_width
+ (unsigned)(lw->label.internal_width << 1) + (unsigned)(lw->label.internal_width << 1)
+ LEFT_OFFSET(lw)); + LEFT_OFFSET(lw));
preferred->height = (Dimension)(lw->label.label_height + preferred->height = (Dimension)(lw->label.label_height +

View file

@ -300,10 +300,15 @@ ListClassRec listClassRec = {
NULL, /* callback_private */ NULL, /* callback_private */
defaultTranslations, /* tm_table */ defaultTranslations, /* tm_table */
XawListQueryGeometry, /* query_geometry */ XawListQueryGeometry, /* query_geometry */
NULL, /* display_accelerator */
NULL, /* extension */
}, },
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* list */ /* list */
{ {
@ -319,11 +324,11 @@ WidgetClass listWidgetClass = (WidgetClass)&listClassRec;
static void static void
GetGCs(Widget w) GetGCs(Widget w)
{ {
XGCValues values;
ListWidget lw = (ListWidget)w; ListWidget lw = (ListWidget)w;
XGCValues values = {
values.foreground = lw->list.foreground; .foreground = lw->list.foreground,
values.font = lw->list.font->fid; .font = lw->list.font->fid
};
if (lw->simple.international == True) if (lw->simple.international == True)
lw->list.normgc = XtAllocateGC(w, 0, GCForeground, &values, GCFont, 0); lw->list.normgc = XtAllocateGC(w, 0, GCForeground, &values, GCFont, 0);
@ -353,7 +358,6 @@ GetGCs(Widget w)
static void static void
CalculatedValues(Widget w) CalculatedValues(Widget w)
{ {
int i, len;
ListWidget lw = (ListWidget)w; ListWidget lw = (ListWidget)w;
/* If list is NULL then the list will just be the name of the widget */ /* If list is NULL then the list will just be the name of the widget */
@ -369,9 +373,13 @@ CalculatedValues(Widget w)
/* Get column width */ /* Get column width */
if (LongestFree(lw)) { if (LongestFree(lw)) {
int i;
lw->list.longest = 0; /* so it will accumulate real longest below */ lw->list.longest = 0; /* so it will accumulate real longest below */
for (i = 0 ; i < lw->list.nitems; i++) { for (i = 0 ; i < lw->list.nitems; i++) {
int len;
if (lw->simple.international == True) if (lw->simple.international == True)
len = XmbTextEscapement(lw->list.fontset, lw->list.list[i], len = XmbTextEscapement(lw->list.fontset, lw->list.list[i],
(int)strlen(lw->list.list[i])); (int)strlen(lw->list.list[i]));
@ -432,11 +440,12 @@ ResetList(Widget w, Bool changex, Bool changey)
static void static void
ChangeSize(Widget w, unsigned int width, unsigned int height) ChangeSize(Widget w, unsigned int width, unsigned int height)
{ {
XtWidgetGeometry request, reply; XtWidgetGeometry request = {
.request_mode = CWWidth | CWHeight,
request.request_mode = CWWidth | CWHeight; .width = (Dimension)width,
request.width = (Dimension)width; .height = (Dimension)height
request.height = (Dimension)height; };
XtWidgetGeometry reply;
switch (XtMakeGeometryRequest(w, &request, &reply)) { switch (XtMakeGeometryRequest(w, &request, &reply)) {
case XtGeometryYes: case XtGeometryYes:
@ -668,12 +677,15 @@ HighlightBackground(Widget w, int x, int y, GC gc)
static void static void
ClipToShadowInteriorAndLongest(ListWidget lw, GC *gc_p, unsigned int x) ClipToShadowInteriorAndLongest(ListWidget lw, GC *gc_p, unsigned int x)
{ {
XRectangle rect; XRectangle rect = {
.x = (short)x,
.y = (short)lw->list.internal_height,
.height = (unsigned short)
(XtHeight(lw) - (lw->list.internal_height << 1)),
.width = (unsigned short)
(XtWidth(lw) - (unsigned)lw->list.internal_width - x),
};
rect.x = (short)x;
rect.y = (short)lw->list.internal_height;
rect.height = (unsigned short)(XtHeight(lw) - (lw->list.internal_height << 1));
rect.width = (unsigned short)(XtWidth(lw) - (unsigned)lw->list.internal_width - x);
if (rect.width > lw->list.longest) if (rect.width > lw->list.longest)
rect.width = (unsigned short)lw->list.longest; rect.width = (unsigned short)lw->list.longest;
@ -980,7 +992,6 @@ Notify(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
{ {
ListWidget lw = (ListWidget)w; ListWidget lw = (ListWidget)w;
int item, item_len; int item, item_len;
XawListReturnStruct ret_value;
/* /*
* Find item and if out of range then unhighlight and return * Find item and if out of range then unhighlight and return
@ -1012,10 +1023,14 @@ Notify(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
/* /*
* Call Callback function * Call Callback function
*/ */
ret_value.string = lw->list.list[item]; {
ret_value.list_index = item; XawListReturnStruct ret_value = {
.string = lw->list.list[item],
.list_index = item
};
XtCallCallbacks(w, XtNcallback, (XtPointer)&ret_value); XtCallCallbacks(w, XtNcallback, (XtPointer)&ret_value);
}
} }
/* Unset() - Action /* Unset() - Action
@ -1178,7 +1193,7 @@ XawListDestroy(Widget w)
* If nitems is <= 0 then the list needs to be NULL terminated * If nitems is <= 0 then the list needs to be NULL terminated
*/ */
void void
XawListChange(Widget w, _Xconst char **list, int nitems, int longest, XawListChange(Widget w, String *list, int nitems, int longest,
#if NeedWidePrototypes #if NeedWidePrototypes
int resize_it int resize_it
#else #else

View file

@ -1,13 +1,5 @@
lib_LTLIBRARIES = lib_LTLIBRARIES =
#
# This doesn't appear to be used on any
# current systems -- it requires SUNSHLIB and !SHAREDCODE,
# but only sunLib.rules defines SUNSHLIB and that file also
# always defines SHAREDCODE. Go figure
#
# SHAREDLIB_SOURCES = sharedlib.c
COMMON_SOURCES = \ COMMON_SOURCES = \
Actions.c \ Actions.c \
AllWidgets.c \ AllWidgets.c \
@ -138,5 +130,3 @@ endif
endif endif
endif endif
EXTRA_DIST = sharedlib.c

View file

@ -306,6 +306,7 @@ XAW6_LIBS = @XAW6_LIBS@
XAW7_CFLAGS = @XAW7_CFLAGS@ XAW7_CFLAGS = @XAW7_CFLAGS@
XAW7_LIBS = @XAW7_LIBS@ XAW7_LIBS = @XAW7_LIBS@
XMLTO = @XMLTO@ XMLTO = @XMLTO@
XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SGML_PATH = @XORG_SGML_PATH@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@ -364,14 +365,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
lib_LTLIBRARIES = $(am__append_1) $(am__append_2) lib_LTLIBRARIES = $(am__append_1) $(am__append_2)
#
# This doesn't appear to be used on any
# current systems -- it requires SUNSHLIB and !SHAREDCODE,
# but only sunLib.rules defines SUNSHLIB and that file also
# always defines SHAREDCODE. Go figure
#
# SHAREDLIB_SOURCES = sharedlib.c
COMMON_SOURCES = \ COMMON_SOURCES = \
Actions.c \ Actions.c \
AllWidgets.c \ AllWidgets.c \
@ -453,7 +446,6 @@ AM_CPPFLAGS = \
@BUILD_XAW7_TRUE@libXaw7_la_LDFLAGS = -version-info 7:0:0 -no-undefined @BUILD_XAW7_TRUE@libXaw7_la_LDFLAGS = -version-info 7:0:0 -no-undefined
@BUILD_XAW7_TRUE@libXaw7_la_LIBADD = $(XAW7_LIBS) @BUILD_XAW7_TRUE@libXaw7_la_LIBADD = $(XAW7_LIBS)
EXTRA_DIST = sharedlib.c
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:

View file

@ -128,7 +128,10 @@ MenuButtonClassRec menuButtonClassRec = {
}, },
/* simple */ /* simple */
{ {
XtInheritChangeSensitive /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* label */ /* label */
{ {
@ -208,7 +211,9 @@ PopupMenu(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal
int menu_x, menu_y, menu_width, menu_height, button_height; int menu_x, menu_y, menu_width, menu_height, button_height;
Position button_x, button_y; Position button_x, button_y;
temp = w; if ((temp = w) == NULL)
return;
while(temp != NULL) { while(temp != NULL) {
menu = XtNameToWidget(temp, mbw->menu_button.menu_name); menu = XtNameToWidget(temp, mbw->menu_button.menu_name);
if (menu == NULL) if (menu == NULL)

View file

@ -551,7 +551,6 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
TextWidget ctx = (TextWidget)XtParent(w); TextWidget ctx = (TextWidget)XtParent(w);
Widget source = ctx->text.source; Widget source = ctx->text.source;
XawTextPosition idx, pos; XawTextPosition idx, pos;
wchar_t c;
XFontSetExtents *ext = XExtentsOfFontSet(fontset); XFontSetExtents *ext = XExtentsOfFontSet(fontset);
XawTextBlock blk; XawTextBlock blk;
int i, rWidth; int i, rWidth;
@ -559,6 +558,8 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos)); pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos));
rWidth = 0; rWidth = 0;
for (i = 0, idx = fromPos; idx < toPos; i++, idx++) { for (i = 0, idx = fromPos; idx < toPos; i++, idx++) {
wchar_t c;
if (i >= blk.length) { if (i >= blk.length) {
i = 0; i = 0;
XawTextSourceRead(source, pos, &blk, (int)(toPos - pos)); XawTextSourceRead(source, pos, &blk, (int)(toPos - pos));
@ -656,15 +657,15 @@ GetGC(MultiSinkObject sink)
{ {
XtGCMask valuemask = (GCGraphicsExposures | GCClipXOrigin | XtGCMask valuemask = (GCGraphicsExposures | GCClipXOrigin |
GCForeground | GCBackground); GCForeground | GCBackground);
XGCValues values; XGCValues values = {
/* XXX We dont want to share a gc that will change the clip-mask */
.clip_x_origin = (int)(long)sink,
.clip_mask = None,
.graphics_exposures = False,
/* XXX We dont want do share a gc that will change the clip-mask */ .foreground = sink->text_sink.foreground,
values.clip_x_origin = (int)(long)sink; .background = sink->text_sink.background
values.clip_mask = None; };
values.graphics_exposures = False;
values.foreground = sink->text_sink.foreground;
values.background = sink->text_sink.background;
sink->multi_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values, sink->multi_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values,
GCFont | GCClipMask, 0); GCFont | GCClipMask, 0);

View file

@ -75,6 +75,10 @@ in this Software without prior written authorization from The Open Group.
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#define MAGIC_VALUE ((XawTextPosition)-1) #define MAGIC_VALUE ((XawTextPosition)-1)
#define streq(a, b) (strcmp((a), (b)) == 0) #define streq(a, b) (strcmp((a), (b)) == 0)
@ -331,7 +335,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length)
text->firstPos = (int)pos; text->firstPos = (int)pos;
text->ptr = (char *)(piece->text + (pos - start)); text->ptr = (char *)(piece->text + (pos - start));
count = piece->used - (pos - start); count = piece->used - (pos - start);
text->length = (Max(0, (length > count) ? count : length)); text->length = (int)(Max(0, (length > count) ? count : length));
return (pos + text->length); return (pos + text->length);
} }
@ -404,12 +408,15 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
if (src->text_src.edit_mode == XawtextRead) if (src->text_src.edit_mode == XawtextRead)
return (XawEditError); return (XawEditError);
start_piece = FindPiece(src, startPos, &start_first); if ((start_piece = FindPiece(src, startPos, &start_first)) == NULL)
end_piece = FindPiece(src, endPos, &end_first); return XawEditError;
if ((end_piece = FindPiece(src, endPos, &end_first)) == NULL)
return XawEditError;
/* STEP 3: remove the empty pieces... */ /* STEP 3: remove the empty pieces... */
if (start_piece != end_piece) { if (start_piece != end_piece) {
temp_piece = start_piece->next; if ((temp_piece = start_piece->next) == NULL)
return XawEditError;
/* If empty and not the only piece then remove it */ /* If empty and not the only piece then remove it */
if (((start_piece->used = startPos - start_first) == 0) if (((start_piece->used = startPos - start_first) == 0)
@ -587,7 +594,6 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type,
if (piece == NULL) /* Beginning of text */ if (piece == NULL) /* Beginning of text */
return (0); return (0);
ptr = piece->text + piece->used - 1; ptr = piece->text + piece->used - 1;
c = *ptr;
} }
else if (ptr >= piece->text + piece->used) { else if (ptr >= piece->text + piece->used) {
piece = piece->next; piece = piece->next;
@ -869,7 +875,7 @@ static void
XawMultiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args) XawMultiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
{ {
MultiSrcObject src = (MultiSrcObject)w; MultiSrcObject src = (MultiSrcObject)w;
unsigned int i; Cardinal i;
if (src->multi_src.type == XawAsciiString) { if (src->multi_src.type == XawAsciiString) {
for (i = 0; i < *num_args ; i++) { for (i = 0; i < *num_args ; i++) {
@ -1034,13 +1040,10 @@ Bool
_XawMultiSaveAsFile(Widget w, _Xconst char* name) _XawMultiSaveAsFile(Widget w, _Xconst char* name)
{ {
MultiSrcObject src = (MultiSrcObject)w; MultiSrcObject src = (MultiSrcObject)w;
char * mb_string; char *mb_string = StorePiecesInString(src);
Bool ret;
mb_string = StorePiecesInString(src);
if (mb_string != 0) { if (mb_string != 0) {
ret = WriteToFile(mb_string, (String)name); Bool ret = WriteToFile(mb_string, (String)name);
XtFree(mb_string); XtFree(mb_string);
return (ret); return (ret);
@ -1089,7 +1092,7 @@ WriteToFile(String string, String name)
int fd; int fd;
Bool result = True; Bool result = True;
if ((fd = creat(name, 0666)) == -1) if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666)) == -1)
return (False); return (False);
if (write(fd, string, strlen(string)) == -1) if (write(fd, string, strlen(string)) == -1)
@ -1215,7 +1218,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString)
XtErrorMsg("NoFile", "multiSourceCreate", "XawError", XtErrorMsg("NoFile", "multiSourceCreate", "XawError",
"Creating a read only disk widget and no file specified.", "Creating a read only disk widget and no file specified.",
NULL, 0); NULL, 0);
open_mode = O_RDONLY; open_mode = O_RDONLY | O_CLOEXEC;
fdopen_mode = "r"; fdopen_mode = "r";
break; break;
case XawtextAppend: case XawtextAppend:
@ -1225,9 +1228,9 @@ InitStringOrFile(MultiSrcObject src, Bool newString)
src->multi_src.is_tempfile = True; src->multi_src.is_tempfile = True;
} }
else { else {
/* O_NOFOLLOW is a BSD & Linux extension */ /* O_NOFOLLOW was a FreeBSD & Linux extension, now adopted by POSIX */
#ifdef O_NOFOLLOW #ifdef O_NOFOLLOW
open_mode = O_RDWR | O_NOFOLLOW; open_mode = O_RDWR | O_NOFOLLOW | O_CLOEXEC;
#else #else
open_mode = O_RDWR; /* unsafe; subject to race conditions */ open_mode = O_RDWR; /* unsafe; subject to race conditions */
#endif #endif
@ -1323,7 +1326,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string)
else { else {
if (src->multi_src.length != 0) { if (src->multi_src.length != 0) {
temp_mb_holder = temp_mb_holder =
XtMalloc(((size_t)(src->multi_src.length + 1) * sizeof(unsigned char))); XtMalloc((Cardinal)((size_t)(src->multi_src.length + 1) * sizeof(unsigned char)));
fseek(file, 0, SEEK_SET); fseek(file, 0, SEEK_SET);
src->multi_src.length = (XawTextPosition)fread(temp_mb_holder, src->multi_src.length = (XawTextPosition)fread(temp_mb_holder,
sizeof(unsigned char), sizeof(unsigned char),

View file

@ -466,6 +466,10 @@ PanedClassRec panedClassRec = {
XawPanedPaneSetValues, /* set_values */ XawPanedPaneSetValues, /* set_values */
NULL, /* extension */ NULL, /* extension */
}, },
/* paned */
{
NULL, /* extension */
}
}; };
WidgetClass panedWidgetClass = (WidgetClass)&panedClassRec; WidgetClass panedWidgetClass = (WidgetClass)&panedClassRec;
@ -506,7 +510,7 @@ AdjustPanedSize(PanedWidget pw, unsigned int off_size,
int size = Max(PaneInfo(*childP)->size, (int)PaneInfo(*childP)->min); int size = Max(PaneInfo(*childP)->size, (int)PaneInfo(*childP)->min);
AssignMin(size, (int)PaneInfo(*childP)->max); AssignMin(size, (int)PaneInfo(*childP)->max);
newsize = (newsize + (size + pw->paned.internal_bw)); newsize = (Dimension)(newsize + (size + pw->paned.internal_bw));
} }
newsize = (Dimension)(newsize - pw->paned.internal_bw); newsize = (Dimension)(newsize - pw->paned.internal_bw);
@ -792,9 +796,7 @@ static void
CommitNewLocations(PanedWidget pw) CommitNewLocations(PanedWidget pw)
{ {
Widget *childP; Widget *childP;
XWindowChanges changes; XWindowChanges changes = { .stack_mode = Above };
changes.stack_mode = Above;
ForAllPanes(pw, childP) { ForAllPanes(pw, childP) {
Pane pane = PaneInfo(*childP); Pane pane = PaneInfo(*childP);
@ -910,7 +912,7 @@ static void
_DrawInternalBorders(PanedWidget pw, GC gc) _DrawInternalBorders(PanedWidget pw, GC gc)
{ {
Widget *childP; Widget *childP;
int on_loc, off_loc; int off_loc;
unsigned int on_size, off_size; unsigned int on_size, off_size;
/* /*
@ -925,7 +927,7 @@ _DrawInternalBorders(PanedWidget pw, GC gc)
on_size = (unsigned int)pw->paned.internal_bw; on_size = (unsigned int)pw->paned.internal_bw;
ForAllPanes(pw, childP) { ForAllPanes(pw, childP) {
on_loc = IsVert(pw) ? XtY(*childP) : XtX(*childP); int on_loc = IsVert(pw) ? XtY(*childP) : XtX(*childP);
on_loc -= (int)on_size; on_loc -= (int)on_size;
_DrawRect(pw, gc, on_loc, off_loc, on_size, off_size); _DrawRect(pw, gc, on_loc, off_loc, on_size, off_size);
@ -1041,7 +1043,6 @@ static void
StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir) StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir)
{ {
Widget *childP; Widget *childP;
Cursor cursor;
pw->paned.whichadd = pw->paned.whichsub = NULL; pw->paned.whichadd = pw->paned.whichsub = NULL;
@ -1054,6 +1055,8 @@ StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir)
* Change the cursor * Change the cursor
*/ */
if (XtIsRealized(grip)) { if (XtIsRealized(grip)) {
Cursor cursor;
if (IsVert(pw)) { if (IsVert(pw)) {
if (dir == UpLeftPane) if (dir == UpLeftPane)
cursor = pw->paned.adjust_upper_cursor; cursor = pw->paned.adjust_upper_cursor;
@ -1122,11 +1125,17 @@ MoveGripAdjustment(PanedWidget pw, Widget grip, Direction dir, int loc)
if (dir == ThisBorderOnly) { if (dir == ThisBorderOnly) {
int old_add_size = add_size, old_sub_size; int old_add_size = add_size, old_sub_size;
if (pw->paned.whichadd == NULL)
return;
AssignMax(add_size, (int)PaneInfo(pw->paned.whichadd)->min); AssignMax(add_size, (int)PaneInfo(pw->paned.whichadd)->min);
AssignMin(add_size, (int)PaneInfo(pw->paned.whichadd)->max); AssignMin(add_size, (int)PaneInfo(pw->paned.whichadd)->max);
if (add_size != old_add_size) if (add_size != old_add_size)
sub_size += old_add_size - add_size; sub_size += old_add_size - add_size;
if (pw->paned.whichsub == NULL)
return;
old_sub_size = sub_size; old_sub_size = sub_size;
AssignMax(sub_size, (int)PaneInfo(pw->paned.whichsub)->min); AssignMax(sub_size, (int)PaneInfo(pw->paned.whichsub)->min);
AssignMin(sub_size, (int)PaneInfo(pw->paned.whichsub)->max); AssignMin(sub_size, (int)PaneInfo(pw->paned.whichsub)->max);
@ -1452,7 +1461,6 @@ ChangeAllGripCursors(PanedWidget pw)
Widget *childP; Widget *childP;
ForAllPanes(pw, childP) { ForAllPanes(pw, childP) {
Arg arglist[1];
Cursor cursor; Cursor cursor;
if ((cursor = pw->paned.grip_cursor) == None) { if ((cursor = pw->paned.grip_cursor) == None) {
@ -1463,6 +1471,8 @@ ChangeAllGripCursors(PanedWidget pw)
} }
if (HasGrip(*childP)) { if (HasGrip(*childP)) {
Arg arglist[1];
XtSetArg(arglist[0], XtNcursor, cursor); XtSetArg(arglist[0], XtNcursor, cursor);
XtSetValues(PaneInfo(*childP)->grip, arglist, 1); XtSetValues(PaneInfo(*childP)->grip, arglist, 1);
} }

View file

@ -39,12 +39,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/PannerP.h> #include <X11/Xaw/PannerP.h>
#include <X11/Xaw/XawInit.h> #include <X11/Xaw/XawInit.h>
#include "Private.h" #include "Private.h"
#if defined(ISC) && __STDC__ && !defined(ISC30)
extern double atof(char *);
#else
#include <stdlib.h> /* for atof() */ #include <stdlib.h> /* for atof() */
#endif
/* /*
* Class Methods * Class Methods
@ -342,7 +337,7 @@ WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
static void static void
reset_shadow_gc(PannerWidget pw) reset_shadow_gc(PannerWidget pw)
{ {
XtGCMask valuemask = GCForeground; XtGCMask valuemask;
XGCValues values; XGCValues values;
unsigned long pixels[3]; unsigned long pixels[3];
@ -981,11 +976,11 @@ ActionPage(Widget gw, XEvent *event, String *params, Cardinal *num_params)
y += pw->panner.knob_y; y += pw->panner.knob_y;
if (isin) { /* if in, then use move */ if (isin) { /* if in, then use move */
XEvent ev; XEvent ev = {
.xbutton.type = ButtonPress,
ev.xbutton.type = ButtonPress; .xbutton.x = x,
ev.xbutton.x = x; .xbutton.y = y
ev.xbutton.y = y; };
ActionMove(gw, &ev, NULL, &zero); ActionMove(gw, &ev, NULL, &zero);
} }
else { else {

View file

@ -469,13 +469,14 @@ _XawFindCache(XawCache *xaw,
static XawCache * static XawCache *
_XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth) _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth)
{ {
XawCache *s_cache, *c_cache, *d_cache, *cache, *pcache; XawCache *cache;
cache = _XawFindCache(xaw, screen, colormap, depth, FIND_ALL); cache = _XawFindCache(xaw, screen, colormap, depth, FIND_ALL);
if (!cache) if (!cache)
{ {
s_cache = _XawFindCache(xaw, XawCache *c_cache, *d_cache, *pcache;
XawCache *s_cache = _XawFindCache(xaw,
screen, colormap, depth, FIND_SCREEN); screen, colormap, depth, FIND_SCREEN);
if (!s_cache) if (!s_cache)
{ {
@ -664,7 +665,7 @@ GetResourcePixmapPath(Display *display)
XrmRepresentation rep_type; XrmRepresentation rep_type;
XrmValue value; XrmValue value;
static char *default_path = static char *default_path =
"%H/%T/%N:%P/include/X11/%T/%N:/usr/X11R6/include/X11/%T/%N:/usr/include/X11/%T/%N:%N"; (char*)"%H/%T/%N:%P/include/X11/%T/%N:/usr/X11R6/include/X11/%T/%N:/usr/include/X11/%T/%N:%N";
xrm_name[0] = XrmPermStringToQuark("pixmapFilePath"); xrm_name[0] = XrmPermStringToQuark("pixmapFilePath");
xrm_name[1] = NULLQUARK; xrm_name[1] = NULLQUARK;
@ -707,7 +708,6 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
{ {
Pixel fg, bg; Pixel fg, bg;
XColor color, exact; XColor color, exact;
Pixmap pixmap;
unsigned int width, height; unsigned int width, height;
unsigned char *data = NULL; unsigned char *data = NULL;
int hotX, hotY; int hotX, hotY;
@ -716,8 +716,8 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
static SubstitutionRec sub[] = { static SubstitutionRec sub[] = {
{'H', NULL}, {'H', NULL},
{'N', NULL}, {'N', NULL},
{'T', "bitmaps"}, {'T', (_XtString) "bitmaps"},
{'P', PROJECT_ROOT}, {'P', (_XtString) PROJECT_ROOT},
}; };
char *filename; char *filename;
@ -747,7 +747,7 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
{ {
if (!sub[0].substitution) if (!sub[0].substitution)
sub[0].substitution = getenv("HOME"); sub[0].substitution = getenv("HOME");
sub[1].substitution = params->name; sub[1].substitution = (_XtString)params->name;
if (pixmap_path == NULL) if (pixmap_path == NULL)
GetResourcePixmapPath(DisplayOfScreen(screen)); GetResourcePixmapPath(DisplayOfScreen(screen));
filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL); filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL);
@ -755,12 +755,13 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
return (FALSE); return (FALSE);
} }
else else
filename = params->name; filename = (char*)params->name;
if (XReadBitmapFileData(filename, &width, &height, &data, if (XReadBitmapFileData(filename, &width, &height, &data,
&hotX, &hotY) == BitmapSuccess) &hotX, &hotY) == BitmapSuccess)
{ {
pixmap = XCreatePixmapFromBitmapData(DisplayOfScreen(screen), Pixmap pixmap =
XCreatePixmapFromBitmapData(DisplayOfScreen(screen),
RootWindowOfScreen(screen), RootWindowOfScreen(screen),
(char *)data, (char *)data,
width, height, fg, bg, (unsigned)depth); width, height, fg, bg, (unsigned)depth);
@ -828,7 +829,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
value = NULL; value = NULL;
if ((argval = XawFindArgVal(params, "start")) != NULL) if ((argval = XawFindArgVal(params, "start")) != NULL)
value = argval->value; value = (char*)argval->value;
if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value, if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
&start, &color)) &start, &color))
return (False); return (False);
@ -839,7 +840,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
} }
value = NULL; value = NULL;
if ((argval = XawFindArgVal(params, "end")) != NULL) if ((argval = XawFindArgVal(params, "end")) != NULL)
value = argval->value; value = (char*)argval->value;
if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value, if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
&end, &color)) &end, &color))
return (False); return (False);
@ -936,8 +937,8 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth _X
static SubstitutionRec sub[] = { static SubstitutionRec sub[] = {
{'H', NULL}, {'H', NULL},
{'N', NULL}, {'N', NULL},
{'T', "pixmaps"}, {'T', (_XtString) "pixmaps"},
{'P', PROJECT_ROOT}, {'P', (_XtString) PROJECT_ROOT},
}; };
const char *filename; const char *filename;
@ -949,7 +950,7 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth _X
{ {
if (!sub[0].substitution) if (!sub[0].substitution)
sub[0].substitution = getenv("HOME"); sub[0].substitution = getenv("HOME");
sub[1].substitution = params->name; sub[1].substitution = (_XtString)params->name;
if (pixmap_path == NULL) if (pixmap_path == NULL)
GetResourcePixmapPath(DisplayOfScreen(screen)); GetResourcePixmapPath(DisplayOfScreen(screen));
filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL); filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL);

View file

@ -153,15 +153,15 @@ SendReport(PortholeWidget pw, unsigned int changed)
Widget child = find_child(pw); Widget child = find_child(pw);
if (pw->porthole.report_callbacks && child) { if (pw->porthole.report_callbacks && child) {
XawPannerReport prep; XawPannerReport prep = {
.changed = changed,
prep.changed = changed; .slider_x = (Position)(-XtX(child)), /* porthole is "inner" */
prep.slider_x = (Position)(-XtX(child)); /* porthole is "inner" */ .slider_y = (Position)(-XtY(child)), /* child is outer since it is larger */
prep.slider_y = (Position)(-XtY(child)); /* child is outer since it is larger */ .slider_width = XtWidth(pw),
prep.slider_width = XtWidth(pw); .slider_height = XtHeight(pw),
prep.slider_height = XtHeight(pw); .canvas_width = XtWidth(child),
prep.canvas_width = XtWidth(child); .canvas_height = XtHeight(child)
prep.canvas_height = XtHeight(child); };
XtCallCallbackList((Widget)pw, pw->porthole.report_callbacks, XtCallCallbackList((Widget)pw, pw->porthole.report_callbacks,
(XtPointer)&prep); (XtPointer)&prep);
} }
@ -351,9 +351,8 @@ XawPortholeChangeManaged(Widget gw)
if (child) { if (child) {
if (!XtIsRealized (gw)) { if (!XtIsRealized (gw)) {
XtWidgetGeometry geom, retgeom; XtWidgetGeometry geom = { .request_mode = 0 }, retgeom;
geom.request_mode = 0;
if (XtWidth(pw) == 0) { if (XtWidth(pw) == 0) {
geom.width = XtWidth(child); geom.width = XtWidth(child);
geom.request_mode |= CWWidth; geom.request_mode |= CWWidth;

View file

@ -190,6 +190,9 @@ RepeaterClassRec repeaterClassRec = {
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* label */ /* label */
{ {

View file

@ -316,6 +316,9 @@ ScrollbarClassRec scrollbarClassRec = {
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* scrollbar */ /* scrollbar */
{ {

View file

@ -225,6 +225,9 @@ SimpleClassRec simpleClassRec = {
/* simple */ /* simple */
{ {
ChangeSensitive, /* change_sensitive */ ChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
}; };

View file

@ -272,6 +272,9 @@ static CompositeClassExtensionRec extension_rec = {
XtCompositeExtensionVersion, /* version */ XtCompositeExtensionVersion, /* version */
sizeof(CompositeClassExtensionRec), /* record_size */ sizeof(CompositeClassExtensionRec), /* record_size */
True, /* accepts_objects */ True, /* accepts_objects */
#ifndef OLDXAW
False, /* allows_change_managed_set */
#endif
}; };
#define Superclass (&overrideShellClassRec) #define Superclass (&overrideShellClassRec)
@ -1070,6 +1073,8 @@ CreateLabel(Widget w)
*next_child = *child; *next_child = *child;
next_child = child; next_child = child;
} }
if (child != NULL)
*child = (Widget)smw->simple_menu.label; *child = (Widget)smw->simple_menu.label;
} }
@ -1105,8 +1110,6 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret)
short vadd, hadd, x_ins, y_ins; short vadd, hadd, x_ins, y_ins;
Dimension *widths; Dimension *widths;
height = 0;
if (XtIsSubclass(w, simpleMenuWidgetClass)) { if (XtIsSubclass(w, simpleMenuWidgetClass)) {
smw = (SimpleMenuWidget)w; smw = (SimpleMenuWidget)w;
current_entry = NULL; current_entry = NULL;
@ -1196,7 +1199,7 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret)
++n; ++n;
} }
height = (tmp_h + smw->simple_menu.bottom_margin); height = (Dimension)(tmp_h + smw->simple_menu.bottom_margin);
width = (Dimension)(width + tmp_w); width = (Dimension)(width + tmp_w);
if (smw->simple_menu.label && width < XtWidth(smw->simple_menu.label)) { if (smw->simple_menu.label && width < XtWidth(smw->simple_menu.label)) {
@ -1306,12 +1309,14 @@ AddPositionAction(XtAppContext app_con, XPointer data _X_UNUSED)
static Widget static Widget
FindMenu(Widget widget, String name) FindMenu(Widget widget, String name)
{ {
Widget w, menu; Widget w;
for (w = widget; w != NULL; w = XtParent(w)) for (w = widget; w != NULL; w = XtParent(w)) {
if ((menu = XtNameToWidget(w, name)) != NULL) Widget menu = XtNameToWidget(w, name);
if (menu != NULL)
return (menu); return (menu);
}
return (NULL); return (NULL);
} }
@ -1458,11 +1463,12 @@ static void
MakeSetValuesRequest(Widget w, unsigned int width, unsigned int height) MakeSetValuesRequest(Widget w, unsigned int width, unsigned int height)
{ {
SimpleMenuWidget smw = (SimpleMenuWidget)w; SimpleMenuWidget smw = (SimpleMenuWidget)w;
Arg arglist[2];
Cardinal num_args = 0;
if (!smw->simple_menu.recursive_set_values) { if (!smw->simple_menu.recursive_set_values) {
if (XtWidth(smw) != width || XtHeight(smw) != height) { if (XtWidth(smw) != width || XtHeight(smw) != height) {
Arg arglist[2];
Cardinal num_args = 0;
smw->simple_menu.recursive_set_values = True; smw->simple_menu.recursive_set_values = True;
XtSetArg(arglist[num_args], XtNwidth, width); num_args++; XtSetArg(arglist[num_args], XtNwidth, width); num_args++;
XtSetArg(arglist[num_args], XtNheight, height); num_args++; XtSetArg(arglist[num_args], XtNheight, height); num_args++;
@ -1553,7 +1559,6 @@ GetEventEntry(Widget w, XEvent *event)
*/ */
if (x_root == WidthOfScreen(XtScreen(w)) - 1 && if (x_root == WidthOfScreen(XtScreen(w)) - 1 &&
XtX(w) + XtWidth(w) + (XtBorderWidth(w)) > x_root) { XtX(w) + XtWidth(w) + (XtBorderWidth(w)) > x_root) {
warp = -8;
if (smw->simple_menu.entry_set) { if (smw->simple_menu.entry_set) {
entry = DoGetEventEntry(w, entry = DoGetEventEntry(w,
XtX(smw->simple_menu.entry_set) XtX(smw->simple_menu.entry_set)

View file

@ -705,15 +705,16 @@ static void
CreateGCs(Widget w) CreateGCs(Widget w)
{ {
SmeBSBObject entry = (SmeBSBObject)w; SmeBSBObject entry = (SmeBSBObject)w;
XGCValues values; XGCValues values = {
XtGCMask mask, mask_i18n; .foreground = XtParent(w)->core.background_pixel,
.background = entry->sme_bsb.foreground,
.font = entry->sme_bsb.font->fid,
.graphics_exposures = False
};
XtGCMask mask = GCForeground | GCBackground | GCGraphicsExposures | GCFont;
XtGCMask mask_i18n = GCForeground | GCBackground | GCGraphicsExposures;
values.foreground = XtParent(w)->core.background_pixel;
values.background = entry->sme_bsb.foreground;
values.font = entry->sme_bsb.font->fid;
values.graphics_exposures = False;
mask = GCForeground | GCBackground | GCGraphicsExposures | GCFont;
mask_i18n = GCForeground | GCBackground | GCGraphicsExposures;
if (entry->sme.international == True) if (entry->sme.international == True)
entry->sme_bsb.rev_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0); entry->sme_bsb.rev_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0);
else else

View file

@ -181,12 +181,12 @@ static void
CreateGC(Widget w) CreateGC(Widget w)
{ {
SmeLineObject entry = (SmeLineObject)w; SmeLineObject entry = (SmeLineObject)w;
XGCValues values;
XtGCMask mask = GCForeground | GCGraphicsExposures | GCLineWidth; XtGCMask mask = GCForeground | GCGraphicsExposures | GCLineWidth;
XGCValues values = {
values.foreground = entry->sme_line.foreground; .foreground = entry->sme_line.foreground,
values.graphics_exposures = False; .graphics_exposures = False,
values.line_width = entry->sme_line.line_width; .line_width = entry->sme_line.line_width
};
if (entry->sme_line.stipple != XtUnspecifiedPixmap) { if (entry->sme_line.stipple != XtUnspecifiedPixmap) {
values.stipple = entry->sme_line.stipple; values.stipple = entry->sme_line.stipple;

View file

@ -318,7 +318,7 @@ static void
draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED) draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED)
{ {
StripChartWidget w = (StripChartWidget)client_data; StripChartWidget w = (StripChartWidget)client_data;
double value; double value = 0.0;
if (w->strip_chart.update > 0) if (w->strip_chart.update > 0)
w->strip_chart.interval_id = w->strip_chart.interval_id =
@ -385,7 +385,6 @@ draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED)
static int static int
repaint_window(StripChartWidget w, int left, int width) repaint_window(StripChartWidget w, int left, int width)
{ {
int i, j;
int next = w->strip_chart.interval; int next = w->strip_chart.interval;
int scale = w->strip_chart.scale; int scale = w->strip_chart.scale;
int scalewidth = 0; int scalewidth = 0;
@ -410,6 +409,7 @@ repaint_window(StripChartWidget w, int left, int width)
} }
if (XtIsRealized((Widget)w)) { if (XtIsRealized((Widget)w)) {
int i;
Display *dpy = XtDisplay(w); Display *dpy = XtDisplay(w);
Window win = XtWindow(w); Window win = XtWindow(w);
@ -434,7 +434,7 @@ repaint_window(StripChartWidget w, int left, int width)
/* Draw graph reference lines */ /* Draw graph reference lines */
for (i = 1; i < w->strip_chart.scale; i++) { for (i = 1; i < w->strip_chart.scale; i++) {
j = i * ((int)XtHeight(w) / w->strip_chart.scale); int j = i * ((int)XtHeight(w) / w->strip_chart.scale);
XDrawLine(dpy, win, w->strip_chart.hiGC, left, j, scalewidth, j); XDrawLine(dpy, win, w->strip_chart.hiGC, left, j, scalewidth, j);
} }
} }

View file

@ -474,9 +474,7 @@ static XtResource resources[] = {
{ toVal->size = sizeof(type); toVal->addr = (XPointer)address; } { toVal->size = sizeof(type); toVal->addr = (XPointer)address; }
static XrmQuark QWrapNever, QWrapLine, QWrapWord; static XrmQuark QWrapNever, QWrapLine, QWrapWord;
#ifndef notdef
static XrmQuark QScrollNever, QScrollWhenNeeded, QScrollAlways; static XrmQuark QScrollNever, QScrollWhenNeeded, QScrollAlways;
#endif
static XrmQuark QJustifyLeft, QJustifyRight, QJustifyCenter, QJustifyFull; static XrmQuark QJustifyLeft, QJustifyRight, QJustifyCenter, QJustifyFull;
/*ARGSUSED*/ /*ARGSUSED*/
@ -795,7 +793,7 @@ CreateVScrollBar(TextWidget ctx)
XtAddCallback(vbar, XtNscrollProc, VScroll, (XtPointer)ctx); XtAddCallback(vbar, XtNscrollProc, VScroll, (XtPointer)ctx);
XtAddCallback(vbar, XtNjumpProc, VJump, (XtPointer)ctx); XtAddCallback(vbar, XtNjumpProc, VJump, (XtPointer)ctx);
ctx->text.r_margin.left += (XtWidth(vbar) + XtBorderWidth(vbar)); ctx->text.r_margin.left += (Position) (XtWidth(vbar) + XtBorderWidth(vbar));
ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left; ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left;
PositionVScrollBar(ctx); PositionVScrollBar(ctx);
@ -950,7 +948,7 @@ XawTextInitialize(Widget request _X_UNUSED, Widget cnew,
if (XtHeight(ctx) == DEFAULT_TEXT_HEIGHT) { if (XtHeight(ctx) == DEFAULT_TEXT_HEIGHT) {
XtHeight(ctx) = (Dimension)VMargins(ctx); XtHeight(ctx) = (Dimension)VMargins(ctx);
if (ctx->text.sink != NULL) if (ctx->text.sink != NULL)
XtHeight(ctx) += XawTextSinkMaxHeight(ctx->text.sink, 1); XtHeight(ctx) += (Dimension) XawTextSinkMaxHeight(ctx->text.sink, 1);
} }
if (ctx->text.scroll_vert == XawtextScrollAlways) if (ctx->text.scroll_vert == XawtextScrollAlways)
@ -1069,14 +1067,16 @@ void
_XawTextNeedsUpdating(TextWidget ctx, _XawTextNeedsUpdating(TextWidget ctx,
XawTextPosition left, XawTextPosition right) XawTextPosition left, XawTextPosition right)
{ {
XmuSegment segment;
if (left >= right) if (left >= right)
return; return;
else {
XmuSegment segment = {
.x1 = (int)left,
.x2 = (int)right
};
segment.x1 = (int)left;
segment.x2 = (int)right;
(void)XmuScanlineOrSegment(ctx->text.update, &segment); (void)XmuScanlineOrSegment(ctx->text.update, &segment);
}
} }
/* /*
@ -1124,18 +1124,15 @@ _XawTextGetText(TextWidget ctx, XawTextPosition left, XawTextPosition right)
char * char *
_XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right) _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right)
{ {
unsigned char *s;
unsigned char c;
long i, j, n;
wchar_t *ws, wc;
/* allow ESC in accordance with ICCCM */ /* allow ESC in accordance with ICCCM */
if (XawTextFormat(ctx, XawFmtWide)) { if (XawTextFormat(ctx, XawFmtWide)) {
MultiSinkObject sink = (MultiSinkObject)ctx->text.sink; MultiSinkObject sink = (MultiSinkObject)ctx->text.sink;
ws = (wchar_t *)_XawTextGetText(ctx, left, right); wchar_t *ws = (wchar_t *)_XawTextGetText(ctx, left, right);
n = (long)wcslen(ws); long n = (long)wcslen(ws);
long i, j;
for (j = 0, i = 0; j < n; j++) { for (j = 0, i = 0; j < n; j++) {
wc = ws[j]; wchar_t wc = ws[j];
if (XwcTextEscapement (sink->multi_sink.fontset, &wc, 1) if (XwcTextEscapement (sink->multi_sink.fontset, &wc, 1)
|| (wc == _Xaw_atowc(XawTAB)) || (wc == _Xaw_atowc(XawLF)) || (wc == _Xaw_atowc(XawTAB)) || (wc == _Xaw_atowc(XawLF))
|| (wc == _Xaw_atowc(XawESC))) || (wc == _Xaw_atowc(XawESC)))
@ -1145,12 +1142,13 @@ _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right)
return ((char *)ws); return ((char *)ws);
} }
else { else {
s = (unsigned char *)_XawTextGetText(ctx, left, right); unsigned char *s = (unsigned char *)_XawTextGetText(ctx, left, right);
/* only HT and NL control chars are allowed, strip out others */ /* only HT and NL control chars are allowed, strip out others */
n = (long)strlen((char *)s); long n = (long)strlen((char *)s);
i = 0; long i = 0, j;
for (j = 0; j < n; j++) { for (j = 0; j < n; j++) {
c = s[j]; unsigned char c = s[j];
if (((c >= 0x20) && c <= 0x7f) if (((c >= 0x20) && c <= 0x7f)
||(c >= 0xa0) || (c == XawTAB) || (c == XawLF) ||(c >= 0xa0) || (c == XawTAB) || (c == XawLF)
|| (c == XawESC)) { || (c == XawESC)) {
@ -1222,14 +1220,15 @@ static Bool
LineAndXYForPosition(TextWidget ctx, XawTextPosition pos, LineAndXYForPosition(TextWidget ctx, XawTextPosition pos,
int *line, int *x, int *y) int *line, int *x, int *y)
{ {
XawTextPosition linePos, endPos;
Boolean visible; Boolean visible;
int realW, realH;
*line = 0; *line = 0;
*x = ctx->text.left_margin; *x = ctx->text.left_margin;
*y = ctx->text.margin.top + 1; *y = ctx->text.margin.top + 1;
if ((visible = IsPositionVisible(ctx, pos)) != False) { if ((visible = IsPositionVisible(ctx, pos)) != False) {
XawTextPosition linePos, endPos;
int realW, realH;
*line = LineForPosition(ctx, pos); *line = LineForPosition(ctx, pos);
*y = ctx->text.lt.info[*line].y; *y = ctx->text.lt.info[*line].y;
linePos = ctx->text.lt.info[*line].position; linePos = ctx->text.lt.info[*line].position;
@ -1252,12 +1251,11 @@ void
_XawTextBuildLineTable(TextWidget ctx, XawTextPosition position, _XawTextBuildLineTable(TextWidget ctx, XawTextPosition position,
_XtBoolean force_rebuild) _XtBoolean force_rebuild)
{ {
Dimension height = 0;
int lines = 0; int lines = 0;
Cardinal size; Cardinal size;
if ((int)XtHeight(ctx) > VMargins(ctx)) { if ((int)XtHeight(ctx) > VMargins(ctx)) {
height = (Dimension)(XtHeight(ctx) - VMargins(ctx)); Dimension height = (Dimension)(XtHeight(ctx) - VMargins(ctx));
lines = XawTextSinkMaxLines(ctx->text.sink, height); lines = XawTextSinkMaxLines(ctx->text.sink, height);
} }
size = (Cardinal)(sizeof(XawTextLineTableEntry) * (size_t)(lines + 1)); size = (Cardinal)(sizeof(XawTextLineTableEntry) * (size_t)(lines + 1));
@ -1385,7 +1383,7 @@ _BuildLineTable(TextWidget ctx, XawTextPosition position, int line)
if (lt->textWidth != (Cardinal)width) { if (lt->textWidth != (Cardinal)width) {
if (lt->textWidth > (Cardinal)width) if (lt->textWidth > (Cardinal)width)
ctx->text.clear_to_eol = True; ctx->text.clear_to_eol = True;
lt->textWidth = (unsigned)width; lt->textWidth = (Dimension)width;
} }
y = (Position)(y + height); y = (Position)(y + height);
@ -1486,9 +1484,11 @@ GetWidestLine(TextWidget ctx)
void void
_XawTextSetScrollBars(TextWidget ctx) _XawTextSetScrollBars(TextWidget ctx)
{ {
float first, last, denom, widest; float first;
if (ctx->text.scroll_vert == XawtextScrollAlways) { if (ctx->text.scroll_vert == XawtextScrollAlways) {
float last;
if (ctx->text.lastPos == 0) if (ctx->text.lastPos == 0)
first = 0.0; first = 0.0;
else else
@ -1504,7 +1504,10 @@ _XawTextSetScrollBars(TextWidget ctx)
} }
if (ctx->text.scroll_horiz == XawtextScrollAlways) { if (ctx->text.scroll_horiz == XawtextScrollAlways) {
denom = (float)GetWidestLine(ctx); unsigned value = GetWidestLine(ctx);
float denom = (float)value;
float widest;
if (denom <= 0) if (denom <= 0)
denom = (float)((int)XtWidth(ctx) - RHMargins(ctx)); denom = (float)((int)XtWidth(ctx) - RHMargins(ctx));
if (denom <= 0) if (denom <= 0)
@ -1712,7 +1715,6 @@ XawTextScroll(TextWidget ctx, int vlines, int hpixels)
else { else {
update_from = lt->info[lt->lines - vlines].position; update_from = lt->info[lt->lines - vlines].position;
update_to = lt->info[lt->lines].position; update_to = lt->info[lt->lines].position;
y1 = lt->info[lt->lines - vlines].y;
y2 = lt->info[vlines].y; y2 = lt->info[vlines].y;
DoCopyArea(ctx, ctx->text.r_margin.left, y2, DoCopyArea(ctx, ctx->text.r_margin.left, y2,
(unsigned)vwidth, (unsigned)(lt->info[lt->lines].y - y2), (unsigned)vwidth, (unsigned)(lt->info[lt->lines].y - y2),
@ -1762,10 +1764,11 @@ HJump(Widget w, XtPointer closure, XtPointer callData)
{ {
TextWidget ctx = (TextWidget)closure; TextWidget ctx = (TextWidget)closure;
float percent = *(float *)callData; float percent = *(float *)callData;
unsigned value = GetWidestLine(ctx);
long pixels; long pixels;
pixels = ctx->text.left_margin - pixels = ctx->text.left_margin -
(ctx->text.r_margin.left - (int)(percent * (float)GetWidestLine(ctx))); (ctx->text.r_margin.left - (int)(percent * (float)value));
HScroll(w, (XtPointer)ctx, (XtPointer)pixels); HScroll(w, (XtPointer)ctx, (XtPointer)pixels);
} }
@ -1956,7 +1959,6 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
TextWidget ctx = (TextWidget)w; TextWidget ctx = (TextWidget)w;
Widget src = ctx->text.source; Widget src = ctx->text.source;
XawTextEditType edit_mode; XawTextEditType edit_mode;
Arg args[1];
XawTextSelectionSalt *salt = NULL; XawTextSelectionSalt *salt = NULL;
XawTextSelection *s; XawTextSelection *s;
@ -1966,9 +1968,12 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
if (SrcCvtSel(src, selection, target, type, value, length, format)) if (SrcCvtSel(src, selection, target, type, value, length, format))
return (True); return (True);
else {
Arg args[1];
XtSetArg(args[0], XtNeditType, &edit_mode); XtSetArg(args[0], XtNeditType, &edit_mode);
XtGetValues(src, args, ONE); XtGetValues(src, args, ONE);
}
XmuConvertStandardSelection(w, ctx->text.time, selection, XmuConvertStandardSelection(w, ctx->text.time, selection,
target, type, (XPointer*)&std_targets, target, type, (XPointer*)&std_targets,
@ -2045,20 +2050,21 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
*length = strlen((char *)*value); *length = strlen((char *)*value);
} }
else { else {
*value = XtMalloc(((size_t)(salt->length + 1) * sizeof(unsigned char))); *value = XtMalloc((Cardinal)((size_t)(salt->length + 1) * sizeof(unsigned char)));
strcpy ((char *)*value, salt->contents); strcpy ((char *)*value, salt->contents);
*length = (unsigned long)salt->length; *length = (unsigned long)salt->length;
} }
/* Got *value,*length, now in COMPOUND_TEXT format. */ /* Got *value,*length, now in COMPOUND_TEXT format. */
if (XawTextFormat(ctx, XawFmtWide) && *type == XA_STRING) { if (XawTextFormat(ctx, XawFmtWide) && *type == XA_STRING) {
XTextProperty textprop;
wchar_t **wlist; wchar_t **wlist;
int count; int count;
XTextProperty textprop = {
.encoding = XA_COMPOUND_TEXT(d),
.value = (unsigned char *)*value,
.nitems = strlen(*value),
.format = 8
};
textprop.encoding = XA_COMPOUND_TEXT(d);
textprop.value = (unsigned char *)*value;
textprop.nitems = strlen(*value);
textprop.format = 8;
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
< Success < Success
|| count < 1) { || count < 1) {
@ -2075,14 +2081,15 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
*length = textprop.nitems; *length = textprop.nitems;
XwcFreeStringList(wlist); XwcFreeStringList(wlist);
} else if (*type == XA_UTF8_STRING(d)) { } else if (*type == XA_UTF8_STRING(d)) {
XTextProperty textprop;
char **list; char **list;
int count; int count;
XTextProperty textprop = {
.encoding = XA_COMPOUND_TEXT(d),
.value = (unsigned char *)*value,
.nitems = strlen(*value),
.format = 8
};
textprop.encoding = XA_COMPOUND_TEXT(d);
textprop.value = (unsigned char *)*value;
textprop.nitems = strlen(*value);
textprop.format = 8;
if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count) if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count)
< Success < Success
|| count < 1) { || count < 1) {
@ -2352,10 +2359,10 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right,
if (left < right) { if (left < right) {
Widget w = (Widget)ctx; Widget w = (Widget)ctx;
int buffer;
while (count) { while (count) {
Atom selection = selections[--count]; Atom selection = selections[--count];
int buffer;
/* /*
* If this is a cut buffer * If this is a cut buffer
@ -2396,7 +2403,7 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right,
while (len > max_len) { while (len > max_len) {
len -= max_len; len -= max_len;
tptr += max_len; tptr += max_len;
amount = Min (len, max_len); amount = (unsigned) Min (len, max_len);
XChangeProperty(XtDisplay(w), RootWindow(XtDisplay(w), 0), XChangeProperty(XtDisplay(w), RootWindow(XtDisplay(w), 0),
selection, XA_STRING, 8, PropModeAppend, selection, XA_STRING, 8, PropModeAppend,
tptr, (int)amount); tptr, (int)amount);
@ -2679,12 +2686,13 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right)
TextWidget ctx = (TextWidget)w; TextWidget ctx = (TextWidget)w;
int x, y, line; int x, y, line;
XawTextPosition start, end, last, final; XawTextPosition last;
XmuScanline *scan; XmuScanline *scan;
XmuSegment *seg; XmuSegment *seg;
XmuArea *clip = NULL; XmuArea *clip = NULL;
Bool cleol = ctx->text.clear_to_eol; Bool cleol = ctx->text.clear_to_eol;
Bool has_selection = ctx->text.s.right > ctx->text.s.left; Bool has_selection = ctx->text.s.right > ctx->text.s.left;
XawTextPosition start;
left = left < ctx->text.lt.top ? ctx->text.lt.top : left; left = left < ctx->text.lt.top ? ctx->text.lt.top : left;
@ -2697,7 +2705,10 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right)
if (cleol) if (cleol)
clip = XmuCreateArea(); clip = XmuCreateArea();
for (start = left; start < right && line < ctx->text.lt.lines; line++) { for (start = left;
start < right && line < ctx->text.lt.lines; line++) {
XawTextPosition end, final;
if ((end = ctx->text.lt.info[line + 1].position) > right) if ((end = ctx->text.lt.info[line + 1].position) > right)
end = right; end = right;
@ -2756,10 +2767,11 @@ DisplayText(Widget w, XawTextPosition left, XawTextPosition right)
TextWidget ctx = (TextWidget)w; TextWidget ctx = (TextWidget)w;
int y, line; int y, line;
XawTextPosition from, to, lastPos; XawTextPosition lastPos;
Bool cleol = ctx->text.clear_to_eol; Bool cleol = ctx->text.clear_to_eol;
Bool has_selection = ctx->text.s.right > ctx->text.s.left; Bool has_selection = ctx->text.s.right > ctx->text.s.left;
XawTextPaintList *paint_list; XawTextPaintList *paint_list;
XawTextPosition from;
left = left < ctx->text.lt.top ? ctx->text.lt.top : left; left = left < ctx->text.lt.top ? ctx->text.lt.top : left;
@ -2773,8 +2785,11 @@ DisplayText(Widget w, XawTextPosition left, XawTextPosition right)
paint_list = ((TextSinkObject)ctx->text.sink)->text_sink.paint; paint_list = ((TextSinkObject)ctx->text.sink)->text_sink.paint;
for (from = left; from < right && line < ctx->text.lt.lines; line++) { for (from = left;
if ((to = ctx->text.lt.info[line + 1].position) > right) from < right && line < ctx->text.lt.lines; line++) {
XawTextPosition to = ctx->text.lt.info[line + 1].position;
if (to > right)
to = right; to = right;
if (to > lastPos) if (to > lastPos)
@ -2834,7 +2849,7 @@ static void
DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion) DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion)
{ {
XawTextPosition newLeft, newRight; XawTextPosition newLeft, newRight;
XawTextSelectType newType, *sarray; XawTextSelectType newType;
Widget src = ctx->text.source; Widget src = ctx->text.source;
if (motion) if (motion)
@ -2842,7 +2857,8 @@ DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion)
else { else {
if ((labs((long) time - (long) ctx->text.lasttime) < MULTI_CLICK_TIME) if ((labs((long) time - (long) ctx->text.lasttime) < MULTI_CLICK_TIME)
&& (pos >= ctx->text.s.left && pos <= ctx->text.s.right)) { && (pos >= ctx->text.s.left && pos <= ctx->text.s.right)) {
sarray = ctx->text.sarray; XawTextSelectType *sarray = ctx->text.sarray;
for (; *sarray != XawselectNull && *sarray != ctx->text.s.type; for (; *sarray != XawselectNull && *sarray != ctx->text.s.type;
sarray++) sarray++)
; ;
@ -3062,7 +3078,7 @@ _XawTextClearAndCenterDisplay(TextWidget ctx)
left_margin == ctx->text.left_margin) { left_margin == ctx->text.left_margin) {
int insert_line = LineForPosition(ctx, ctx->text.insertPos); int insert_line = LineForPosition(ctx, ctx->text.insertPos);
int scroll_by = insert_line - (ctx->text.lt.lines >> 1); int scroll_by = insert_line - (ctx->text.lt.lines >> 1);
Boolean clear_to_eol = ctx->text.clear_to_eol; Boolean clear_to_eol;
XawTextScroll(ctx, scroll_by, 0); XawTextScroll(ctx, scroll_by, 0);
SinkClearToBG(ctx->text.sink, 0, 0, XtWidth(ctx), XtHeight(ctx)); SinkClearToBG(ctx->text.sink, 0, 0, XtWidth(ctx), XtHeight(ctx));
@ -3348,11 +3364,11 @@ CountLines(TextWidget ctx, XawTextPosition left, XawTextPosition right)
if (ctx->text.wrap == XawtextWrapNever || left >= right) if (ctx->text.wrap == XawtextWrapNever || left >= right)
return (1); return (1);
else { else {
XawTextPosition tmp;
int dim, lines = 0, wwidth = GetMaxTextWidth(ctx); int dim, lines = 0, wwidth = GetMaxTextWidth(ctx);
while (left < right) { while (left < right) {
tmp = left; XawTextPosition tmp = left;
XawTextSinkFindPosition(ctx->text.sink, left, XawTextSinkFindPosition(ctx->text.sink, left,
ctx->text.left_margin, ctx->text.left_margin,
wwidth, ctx->text.wrap == XawtextWrapWord, wwidth, ctx->text.wrap == XawtextWrapWord,

View file

@ -403,14 +403,14 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection _X_UNUSED,
StartAction(ctx, NULL); StartAction(ctx, NULL);
if (XawTextFormat(ctx, XawFmtWide)) { if (XawTextFormat(ctx, XawFmtWide)) {
XTextProperty textprop;
wchar_t **wlist; wchar_t **wlist;
int count; int count;
XTextProperty textprop = {
textprop.encoding = *type; .encoding = *type,
textprop.value = (unsigned char *)value; .value = (unsigned char *)value,
textprop.nitems = strlen(value); .nitems = strlen(value),
textprop.format = 8; .format = 8
};
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
!= Success != Success
@ -421,7 +421,7 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection _X_UNUSED,
fprintf(stderr, "Xaw Text Widget: An attempt was made to insert " fprintf(stderr, "Xaw Text Widget: An attempt was made to insert "
"an illegal selection.\n"); "an illegal selection.\n");
textprop.value = (const unsigned char *)" >> ILLEGAL SELECTION << "; textprop.value = (unsigned char *)" >> ILLEGAL SELECTION << ";
textprop.nitems = strlen((char *) textprop.value); textprop.nitems = strlen((char *) textprop.value);
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
!= Success != Success
@ -950,7 +950,6 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
TextWidget ctx = (TextWidget)w; TextWidget ctx = (TextWidget)w;
Widget src = ctx->text.source; Widget src = ctx->text.source;
XawTextEditType edit_mode; XawTextEditType edit_mode;
Arg args[1];
XawTextSelectionSalt *salt = NULL; XawTextSelectionSalt *salt = NULL;
XawTextSelection *s; XawTextSelection *s;
@ -960,9 +959,12 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
if (SrcCvtSel(src, selection, target, type, value, length, format)) if (SrcCvtSel(src, selection, target, type, value, length, format))
return (True); return (True);
else {
Arg args[1];
XtSetArg(args[0], XtNeditType,&edit_mode); XtSetArg(args[0], XtNeditType,&edit_mode);
XtGetValues(src, args, 1); XtGetValues(src, args, 1);
}
XmuConvertStandardSelection(w, ctx->text.time, selection, XmuConvertStandardSelection(w, ctx->text.time, selection,
target, type, (XPointer *)&std_targets, target, type, (XPointer *)&std_targets,
@ -1035,21 +1037,22 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
*length = strlen(*value); *length = strlen(*value);
} }
else { else {
*value = XtMalloc(((size_t)(salt->length + 1) * sizeof(unsigned char))); *value = XtMalloc((Cardinal)((size_t)(salt->length + 1) * sizeof(unsigned char)));
strcpy (*value, salt->contents); strcpy (*value, salt->contents);
*length = (unsigned long)salt->length; *length = (unsigned long)salt->length;
} }
/* Got *value,*length, now in COMPOUND_TEXT format. */ /* Got *value,*length, now in COMPOUND_TEXT format. */
if (XawTextFormat(ctx, XawFmtWide)) { if (XawTextFormat(ctx, XawFmtWide)) {
if (*type == XA_STRING) { if (*type == XA_STRING) {
XTextProperty textprop;
wchar_t **wlist; wchar_t **wlist;
int count; int count;
XTextProperty textprop = {
.encoding = XA_COMPOUND_TEXT(d),
.value = (unsigned char *)*value,
.nitems = strlen(*value),
.format = 8
};
textprop.encoding = XA_COMPOUND_TEXT(d);
textprop.value = (unsigned char *)*value;
textprop.nitems = strlen(*value);
textprop.format = 8;
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
< Success < Success
|| count < 1) { || count < 1) {
@ -1067,14 +1070,15 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
XwcFreeStringList((wchar_t**) wlist); XwcFreeStringList((wchar_t**) wlist);
} }
else if (*type == XA_UTF8_STRING(d)) { else if (*type == XA_UTF8_STRING(d)) {
XTextProperty textprop;
char **list; char **list;
int count; int count;
XTextProperty textprop = {
.encoding = XA_COMPOUND_TEXT(d),
.value = (unsigned char *)*value,
.nitems = strlen(*value),
.format = 8
};
textprop.encoding = XA_COMPOUND_TEXT(d);
textprop.value = (unsigned char *)*value;
textprop.nitems = strlen(*value);
textprop.format = 8;
if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count) if (Xutf8TextPropertyToTextList(d, &textprop, &list, &count)
< Success < Success
|| count < 1) { || count < 1) {
@ -1194,7 +1198,7 @@ _LoseSelection(Widget w, Atom *selection, char **contents _X_UNUSED, int *length
tail = kill_ring; tail = kill_ring;
kill_ring = kill_ring->next; kill_ring = kill_ring->next;
} }
if (kill_ring->refcount == 0) { if (tail != NULL && kill_ring->refcount == 0) {
--num_kill_rings; --num_kill_rings;
tail->next = NULL; tail->next = NULL;
XtFree(kill_ring->contents); XtFree(kill_ring->contents);
@ -1289,16 +1293,24 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to,
if (!append) if (!append)
salt->contents = string; salt->contents = string;
else { else {
salt->contents = XtMalloc((length + size + 1)); salt->contents = XtMalloc((Cardinal)(length + size + 1));
if (from >= old_from) { if (from >= old_from) {
if (ring != NULL) {
strncpy(salt->contents, ring, (size_t)size); strncpy(salt->contents, ring, (size_t)size);
salt->contents[size] = '\0'; salt->contents[size] = '\0';
} else {
salt->contents[size = 0] = '\0';
}
strncat(salt->contents, string, (size_t)length); strncat(salt->contents, string, (size_t)length);
} }
else { else {
strncpy(salt->contents, string, (size_t)length); strncpy(salt->contents, string, (size_t)length);
salt->contents[length] = '\0'; salt->contents[length] = '\0';
if (ring != NULL) {
strncat(salt->contents, ring, (size_t)size); strncat(salt->contents, ring, (size_t)size);
} else {
size = 0;
}
} }
salt->contents[length + size] = '\0'; salt->contents[length + size] = '\0';
XtFree(ring); XtFree(ring);
@ -1330,7 +1342,7 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to,
text.firstPos = 0; text.firstPos = 0;
text.format = (unsigned long)_XawTextFormat(ctx); text.format = (unsigned long)_XawTextFormat(ctx);
text.ptr = ""; text.ptr = (char*)"";
if (_XawTextReplace(ctx, from, to, &text)) { if (_XawTextReplace(ctx, from, to, &text)) {
XBell(XtDisplay(ctx), 50); XBell(XtDisplay(ctx), 50);
@ -1399,7 +1411,8 @@ DeleteChar(Widget w, XEvent *event, XawTextScanDirection dir)
short mul = MULT(ctx); short mul = MULT(ctx);
if (mul < 0) { if (mul < 0) {
ctx->text.mult = mul = (short)(-mul); mul = -mul;
ctx->text.mult = mul;
dir = dir == XawsdLeft ? XawsdRight : XawsdLeft; dir = dir == XawsdLeft ? XawsdRight : XawsdLeft;
} }
DeleteOrKill(ctx, event, dir, XawstPositions, True, False); DeleteOrKill(ctx, event, dir, XawstPositions, True, False);
@ -1600,11 +1613,10 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
text.firstPos = 0; text.firstPos = 0;
text.format = XawFmt8Bit; text.format = XawFmt8Bit;
text.ptr = " "; text.ptr = (char*)" ";
text.length = 1; text.length = 1;
position = XawTextSourceRead(ctx->text.source, position, XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
&block, (int)(right - left));
done = False; done = False;
space = False; space = False;
/* convert tabs and returns to spaces */ /* convert tabs and returns to spaces */
@ -1637,11 +1649,10 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
done = True; done = True;
} }
text.ptr = ""; text.ptr = (char*)"";
text.length = 0; text.length = 0;
position = tmp = left; position = tmp = left;
position = XawTextSourceRead(ctx->text.source, position, XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
&block, (int)(right - left));
ipos = ctx->text.insertPos; ipos = ctx->text.insertPos;
done = False; done = False;
while (!done) { while (!done) {
@ -1717,12 +1728,11 @@ Tabify(TextWidget ctx, XawTextPosition left, XawTextPosition right,
int tab_index = 0, tab_column = 0, TAB_SIZE = DEFAULT_TAB_SIZE; int tab_index = 0, tab_column = 0, TAB_SIZE = DEFAULT_TAB_SIZE;
text.firstPos = 0; text.firstPos = 0;
text.ptr = "\t"; text.ptr = (char*)"\t";
text.format = XawFmt8Bit; text.format = XawFmt8Bit;
text.length = 1; text.length = 1;
position = XawTextSourceRead(ctx->text.source, position, XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
&block, (int)(right - left));
ipos = ctx->text.insertPos; ipos = ctx->text.insertPos;
done = zero = False; done = zero = False;
if (tab_count) if (tab_count)
@ -1859,14 +1869,13 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right,
short *char_tabs = sink->text_sink.char_tabs; short *char_tabs = sink->text_sink.char_tabs;
int tab_count = sink->text_sink.tab_count; int tab_count = sink->text_sink.tab_count;
int tab_index = 0, tab_column = 0, tab_base = 0; int tab_index = 0, tab_column = 0, tab_base = 0;
static char *tabs = " "; static char *tabs = (char*)" ";
text.firstPos = 0; text.firstPos = 0;
text.format = XawFmt8Bit; text.format = XawFmt8Bit;
text.ptr = tabs; text.ptr = tabs;
position = XawTextSourceRead(ctx->text.source, position, XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
&block, (int)(right - left));
ipos = ctx->text.insertPos; ipos = ctx->text.insertPos;
done = False; done = False;
zero = False; zero = False;
@ -2182,7 +2191,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
position = tmp; position = tmp;
if (position > left && position - left > ctx->text.left_column if (position > left && position - left > ctx->text.left_column
&& position != right) { && position != right) {
text.ptr = "\n"; text.ptr = (char*)"\n";
text.length = 1; text.length = 1;
CHECK_SAVE(); CHECK_SAVE();
if (_XawTextReplace(ctx, position, position + 1, &text)) if (_XawTextReplace(ctx, position, position + 1, &text))
@ -2235,7 +2244,6 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
} }
XawStackFree(text.ptr, buf); XawStackFree(text.ptr, buf);
position += count; position += count;
right += count;
if (num_pos) { if (num_pos) {
for (cpos = 0; cpos < num_pos; cpos++) for (cpos = 0; cpos < num_pos; cpos++)
if (pos[cpos] > left) if (pos[cpos] > left)
@ -2297,7 +2305,6 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
inc += ii; inc += ii;
} }
position += count; position += count;
right += count;
XawStackFree(text.ptr, buf); XawStackFree(text.ptr, buf);
} }
break; break;
@ -2322,18 +2329,17 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
TextWidget ctx = (TextWidget)w; TextWidget ctx = (TextWidget)w;
TextSrcObject src = (TextSrcObject)ctx->text.source; TextSrcObject src = (TextSrcObject)ctx->text.source;
XawTextPosition from, to, tmp, end = 0, *pos, *posbuf[32]; XawTextPosition from, to, tmp, end = 0, *pos, *posbuf[32];
char buf[32];
XawTextBlock text; XawTextBlock text;
int i, spaces = MULT(ctx); int i, spaces = MULT(ctx);
char *lbuf = NULL, *rbuf; char *lbuf = NULL, *rbuf;
unsigned llen = 0, rlen, size; unsigned llen = 0;
Bool undo = src->textSrc.enable_undo && src->textSrc.undo_state == False; Bool undo = src->textSrc.enable_undo && src->textSrc.undo_state == False;
Bool format = ctx->text.auto_fill Bool format = ctx->text.auto_fill
&& ctx->text.left_column < ctx->text.right_column; && ctx->text.left_column < ctx->text.right_column;
text.firstPos = 0; text.firstPos = 0;
text.format = XawFmt8Bit; text.format = XawFmt8Bit;
text.ptr = ""; text.ptr = (char*)"";
StartAction(ctx, event); StartAction(ctx, event);
@ -2370,6 +2376,8 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
tmp = from; tmp = from;
if (spaces > 0) { if (spaces > 0) {
char buf[32];
text.ptr = XawStackAlloc((unsigned)spaces, buf); text.ptr = XawStackAlloc((unsigned)spaces, buf);
for (i = 0; i < spaces; i++) for (i = 0; i < spaces; i++)
text.ptr[i] = ' '; text.ptr[i] = ' ';
@ -2424,7 +2432,9 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
Tabify(ctx, from, to, pos, (int)src->textSrc.num_text, NULL); Tabify(ctx, from, to, pos, (int)src->textSrc.num_text, NULL);
if (undo) { if (undo) {
rlen = (unsigned)(llen + (ctx->text.lastPos - end)); unsigned rlen = (unsigned)(llen + (ctx->text.lastPos - end));
unsigned size;
rbuf = _XawTextGetText(ctx, from, from + rlen); rbuf = _XawTextGetText(ctx, from, from + rlen);
text.format = (unsigned long)_XawTextFormat(ctx); text.format = (unsigned long)_XawTextFormat(ctx);
@ -2601,7 +2611,7 @@ InsertNewLineAndIndent(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n
char *ptr; char *ptr;
length = (int)strlen(line_to_ip); length = (int)strlen(line_to_ip);
text.ptr = XtMalloc(((size_t)(2 + length) * sizeof(char))); text.ptr = XtMalloc((Cardinal)((size_t)(2 + length) * sizeof(char)));
ptr = text.ptr; ptr = text.ptr;
ptr[0] = XawLF; ptr[0] = XawLF;
strcpy(++ptr, line_to_ip); strcpy(++ptr, line_to_ip);
@ -3020,7 +3030,7 @@ AutoFill(TextWidget ctx)
return; return;
text.format = XawFmt8Bit; text.format = XawFmt8Bit;
text.ptr = "\n"; text.ptr = (char*)"\n";
} }
text.length = 1; text.length = 1;
text.firstPos = 0; text.firstPos = 0;
@ -3295,7 +3305,7 @@ InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params)
StartAction(ctx, event); StartAction(ctx, event);
for (i = (int)*num_params; i; i--, params++) { /* DO FOR EACH PARAMETER */ for (i = (int)*num_params; i; i--, params++) { /* DO FOR EACH PARAMETER */
text.ptr = IfHexConvertHexElseReturnParam(*params, &text.length); text.ptr = IfHexConvertHexElseReturnParam((char*) *params, &text.length);
if (text.length == 0) if (text.length == 0)
continue; continue;
@ -3370,7 +3380,7 @@ DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params)
if (*num_params > 0) { /* default arg is "True" */ if (*num_params > 0) { /* default arg is "True" */
XrmValue from, to; XrmValue from, to;
from.size = (unsigned)strlen(from.addr = params[0]); from.size = (unsigned)strlen(from.addr = (char*)params[0]);
XtConvert(w, XtRString, &from, XtRBoolean, &to); XtConvert(w, XtRString, &from, XtRBoolean, &to);
if (to.addr != NULL) if (to.addr != NULL)
@ -3416,7 +3426,6 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params)
return; return;
} }
else if (mult == 32767) { else if (mult == 32767) {
mult = ctx->text.mult = (short)(- (params[0][0] - '0'));
return; return;
} }
else { else {
@ -3520,19 +3529,20 @@ static XawTextPosition
StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
XawTextPosition *pos, int num_pos) XawTextPosition *pos, int num_pos)
{ {
XawTextPosition startPos, endPos, eop_begin, eop_end, temp; XawTextPosition startPos, endPos, eop_begin, eop_end;
Widget src = ctx->text.source; Widget src = ctx->text.source;
XawTextBlock text; XawTextBlock text;
char *buf; char *buf;
static wchar_t wc_two_spaces[3];
int idx; int idx;
/* Initialize our TextBlock with two spaces. */ /* Initialize our TextBlock with two spaces. */
text.firstPos = 0; text.firstPos = 0;
text.format = (unsigned long)_XawTextFormat(ctx); text.format = (unsigned long)_XawTextFormat(ctx);
if (text.format == XawFmt8Bit) if (text.format == XawFmt8Bit) {
text.ptr= " "; text.ptr= (char*)" ";
else { } else {
static wchar_t wc_two_spaces[3];
wc_two_spaces[0] = _Xaw_atowc(XawSP); wc_two_spaces[0] = _Xaw_atowc(XawSP);
wc_two_spaces[1] = _Xaw_atowc(XawSP); wc_two_spaces[1] = _Xaw_atowc(XawSP);
wc_two_spaces[2] = 0; wc_two_spaces[2] = 0;
@ -3540,11 +3550,13 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
} }
/* Strip out CR's. */ /* Strip out CR's. */
eop_begin = eop_end = startPos = endPos = from; eop_begin = eop_end = startPos = from;
/* CONSTCOND */ /* CONSTCOND */
while (TRUE) { while (TRUE) {
endPos=SrcScan(src, startPos, XawstEOL, XawsdRight, 1, False); XawTextPosition temp;
endPos = SrcScan(src, startPos, XawstEOL, XawsdRight, 1, False);
temp = SrcScan(src, endPos, XawstWhiteSpace, XawsdLeft, 1, False); temp = SrcScan(src, endPos, XawstWhiteSpace, XawsdLeft, 1, False);
temp = SrcScan(src, temp, XawstWhiteSpace, XawsdRight,1, False); temp = SrcScan(src, temp, XawstWhiteSpace, XawsdRight,1, False);
@ -3626,19 +3638,19 @@ static void
InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
XawTextPosition *pos, int num_pos) XawTextPosition *pos, int num_pos)
{ {
XawTextPosition startPos, endPos, space, eol; XawTextPosition startPos;
XawTextBlock text; XawTextBlock text;
int i, width, height, len, wwidth, idx; int i, width, height, wwidth, idx;
char *buf;
static wchar_t wide_CR[2];
text.firstPos = 0; text.firstPos = 0;
text.length = 1; text.length = 1;
text.format = (unsigned long)_XawTextFormat(ctx); text.format = (unsigned long)_XawTextFormat(ctx);
if (text.format == XawFmt8Bit) if (text.format == XawFmt8Bit) {
text.ptr = "\n"; text.ptr = (char*)"\n";
else { } else {
static wchar_t wide_CR[2];
wide_CR[0] = _Xaw_atowc(XawLF); wide_CR[0] = _Xaw_atowc(XawLF);
wide_CR[1] = 0; wide_CR[1] = 0;
text.ptr = (char*)wide_CR; text.ptr = (char*)wide_CR;
@ -3657,6 +3669,10 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
/* CONSTCOND */ /* CONSTCOND */
while (TRUE) { while (TRUE) {
int len;
char *buf;
XawTextPosition endPos, space, eol;
XawTextSinkFindPosition(ctx->text.sink, startPos, XawTextSinkFindPosition(ctx->text.sink, startPos,
(int)ctx->text.r_margin.left, wwidth, (int)ctx->text.r_margin.left, wwidth,
True, &eol, &width, &height); True, &eol, &width, &height);
@ -3735,14 +3751,12 @@ FormRegion(TextWidget ctx, XawTextPosition from, XawTextPosition to,
ctx->text.justify == XawjustifyFull) { ctx->text.justify == XawjustifyFull) {
Untabify(ctx, from, to, pos, num_pos, NULL); Untabify(ctx, from, to, pos, num_pos, NULL);
to += ctx->text.lastPos - len; to += ctx->text.lastPos - len;
len = ctx->text.insertPos;
(void)BlankLine((Widget)ctx, from, &inc); (void)BlankLine((Widget)ctx, from, &inc);
if (from + inc >= to) if (from + inc >= to)
return (XawEditDone); return (XawEditDone);
} }
if (!StripSpaces(ctx, from + inc, to, pos, num_pos, NULL)) if (!StripSpaces(ctx, from + inc, to, pos, num_pos, NULL))
return (XawReplaceError); return (XawReplaceError);
to += ctx->text.lastPos - len;
FormatText(ctx, from, ctx->text.justify != XawjustifyFull, pos, num_pos); FormatText(ctx, from, ctx->text.justify != XawjustifyFull, pos, num_pos);
} }

View file

@ -61,6 +61,12 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xaw/Toggle.h> #include <X11/Xaw/Toggle.h>
#include "XawI18n.h" #include "XawI18n.h"
#ifdef O_CLOEXEC
#define FOPEN_CLOEXEC "e"
#else
#define FOPEN_CLOEXEC ""
#endif
static _Xconst char* INSERT_FILE = "Enter Filename:"; static _Xconst char* INSERT_FILE = "Enter Filename:";
static _Xconst char* SEARCH_LABEL_1 = "Use <Tab> to change fields."; static _Xconst char* SEARCH_LABEL_1 = "Use <Tab> to change fields.";
static _Xconst char* SEARCH_LABEL_2 = "Use ^q<Tab> for <Tab>."; static _Xconst char* SEARCH_LABEL_2 = "Use ^q<Tab> for <Tab>.";
@ -305,7 +311,8 @@ InsertFileNamed(Widget tw, String str)
XawTextBlock text; XawTextBlock text;
XawTextPosition pos; XawTextPosition pos;
if (str == NULL || strlen(str) == 0 || (file = fopen(str, "r")) == NULL) if (str == NULL || strlen(str) == 0 ||
(file = fopen(str, "r" FOPEN_CLOEXEC)) == NULL)
return (False); return (False);
pos = XawTextGetInsertionPoint(tw); pos = XawTextGetInsertionPoint(tw);

View file

@ -198,6 +198,9 @@ TextSinkClassRec textSinkClassRec = {
MaxHeight, /* MaxHeight */ MaxHeight, /* MaxHeight */
SetTabs, /* SetTabs */ SetTabs, /* SetTabs */
GetCursorBounds, /* GetCursorBounds */ GetCursorBounds, /* GetCursorBounds */
#ifndef OLDXAW
NULL,
#endif
}, },
}; };
@ -423,10 +426,10 @@ ClearToBackground(Widget w, int x, int y,
TextWidget xaw = (TextWidget)XtParent(w); TextWidget xaw = (TextWidget)XtParent(w);
Position x1, y1, x2, y2; Position x1, y1, x2, y2;
x1 = (XawMax(x, xaw->text.r_margin.left)); x1 = (Position) (XawMax(x, xaw->text.r_margin.left));
y1 = (XawMax(y, xaw->text.r_margin.top)); y1 = (Position) (XawMax(y, xaw->text.r_margin.top));
x2 = (XawMin(x + (int)width, (int)XtWidth(xaw) - xaw->text.r_margin.right)); x2 = (Position) (XawMin(x + (int)width, (int)XtWidth(xaw) - xaw->text.r_margin.right));
y2 = (XawMin(y + (int)height, (int)XtHeight(xaw) - xaw->text.r_margin.bottom)); y2 = (Position) (XawMin(y + (int)height, (int)XtHeight(xaw) - xaw->text.r_margin.bottom));
x = (int)x1; x = (int)x1;
y = (int)y1; y = (int)y1;
@ -939,15 +942,6 @@ XawTextSinkPreparePaint(Widget w, int y, int line, XawTextPosition from,
(w, y, line, from, to, highlight); (w, y, line, from, to, highlight);
} }
#if 0
/*ARGSUSED*/
static void
PreparePaint(Widget w, int y, int line, XawTextPosition from, XawTextPosition to,
Bool highlight)
{
}
#endif
void void
XawTextSinkDoPaint(Widget w) XawTextSinkDoPaint(Widget w)
{ {
@ -956,14 +950,6 @@ XawTextSinkDoPaint(Widget w)
(*cclass->text_sink_class.extension->DoPaint)(w); (*cclass->text_sink_class.extension->DoPaint)(w);
} }
#if 0
/*ARGSUSED*/
static void
DoPaint(Widget w)
{
}
#endif
Bool Bool
XawTextSinkEndPaint(Widget w) XawTextSinkEndPaint(Widget w)
{ {

View file

@ -231,6 +231,9 @@ TextSrcClassRec textSrcClassRec = {
Search, /* Search */ Search, /* Search */
SetSelection, /* SetSelection */ SetSelection, /* SetSelection */
ConvertSelection, /* ConvertSelection */ ConvertSelection, /* ConvertSelection */
#ifndef OLDXAW
NULL, /* extension */
#endif
}, },
}; };
@ -238,7 +241,7 @@ WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec;
static XrmQuark QRead, QAppend, QEdit; static XrmQuark QRead, QAppend, QEdit;
#ifndef OLDXAW #ifndef OLDXAW
static char *SrcNL = "\n"; static char *SrcNL = (char*)"\n";
static wchar_t SrcWNL[2]; static wchar_t SrcWNL[2];
#endif #endif
@ -732,6 +735,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
Bool enable_undo; Bool enable_undo;
XawTextPosition start, end; XawTextPosition start, end;
int i, error, lines = 0; int i, error, lines = 0;
Cardinal j;
if (src->textSrc.edit_mode == XawtextRead) if (src->textSrc.edit_mode == XawtextRead)
return (XawEditError); return (XawEditError);
@ -751,9 +755,9 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
if (left < right) { if (left < right) {
Widget ctx = NULL; Widget ctx = NULL;
for (i = 0; i < src->textSrc.num_text; i++) for (j = 0; j < src->textSrc.num_text; j++)
if (XtIsSubclass(src->textSrc.text[i], textWidgetClass)) { if (XtIsSubclass(src->textSrc.text[j], textWidgetClass)) {
ctx = src->textSrc.text[i]; ctx = src->textSrc.text[j];
break; break;
} }
l_state->buffer = _XawTextGetText((TextWidget)ctx, left, right); l_state->buffer = _XawTextGetText((TextWidget)ctx, left, right);
@ -823,8 +827,8 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
*/ */
if (left > LARGE_VALUE) { if (left > LARGE_VALUE) {
start = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 2, False); start = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 2, False);
for (i = 0; i < src->textSrc.num_text; i++) { for (j = 0; j < src->textSrc.num_text; j++) {
TextWidget tw = (TextWidget)src->textSrc.text[i]; TextWidget tw = (TextWidget)src->textSrc.text[j];
if (left <= tw->text.lt.top && if (left <= tw->text.lt.top &&
left + block->length - (right - left) > tw->text.lt.top) left + block->length - (right - left) > tw->text.lt.top)
@ -983,7 +987,6 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
src->textSrc.changed = True; src->textSrc.changed = True;
if (error == XawEditDone) { if (error == XawEditDone) {
XawTextPropertyInfo info;
XawTextAnchor *anchor; XawTextAnchor *anchor;
/* find anchor and index */ /* find anchor and index */
@ -1051,7 +1054,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
offset = anchor->position + entity->offset + entity->length; offset = anchor->position + entity->offset + entity->length;
if (offset > right) { if (offset > right) {
entity->length = (XawMin(entity->length, offset - right)); entity->length = (Cardinal) (XawMin(entity->length, offset - right));
goto exit_anchor_loop; goto exit_anchor_loop;
} }
@ -1183,10 +1186,15 @@ exit_anchor_loop:
} }
} }
info.left = left; {
info.right = right; XawTextPropertyInfo info = {
info.block = block; .left = left,
.right = right,
.block = block
};
XtCallCallbacks(w, XtNpropertyCallback, &info); XtCallCallbacks(w, XtNpropertyCallback, &info);
}
TellSourceChanged(src, left, right, block, lines); TellSourceChanged(src, left, right, block, lines);
/* Call callbacks, we have changed the buffer */ /* Call callbacks, we have changed the buffer */
@ -1349,7 +1357,6 @@ FreeUndoBuffer(XawTextUndo *undo)
static void static void
UndoGC(XawTextUndo *undo) UndoGC(XawTextUndo *undo)
{ {
unsigned i;
XawTextUndoList *head = undo->head, *redo = head->redo; XawTextUndoList *head = undo->head, *redo = head->redo;
if (head == undo->pointer || head == undo->end_mark if (head == undo->pointer || head == undo->end_mark
@ -1362,6 +1369,8 @@ UndoGC(XawTextUndo *undo)
--head->left->refcount; --head->left->refcount;
if (--head->right->refcount == 0) { if (--head->right->refcount == 0) {
unsigned i;
for (i = 0; i < undo->num_undo; i+= 2) for (i = 0; i < undo->num_undo; i+= 2)
if (head->left == undo->undo[i] || head->left == undo->undo[i+1]) { if (head->left == undo->undo[i] || head->left == undo->undo[i+1]) {
if (head->left == undo->undo[i+1]) { if (head->left == undo->undo[i+1]) {
@ -1673,13 +1682,15 @@ XawTextAnchor *
XawTextSourceFindAnchor(Widget w, XawTextPosition position) XawTextSourceFindAnchor(Widget w, XawTextPosition position)
{ {
TextSrcObject src = (TextSrcObject)w; TextSrcObject src = (TextSrcObject)w;
int i = 0, left, right, nmemb = src->textSrc.num_anchors; int left, right, nmemb = src->textSrc.num_anchors;
XawTextAnchor *anchor, **anchors = src->textSrc.anchors; XawTextAnchor **anchors = src->textSrc.anchors;
left = 0; left = 0;
right = nmemb - 1; right = nmemb - 1;
while (left <= right) { while (left <= right) {
anchor = anchors[i = (left + right) >> 1]; int i = (left + right) >> 1;
XawTextAnchor *anchor = anchors[i];
if (anchor->position == position) if (anchor->position == position)
return (anchor); return (anchor);
else if (position < anchor->position) else if (position < anchor->position)
@ -1701,7 +1712,6 @@ XawTextSourceAnchorAndEntity(Widget w, XawTextPosition position,
{ {
XawTextAnchor *anchor = XawTextSourceFindAnchor(w, position); XawTextAnchor *anchor = XawTextSourceFindAnchor(w, position);
XawTextEntity *pentity, *entity; XawTextEntity *pentity, *entity;
XawTextPosition offset;
Bool next_anchor = True, retval = False; Bool next_anchor = True, retval = False;
if (anchor->cache && anchor->position + anchor->cache->offset + if (anchor->cache && anchor->position + anchor->cache->offset +
@ -1710,7 +1720,7 @@ XawTextSourceAnchorAndEntity(Widget w, XawTextPosition position,
else else
pentity = entity = anchor->entities; pentity = entity = anchor->entities;
while (entity) { while (entity) {
offset = anchor->position + entity->offset; XawTextPosition offset = anchor->position + entity->offset;
if (offset > position) { if (offset > position) {
retval = next_anchor = False; retval = next_anchor = False;
@ -1899,7 +1909,6 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
XawTextAnchor *anchor = XawTextSourceFindAnchor(w, left); XawTextAnchor *anchor = XawTextSourceFindAnchor(w, left);
XawTextEntity *entity, *eprev, *enext; XawTextEntity *entity, *eprev, *enext;
XawTextPosition offset; XawTextPosition offset;
int length;
while (anchor && anchor->entities == NULL) while (anchor && anchor->entities == NULL)
anchor = XawTextSourceRemoveAnchor(w, anchor); anchor = XawTextSourceRemoveAnchor(w, anchor);
@ -1928,7 +1937,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
offset = anchor->position + entity->offset; offset = anchor->position + entity->offset;
if (offset <= left) { if (offset <= left) {
length = (XawMin(entity->length, left - offset)); int length = (int) (XawMin(entity->length, left - offset));
if (length <= 0) { if (length <= 0) {
enext = entity->next; enext = entity->next;
@ -1963,7 +1972,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
if (offset > right) { if (offset > right) {
anchor->cache = NULL; anchor->cache = NULL;
entity->offset = XawMax(entity->offset, right - anchor->position); entity->offset = XawMax(entity->offset, right - anchor->position);
entity->length = (XawMin(entity->length, offset - right)); entity->length = (Cardinal) (XawMin(entity->length, offset - right));
return; return;
} }

View file

@ -330,13 +330,13 @@ XawTipExpose(Widget w, XEvent *event, Region region)
Position ksy = (Position)tip->tip.top_margin; Position ksy = (Position)tip->tip.top_margin;
XFontSetExtents *ext = XExtentsOfFontSet(tip->tip.fontset); XFontSetExtents *ext = XExtentsOfFontSet(tip->tip.fontset);
ksy = (ksy + XawAbs(ext->max_ink_extent.y)); ksy = (Position) (ksy + XawAbs(ext->max_ink_extent.y));
while ((nl = strchr(label, '\n')) != NULL) { while ((nl = strchr(label, '\n')) != NULL) {
XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset, XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset,
gc, tip->tip.left_margin, ksy, label, gc, tip->tip.left_margin, ksy, label,
(int)(nl - label)); (int)(nl - label));
ksy = (ksy + ext->max_ink_extent.height); ksy = (Position) (ksy + ext->max_ink_extent.height);
label = nl + 1; label = nl + 1;
} }
len = (int)strlen(label); len = (int)strlen(label);
@ -380,12 +380,13 @@ XawTipSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
if (curtip->tip.font->fid != newtip->tip.font->fid || if (curtip->tip.font->fid != newtip->tip.font->fid ||
curtip->tip.foreground != newtip->tip.foreground) { curtip->tip.foreground != newtip->tip.foreground) {
XGCValues values; XGCValues values = {
.foreground = newtip->tip.foreground,
.background = newtip->core.background_pixel,
.font = newtip->tip.font->fid,
.graphics_exposures = False
};
values.foreground = newtip->tip.foreground;
values.background = newtip->core.background_pixel;
values.font = newtip->tip.font->fid;
values.graphics_exposures = False;
XtReleaseGC(cnew, curtip->tip.gc); XtReleaseGC(cnew, curtip->tip.gc);
newtip->tip.gc = XtAllocateGC(cnew, 0, GCForeground | GCBackground | newtip->tip.gc = XtAllocateGC(cnew, 0, GCForeground | GCBackground |
GCFont | GCGraphicsExposures, &values, GCFont | GCGraphicsExposures, &values,
@ -454,9 +455,9 @@ TipLayout(XawTipInfo *info)
XTextWidth16(fs, (_Xconst XChar2b*)label, (int)(strlen(label) >> 1)) : XTextWidth16(fs, (_Xconst XChar2b*)label, (int)(strlen(label) >> 1)) :
XTextWidth(fs, label, (int)strlen(label)); XTextWidth(fs, label, (int)strlen(label));
} }
XtWidth(info->tip) = (width + info->tip->tip.left_margin + XtWidth(info->tip) = (Dimension) (width + info->tip->tip.left_margin +
info->tip->tip.right_margin); info->tip->tip.right_margin);
XtHeight(info->tip) = (height + info->tip->tip.top_margin + XtHeight(info->tip) = (Dimension) (height + info->tip->tip.top_margin +
info->tip->tip.bottom_margin); info->tip->tip.bottom_margin);
} }
@ -526,7 +527,7 @@ FindTipInfo(Widget w)
Screen *screen = XtScreenOfObject(w); Screen *screen = XtScreenOfObject(w);
if (tip == NULL) if (tip == NULL)
return (first_tip = tip = CreateTipInfo(w)); return (first_tip = CreateTipInfo(w));
for (ptip = tip; tip; ptip = tip, tip = tip->next) for (ptip = tip; tip; ptip = tip, tip = tip->next)
if (tip->screen == screen) if (tip->screen == screen)

View file

@ -159,6 +159,9 @@ ToggleClassRec toggleClassRec = {
/* simple */ /* simple */
{ {
XtInheritChangeSensitive, /* change_sensitive */ XtInheritChangeSensitive, /* change_sensitive */
#ifndef OLDXAW
NULL,
#endif
}, },
/* label */ /* label */
{ {
@ -489,7 +492,6 @@ void
XawToggleChangeRadioGroup(Widget w, Widget radio_group) XawToggleChangeRadioGroup(Widget w, Widget radio_group)
{ {
ToggleWidget tw = (ToggleWidget)w; ToggleWidget tw = (ToggleWidget)w;
RadioGroup *group;
RemoveFromRadioGroup(w); RemoveFromRadioGroup(w);
@ -502,7 +504,9 @@ XawToggleChangeRadioGroup(Widget w, Widget radio_group)
XawToggleUnsetCurrent(radio_group); XawToggleUnsetCurrent(radio_group);
if (radio_group != NULL) { if (radio_group != NULL) {
if ((group = GetRadioGroup(radio_group)) == NULL) RadioGroup *group = GetRadioGroup(radio_group);
if (group == NULL)
CreateRadioGroup(w, radio_group); CreateRadioGroup(w, radio_group);
else else
AddToRadioGroup(group, w); AddToRadioGroup(group, w);
@ -611,12 +615,13 @@ XawToggleSetCurrent(Widget radio_group, XtPointer radio_data)
void void
XawToggleUnsetCurrent(Widget radio_group) XawToggleUnsetCurrent(Widget radio_group)
{ {
ToggleWidgetClass cclass;
ToggleWidget local_tog = (ToggleWidget)radio_group; ToggleWidget local_tog = (ToggleWidget)radio_group;
/* Special Case no radio group */ /* Special Case no radio group */
if (local_tog->command.set) { if (local_tog->command.set) {
ToggleWidgetClass cclass;
cclass = (ToggleWidgetClass)local_tog->core.widget_class; cclass = (ToggleWidgetClass)local_tog->core.widget_class;
cclass->toggle_class.Unset(radio_group, NULL, NULL, NULL); cclass->toggle_class.Unset(radio_group, NULL, NULL, NULL);
Notify(radio_group, NULL, NULL, NULL); Notify(radio_group, NULL, NULL, NULL);

View file

@ -206,9 +206,6 @@ WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
static void static void
initialize_dimensions(Dimension **listp, int *sizep, int n) initialize_dimensions(Dimension **listp, int *sizep, int n)
{ {
int i;
Dimension *l;
if (!*listp) { if (!*listp) {
*listp = (Dimension *) XtCalloc ((unsigned int) n, *listp = (Dimension *) XtCalloc ((unsigned int) n,
(unsigned int) sizeof(Dimension)); (unsigned int) sizeof(Dimension));
@ -221,10 +218,15 @@ initialize_dimensions(Dimension **listp, int *sizep, int n)
if (!*listp) { if (!*listp) {
*sizep = 0; *sizep = 0;
return; return;
} } else {
for (i = *sizep, l = (*listp) + i; i < n; i++, l++) *l = 0; int i;
Dimension *l;
for (i = *sizep, l = (*listp) + i; i < n; i++, l++)
*l = 0;
*sizep = n; *sizep = n;
} }
}
return; return;
} }
@ -282,7 +284,8 @@ static void
delete_node(Widget parent, Widget node) delete_node(Widget parent, Widget node)
{ {
TreeConstraints pc; TreeConstraints pc;
int pos, i; int pos;
int i;
/* /*
* Make sure the parent exists. * Make sure the parent exists.
@ -587,6 +590,8 @@ static void
XawTreeRedisplay(Widget gw, XEvent *event _X_UNUSED, Region region _X_UNUSED) XawTreeRedisplay(Widget gw, XEvent *event _X_UNUSED, Region region _X_UNUSED)
{ {
TreeWidget tw = (TreeWidget) gw; TreeWidget tw = (TreeWidget) gw;
Cardinal i;
int j;
#ifndef OLDXAW #ifndef OLDXAW
if (tw->tree.display_list) if (tw->tree.display_list)
@ -597,8 +602,6 @@ XawTreeRedisplay(Widget gw, XEvent *event _X_UNUSED, Region region _X_UNUSED)
* If the Tree widget is visible, visit each managed child. * If the Tree widget is visible, visit each managed child.
*/ */
if (tw->core.visible) { if (tw->core.visible) {
Cardinal i;
int j;
Display *dpy = XtDisplay (tw); Display *dpy = XtDisplay (tw);
Window w = XtWindow (tw); Window w = XtWindow (tw);
@ -722,10 +725,10 @@ static void
compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth)
{ {
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */ TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
int i;
Bool horiz = IsHorizontal (tree); Bool horiz = IsHorizontal (tree);
Dimension newwidth, newheight; Dimension newwidth, newheight;
Dimension bw2 = (Dimension)(w->core.border_width * 2); Dimension bw2 = (Dimension)(w->core.border_width * 2);
int i;
/* /*
* Set the max-size per level. * Set the max-size per level.
@ -792,10 +795,9 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth)
static void static void
set_positions(TreeWidget tw, Widget w, int level) set_positions(TreeWidget tw, Widget w, int level)
{ {
int i;
if (w) { if (w) {
TreeConstraints tc = TREE_CONSTRAINT(w); TreeConstraints tc = TREE_CONSTRAINT(w);
int i;
if (level > 0) { if (level > 0) {
/* /*
@ -832,15 +834,13 @@ static void
arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y)
{ {
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */ TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
TreeConstraints firstcc, lastcc;
int i;
int newx, newy; int newx, newy;
Bool horiz = IsHorizontal (tree); Bool horiz = IsHorizontal (tree);
Widget child = NULL; Widget child = NULL;
Dimension tmp; Dimension tmp;
Dimension bw2 = (Dimension)(w->core.border_width * 2); Dimension bw2 = (Dimension)(w->core.border_width * 2);
Bool relayout = True; Bool relayout = True;
int i;
/* /*
* If no children, then just lay out where requested. * If no children, then just lay out where requested.
@ -903,10 +903,10 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y)
/* /*
* now layout parent between first and last children * now layout parent between first and last children
*/ */
if (relayout) { if (relayout && (child != NULL)) {
Position adjusted; Position adjusted;
firstcc = TREE_CONSTRAINT (tc->tree.children[0]); TreeConstraints firstcc = TREE_CONSTRAINT (tc->tree.children[0]);
lastcc = TREE_CONSTRAINT (child); TreeConstraints lastcc = TREE_CONSTRAINT (child);
/* Adjustments are disallowed if they result in a position above /* Adjustments are disallowed if they result in a position above
* or to the left of the originally requested position, because * or to the left of the originally requested position, because

View file

@ -204,7 +204,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
} }
}; };
#if !defined(__UNIXOS2__) && !defined(__APPLE__) #if !defined(__APPLE__)
externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
(WidgetClass) (&vendorShellClassRec); (WidgetClass) (&vendorShellClassRec);
#endif #endif
@ -280,16 +280,16 @@ XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *n
XrmValue *fromVal, XrmValue *toVal, XrmValue *fromVal, XrmValue *toVal,
XtPointer *cvt_data _X_UNUSED) XtPointer *cvt_data _X_UNUSED)
{ {
XTextProperty prop;
char **list; char **list;
int count; int count;
static char *mbs = NULL; static char *mbs = NULL;
int len; int len;
XTextProperty prop = {
prop.value = (unsigned char *)fromVal->addr; .value = (unsigned char *)fromVal->addr,
prop.encoding = XA_COMPOUND_TEXT(dpy); .encoding = XA_COMPOUND_TEXT(dpy),
prop.format = 8; .format = 8,
prop.nitems = fromVal->size; .nitems = fromVal->size
};
if(XmbTextPropertyToTextList(dpy, &prop, &list, &count) < Success) { if(XmbTextPropertyToTextList(dpy, &prop, &list, &count) < Success) {
XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtAppWarningMsg(XtDisplayToApplicationContext(dpy),
@ -330,7 +330,7 @@ XawVendorShellClassPartInit(WidgetClass cclass)
CompositeClassExtension ext; CompositeClassExtension ext;
VendorShellWidgetClass vsclass = (VendorShellWidgetClass)cclass; VendorShellWidgetClass vsclass = (VendorShellWidgetClass)cclass;
if ((ext = (CompositeClassExtension) if (((CompositeClassExtension)
XtGetClassExtension (cclass, XtGetClassExtension (cclass,
XtOffsetOf(CompositeClassRec, XtOffsetOf(CompositeClassRec,
composite_class.extension), composite_class.extension),
@ -348,8 +348,8 @@ XawVendorShellClassPartInit(WidgetClass cclass)
} }
} }
#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
/* stupid OSF/1 shared libraries have the wrong semantics */ /* shared libraries on these platforms have the wrong semantics */
/* symbols do not get resolved external to the shared library */ /* symbols do not get resolved external to the shared library */
void _XawFixupVendorShell() void _XawFixupVendorShell()
{ {

View file

@ -216,6 +216,9 @@ ViewportClassRec viewportClassRec = {
/* form */ /* form */
{ {
Layout, /* layout */ Layout, /* layout */
#ifndef OLDXAW
NULL,
#endif
}, },
/* viewport */ /* viewport */
{ {
@ -441,10 +444,6 @@ XawViewportChangeManaged(Widget widget)
((FormWidget)w, XtWidth(w), XtHeight(w), True /* True? */); ((FormWidget)w, XtWidth(w), XtHeight(w), True /* True? */);
} }
} }
#ifdef notdef
(*Superclass->composite_class.change_managed)(widget);
#endif
} }
static void static void
@ -472,19 +471,18 @@ RedrawThumbs(ViewportWidget w)
static void static void
SendReport(ViewportWidget w, unsigned int changed) SendReport(ViewportWidget w, unsigned int changed)
{ {
XawPannerReport rep;
if (w->viewport.report_callbacks) { if (w->viewport.report_callbacks) {
Widget child = w->viewport.child; Widget child = w->viewport.child;
Widget clip = w->viewport.clip; Widget clip = w->viewport.clip;
XawPannerReport rep = {
rep.changed = changed; .changed = changed,
rep.slider_x = (Position) -XtX(child); /* child is canvas */ .slider_x = (Position) -XtX(child), /* child is canvas */
rep.slider_y = (Position) -XtY(child); /* clip is slider */ .slider_y = (Position) -XtY(child), /* clip is slider */
rep.slider_width = XtWidth(clip); .slider_width = XtWidth(clip),
rep.slider_height = XtHeight(clip); .slider_height = XtHeight(clip),
rep.canvas_width = XtWidth(child); .canvas_width = XtWidth(child),
rep.canvas_height = XtHeight(child); .canvas_height = XtHeight(child)
};
XtCallCallbackList((Widget)w, w->viewport.report_callbacks, XtCallCallbackList((Widget)w, w->viewport.report_callbacks,
(XtPointer)&rep); (XtPointer)&rep);
} }

View file

@ -76,20 +76,6 @@ _Xaw_atowc(unsigned char c)
return (wc); return (wc);
} }
#ifdef NCR
int
_Xaw_iswspace(wchar_t w)
{
int ret = 0;
wchar_t s = _Xaw_atowc(' ');
if (s == w)
ret = 1;
return (ret);
}
#endif
int int
_Xaw_iswalnum(wchar_t ch) _Xaw_iswalnum(wchar_t ch)
{ {

View file

@ -38,29 +38,6 @@ in this Software without prior written authorization from The Open Group.
#include <wchar.h> #include <wchar.h>
#endif #endif
#if defined(AIXV3) || defined(__SCO__)
#include <ctype.h>
#endif
#ifdef NCR
#define iswspace(c) _Xaw_iswspace(c)
int _Xaw_iswspace
(
wchar_t c
);
#endif
#ifdef sony
#ifndef SVR4
#include <jctype.h>
#define iswspace(c) jisspace(c)
#endif
#endif
#ifdef QNX4
#define toascii( c ) ((unsigned)(c) & 0x007f)
#endif
#include <stdlib.h> #include <stdlib.h>
#ifdef USE_XWCHAR_STRING #ifdef USE_XWCHAR_STRING
@ -103,10 +80,16 @@ wchar_t _Xaw_atowc
); );
#ifndef HAS_ISW_FUNCS #ifndef HAS_ISW_FUNCS
#include <ctype.h> # include <ctype.h>
#ifndef iswspace # ifndef isascii
#define iswspace(c) (isascii(c) && isspace(toascii(c))) # define isascii(c) ((unsigned char)(c) < 127)
#endif # endif
# ifndef toascii
# define toascii(c) ((c) & 0x7f)
# endif
# ifndef iswspace
# define iswspace(c) (isascii(c) && isspace(toascii(c)))
# endif
#endif #endif
#if !defined(iswalnum) && !defined(HAVE_ISWALNUM) #if !defined(iswalnum) && !defined(HAVE_ISWALNUM)

View file

@ -80,6 +80,18 @@ in this Software without prior written authorization from The Open Group.
#define Offset(field) (XtOffsetOf(XawIcTablePart, field)) #define Offset(field) (XtOffsetOf(XawIcTablePart, field))
#define ADD_IC(value) ic_a[ic_cnt] = (XPointer) value; ic_cnt++
#define USE_IC(count) (ic_cnt > count) ? ic_a[count] : NULL
#define END_IC() ic_a[ic_cnt] = (XPointer) NULL
#define ADD_PE(value) pe_a[pe_cnt] = (XPointer) value; pe_cnt++
#define USE_PE(count) (pe_cnt > count) ? pe_a[count] : NULL
#define END_PE() pe_a[pe_cnt] = (XPointer) NULL
#define ADD_ST(value) st_a[st_cnt] = (XPointer) value; st_cnt++
#define USE_ST(count) (st_cnt > count) ? st_a[count] : NULL
#define END_ST() st_a[st_cnt] = (XPointer) NULL
/***************************************************** /*****************************************************
* *
* Forward reference prototypes * Forward reference prototypes
@ -264,18 +276,19 @@ GetInputStyleOfIC(XawVendorShellExtPart *ve)
static void static void
ConfigureCB(Widget w, XtPointer closure _X_UNUSED, XEvent *event, Boolean *unused _X_UNUSED) ConfigureCB(Widget w, XtPointer closure _X_UNUSED, XEvent *event, Boolean *unused _X_UNUSED)
{ {
XawIcTableList p;
XawVendorShellExtPart *ve; XawVendorShellExtPart *ve;
VendorShellWidget vw; VendorShellWidget vw;
XVaNestedList pe_attr;
XRectangle pe_area;
XawTextMargin *margin;
if (event->type != ConfigureNotify) return; if (event->type != ConfigureNotify) return;
if ((vw = SearchVendorShell(w)) == NULL) return; if ((vw = SearchVendorShell(w)) == NULL) return;
if ((ve = GetExtPart(vw)) != NULL) { if ((ve = GetExtPart(vw)) != NULL) {
XawIcTableList p;
XVaNestedList pe_attr;
XRectangle pe_area;
XawTextMargin *margin;
if (IsSharedIC(ve)) return; if (IsSharedIC(ve)) return;
if ((ve->im.xim == NULL) || if ((ve->im.xim == NULL) ||
((p = GetIcTableShared(w, ve)) == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
@ -314,20 +327,6 @@ static Widget SetErrCnxt(Widget w, XIM xim)
return(contextErrData->widget); return(contextErrData->widget);
} }
#if 0
static Widget
GetErrCnxt(XIM error_im)
{
contextErrDataRec *contextErrData;
if (XFindContext(XDisplayOfIM(error_im), (Window)error_im, errContext,
(XPointer*)&contextErrData)) {
return(NULL);
}
return(contextErrData->widget);
}
#endif
static void static void
CloseIM(XawVendorShellExtPart *ve) CloseIM(XawVendorShellExtPart *ve)
{ {
@ -426,31 +425,15 @@ VendorShellDestroyed(Widget w, XtPointer cl_data _X_UNUSED, XtPointer ca_data _X
return; return;
} }
#if 0
static int
IOErrorHandler(XIM error_im)
{
VendorShellWidget vw;
XawVendorShellExtPart * ve;
if ((vw = (VendorShellWidget)GetErrCnxt(error_im)) == NULL
|| (ve = GetExtPart(vw)) == NULL) return(0);
DestroyAllIM(ve);
return(0);
}
#endif
/* /*
* Attempt to open an input method * Attempt to open an input method
*/ */
static void static void
OpenIM(XawVendorShellExtPart *ve) OpenIM(XawVendorShellExtPart *ve)
{ {
int i; int i;
_Xconst char *s, *ns, *end; _Xconst char *s, *ns, *end;
char *p, *pbuf, buf[32]; char *p, buf[32];
XIM xim = NULL; XIM xim = NULL;
XIMStyles *xim_styles; XIMStyles *xim_styles;
XIMStyle input_style = 0; XIMStyle input_style = 0;
@ -462,6 +445,8 @@ OpenIM(XawVendorShellExtPart *ve)
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL); xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL);
} else { } else {
char *pbuf;
/* no fragment can be longer than the whole string */ /* no fragment can be longer than the whole string */
Cardinal len = (Cardinal)strlen (ve->im.input_method) + 5; Cardinal len = (Cardinal)strlen (ve->im.input_method) + 5;
@ -496,7 +481,7 @@ OpenIM(XawVendorShellExtPart *ve)
if (pbuf != buf) XtFree (pbuf); if (pbuf != buf) XtFree (pbuf);
} }
if (xim == NULL) { if (xim == NULL) {
if ((p = XSetLocaleModifiers("")) != NULL) { if (XSetLocaleModifiers("") != NULL) {
xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL); xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL);
} }
} }
@ -513,7 +498,7 @@ OpenIM(XawVendorShellExtPart *ve)
return; return;
} }
found = False; found = False;
for(ns = s = ve->im.preedit_type; s && !found;) { for (s = ve->im.preedit_type; s && !found;) {
while (*s && isspace((unsigned char)*s)) s++; while (*s && isspace((unsigned char)*s)) s++;
if (!*s) break; if (!*s) break;
if ((ns = end = strchr(s, ',')) == NULL) if ((ns = end = strchr(s, ',')) == NULL)
@ -720,18 +705,18 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
if (p->input_style & XIMPreeditArea) { if (p->input_style & XIMPreeditArea) {
pe_attr = XVaCreateNestedList(0, XNAreaNeeded, &pe_area_needed, NULL); pe_attr = XVaCreateNestedList(0, XNAreaNeeded, &pe_area_needed, NULL);
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++; ADD_IC(XNPreeditAttributes);
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++; ADD_IC(pe_attr);
} }
if (p->input_style & XIMStatusArea) { if (p->input_style & XIMStatusArea) {
st_attr = XVaCreateNestedList(0, XNAreaNeeded, &st_area_needed, NULL); st_attr = XVaCreateNestedList(0, XNAreaNeeded, &st_area_needed, NULL);
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++; ADD_IC(XNStatusAttributes);
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++; ADD_IC(st_attr);
} }
ic_a[ic_cnt] = (XPointer) NULL; END_IC();
if (ic_cnt > 0) { if (ic_cnt > 0) {
XGetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], NULL); XGetICValues(p->xic, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3), NULL);
if (pe_attr) XFree(pe_attr); if (pe_attr) XFree(pe_attr);
if (st_attr) XFree(st_attr); if (st_attr) XFree(st_attr);
if (p->xic == NULL) { if (p->xic == NULL) {
@ -752,8 +737,8 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
XFree(st_area_needed); XFree(st_area_needed);
st_attr = XVaCreateNestedList(0, XNArea, &st_area, NULL); st_attr = XVaCreateNestedList(0, XNArea, &st_area, NULL);
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++; ADD_IC(XNStatusAttributes);
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++; ADD_IC(st_attr);
} }
if (p->input_style & XIMPreeditArea) { if (p->input_style & XIMPreeditArea) {
if (p->input_style & XIMStatusArea) { if (p->input_style & XIMStatusArea) {
@ -767,11 +752,11 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
XFree(pe_area_needed); XFree(pe_area_needed);
pe_area.y = (short)(height - pe_area.height); pe_area.y = (short)(height - pe_area.height);
pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL); pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL);
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++; ADD_IC(XNPreeditAttributes);
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++; ADD_IC(pe_attr);
} }
ic_a[ic_cnt] = (XPointer) NULL; END_IC();
XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], NULL); XSetICValues(p->xic, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3), NULL);
if (pe_attr) XFree(pe_attr); if (pe_attr) XFree(pe_attr);
if (st_attr) XFree(st_attr); if (st_attr) XFree(st_attr);
if (p->xic == NULL) { if (p->xic == NULL) {
@ -791,7 +776,6 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
XPointer ic_a[20], pe_a[20], st_a[20]; XPointer ic_a[20], pe_a[20], st_a[20];
Dimension height = 0; Dimension height = 0;
int ic_cnt = 0, pe_cnt = 0, st_cnt = 0; int ic_cnt = 0, pe_cnt = 0, st_cnt = 0;
XawTextMargin *margin;
if (!XtIsRealized(w)) return; if (!XtIsRealized(w)) return;
if (((ve->im.xim == NULL) || (p = GetIcTableShared(w, ve)) == NULL) || if (((ve->im.xim == NULL) || (p = GetIcTableShared(w, ve)) == NULL) ||
@ -804,10 +788,10 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
if (p->input_style & (XIMPreeditArea|XIMPreeditPosition|XIMStatusArea)) { if (p->input_style & (XIMPreeditArea|XIMPreeditPosition|XIMStatusArea)) {
if (p->flg & CIFontSet) { if (p->flg & CIFontSet) {
pe_a[pe_cnt] = (XPointer) XNFontSet; pe_cnt++; ADD_PE(XNFontSet);
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++; ADD_PE(p->font_set);
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++; ADD_ST(XNFontSet);
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++; ADD_ST(p->font_set);
if (p->font_set) { if (p->font_set) {
height = (Dimension)(maxAscentOfFontSet(p->font_set) height = (Dimension)(maxAscentOfFontSet(p->font_set)
+ maxDescentOfFontSet(p->font_set)); + maxDescentOfFontSet(p->font_set));
@ -815,39 +799,43 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
height = (Dimension)SetVendorShellHeight(ve, height); height = (Dimension)SetVendorShellHeight(ve, height);
} }
if (p->flg & CIFg) { if (p->flg & CIFg) {
pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++; ADD_PE(XNForeground);
pe_a[pe_cnt] = (XPointer) p->foreground; pe_cnt++; ADD_PE(p->foreground);
st_a[st_cnt] = (XPointer) XNForeground; st_cnt++; ADD_ST(XNForeground);
st_a[st_cnt] = (XPointer) p->foreground; st_cnt++; ADD_ST(p->foreground);
} }
if (p->flg & CIBg) { if (p->flg & CIBg) {
pe_a[pe_cnt] = (XPointer) XNBackground; pe_cnt++; ADD_PE(XNBackground);
pe_a[pe_cnt] = (XPointer) p->background; pe_cnt++; ADD_PE(p->background);
st_a[st_cnt] = (XPointer) XNBackground; st_cnt++; ADD_ST(XNBackground);
st_a[st_cnt] = (XPointer) p->background; st_cnt++; ADD_ST(p->background);
} }
if (p->flg & CIBgPixmap) { if (p->flg & CIBgPixmap) {
pe_a[pe_cnt] = (XPointer) XNBackgroundPixmap; pe_cnt++; ADD_PE(XNBackgroundPixmap);
pe_a[pe_cnt] = (XPointer) p->bg_pixmap; pe_cnt++; ADD_PE(p->bg_pixmap);
st_a[st_cnt] = (XPointer) XNBackgroundPixmap; st_cnt++; ADD_ST(XNBackgroundPixmap);
st_a[st_cnt] = (XPointer) p->bg_pixmap; st_cnt++; ADD_ST(p->bg_pixmap);
} }
if (p->flg & CILineS) { if (p->flg & CILineS) {
pe_a[pe_cnt] = (XPointer) XNLineSpace; pe_cnt++; ADD_PE(XNLineSpace);
pe_a[pe_cnt] = (XPointer) p->line_spacing; pe_cnt++; ADD_PE(p->line_spacing);
st_a[st_cnt] = (XPointer) XNLineSpace; st_cnt++; ADD_ST(XNLineSpace);
st_a[st_cnt] = (XPointer) p->line_spacing; st_cnt++; ADD_ST(p->line_spacing);
} }
} }
if (p->input_style & XIMPreeditArea) { if (p->input_style & XIMPreeditArea) {
pe_area.x = 0; pe_area.x = 0;
pe_area.y = (short)(ve->parent->core.height - height); pe_area.y = (short)(ve->parent->core.height - height);
pe_area.width = ve->parent->core.width; pe_area.width = ve->parent->core.width;
pe_area.height = height; pe_area.height = height;
pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; ADD_PE(XNArea);
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++; ADD_PE(&pe_area);
} }
if (p->input_style & XIMPreeditPosition) { if (p->input_style & XIMPreeditPosition) {
XawTextMargin *margin;
pe_area.x = 0; pe_area.x = 0;
pe_area.y = 0; pe_area.y = 0;
pe_area.width = w->core.width; pe_area.width = w->core.width;
@ -857,59 +845,58 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
pe_area.y = (short)(pe_area.y + margin->top); pe_area.y = (short)(pe_area.y + margin->top);
pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1)); pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1));
pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1)); pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1));
pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; ADD_PE(XNArea);
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++; ADD_PE(&pe_area);
if (p->flg & CICursorP) { if (p->flg & CICursorP) {
_XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y); _XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y);
} else { } else {
position.x = position.y = 0; position.x = position.y = 0;
} }
pe_a[pe_cnt] = (XPointer) XNSpotLocation; pe_cnt++; ADD_PE(XNSpotLocation);
pe_a[pe_cnt] = (XPointer) &position; pe_cnt++; ADD_PE(&position);
} }
if (p->input_style & XIMStatusArea) { if (p->input_style & XIMStatusArea) {
st_area.x = 0; st_area.x = 0;
st_area.y = (short)(ve->parent->core.height - height); st_area.y = (short)(ve->parent->core.height - height);
st_area.width = ve->parent->core.width; st_area.width = ve->parent->core.width;
st_area.height = height; st_area.height = height;
st_a[st_cnt] = (XPointer) XNArea; st_cnt++; ADD_ST(XNArea);
st_a[st_cnt] = (XPointer) &st_area; st_cnt++; ADD_ST(&st_area);
} }
ic_a[ic_cnt] = (XPointer) XNInputStyle; ic_cnt++; ADD_IC(XNInputStyle);
ic_a[ic_cnt] = (XPointer) p->input_style; ic_cnt++; ADD_IC(p->input_style);
ic_a[ic_cnt] = (XPointer) XNClientWindow; ic_cnt++; ADD_IC(XNClientWindow);
ic_a[ic_cnt] = (XPointer) XtWindow(ve->parent); ic_cnt++; ADD_IC(XtWindow(ve->parent));
ic_a[ic_cnt] = (XPointer) XNFocusWindow; ic_cnt++; ADD_IC(XNFocusWindow);
ic_a[ic_cnt] = (XPointer) XtWindow(w); ic_cnt++; ADD_IC(XtWindow(w));
if (pe_cnt > 0) { if (pe_cnt > 0) {
pe_a[pe_cnt] = (XPointer) NULL; END_PE();
pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3], pe_attr = XVaCreateNestedList(0, USE_PE(0), USE_PE(1), USE_PE(2),
pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8], USE_PE(3), USE_PE(4), USE_PE(5),
pe_a[9], pe_a[10], pe_a[11], pe_a[12], USE_PE(6), USE_PE(7), USE_PE(8),
pe_a[13], pe_a[14], pe_a[15], pe_a[16], USE_PE(9), USE_PE(10), USE_PE(11),
pe_a[17], pe_a[18], NULL); USE_PE(12), USE_PE(13), USE_PE(14),
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++; USE_PE(15), NULL);
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++; ADD_IC(XNPreeditAttributes);
ADD_IC(pe_attr);
} }
if (st_cnt > 0) { if (st_cnt > 0) {
st_a[st_cnt] = (XPointer) NULL; END_ST();
st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3], st_attr = XVaCreateNestedList(0, USE_ST(0), USE_ST(1), USE_ST(2),
st_a[4], st_a[5], st_a[6], st_a[7], st_a[8], USE_ST(3), USE_ST(4), USE_ST(5),
st_a[9], st_a[10], st_a[11], st_a[12], USE_ST(6), USE_ST(7), USE_ST(8),
st_a[13], st_a[14], st_a[15], st_a[16], USE_ST(9), USE_ST(10), USE_ST(11), NULL);
st_a[17], st_a[18], NULL); ADD_IC(XNStatusAttributes);
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++; ADD_IC(st_attr);
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
} }
ic_a[ic_cnt] = (XPointer) NULL; END_IC();
p->xic = XCreateIC(ve->im.xim, ic_a[0], ic_a[1], ic_a[2], ic_a[3], p->xic = XCreateIC(ve->im.xim, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3),
ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], USE_IC(4), USE_IC(5), USE_IC(6), USE_IC(7), USE_IC(8),
ic_a[10], ic_a[11], ic_a[12], ic_a[13], ic_a[14], USE_IC(9), NULL);
ic_a[15], ic_a[16], ic_a[17], ic_a[18], NULL);
if (pe_attr) XtFree(pe_attr); if (pe_attr) XtFree(pe_attr);
if (st_attr) XtFree(st_attr); if (st_attr) XtFree(st_attr);
@ -963,46 +950,46 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
if (p->input_style & (XIMPreeditArea|XIMPreeditPosition|XIMStatusArea)) { if (p->input_style & (XIMPreeditArea|XIMPreeditPosition|XIMStatusArea)) {
if (p->flg & CIFontSet) { if (p->flg & CIFontSet) {
pe_a[pe_cnt] = (XPointer) XNFontSet; pe_cnt++; ADD_PE(XNFontSet);
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++; ADD_PE(p->font_set);
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++; ADD_ST(XNFontSet);
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++; ADD_ST(p->font_set);
if (p->font_set) { if (p->font_set) {
height = maxAscentOfFontSet(p->font_set) height = maxAscentOfFontSet(p->font_set)
+ maxDescentOfFontSet(p->font_set); + maxDescentOfFontSet(p->font_set);
} }
height = (int)SetVendorShellHeight(ve, (unsigned)height); SetVendorShellHeight(ve, (unsigned)height);
} }
if (p->flg & CIFg) { if (p->flg & CIFg) {
pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++; ADD_PE(XNForeground);
pe_a[pe_cnt] = (XPointer) p->foreground; pe_cnt++; ADD_PE(p->foreground);
st_a[st_cnt] = (XPointer) XNForeground; st_cnt++; ADD_ST(XNForeground);
st_a[st_cnt] = (XPointer) p->foreground; st_cnt++; ADD_ST(p->foreground);
} }
if (p->flg & CIBg) { if (p->flg & CIBg) {
pe_a[pe_cnt] = (XPointer) XNBackground; pe_cnt++; ADD_PE(XNBackground);
pe_a[pe_cnt] = (XPointer) p->background; pe_cnt++; ADD_PE(p->background);
st_a[st_cnt] = (XPointer) XNBackground; st_cnt++; ADD_ST(XNBackground);
st_a[st_cnt] = (XPointer) p->background; st_cnt++; ADD_ST(p->background);
} }
if (p->flg & CIBgPixmap) { if (p->flg & CIBgPixmap) {
pe_a[pe_cnt] = (XPointer) XNBackgroundPixmap; pe_cnt++; ADD_PE(XNBackgroundPixmap);
pe_a[pe_cnt] = (XPointer) p->bg_pixmap; pe_cnt++; ADD_PE(p->bg_pixmap);
st_a[st_cnt] = (XPointer) XNBackgroundPixmap; st_cnt++; ADD_ST(XNBackgroundPixmap);
st_a[st_cnt] = (XPointer) p->bg_pixmap; st_cnt++; ADD_ST(p->bg_pixmap);
} }
if (p->flg & CILineS) { if (p->flg & CILineS) {
pe_a[pe_cnt] = (XPointer) XNLineSpace; pe_cnt++; ADD_PE(XNLineSpace);
pe_a[pe_cnt] = (XPointer) p->line_spacing; pe_cnt++; ADD_PE(p->line_spacing);
st_a[st_cnt] = (XPointer) XNLineSpace; st_cnt++; ADD_ST(XNLineSpace);
st_a[st_cnt] = (XPointer) p->line_spacing; st_cnt++; ADD_ST(p->line_spacing);
} }
} }
if (p->input_style & XIMPreeditPosition) { if (p->input_style & XIMPreeditPosition) {
if (p->flg & CICursorP) { if (p->flg & CICursorP) {
_XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y); _XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y);
pe_a[pe_cnt] = (XPointer) XNSpotLocation; pe_cnt++; ADD_PE(XNSpotLocation);
pe_a[pe_cnt] = (XPointer) &position; pe_cnt++; ADD_PE(&position);
} }
} }
if (IsSharedIC(ve)) { if (IsSharedIC(ve)) {
@ -1016,41 +1003,38 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
pe_area.y = (short)(pe_area.y + margin->top); pe_area.y = (short)(pe_area.y + margin->top);
pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1)); pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1));
pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1)); pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1));
pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; ADD_PE(XNArea);
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++; ADD_PE(&pe_area);
} }
} }
if (pe_cnt > 0) { if (pe_cnt > 0) {
pe_a[pe_cnt] = (XPointer) NULL; END_PE();
pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3], pe_attr = XVaCreateNestedList(0, USE_PE(0), USE_PE(1), USE_PE(2),
pe_a[4], pe_a[5], pe_a[6], pe_a[7], USE_PE(3), USE_PE(4), USE_PE(5),
pe_a[8], pe_a[9], pe_a[10], pe_a[11], USE_PE(6), USE_PE(7), USE_PE(8),
pe_a[12], pe_a[13], pe_a[14], pe_a[15], USE_PE(9), USE_PE(10), USE_PE(11),
pe_a[16], pe_a[17], pe_a[18], NULL); USE_PE(12), USE_PE(13), NULL);
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++; ADD_IC(XNPreeditAttributes);
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++; ADD_IC(pe_attr);
} }
if (st_cnt > 0) { if (st_cnt > 0) {
st_a[st_cnt] = (XPointer) NULL; END_ST();
st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3], st_attr = XVaCreateNestedList(0, USE_ST(0), USE_ST(1), USE_ST(2),
st_a[4], st_a[5], st_a[6], st_a[7], USE_ST(3), USE_ST(4), USE_ST(5),
st_a[8], st_a[9], st_a[10], st_a[11], USE_ST(6), USE_ST(7), USE_ST(8),
st_a[12], st_a[13], st_a[14], st_a[15], USE_ST(9), NULL);
st_a[16], st_a[17], st_a[18], NULL); ADD_IC(XNStatusAttributes);
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++; ADD_IC(st_attr);
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
} }
if (focus == TRUE) { if (focus == TRUE) {
ic_a[ic_cnt] = (XPointer) XNFocusWindow; ic_cnt++; ADD_IC(XNFocusWindow);
ic_a[ic_cnt] = (XPointer) XtWindow(w); ic_cnt++; ADD_IC(XtWindow(w));
} }
if (ic_cnt > 0) { if (ic_cnt > 0) {
ic_a[ic_cnt] = (XPointer) NULL; END_IC();
XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4], XSetICValues(p->xic, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3),
ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10], USE_IC(4), USE_IC(5), NULL);
ic_a[11], ic_a[12], ic_a[13], ic_a[14], ic_a[15],
ic_a[16], ic_a[17], ic_a[18], NULL);
if (pe_attr) XtFree(pe_attr); if (pe_attr) XtFree(pe_attr);
if (st_attr) XtFree(st_attr); if (st_attr) XtFree(st_attr);
} }
@ -1085,13 +1069,13 @@ CurrentSharedIcTable(XawVendorShellExtPart *ve)
static void static void
SetICFocus(Widget w, XawVendorShellExtPart *ve) SetICFocus(Widget w, XawVendorShellExtPart *ve)
{ {
XawIcTableList p, pp; XawIcTableList p;
if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) || if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
(p->xic == NULL)) return; (p->xic == NULL)) return;
if (IsSharedIC(ve)) { if (IsSharedIC(ve)) {
pp = CurrentSharedIcTable(ve); XawIcTableList pp = CurrentSharedIcTable(ve);
if (pp == NULL || pp->widget != w) { if (pp == NULL || pp->widget != w) {
SharedICChangeFocusWindow(w, ve, p); SharedICChangeFocusWindow(w, ve, p);
} }
@ -1232,10 +1216,12 @@ UnsetFocus(Widget inwidg)
{ {
XawVendorShellExtPart *ve; XawVendorShellExtPart *ve;
VendorShellWidget vw; VendorShellWidget vw;
XawIcTableList p;
if ((vw = SearchVendorShell(inwidg)) == NULL) return; if ((vw = SearchVendorShell(inwidg)) == NULL) return;
if ((ve = GetExtPart(vw)) != NULL) { if ((ve = GetExtPart(vw)) != NULL) {
XawIcTableList p;
if ((p = GetIcTableShared(inwidg, ve)) == NULL) return; if ((p = GetIcTableShared(inwidg, ve)) == NULL) return;
if (p->flg & CIICFocus) { if (p->flg & CIICFocus) {
p->flg &= (unsigned long)(~CIICFocus); p->flg &= (unsigned long)(~CIICFocus);

View file

@ -1,173 +0,0 @@
/*
Copyright 1991, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#if defined(SUNSHLIB) && !defined(SHAREDCODE)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/IntrinsicP.h>
#include <X11/Xaw/AsciiSinkP.h>
#include <X11/Xaw/AsciiSrcP.h>
#include <X11/Xaw/AsciiTextP.h>
#include <X11/Xaw/MultiSinkP.h>
#include <X11/Xaw/MultiSrcP.h>
#include <X11/Xaw/BoxP.h>
#include <X11/Xaw/CommandP.h>
#include <X11/Xaw/DialogP.h>
#include <X11/Xaw/FormP.h>
#include <X11/Xaw/GripP.h>
#include <X11/Xaw/LabelP.h>
#include <X11/Xaw/ListP.h>
#include <X11/Xaw/MenuButtoP.h>
#include <X11/Xaw/PanedP.h>
#include <X11/Xaw/PannerP.h>
#include <X11/Xaw/PortholeP.h>
#include <X11/Xaw/RepeaterP.h>
#include <X11/Xaw/ScrollbarP.h>
#include <X11/Xaw/SimpleP.h>
#include <X11/Xaw/SimpleMenP.h>
#include <X11/Xaw/SmeP.h>
#include <X11/Xaw/SmeBSBP.h>
#include <X11/Xaw/SmeLineP.h>
#include <X11/Xaw/StripCharP.h>
#include <X11/Xaw/TextP.h>
#include <X11/Xaw/TextSinkP.h>
#include <X11/Xaw/TextSrcP.h>
#include <X11/Xaw/ToggleP.h>
#include <X11/Xaw/TreeP.h>
#include <X11/VendorP.h>
#include <X11/Xaw/ViewportP.h>
extern AsciiSinkClassRec asciiSinkClassRec;
WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec;
extern AsciiSrcClassRec asciiSrcClassRec;
WidgetClass asciiSrcObjectClass = (WidgetClass)&asciiSrcClassRec;
extern AsciiTextClassRec asciiTextClassRec;
WidgetClass asciiTextWidgetClass = (WidgetClass)&asciiTextClassRec;
#ifdef ASCII_STRING
extern AsciiStringClassRec asciiStringClassRec;
WidgetClass asciiStringWidgetClass = (WidgetClass)&asciiStringClassRec;
#endif
#ifdef ASCII_DISK
extern AsciiDiskClassRec asciiDiskClassRec;
WidgetClass asciiDiskWidgetClass = (WidgetClass)&asciiDiskClassRec;
#endif
extern MultiSinkClassRec multiSinkClassRec;
WidgetClass multiSinkObjectClass = (WidgetClass)&multiSinkClassRec;
extern MultiSrcClassRec multiSrcClassRec;
WidgetClass multiSrcObjectClass = (WidgetClass)&multiSrcClassRec;
extern BoxClassRec boxClassRec;
WidgetClass boxWidgetClass = (WidgetClass)&boxClassRec;
extern CommandClassRec commandClassRec;
WidgetClass commandWidgetClass = (WidgetClass) &commandClassRec;
extern DialogClassRec dialogClassRec;
WidgetClass dialogWidgetClass = (WidgetClass)&dialogClassRec;
extern FormClassRec formClassRec;
WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
extern GripClassRec gripClassRec;
WidgetClass gripWidgetClass = (WidgetClass) &gripClassRec;
extern LabelClassRec labelClassRec;
WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec;
extern ListClassRec listClassRec;
WidgetClass listWidgetClass = (WidgetClass)&listClassRec;
extern MenuButtonClassRec menuButtonClassRec;
WidgetClass menuButtonWidgetClass = (WidgetClass) &menuButtonClassRec;
extern PanedClassRec panedClassRec;
WidgetClass panedWidgetClass = (WidgetClass) &panedClassRec;
WidgetClass vPanedWidgetClass = (WidgetClass) &panedClassRec;
extern PannerClassRec pannerClassRec;
WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
extern PortholeClassRec portholeClassRec;
WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec;
extern RepeaterClassRec repeaterClassRec;
WidgetClass repeaterWidgetClass = (WidgetClass) &repeaterClassRec;
extern ScrollbarClassRec scrollbarClassRec;
WidgetClass scrollbarWidgetClass = (WidgetClass)&scrollbarClassRec;
extern SimpleClassRec simpleClassRec;
WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec;
extern SimpleMenuClassRec simpleMenuClassRec;
WidgetClass simpleMenuWidgetClass = (WidgetClass)&simpleMenuClassRec;
extern SmeClassRec smeClassRec;
WidgetClass smeObjectClass = (WidgetClass) &smeClassRec;
extern SmeBSBClassRec smeBSBClassRec;
WidgetClass smeBSBObjectClass = (WidgetClass) &smeBSBClassRec;
extern SmeLineClassRec smeLineClassRec;
WidgetClass smeLineObjectClass = (WidgetClass) &smeLineClassRec;
extern StripChartClassRec stripChartClassRec;
WidgetClass stripChartWidgetClass = (WidgetClass) &stripChartClassRec;
extern TextClassRec textClassRec;
WidgetClass textWidgetClass = (WidgetClass)&textClassRec;
unsigned long FMT8BIT = 0L;
unsigned long XawFmt8Bit = 0L;
unsigned long XawFmtWide = 0L;
extern TextSinkClassRec textSinkClassRec;
WidgetClass textSinkObjectClass = (WidgetClass)&textSinkClassRec;
extern TextSrcClassRec textSrcClassRec;
WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec;
extern ToggleClassRec toggleClassRec;
WidgetClass toggleWidgetClass = (WidgetClass) &toggleClassRec;
extern TreeClassRec treeClassRec;
WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
extern VendorShellClassRec vendorShellClassRec;
WidgetClass vendorShellWidgetClass = (WidgetClass) &vendorShellClassRec;
extern ViewportClassRec viewportClassRec;
WidgetClass viewportWidgetClass = (WidgetClass)&viewportClassRec;
#endif /* SUNSHLIB */

153
lib/libXaw/test-driver Normal file
View file

@ -0,0 +1,153 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://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>.
# Make unconditional expansion of undefined variables an error. This
# helps a lot in preventing typo-related bugs.
set -u
usage_error ()
{
echo "$0: $*" >&2
print_usage >&2
exit 2
}
print_usage ()
{
cat <<END
Usage:
test-driver --test-name NAME --log-file PATH --trs-file PATH
[--expect-failure {yes|no}] [--color-tests {yes|no}]
[--enable-hard-errors {yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
See the GNU Automake documentation for information.
END
}
test_name= # Used for reporting.
log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
enable_hard_errors=yes
while test $# -gt 0; do
case $1 in
--help) print_usage; exit $?;;
--version) echo "test-driver $scriptversion"; exit $?;;
--test-name) test_name=$2; shift;;
--log-file) log_file=$2; shift;;
--trs-file) trs_file=$2; shift;;
--color-tests) color_tests=$2; shift;;
--expect-failure) expect_failure=$2; shift;;
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
*) break;;
esac
shift
done
missing_opts=
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
if test x"$missing_opts" != x; then
usage_error "the following mandatory options are missing:$missing_opts"
fi
if test $# -eq 0; then
usage_error "missing argument"
fi
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='' # Red.
grn='' # Green.
lgn='' # Light green.
blu='' # Blue.
mgn='' # Magenta.
std='' # No color.
else
red= grn= lgn= blu= mgn= std=
fi
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
trap "st=129; $do_exit" 1
trap "st=130; $do_exit" 2
trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here. We create the file first, then append to it,
# to ameliorate tests themselves also writing to the log file. Our tests
# don't, but others can (automake bug#35762).
: >"$log_file"
"$@" >>"$log_file" 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
tweaked_estatus=1
else
tweaked_estatus=$estatus
fi
case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
# Report the test outcome and exit status in the logs, so that one can
# know whether the test passed or failed simply by looking at the '.log'
# file, without the need of also peaking into the corresponding '.trs'
# file (automake bug#11814).
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
# Register the test result, and other relevant metadata.
echo ":test-result: $res" > $trs_file
echo ":global-test-result: $res" >> $trs_file
echo ":recheck: $recheck" >> $trs_file
echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View file

@ -1,3 +1,86 @@
commit 09617bcc9a0f1b5072212da5f8fede92ab85d157
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 2 12:55:30 2024 -0800
libXcursor 1.2.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 3783190da9aaa5ddd23aad6060469fd3f3ebece9
Author: Robin Linden <dev@robinlinden.eu>
Date: Thu Jan 18 18:36:39 2024 +0100
Remove superfluous and unguarded config.h include
config.h is correctly included behind a HAVE_CONFIG_H guard earlier in
the file, so this isn't needed.
Signed-off-by: Robin Linden <dev@robinlinden.eu>
commit 5e0f8347cebef2b3a9f5d75ca254aabaa0bca259
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Oct 8 10:48:25 2023 -0700
XcursorXcFileLoad: plug memory leak in error paths
Found by gcc analyzer:
file.c: In function XcursorXcFileLoad:
file.c:782:8: warning: leak of fileHeader [CWE-401] [-Wanalyzer-malloc-leak]
782 | if (!images)
| ^
Fixes: 3b84b14 ("Initial revision")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 9c1b50ed98d354488329c99bc8bf77d1c6df657c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jul 8 11:07:03 2023 -0700
Add comment about keeping libxcb-cursor copy of code in sync
_XcursorThemeInherits, XcursorWhite, & XcursorSep are copied in
libxcb-cursor/cursor/load_cursor.c and should be kept in sync
with changes to the libXcursor originals of those.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit a353f02a7ac4504ad5edb5407278c7a03c507aef
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 25 12:14:36 2023 -0700
If O_CLOEXEC is defined, add "e" to fopen modes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 81dc4a481b64499ab7c355ee43c91e4fe0767545
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 4 10:44:45 2023 -0800
configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.
Clears autoconf warnings:
configure.ac:42: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:42: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:42: the top level
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 87a30b1758b7757dd74d0a70e871d7af1cac3a44
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 28 17:30:21 2022 -0700
gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 27adb16027fa99d83818a0ed9f6623cb03f0c574 commit 27adb16027fa99d83818a0ed9f6623cb03f0c574
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 3 09:55:44 2022 -0700 Date: Sun Apr 3 09:55:44 2022 -0700

View file

@ -211,7 +211,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@

View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. 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'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then if test -n "$RANLIB"; then
case $host_os in case $host_os in
openbsd* | secbsd*) openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;; ;;
*) *)
@ -1651,7 +1651,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192; lt_cv_sys_max_cmd_len=8192;
;; ;;
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*) netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further. # This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@ -2734,7 +2734,7 @@ newsos6)
dynamic_linker='ldqnx.so' dynamic_linker='ldqnx.so'
;; ;;
openbsd* | secbsd*) openbsd*)
version_type=sunos version_type=sunos
sys_lib_dlsearch_path_spec="/usr/lib" sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no need_lib_prefix=no
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
i*86 ) i*86 )
# Not sure whether the presence of OpenBSD here was a mistake. # Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up. # Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|SecBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;; ;;
@ -3320,7 +3320,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
openbsd* | secbsd*) openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else else
@ -4650,7 +4650,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++) # we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes with_gnu_ld=yes
;; ;;
openbsd* | secbsd*) openbsd*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
esac esac
@ -5377,7 +5377,7 @@ _LT_EOF
*nto* | *qnx*) *nto* | *qnx*)
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -6581,7 +6581,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no _LT_TAGVAR(ld_shlibs, $1)=no
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -9905,7 +9905,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a 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 copy of this software and associated documentation files (the "Software"),
@ -9942,7 +9942,7 @@ dnl DEALINGS IN THE SOFTWARE.
# 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. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 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_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -9963,7 +9963,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files # such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[ AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP]) AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) [$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, # Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -9989,10 +9989,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -10273,7 +10273,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions # the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified, # as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'. # --with-xmlto assumes 'auto'.
# #
@ -10487,7 +10487,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions # the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified, # as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'. # --with-asciidoc assumes 'auto'.
# #
@ -10557,7 +10557,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions # the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified, # as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'. # --with-doxygen assumes 'auto'.
# #
@ -10641,7 +10641,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions # the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified, # as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'. # --with-groff assumes 'auto'.
# #
@ -10749,7 +10749,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions # the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified, # as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'. # --with-fop assumes 'auto'.
# #
@ -10843,7 +10843,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes # 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 # not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with # presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions # the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified, # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'. # --with-ps2pdf assumes 'auto'.
# #
@ -10898,7 +10898,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all # not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages. # documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -10931,7 +10931,7 @@ AC_MSG_RESULT([$build_docs])
# #
# This macro enables a builder to skip all developer documentation. # This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -10964,7 +10964,7 @@ AC_MSG_RESULT([$build_devel_docs])
# #
# This macro enables a builder to skip all functional specification targets. # This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides # Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building. # maximum flexibility in controlling documentation building.
# Refer to: # Refer to:
# XORG_WITH_XMLTO --with-xmlto # XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_ASCIIDOC --with-asciidoc
@ -11353,7 +11353,7 @@ AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
# Obtain platform specific info like program name and options # Obtain platform specific info like program name and options
# The lint program on FreeBSD and NetBSD is different from the one on Solaris # The lint program on FreeBSD and NetBSD is different from the one on Solaris
case $host_os in case $host_os in
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*) *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
lint_name=splint lint_name=splint
lint_options="-badflag" lint_options="-badflag"
;; ;;
@ -11439,7 +11439,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [ AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
], ],
[C++], [ [C++], [
AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXX])
@ -11455,7 +11459,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0 # Minimum version: 1.16.0
# #
# Test if the compiler works when passed the given flag as a command line argument. # Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the # If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options. # next flag in the list until there are no more options.
# #
# Note that this does not guarantee that the compiler supports the flag as some # Note that this does not guarantee that the compiler supports the flag as some
@ -11471,7 +11475,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE( AC_LANG_CASE(
[C], [ [C], [
AC_REQUIRE([AC_PROG_CC_C99]) dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C]) define([PREFIX], [C])
define([CACHE_PREFIX], [cc]) define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC]) define([COMPILER], [$CC])
@ -11612,7 +11620,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds # Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed. # when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -11721,23 +11729,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION ]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS # XORG_DEFAULT_NOCODE_OPTIONS
# -------------------- # ---------------------------
# Minimum version: 1.3.0 # Minimum version: 1.20.0
# #
# Defines default options for X.Org modules. # Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
# #
AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL]) AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION XORG_RELEASE_VERSION
XORG_CHANGELOG XORG_CHANGELOG
XORG_INSTALL XORG_INSTALL
XORG_MANPAGE_SECTIONS XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS ]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL() # XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'. # Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -53,7 +53,7 @@ func_file_conv ()
MINGW*) MINGW*)
file_conv=mingw file_conv=mingw
;; ;;
CYGWIN*) CYGWIN* | MSYS*)
file_conv=cygwin file_conv=cygwin
;; ;;
*) *)
@ -67,7 +67,7 @@ func_file_conv ()
mingw/*) mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;; ;;
cygwin/*) cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"` file=`cygpath -m "$file" || echo "$file"`
;; ;;
wine/*) wine/*)
@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion" echo "compile $scriptversion"
exit $? exit $?
;; ;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return... func_cl_wrapper "$@" # Doesn't return...
;; ;;
esac esac
@ -339,9 +340,9 @@ exit $ret
# Local Variables: # Local Variables:
# mode: shell-script # mode: shell-script
# sh-indentation: 2 # sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

File diff suppressed because it is too large Load diff

View file

@ -6,12 +6,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -30,6 +33,9 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define to 1 if you have Xfixes */ /* Define to 1 if you have Xfixes */
#undef HAVE_XFIXES #undef HAVE_XFIXES
@ -67,28 +73,96 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */ /* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
# undef _ALL_SOURCE # undef _ALL_SOURCE
#endif #endif
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable GNU extensions on systems that have them. */ /* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Enable threading extensions on Solaris. */ /* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS
#endif #endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */ /* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE #ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE # undef _TANDEM_SOURCE
#endif #endif
/* Enable general extensions on Solaris. */ /* Enable X/Open extensions. Define to 500 only if necessary
#ifndef __EXTENSIONS__ to make mbstate_t available. */
# undef __EXTENSIONS__ #ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif #endif
@ -103,13 +177,3 @@
/* Micro revision of libXcursor */ /* Micro revision of libXcursor */
#undef XCURSOR_LIB_REVISION #undef XCURSOR_LIB_REVISION
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

File diff suppressed because it is too large Load diff

8643
lib/libXcursor/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -26,12 +26,15 @@ AC_PREREQ([2.60])
# This is the package version number, not the shared library # This is the package version number, not the shared library
# version. This version number will be substituted into Xcursor.h # version. This version number will be substituted into Xcursor.h
# #
AC_INIT([libXcursor], [1.2.1], AC_INIT([libXcursor], [1.2.2],
[https://gitlab.freedesktop.org/xorg/lib/libXcursor/issues],[libXcursor]) [https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/issues],
[libXcursor])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h]) AC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h])
AC_CONFIG_MACRO_DIRS([m4])
# Set common system defines for POSIX extensions, such as _GNU_SOURCE # Set common system defines for POSIX extensions, such as _GNU_SOURCE
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) # Must be called before any macros that run the compiler (like LT_INIT)
# to avoid autoconf errors. # to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
@ -39,7 +42,7 @@ AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([foreign dist-xz]) AM_INIT_AUTOMAKE([foreign dist-xz])
# Initialize libtool # Initialize libtool
AC_PROG_LIBTOOL LT_INIT
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION], m4_ifndef([XORG_MACROS_VERSION],

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd= chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit. --version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time) -C install only if different (preserve data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER. -o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files. -s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
" "
while test $# -ne 0; do while test $# -ne 0; do
@ -143,8 +143,7 @@ while test $# -ne 0; do
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2 echo "$0: invalid mode: $mode" >&2
exit 1;; exit 1;;
esac esac
@ -153,16 +152,23 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities. # Protect names problematic for 'test' and other utilities.
case $dst_arg in case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;; -* | [=\(\)!]) dst_arg=./$dst_arg;;
esac esac
shift;; shift;;
-T) no_target_directory=true;; -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
@ -177,6 +183,16 @@ while test $# -ne 0; do
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@ -250,6 +275,10 @@ do
dstdir=$dst dstdir=$dst
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,70 +295,36 @@ do
fi fi
dst=$dst_arg dst=$dst_arg
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename.
# if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
fi fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false obsolete_mkdir_used=false
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. # With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask. # Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
@ -339,43 +334,49 @@ do
fi fi
posix_mkdir=false posix_mkdir=false
case $umask in # The $RANDOM variable is not portable (e.g., dash). Use it
*[123567][0-7][0-7]) # here however when possible just to lower collision chance.
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask && if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 $mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then then
if test -z "$dir_arg" || { if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m. # Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't. # other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"` test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;; d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;; d????-?--*) different_mode=755;;
*) false;; *) false;;
esac && esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && { $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"` ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
} }
} }
then posix_mkdir=: then posix_mkdir=:
fi fi
rmdir "$tmpdir/d" "$tmpdir" rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else else
# Remove any dirs left behind by ancient mkdir implementations. # Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi fi
trap '' 0;; trap '' 0;;
esac;;
esac esac
if if
@ -386,7 +387,7 @@ do
then : then :
else else
# The umask is ridiculous, or mkdir does not conform to POSIX, # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the # or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
@ -396,14 +397,12 @@ do
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
@ -417,7 +416,7 @@ do
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
@ -450,14 +449,25 @@ do
else else
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=${dstdirslash}_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && (umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -474,18 +484,22 @@ do
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
rm -f "$dsttmp" rm -f "$dsttmp"
else else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination. # Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -500,9 +514,9 @@ do
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
@ -519,9 +533,9 @@ do
done done
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:

8400
lib/libXcursor/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load diff

437
lib/libXcursor/m4/ltoptions.m4 vendored Normal file
View file

@ -0,0 +1,437 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# 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.
# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option '$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
[_LT_WITH_AIX_SONAME([aix])])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the 'shared' and
# 'disable-shared' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the 'static' and
# 'disable-static' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the 'fast-install'
# and 'disable-fast-install' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the 'fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the 'disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
AC_ARG_WITH([aix-soname],
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
with_aix_soname=$lt_cv_with_aix_soname])
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
# the AIX toolchain works better with OBJECT_MODE set (default 32).
if test 64 = "${OBJECT_MODE-32}"; then
shared_archive_member_spec=shr_64
else
shared_archive_member_spec=shr
fi
fi
;;
*)
with_aix_soname=aix
;;
esac
_LT_DECL([], [shared_archive_member_spec], [0],
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
])# _LT_WITH_AIX_SONAME
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the 'pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

124
lib/libXcursor/m4/ltsugar.m4 vendored Normal file
View file

@ -0,0 +1,124 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# 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.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

24
lib/libXcursor/m4/ltversion.m4 vendored Normal file
View file

@ -0,0 +1,24 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
# 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.
# @configure_input@
# serial 4245 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.7])
m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.7'
macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

99
lib/libXcursor/m4/lt~obsolete.m4 vendored Normal file
View file

@ -0,0 +1,99 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# 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.
# serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View file

@ -127,7 +127,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@

View file

@ -167,7 +167,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@

View file

@ -146,7 +146,7 @@ _XcursorPixelToColor (XcursorPixel p, XColor *color)
static void static void
_XcursorDumpImage (XImage *image) _XcursorDumpImage (XImage *image)
{ {
FILE *f = fopen ("/tmp/images", "a"); FILE *f = fopen ("/tmp/images", "a" FOPEN_CLOEXEC);
int x, y; int x, y;
if (!f) if (!f)
return; return;
@ -164,7 +164,7 @@ _XcursorDumpImage (XImage *image)
static void static void
_XcursorDumpColor (XColor *color, char *name) _XcursorDumpColor (XColor *color, char *name)
{ {
FILE *f = fopen ("/tmp/images", "a"); FILE *f = fopen ("/tmp/images", "a" FOPEN_CLOEXEC);
fprintf (f, "%s: %x %x %x\n", name, fprintf (f, "%s: %x %x %x\n", name,
color->red, color->green, color->blue); color->red, color->green, color->blue);
fflush (f); fflush (f);

View file

@ -780,10 +780,14 @@ XcursorXcFileLoad (XcursorFile *file,
} }
images = XcursorImagesCreate (nimage); images = XcursorImagesCreate (nimage);
if (!images) if (!images)
{
_XcursorFileHeaderDestroy (fileHeader);
return 0; return 0;
}
comments = XcursorCommentsCreate (ncomment); comments = XcursorCommentsCreate (ncomment);
if (!comments) if (!comments)
{ {
_XcursorFileHeaderDestroy (fileHeader);
XcursorImagesDestroy (images); XcursorImagesDestroy (images);
return 0; return 0;
} }
@ -1019,7 +1023,7 @@ XcursorFilenameLoadImage (const char *file, int size)
if (!file || size < 0) if (!file || size < 0)
return NULL; return NULL;
f = fopen (file, "r"); f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f) if (!f)
return NULL; return NULL;
image = XcursorFileLoadImage (f, size); image = XcursorFileLoadImage (f, size);
@ -1036,7 +1040,7 @@ XcursorFilenameLoadImages (const char *file, int size)
if (!file || size < 0) if (!file || size < 0)
return NULL; return NULL;
f = fopen (file, "r"); f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f) if (!f)
return NULL; return NULL;
images = XcursorFileLoadImages (f, size); images = XcursorFileLoadImages (f, size);
@ -1053,7 +1057,7 @@ XcursorFilenameLoadAllImages (const char *file)
if (!file) if (!file)
return NULL; return NULL;
f = fopen (file, "r"); f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f) if (!f)
return NULL; return NULL;
images = XcursorFileLoadAllImages (f); images = XcursorFileLoadAllImages (f);
@ -1072,7 +1076,7 @@ XcursorFilenameLoad (const char *file,
if (!file) if (!file)
return XcursorFalse; return XcursorFalse;
f = fopen (file, "r"); f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f) if (!f)
return 0; return 0;
ret = XcursorFileLoad (f, commentsp, imagesp); ret = XcursorFileLoad (f, commentsp, imagesp);
@ -1089,7 +1093,7 @@ XcursorFilenameSaveImages (const char *file, const XcursorImages *images)
if (!file || !images) if (!file || !images)
return XcursorFalse; return XcursorFalse;
f = fopen (file, "w"); f = fopen (file, "w" FOPEN_CLOEXEC);
if (!f) if (!f)
return 0; return 0;
ret = XcursorFileSaveImages (f, images); ret = XcursorFileSaveImages (f, images);
@ -1107,7 +1111,7 @@ XcursorFilenameSave (const char *file,
if (!file || !comments || !images) if (!file || !comments || !images)
return XcursorFalse; return XcursorFalse;
f = fopen (file, "w"); f = fopen (file, "w" FOPEN_CLOEXEC);
if (!f) if (!f)
return 0; return 0;
ret = XcursorFileSave (f, comments, images); ret = XcursorFileSave (f, comments, images);

View file

@ -159,6 +159,12 @@ _XcursorNextPath (const char *path)
return colon + 1; return colon + 1;
} }
/*
* _XcursorThemeInherits, XcursorWhite, & XcursorSep are copied in
* libxcb-cursor/cursor/load_cursor.c. Please update that copy to
* include any changes made to the code for those here.
*/
#define XcursorWhite(c) ((c) == ' ' || (c) == '\t' || (c) == '\n') #define XcursorWhite(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
#define XcursorSep(c) ((c) == ';' || (c) == ',') #define XcursorSep(c) ((c) == ';' || (c) == ',')
@ -172,7 +178,7 @@ _XcursorThemeInherits (const char *full)
if (!full) if (!full)
return NULL; return NULL;
f = fopen (full, "r"); f = fopen (full, "r" FOPEN_CLOEXEC);
if (f) if (f)
{ {
while (fgets (line, sizeof (line), f)) while (fgets (line, sizeof (line), f))
@ -254,7 +260,7 @@ XcursorScanTheme (const char *theme, const char *name)
full = _XcursorBuildFullname (dir, "cursors", name); full = _XcursorBuildFullname (dir, "cursors", name);
if (full) if (full)
{ {
f = fopen (full, "r"); f = fopen (full, "r" FOPEN_CLOEXEC);
free (full); free (full);
} }
if (!f && inherits[d + 1].line == NULL) if (!f && inherits[d + 1].line == NULL)

View file

@ -36,7 +36,13 @@
#endif #endif
#include "Xcursor.h" #include "Xcursor.h"
#include "config.h"
#include <fcntl.h>
#ifdef O_CLOEXEC
#define FOPEN_CLOEXEC "e"
#else
#define FOPEN_CLOEXEC ""
#endif
typedef struct _XcursorFontInfo { typedef struct _XcursorFontInfo {
struct _XcursorFontInfo *next; struct _XcursorFontInfo *next;

View file

@ -1,3 +1,114 @@
commit 1192d3bc407348ff316bd3bffc791b3ac73f591b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 2 13:31:40 2024 -0800
libXdmcp 1.1.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit fa41f9bfd7a0e57ba3e0f40d9a96e1dba1deeb4a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 23 12:23:17 2023 -0700
gitlab CI: add xz-utils to container for "make distcheck"
Also update to latest ci-templates
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 2ed49718a8ff8710bfebf6c286df9e3b5df754c2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 23 12:16:29 2023 -0700
XdmcpWriteHeader: use calloc instead of malloc to alloc buffer
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit f59fbae7a1890b243c69f0ff20099c6d6aa93c4e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 23 12:11:31 2023 -0700
XdmcpWriteHeader: drop unnecessary cast of free() argument
Clears clang complaint:
Write.c:48:7: warning: cast from 'BYTE *' (aka 'unsigned char *') to
'unsigned long *' increases required alignment from 1 to 8 [-Wcast-align]
free((unsigned long *)(buffer->data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 6e6917dd5918f5ae520f71e53128eee3267656b8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Sep 23 12:00:08 2023 -0700
Clear -Wunused-macros warnings when arc4random_buf() is available
Reported by clang:
Key.c:46:9: warning: macro is not used [-Wunused-macros]
#define Time_t time_t
^
Key.c:52:9: warning: macro is not used [-Wunused-macros]
#define random lrand48
^
Key.c:51:9: warning: macro is not used [-Wunused-macros]
#define srandom srand48
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit f431e5b6c266a751dfabb19be286baf08393516a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 30 10:48:58 2023 -0700
Xdmcp.h: add access attributes to function prototypes
May aid in static analysis by gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit eaceeee93c3b9310be5422b9ed0450265779b491
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 4 10:44:45 2023 -0800
configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.
Clears autoconf warnings:
configure.ac:38: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:38: You should run autoupdate.
aclocal.m4:11889: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:38: the top level
configure.ac:38: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:38: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:11889: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:38: the top level
configure.ac:39: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:39: You should run autoupdate.
aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from...
configure.ac:39: the top level
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 45d7acc61ce08280dead99e1fb57ad07ca7eca1b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Feb 25 09:22:37 2023 -0800
Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7f5677e87df575298f62320d76408823b54cd883 commit 7f5677e87df575298f62320d76408823b54cd883
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Nov 18 15:05:39 2022 -0800 Date: Fri Nov 18 15:05:39 2022 -0800

View file

@ -31,6 +31,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>
#include <X11/Xdmcp.h> #include <X11/Xdmcp.h>
#include <stdlib.h>
#ifndef HAVE_ARC4RANDOM_BUF #ifndef HAVE_ARC4RANDOM_BUF
static void static void
@ -41,12 +42,9 @@ getbits (long data, unsigned char *dst)
dst[2] = (data >> 16) & 0xff; dst[2] = (data >> 16) & 0xff;
dst[3] = (data >> 24) & 0xff; dst[3] = (data >> 24) & 0xff;
} }
#endif
#define Time_t time_t #define Time_t time_t
#include <stdlib.h>
#if defined(HAVE_LRAND48) && defined(HAVE_SRAND48) #if defined(HAVE_LRAND48) && defined(HAVE_SRAND48)
#define srandom srand48 #define srandom srand48
#define random lrand48 #define random lrand48
@ -58,8 +56,6 @@ getbits (long data, unsigned char *dst)
#define getpid(x) _getpid(x) #define getpid(x) _getpid(x)
#endif #endif
#ifndef HAVE_ARC4RANDOM_BUF
/* Solaris 11.3.0 - 11.4.15 only define getentropy() in <sys/random.h> */ /* Solaris 11.3.0 - 11.4.15 only define getentropy() in <sys/random.h> */
#if HAVE_GETENTROPY && HAVE_SYS_RANDOM_H #if HAVE_GETENTROPY && HAVE_SYS_RANDOM_H
# include <sys/random.h> # include <sys/random.h>

View file

@ -232,7 +232,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@

View file

@ -42,10 +42,10 @@ XdmcpWriteHeader (
if ((int)buffer->size < 6 + (int)header->length) if ((int)buffer->size < 6 + (int)header->length)
{ {
newData = (BYTE *) malloc(XDM_MAX_MSGLEN * sizeof (BYTE)); newData = calloc(XDM_MAX_MSGLEN, sizeof (BYTE));
if (!newData) if (!newData)
return FALSE; return FALSE;
free((unsigned long *)(buffer->data)); free(buffer->data);
buffer->data = newData; buffer->data = newData;
buffer->size = XDM_MAX_MSGLEN; buffer->size = XDM_MAX_MSGLEN;
} }

View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.69. [m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. 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'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then if test -n "$RANLIB"; then
case $host_os in case $host_os in
openbsd* | secbsd*) openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;; ;;
*) *)
@ -1651,7 +1651,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192; lt_cv_sys_max_cmd_len=8192;
;; ;;
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*) netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further. # This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@ -2734,7 +2734,7 @@ newsos6)
dynamic_linker='ldqnx.so' dynamic_linker='ldqnx.so'
;; ;;
openbsd* | secbsd*) openbsd*)
version_type=sunos version_type=sunos
sys_lib_dlsearch_path_spec="/usr/lib" sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no need_lib_prefix=no
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
i*86 ) i*86 )
# Not sure whether the presence of OpenBSD here was a mistake. # Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up. # Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|SecBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;; ;;
@ -3320,7 +3320,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
openbsd* | secbsd*) openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else else
@ -4650,7 +4650,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++) # we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes with_gnu_ld=yes
;; ;;
openbsd* | secbsd*) openbsd*)
with_gnu_ld=no with_gnu_ld=no
;; ;;
esac esac
@ -5377,7 +5377,7 @@ _LT_EOF
*nto* | *qnx*) *nto* | *qnx*)
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -6581,7 +6581,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no _LT_TAGVAR(ld_shlibs, $1)=no
;; ;;
openbsd* | secbsd*) openbsd*)
if test -f /usr/libexec/ld.so; then if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@ -9942,7 +9942,7 @@ dnl DEALINGS IN THE SOFTWARE.
# 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. # version you require.
m4_defun([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.20.0]) m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 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_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -9989,10 +9989,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional" TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
@ -11353,7 +11353,7 @@ AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
# Obtain platform specific info like program name and options # Obtain platform specific info like program name and options
# The lint program on FreeBSD and NetBSD is different from the one on Solaris # The lint program on FreeBSD and NetBSD is different from the one on Solaris
case $host_os in case $host_os in
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*) *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
lint_name=splint lint_name=splint
lint_options="-badflag" lint_options="-badflag"
;; ;;
@ -11610,7 +11610,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# These are currently disabled because they are noisy. They will be enabled # These are currently disabled because they are noisy. They will be enabled

File diff suppressed because it is too large Load diff

View file

@ -21,8 +21,8 @@
/* Define to 1 if you have the `lrand48' function. */ /* Define to 1 if you have the `lrand48' function. */
#undef HAVE_LRAND48 #undef HAVE_LRAND48
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the `srand48' function. */ /* Define to 1 if you have the `srand48' function. */
#undef HAVE_SRAND48 #undef HAVE_SRAND48
@ -30,6 +30,9 @@
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
@ -51,6 +54,9 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/ */
#undef LT_OBJDIR #undef LT_OBJDIR
@ -85,40 +91,98 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */ /* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
# undef _ALL_SOURCE # undef _ALL_SOURCE
#endif #endif
/* Enable GNU extensions on systems that have them. */ /* Enable general extensions on macOS. */
#ifndef _GNU_SOURCE #ifndef _DARWIN_C_SOURCE
# undef _GNU_SOURCE # undef _DARWIN_C_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif #endif
/* Enable general extensions on Solaris. */ /* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__ #ifndef __EXTENSIONS__
# undef __EXTENSIONS__ # undef __EXTENSIONS__
#endif #endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable X/Open extensions. Define to 500 only if necessary
to make mbstate_t available. */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

3112
lib/libXdmcp/config.sub vendored

File diff suppressed because it is too large Load diff

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