sync with OpenBSD -current
This commit is contained in:
parent
81739016d9
commit
48226b7c51
178 changed files with 76551 additions and 36405 deletions
|
@ -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
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Mar 15 16:29:53 2023 -0700
|
||||
|
@ -1909,7 +2288,7 @@ Date: Sun Jan 31 17:43:29 2010 -0500
|
|||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit ceaf6f7f0e516b1479744df421de404b1decc556
|
||||
Author: Rémi Cardona <remi@gentoo.org>
|
||||
Author: Rémi Cardona <remi@gentoo.org>
|
||||
Date: Thu Dec 17 08:28:30 2009 +0100
|
||||
|
||||
require autoconf 2.60 because of $(docdir) use
|
||||
|
@ -2567,7 +2946,7 @@ Date: Sat Jul 9 06:11:58 2005 +0000
|
|||
libraries not yet installed will work properly.
|
||||
|
||||
commit 5fc8851308321a65a6987aedea6618d056ff7879
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Wed Jul 6 19:26:27 2005 +0000
|
||||
|
||||
- Xaw/xaw.m4: Change help string to say "enable xprint" instead of "disable
|
||||
|
@ -2578,7 +2957,7 @@ Date: Wed Jul 6 19:26:27 2005 +0000
|
|||
- remove font/arabic-misc/README and font/mutt-misc/README
|
||||
|
||||
commit d4f214b6255184a2cbf571c02409a0e3f4405fb0
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Tue Jul 5 22:51:11 2005 +0000
|
||||
|
||||
Add build systems for xlogo, xlsatoms, xlsclients, xmag, xman, xmessage,
|
||||
|
@ -2599,7 +2978,7 @@ Date: Sun Jul 3 07:00:56 2005 +0000
|
|||
<X11/fonts/foo.h>.
|
||||
|
||||
commit f8e7a4ec6117006123dfdc7c970f9f1392bf7d84
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Tue Jun 28 13:30:15 2005 +0000
|
||||
|
||||
lib/Xaw/Makefile.am: install the libXaw.so symlink in $(DESTDIR)$(libdir) -
|
||||
|
@ -2607,7 +2986,7 @@ Date: Tue Jun 28 13:30:15 2005 +0000
|
|||
lib/Xaw/man/Makefile.am: add Xaw.man to EXTRA_DIST to make it distcheck.
|
||||
|
||||
commit c35ec1561bfc9bf8d79b68a071619f4904764002
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Mon Jun 27 21:35:04 2005 +0000
|
||||
|
||||
- Fix string test in lib/Xaw/xaw.m4
|
||||
|
@ -2615,26 +2994,26 @@ Date: Mon Jun 27 21:35:04 2005 +0000
|
|||
- add build system for editres
|
||||
|
||||
commit f6c298f70e13ecf37b4824f6ac01007b876dd3cb
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Fri Jun 24 22:54:24 2005 +0000
|
||||
|
||||
Add m4 macro to check for versions of the Xaw library
|
||||
|
||||
commit e3e78cd7815716d8af729c19833bec51d7e3f19c
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Fri Jun 24 21:20:32 2005 +0000
|
||||
|
||||
Change the so names to libXaw{6,7,8}.so and install a symlink from
|
||||
libXaw.so to the newest version installed
|
||||
|
||||
commit cc658b573a13f36868c5a2263e0b3ff8d0230b86
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Mon May 23 21:47:37 2005 +0000
|
||||
|
||||
Conditionally include config.h in xc/lib/Xaw/*.c
|
||||
|
||||
commit 62b680d868fbe4bfdf1af6e6067d0ef27f773559
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Mon May 23 20:01:46 2005 +0000
|
||||
|
||||
Check in build system for Xaw
|
||||
|
@ -2675,7 +3054,7 @@ Date: Thu Sep 2 01:10:29 2004 +0000
|
|||
Bump major version number of libXaw (Bug #1273).
|
||||
|
||||
commit 93df4ff66635ea936d57723d317d0a0cdaa55e62
|
||||
Author: Kristian Høgsberg <krh@redhat.com>
|
||||
Author: Kristian Høgsberg <krh@redhat.com>
|
||||
Date: Mon Aug 16 16:36:14 2004 +0000
|
||||
|
||||
As discussed and agreed on on the release-wranglers meeting of August 16,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = include src man specs
|
||||
SUBDIRS = include src examples man specs
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA =
|
||||
|
|
|
@ -265,6 +265,7 @@ 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@
|
||||
|
@ -322,7 +323,7 @@ target_alias = @target_alias@
|
|||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = include src man specs
|
||||
SUBDIRS = include src examples man specs
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(am__append_1) $(am__append_2)
|
||||
@BUILD_XAW6_TRUE@@PLATFORM_DARWIN_FALSE@DEFAULT_LIB = libXaw6.@LIBEXT@
|
||||
|
|
24
lib/libXaw/aclocal.m4
vendored
24
lib/libXaw/aclocal.m4
vendored
|
@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
|
|||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
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;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*)
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -2734,7 +2734,7 @@ newsos6)
|
|||
dynamic_linker='ldqnx.so'
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
version_type=sunos
|
||||
sys_lib_dlsearch_path_spec="/usr/lib"
|
||||
need_lib_prefix=no
|
||||
|
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
|
|||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# 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_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
|
@ -3320,7 +3320,7 @@ newos6*)
|
|||
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
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
|
||||
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++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
@ -5377,7 +5377,7 @@ _LT_EOF
|
|||
*nto* | *qnx*)
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
# version you require.
|
||||
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_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
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_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])
|
||||
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"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
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
|
||||
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
|
||||
case $host_os in
|
||||
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
*linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
lint_name=splint
|
||||
lint_options="-badflag"
|
||||
;;
|
||||
|
|
1783
lib/libXaw/config.guess
vendored
1783
lib/libXaw/config.guess
vendored
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,12 @@
|
|||
/* Define to 1 if you have the `ws2_32' library (-lws2_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. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
|
|
2954
lib/libXaw/config.sub
vendored
2954
lib/libXaw/config.sub
vendored
File diff suppressed because it is too large
Load diff
220
lib/libXaw/configure
vendored
220
lib/libXaw/configure
vendored
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# 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>.
|
||||
#
|
||||
|
@ -682,8 +682,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='libXaw'
|
||||
PACKAGE_TARNAME='libXaw'
|
||||
PACKAGE_VERSION='1.0.15'
|
||||
PACKAGE_STRING='libXaw 1.0.15'
|
||||
PACKAGE_VERSION='1.0.16'
|
||||
PACKAGE_STRING='libXaw 1.0.16'
|
||||
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxaw/-/issues'
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
@ -724,6 +724,9 @@ ac_subst_vars='am__EXEEXT_FALSE
|
|||
am__EXEEXT_TRUE
|
||||
LTLIBOBJS
|
||||
LIBOBJS
|
||||
ENABLE_UNIT_TESTS_FALSE
|
||||
ENABLE_UNIT_TESTS_TRUE
|
||||
XORG_MALLOC_DEBUG_ENV
|
||||
BUILD_XAW7_FALSE
|
||||
BUILD_XAW7_TRUE
|
||||
BUILD_XAW6_FALSE
|
||||
|
@ -914,6 +917,7 @@ with_xsltproc
|
|||
enable_xaw6
|
||||
enable_xaw7
|
||||
enable_const
|
||||
enable_unit_tests
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
|
@ -932,7 +936,8 @@ XSLTPROC
|
|||
XAW6_CFLAGS
|
||||
XAW6_LIBS
|
||||
XAW7_CFLAGS
|
||||
XAW7_LIBS'
|
||||
XAW7_LIBS
|
||||
XORG_MALLOC_DEBUG_ENV'
|
||||
|
||||
|
||||
# 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.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
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]...
|
||||
|
||||
|
@ -1552,7 +1557,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of libXaw 1.0.15:";;
|
||||
short | recursive ) echo "Configuration of libXaw 1.0.16:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -1584,6 +1589,7 @@ Optional Features:
|
|||
--disable-xaw6 Disable building of libXaw.so.6
|
||||
--disable-xaw7 Disable building of libXaw.so.7
|
||||
--disable-const Disable const-support
|
||||
--enable-unit-tests Enable building unit test cases (default: no)
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
|
@ -1619,6 +1625,8 @@ Some influential environment variables:
|
|||
XAW6_LIBS linker flags for XAW6, overriding pkg-config
|
||||
XAW7_CFLAGS C compiler 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
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
@ -1687,7 +1695,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
libXaw configure 1.0.15
|
||||
libXaw configure 1.0.16
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
|
@ -1957,7 +1965,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by 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
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
|
@ -3195,7 +3203,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='libXaw'
|
||||
VERSION='1.0.15'
|
||||
VERSION='1.0.16'
|
||||
|
||||
|
||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||
|
@ -19643,7 +19651,190 @@ printf "%s\n" "#define _CONST_X_STRING 1" >>confdefs.h
|
|||
|
||||
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
|
||||
|
@ -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.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
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}"
|
||||
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
|
||||
# values after options handling.
|
||||
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
|
||||
|
||||
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
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
libXaw config.status 1.0.15
|
||||
libXaw config.status 1.0.16
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -20702,6 +20897,7 @@ do
|
|||
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
|
||||
"libtool_hack") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool_hack" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
|
||||
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
|
||||
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
|
||||
"specs/Makefile") CONFIG_FILES="$CONFIG_FILES specs/Makefile" ;;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
# Initialize Autoconf
|
||||
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])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
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.])
|
||||
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
|
||||
examples/Makefile
|
||||
include/Makefile
|
||||
man/Makefile
|
||||
specs/Makefile
|
||||
|
|
15
lib/libXaw/examples/Makefile.am
Normal file
15
lib/libXaw/examples/Makefile.am
Normal 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
|
774
lib/libXaw/examples/Makefile.in
Normal file
774
lib/libXaw/examples/Makefile.in
Normal 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:
|
52
lib/libXaw/examples/list.c
Normal file
52
lib/libXaw/examples/list.c
Normal 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);
|
||||
}
|
62
lib/libXaw/examples/menu.c
Normal file
62
lib/libXaw/examples/menu.c
Normal 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);
|
||||
}
|
84
lib/libXaw/examples/pane.c
Normal file
84
lib/libXaw/examples/pane.c
Normal 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);
|
||||
}
|
77
lib/libXaw/examples/repeater.c
Normal file
77
lib/libXaw/examples/repeater.c
Normal 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);
|
||||
}
|
72
lib/libXaw/examples/scrollbar.c
Normal file
72
lib/libXaw/examples/scrollbar.c
Normal 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);
|
||||
}
|
79
lib/libXaw/examples/simple.c
Normal file
79
lib/libXaw/examples/simple.c
Normal 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);
|
||||
}
|
51
lib/libXaw/examples/strip.c
Normal file
51
lib/libXaw/examples/strip.c
Normal 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);
|
||||
}
|
103
lib/libXaw/examples/toggle.c
Normal file
103
lib/libXaw/examples/toggle.c
Normal 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);
|
||||
}
|
45
lib/libXaw/examples/viewport.c
Normal file
45
lib/libXaw/examples/viewport.c
Normal 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);
|
||||
}
|
81
lib/libXaw/examples/xawhisto.c
Normal file
81
lib/libXaw/examples/xawhisto.c
Normal 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;
|
||||
}
|
|
@ -203,6 +203,7 @@ 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@
|
||||
|
|
|
@ -167,7 +167,7 @@ _XFUNCPROTOBEGIN
|
|||
void XawListChange
|
||||
(
|
||||
Widget w,
|
||||
_Xconst char **list,
|
||||
String *list,
|
||||
int nitems,
|
||||
int longest,
|
||||
#if NeedWidePrototypes
|
||||
|
|
51
lib/libXaw/m4/libtool.m4
vendored
51
lib/libXaw/m4/libtool.m4
vendored
|
@ -730,7 +730,6 @@ _LT_CONFIG_SAVE_COMMANDS([
|
|||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# 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.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
|
@ -2907,6 +2906,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||
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*)
|
||||
version_type=sunos
|
||||
need_lib_prefix=no
|
||||
|
@ -3566,7 +3577,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
|||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
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)$'
|
||||
else
|
||||
|
@ -4072,7 +4083,8 @@ _LT_EOF
|
|||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
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.
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
|
@ -4444,7 +4456,7 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
;;
|
||||
*qnx* | *nto*)
|
||||
# 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_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 10 doesn't accept -KPIC any more.
|
||||
icc* | ifort*)
|
||||
|
@ -4956,6 +4974,9 @@ m4_if([$1], [CXX], [
|
|||
;;
|
||||
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'
|
||||
;;
|
||||
|
@ -5018,6 +5039,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
|||
openbsd* | bitrig* | secbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
linux* | k*bsd*-gnu | gnu*)
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
|
@ -5253,6 +5277,7 @@ _LT_EOF
|
|||
|
||||
case $cc_basename in
|
||||
tcc*)
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
|
||||
;;
|
||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
|
@ -5273,7 +5298,7 @@ _LT_EOF
|
|||
fi
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
|
@ -5794,6 +5819,7 @@ _LT_EOF
|
|||
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'
|
||||
fi
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
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_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
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
_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
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
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
|
||||
else
|
||||
|
@ -6442,7 +6469,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
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
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
|
@ -6883,7 +6910,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# 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
|
||||
|
@ -7222,7 +7249,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# 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
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
|
@ -7317,7 +7344,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
|||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# 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
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||
|
|
|
@ -225,6 +225,7 @@ 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@
|
||||
|
|
|
@ -26,29 +26,24 @@
|
|||
.\"
|
||||
.\" 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__
|
||||
.de TQ
|
||||
.ns
|
||||
.TP
|
||||
..
|
||||
.de bP
|
||||
.ie n .IP \(bu 4
|
||||
.el .IP \(bu 2
|
||||
..
|
||||
.SH NAME
|
||||
Xaw \- X Athena Widgets
|
||||
Xaw \-
|
||||
X Athena Widgets
|
||||
.SH DESCRIPTION
|
||||
.B Xaw
|
||||
is a widget set based on the X Toolkit Intrinsics (Xt) Library. This
|
||||
release by the X.Org Foundation includes additions and modifications
|
||||
originally made for The XFree86 Project, Inc. This manual page describes
|
||||
is a widget set based on the X Toolkit Intrinsics (Xt) Library.
|
||||
This release by the X.Org Foundation includes additions and modifications
|
||||
originally made for The XFree86 Project, Inc.
|
||||
This manual page describes
|
||||
these changes as well as some of the common interfaces between its version
|
||||
and the previous X Consortium release (Xaw6).
|
||||
.PP
|
||||
|
@ -57,425 +52,549 @@ which may be installed in __docdir__, or found on the X.Org website.
|
|||
.SH ACTIONS
|
||||
All of the \fIXaw\fR widgets now have the additional translations
|
||||
.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
|
||||
.I action-name \fP(\fIboolean-expression\fP, \fIarguments\fP)
|
||||
.PP
|
||||
\fBAction-name\fP is one of \fIcall-proc\fP, \fIdeclare\fP,
|
||||
\fIget-values\fP or \fIset-values\fP.
|
||||
\fIaction-name\fP is one of \fBcall-proc\fP, \fBdeclare\fP,
|
||||
\fBget-values\fP or \fBset-values\fP.
|
||||
.PP
|
||||
\fBBoolean-expression\fP is composed with the operators \fI|\fR (or), \fI&\fR
|
||||
(and), \fI^\fR (xor), and \fI~\fR (not). The operands can be a variable name,
|
||||
which starts with a \fI$\fR; a resource name without the bindings \fI.\fP
|
||||
or \fI*\fP; or a constant name, including \fImine\fP (event->xany.window
|
||||
== XtWindow(widget)), \fIfaked\fP (event->xany.send_event != 0), \fItrue\fP (1)
|
||||
and \fIfalse\fP (0).
|
||||
\fIboolean-expression\fP is composed with the operators
|
||||
.RS
|
||||
.TP
|
||||
\fB|\fR (or),
|
||||
.TP
|
||||
\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
|
||||
\fBArguments\fP are self-explanatory; when starting with a \fI$\fP they name
|
||||
a variable, otherwise, they indicate a resource name.
|
||||
\fIarguments\fP are self-explanatory:
|
||||
.RS
|
||||
.bP
|
||||
when starting with a \fI$\fP they name a variable,
|
||||
.bP
|
||||
otherwise they indicate a resource name.
|
||||
.RE
|
||||
.TP 8
|
||||
.B call-proc \fP(\fIboolean-expression\fP, \fIprocedure-name\fP)
|
||||
This action allows the evaluation of a boolean expression in the first
|
||||
parameter before calling a action procedure. The procedure is only called
|
||||
if the expression evaluates as true. Example:
|
||||
parameter before calling a action procedure.
|
||||
The procedure is only called if the expression evaluates as true.
|
||||
Example:
|
||||
.EX
|
||||
call-proc("$inside & $pressed", notify)
|
||||
\fBcall-proc\fP("$inside & $pressed", notify)
|
||||
.EE
|
||||
.TP 8
|
||||
.B declare \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
|
||||
This action is used to create new variables or change their values. Any
|
||||
number of variable-value tuples may be specified. Example:
|
||||
This action is used to create new variables or change their values.
|
||||
Any number of variable-value tuples may be specified.
|
||||
Example:
|
||||
.EX
|
||||
declare(1, $pressed, 1)
|
||||
\fBdeclare\fP(1, $pressed, 1)
|
||||
.EE
|
||||
.TP 8
|
||||
.B get-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
|
||||
This action reads a widget resource value into a variable. Any number of
|
||||
variable-value tuples may be specified. Example:
|
||||
This action reads a widget resource value into a variable.
|
||||
Any number of variable-value tuples may be specified.
|
||||
Example:
|
||||
.EX
|
||||
get-values(1, $fg, foreground, $bg, background)
|
||||
\fBget-values\fP(1, $fg, foreground, $bg, background)
|
||||
.EE
|
||||
.TP 8
|
||||
.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
|
||||
variable. Any number of variable-value tuples may be specified. Example:
|
||||
variable.
|
||||
Any number of variable-value tuples may be specified.
|
||||
Example:
|
||||
.EX
|
||||
set-values(1, foreground, $bg, background, $fg)
|
||||
\fBset-values\fP(1, foreground, $bg, background, $fg)
|
||||
.EE
|
||||
.ne 5
|
||||
.PP
|
||||
Here is a sample translation to make a label widget behave like a button:
|
||||
.PP
|
||||
.nf
|
||||
.EX
|
||||
<Map>: get-values(1, $fg, foreground, $bg, background)\en\e
|
||||
<Btn1Down>: set-values(1, foreground, yellow, background, gray30)\en\e
|
||||
<Btn1Up>: set-values(1, foreground, $fg, background, $bg)
|
||||
.fi
|
||||
.EE
|
||||
.SH DISPLAY LISTS
|
||||
All of the \fBXaw\fP widgets have now the additional resource
|
||||
\fIdisplayList\fP. This resource allows drawing the widget decorations
|
||||
using commands embedded in a resource string. The displayList resource has
|
||||
the syntax:
|
||||
\fIdisplayList\fP.
|
||||
This resource allows drawing the widget decorations
|
||||
using commands embedded in a resource string.
|
||||
The displayList resource has the syntax:
|
||||
.PP
|
||||
\fI[class-name:]function-name arguments[[{;\en}]...]\fP
|
||||
.PP
|
||||
\fBClass-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
|
||||
\fIclass-name\fP is any registered set of functions to draw in the widget.
|
||||
Currently the only existing class is \fBxlib\fP, which provides access to
|
||||
the Xlib drawing primitives.
|
||||
.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.
|
||||
.PP
|
||||
\fBArguments\fP may be anything suitable to the displayList function being
|
||||
called. When the function requires a coordinate, the syntax is
|
||||
\fI{+-}<integer>\fP or \fI<integer>/<integer>\fP. Examples:
|
||||
.nf
|
||||
+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:
|
||||
\fIarguments\fP may be anything suitable to the displayList function being
|
||||
called.
|
||||
When the function requires a coordinate, the syntax is
|
||||
.IP
|
||||
.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
|
||||
.TP 8
|
||||
.B bg \fPcolor-spec
|
||||
.B bg \fIcolor-spec
|
||||
.TQ
|
||||
.B background \fPcolor-spec
|
||||
Sets the background color. \fIcolor-spec\fP must a valid color
|
||||
specification. Example:
|
||||
.B background \fIcolor-spec
|
||||
Sets the background color.
|
||||
\fIcolor-spec\fP must a valid color
|
||||
specification.
|
||||
Example:
|
||||
.EX
|
||||
background red
|
||||
\fBbackground\fP red
|
||||
.EE
|
||||
.TP 8
|
||||
.B cap-style \fPstyle
|
||||
Sets the cap style. Accepted \fIstyle\fPs are "notlast", "butt", "round",
|
||||
.B cap-style \fIstyle
|
||||
Sets the cap style.
|
||||
Accepted \fIstyle\fPs are "notlast", "butt", "round",
|
||||
and "projecting", which set the cap style to CapNotLast, CapBut, CapRound
|
||||
or CapProjecting, respectively. Example:
|
||||
or CapProjecting, respectively.
|
||||
Example:
|
||||
.EX
|
||||
cap-style round
|
||||
\fBcap-style\fP round
|
||||
.EE
|
||||
.TP 8
|
||||
.B clip-mask \fPpixmap-spec
|
||||
Sets the pixmap for the clip mask. Requires a pixmap parameter, as
|
||||
described in the \fBPIXMAPS\fP section below. Example:
|
||||
.B clip-mask \fIpixmap-spec
|
||||
Sets the pixmap for the clip mask.
|
||||
Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
|
||||
Example:
|
||||
.EX
|
||||
clip-mask xlogo11
|
||||
\fBclip-mask\fP xlogo11
|
||||
.EE
|
||||
.TP 8
|
||||
.B clip-origin \fPx,y
|
||||
Sets the clip x and y origin. Requires two arguments, the x and y
|
||||
coordinates. Example:
|
||||
.B clip-origin \fIx,y
|
||||
Sets the clip x and y origin.
|
||||
Requires two arguments, the x and y coordinates.
|
||||
Example:
|
||||
.EX
|
||||
clip-origin 10,10
|
||||
\fBclip-origin\fP 10,10
|
||||
.EE
|
||||
.TP 8
|
||||
.B clip-rects \fPx1,y1,x2,y2 [...,xn,yn]
|
||||
.TQ
|
||||
.B clip-rectangles \fPx1,y1,x2,y2 [...,xn,yn]
|
||||
Sets a list of rectangles to the clip mask. The number of arguments must
|
||||
be a multiple of four. The arguments are coordinates. The parser
|
||||
calculates the width and height of the rectangles. Example:
|
||||
Sets a list of rectangles to the clip mask.
|
||||
The number of arguments must be a multiple of four.
|
||||
The arguments are coordinates.
|
||||
The parser calculates the width and height of the rectangles.
|
||||
Example:
|
||||
.EX
|
||||
clip-rects 0,0,10,20, 20,10,30,30
|
||||
\fBclip-rects\fP 0,0,10,20, 20,10,30,30
|
||||
.EE
|
||||
.TP 8
|
||||
.B coord-mode \fPmode
|
||||
Changes the coord mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and
|
||||
\fIdraw-points\fP. Accepted parameters are "modeorigin" and "previous",
|
||||
that sets the coord mode to CoordModeOrigin or CoordModePrevious,
|
||||
respectively. Example:
|
||||
Changes the coordinate mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and
|
||||
\fIdraw-points\fP.
|
||||
Accepted parameters are "modeorigin" and "previous",
|
||||
that sets the coord mode to CoordModeOrigin or CoordModePrevious, respectively.
|
||||
Example:
|
||||
.EX
|
||||
coord-mode previous
|
||||
\fBcoord-mode\fP previous
|
||||
.EE
|
||||
.TP 8
|
||||
.B copy-area \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy]
|
||||
Calls XCopyArea. The character \fI.\fP means copy the window contents;
|
||||
pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and
|
||||
\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:
|
||||
Calls XCopyArea.
|
||||
The character \fI.\fP means copy the window contents;
|
||||
pixmap-spec is as defined in the \fBPIXMAPS\fP section below.
|
||||
\fIX2\fP and
|
||||
\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
|
||||
copy-area Term,10,10
|
||||
\fBcopy-area\fP Term,10,10
|
||||
.EE
|
||||
.TP 8
|
||||
.B copy-plane \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy,plane]
|
||||
Calls XCopyPlane. The character \fI.\fP means copy the window contents;
|
||||
pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and
|
||||
\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:
|
||||
Calls XCopyPlane.
|
||||
The character \fI.\fP means copy the window contents;
|
||||
pixmap-spec is as defined in the \fBPIXMAPS\fP section below.
|
||||
\fIX2\fP and
|
||||
\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
|
||||
copy-plane star,10,10
|
||||
\fBcopy-plane\fP star,10,10
|
||||
.EE
|
||||
.TP 8
|
||||
.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
|
||||
dashes 3,7 9,10
|
||||
\fBdashes\fP 3,7 9,10
|
||||
.EE
|
||||
.TP 8
|
||||
.B draw-arc \fPx1,y1,x2,y2[,start-angle,end-angle]
|
||||
Draws an arc. The four first arguments are the rectangle enclosing the
|
||||
arc. The two remaining arguments, if specified, are the start and end
|
||||
angle, in degrees. Example:
|
||||
Draws an arc.
|
||||
The four first arguments are the rectangle enclosing the arc.
|
||||
The two remaining arguments, if specified,
|
||||
are the start and end angle, in degrees.
|
||||
Example:
|
||||
.EX
|
||||
draw-arc +0,+0,-1,-1,0,90
|
||||
\fBdraw-arc\fP +0,+0,-1,-1,0,90
|
||||
.EE
|
||||
.TP 8
|
||||
.B draw-rect \fPx1,y1,x2,y2
|
||||
.TQ
|
||||
.B draw-rectangle \fPx1,y1,x2,y2
|
||||
Draws a rectangle. Requires four arguments, which are the start and end
|
||||
coordinate pairs. Example:
|
||||
Draws a rectangle.
|
||||
Requires four arguments, which are the start and end coordinate pairs.
|
||||
Example:
|
||||
.EX
|
||||
draw-rect +1,+1,-5,-5
|
||||
\fBdraw-rect\fP +1,+1,-5,-5
|
||||
.EE
|
||||
.TP 8
|
||||
.B draw-string \fPx,y,"string"
|
||||
Draws a text string. Requires three arguments, a x coordinate, a y
|
||||
coordinate, and a string. Strings that have white space can be quoted with
|
||||
Draws a text string.
|
||||
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,
|
||||
but it will be necessary escape it twice. Example:
|
||||
but it will be necessary escape it twice.
|
||||
Example:
|
||||
.EX
|
||||
draw-string 10,10, "Hello world!"\fP
|
||||
\fBdraw-string\fP 10,10, "Hello world!"\fP
|
||||
.EE
|
||||
.TP 8
|
||||
.B exposures \fPboolean
|
||||
Sets graphics exposures in the GC. Allowed parameters are a integer or the
|
||||
strings "true", "false", "on" and "off". Example:
|
||||
Sets graphics exposures in the GC.
|
||||
Allowed parameters are a integer
|
||||
or the strings "true", "false", "on" and "off".
|
||||
Example:
|
||||
.EX
|
||||
exposures true
|
||||
\fBexposures\fP true
|
||||
.EE
|
||||
.TP 8
|
||||
.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
|
||||
selected foreground. Example:
|
||||
selected foreground.
|
||||
Example:
|
||||
.EX
|
||||
fill-arc +0,+0,-1,-1,0,180
|
||||
\fBfill-arc\fP +0,+0,-1,-1,0,180
|
||||
.EE
|
||||
.TP 8
|
||||
.B fill-poly \fPx1,y1 [...,xn,yn]
|
||||
.TQ
|
||||
.B fill-polygon \fPx1,y1 [...,xn,yn]
|
||||
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
|
||||
fill-poly +0,+10, +10,+20, +30,+0
|
||||
\fBfill-poly\fP +0,+10, +10,+20, +30,+0
|
||||
.EE
|
||||
.TP
|
||||
.B fill-rect \fPx1,y1,x2,y2
|
||||
.TQ
|
||||
.B fill-rectangle \fPx1,y1,x2,y2
|
||||
Like \fIdraw-rect\fP, but fills the contents of the rectangle with the
|
||||
selected foreground color. Example:
|
||||
selected foreground color.
|
||||
Example:
|
||||
.EX
|
||||
fill-rect +10,+10,-20,-20
|
||||
\fBfill-rect\fP +10,+10,-20,-20
|
||||
.EE
|
||||
.TP 8
|
||||
.B fill-rule \fPrule
|
||||
Sets the fill rule. Accepted parameters are "evenodd" and "winding", which
|
||||
set the fill rule to EvenOddRule or WindingRule, respectively. Example:
|
||||
Sets the fill rule.
|
||||
Accepted parameters are "evenodd" and "winding", which
|
||||
set the fill rule to EvenOddRule or WindingRule, respectively.
|
||||
Example:
|
||||
.EX
|
||||
fill-rule winding
|
||||
\fBfill-rule\fP winding
|
||||
.EE
|
||||
.TP 8
|
||||
.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,
|
||||
FillStippled or FillOpaqueStippled, respectively. Example:
|
||||
FillStippled or FillOpaqueStippled, respectively.
|
||||
Example:
|
||||
.EX
|
||||
fill-style tiled
|
||||
\fBfill-style\fP tiled
|
||||
.EE
|
||||
.TP 8
|
||||
.B font \fPfont-spec
|
||||
Sets the font for text functions. Example:
|
||||
Sets the font for text functions.
|
||||
Example:
|
||||
.EX
|
||||
font -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
|
||||
\fBfont\fP -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
|
||||
.EE
|
||||
.TP 8
|
||||
.B fg \fPcolor-spec
|
||||
.TQ
|
||||
.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
|
||||
foreground blue
|
||||
\fBforeground\fP blue
|
||||
.EE
|
||||
.TP 8
|
||||
.B mask
|
||||
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
|
||||
.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",
|
||||
"invert", "orreverse", "copyinverted" and "nand", which set the function to
|
||||
GXset, GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor,
|
||||
GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand,
|
||||
respectively. Example:
|
||||
respectively.
|
||||
Example:
|
||||
.EX
|
||||
function xor
|
||||
\fBfunction\fP xor
|
||||
.EE
|
||||
.TP 8
|
||||
.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,
|
||||
respectively. Example:
|
||||
respectively.
|
||||
Example:
|
||||
.EX
|
||||
join-style round
|
||||
\fBjoin-style\fP round
|
||||
.EE
|
||||
.TP 8
|
||||
.B image \fP{pixmap-spec},xs,ys,[xe,ye]
|
||||
This function is implemented as a way to quickly compose complex
|
||||
decorations in widgets. \fIPixmap-spec\fP is as defined in the
|
||||
\fBPIXMAPS\fP section below. \fIxs\fP and \fIys\fP are the coordinates from
|
||||
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:
|
||||
decorations in widgets.
|
||||
\fIPixmap-spec\fP is as defined in the
|
||||
\fBPIXMAPS\fP section below.
|
||||
\fIxs\fP and \fIys\fP are the coordinates from
|
||||
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
|
||||
image pixmap.xpm,0,0,20,20
|
||||
\fBimage\fP pixmap.xpm,0,0,20,20
|
||||
.EE
|
||||
.TP 8
|
||||
.B line \fPx1,y1,x2,y2
|
||||
.TQ
|
||||
.B draw-line \fPx1,y1,x2,y2
|
||||
Draws a line with the current foreground color. Requires four arguments,
|
||||
the starting and ending coordinate pairs. Example:
|
||||
Draws a line with the current foreground color.
|
||||
Requires four arguments, the starting and ending coordinate pairs.
|
||||
Example:
|
||||
.EX
|
||||
line +0,+0, -1,-1
|
||||
\fBline\fP +0,+0, -1,-1
|
||||
.EE
|
||||
.TP 8
|
||||
.B line-width \fPinteger
|
||||
Selects a line width for drawing. Example:
|
||||
Selects a line width for drawing.
|
||||
Example:
|
||||
.EX
|
||||
line-width 2
|
||||
\fBline-width\fP 2
|
||||
.EE
|
||||
.TP 8
|
||||
.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
|
||||
LineDoubleDash, respectively. Example:
|
||||
LineDoubleDash, respectively.
|
||||
Example:
|
||||
.EX
|
||||
line-style onoffdash
|
||||
\fBline-style\fP onoffdash
|
||||
.EE
|
||||
.TP 8
|
||||
.B lines \fPx1,y1,x2,y2 [...,xn,yn]
|
||||
.TQ
|
||||
.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:
|
||||
.EX
|
||||
lines +0,-1, -1,-1, -1,+0
|
||||
\fBlines\fP +0,-1, -1,-1, -1,+0
|
||||
.EE
|
||||
.TP 8
|
||||
.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
|
||||
paint-string 10,20, "Sample text"\fP
|
||||
\fBpaint-string\fP 10,20, "Sample text"\fP
|
||||
.EE
|
||||
.TP 8
|
||||
.B point \fPx,y
|
||||
.TQ
|
||||
.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
|
||||
point +10,+10
|
||||
\fBpoint\fP +10,+10
|
||||
.EE
|
||||
.TP 8
|
||||
.B plane-mask \fPinteger
|
||||
Sets the plane mask. Requires an integer parameter. Example:
|
||||
Sets the plane mask.
|
||||
Requires an integer parameter.
|
||||
Example:
|
||||
.EX
|
||||
plane-mask -1
|
||||
\fBplane-mask\fP -1
|
||||
.EE
|
||||
.TP 8
|
||||
.B points \fPx1,y1 [...,xn,yn]
|
||||
.TQ
|
||||
.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
|
||||
points +1,+2, +1,+4, +1,+6
|
||||
\fBpoints\fP +1,+2, +1,+4, +1,+6
|
||||
.EE
|
||||
.TP 8
|
||||
.B segments \fPx1,y1,x2,y2 [...,xn,yn]
|
||||
.TQ
|
||||
.B draw-segments \fPx1,y1,x2,y2 [...,xn,yn]
|
||||
Draws a list of segment lines. The number of parameters must be multiple
|
||||
of 4. Example:
|
||||
Draws a list of segment lines.
|
||||
The number of parameters must be multiple of 4.
|
||||
Example:
|
||||
.EX
|
||||
segments +1,+2,+1,-3, +2,-2,-3,-2
|
||||
\fBsegments\fP +1,+2,+1,-3, +2,-2,-3,-2
|
||||
.EE
|
||||
.TP 8
|
||||
.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,
|
||||
Convex or Nonconvex, accordingly. Example:
|
||||
Convex or Nonconvex, accordingly.
|
||||
Example:
|
||||
.EX
|
||||
shape-mode convex
|
||||
\fBshape-mode\fP convex
|
||||
.EE
|
||||
.TP 8
|
||||
.B stipple \fPpixmap-spec
|
||||
Sets the pixmap for a stipple. Requires a pixmap parameter, as described
|
||||
in the \fBPIXMAPS\fP section below. Example:
|
||||
Sets the pixmap for a stipple.
|
||||
Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
|
||||
Example:
|
||||
.EX
|
||||
stipple plaid
|
||||
\fBstipple\fP plaid
|
||||
.EE
|
||||
.TP 8
|
||||
.B subwindow-mode \fPmode
|
||||
Sets the subwindow mode in the GC. Accepted parameters are
|
||||
"includeinferiors" and "clipbychildren", which set the subwindow mode to
|
||||
IncludeInferiors or ClipByChildren, respectively. Example:
|
||||
Sets the subwindow mode in the GC.
|
||||
Accepted parameters are
|
||||
"includeinferiors" and "clipbychildren",
|
||||
which set the subwindow mode to
|
||||
IncludeInferiors or ClipByChildren, respectively.
|
||||
Example:
|
||||
.EX
|
||||
subwindow-mode includeinferiors
|
||||
\fBsubwindow-mode\fP includeinferiors
|
||||
.EE
|
||||
.TP 8
|
||||
.B tile \fPpixmap-spec
|
||||
Sets the pixmap for a tile. Requires a pixmap parameter, as described
|
||||
in the \fBPIXMAPS\fP section below. Example:
|
||||
Sets the pixmap for a tile.
|
||||
Requires a pixmap parameter, as described
|
||||
in the \fBPIXMAPS\fP section below.
|
||||
Example:
|
||||
.EX
|
||||
tile xlogo11?foreground=red&background=gray80
|
||||
\fBtile\fP xlogo11?foreground=red&background=gray80
|
||||
.EE
|
||||
.TP 8
|
||||
.B ts-origin \fPx,y
|
||||
Sets the tile stipple x and y origin. Requires two arguments, a x and y
|
||||
coordinate. Example:
|
||||
Sets the tile stipple x and y origin.
|
||||
Requires two arguments, a x and y coordinate.
|
||||
Example:
|
||||
.EX
|
||||
ts-origin 10,10
|
||||
\fBts-origin\fP 10,10
|
||||
.EE
|
||||
.TP 8
|
||||
.B umask
|
||||
Disables the GC mask, if it has been set with the command \fImask\fP.
|
||||
Requires no arguments.
|
||||
.ne 7
|
||||
.PP
|
||||
Example for drawing a shadow effect in a widget:
|
||||
.PP
|
||||
.EX
|
||||
foreground gray30;\e
|
||||
draw-lines +1,-1,-1,-1,-1,+1;\e
|
||||
foreground gray85;\e
|
||||
draw-lines -1,+0,+0,+0,+0,-1
|
||||
\fBforeground\fP gray30;\e
|
||||
\fBdraw-lines\fP +1,-1,-1,-1,-1,+1;\e
|
||||
\fBforeground\fP gray85;\e
|
||||
\fBdraw-lines\fP -1,+0,+0,+0,+0,-1
|
||||
.EE
|
||||
.SH PIXMAPS
|
||||
A String to Pixmap converter has been added to \fBXaw\fP. This converter
|
||||
is meant to be extended, and has enough abstraction to allow loading
|
||||
several image formats. It uses a format that resembles a \fIURL\fP, with
|
||||
the syntax:
|
||||
A String to Pixmap converter has been added to \fBXaw\fP.
|
||||
This converter is meant to be extended,
|
||||
and has enough abstraction to allow loading several image formats.
|
||||
It uses a format that resembles a \fIURL\fP, with the syntax:
|
||||
.PP
|
||||
.I [type:]name[?arg=val[{&}...]]
|
||||
.PP
|
||||
\fBType\fP can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP.
|
||||
.PP
|
||||
\fBName\fP may be a file name, or, in the case of type \fIgradient\fP, may be
|
||||
.TP
|
||||
\fItype\fP
|
||||
can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP.
|
||||
.TP
|
||||
\fIname\fP
|
||||
may be a file name, or, in the case of type \fIgradient\fP, may be
|
||||
either \fIvertical\fP or \fIhorizontal\fP.
|
||||
.PP
|
||||
\fBArg=val\fP is a list of arguments to the converter. An argument list is
|
||||
preceded by a question mark, and multiple arguments are separated by
|
||||
ampersands. The most common arguments are \fIforeground\fP and
|
||||
\fIbackground\fP. 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 less colors; and the \fIdimension\fP
|
||||
argument to specify the size of the gradient. The \fIxpm\fP converter
|
||||
.TP
|
||||
\fIarg=val\fP
|
||||
is a list of arguments to the converter.
|
||||
.IP
|
||||
An argument list is preceded by a question mark,
|
||||
and multiple arguments are separated by ampersands.
|
||||
.IP
|
||||
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
|
||||
(useful if you have a limited colormap).
|
||||
.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.
|
||||
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
|
||||
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
|
||||
it difficult to have a consistent layout in the application, and, if the
|
||||
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
|
||||
Text widget resources below.
|
||||
.PP
|
||||
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
|
||||
have been added. New text actions include:
|
||||
text editor.
|
||||
In this release, even more operations familiar to Emacs users have been added.
|
||||
New text actions include:
|
||||
.TP 8
|
||||
.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.
|
||||
.TP 8
|
||||
.B keyboard-reset
|
||||
Resets the keyboard state. Reverts the action multiplier to 1, and if undo
|
||||
is enabled, toggles between undo and redo. Bound by default to
|
||||
Resets the keyboard state.
|
||||
Reverts the action multiplier to 1, and if undo
|
||||
is enabled, toggles between undo and redo.
|
||||
Bound by default to
|
||||
\fIControl<Key>G\fP.
|
||||
.TP 8
|
||||
.B kill-ring-yank
|
||||
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
|
||||
fields. Bound by default to \fIMeta<Key>Y\fP.
|
||||
fields.
|
||||
Bound by default to \fIMeta<Key>Y\fP.
|
||||
.TP 8
|
||||
.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,
|
||||
allowing composition of the multiplication number of text actions.
|
||||
.TP 8
|
||||
.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.
|
||||
.TP 8
|
||||
.B toggle-overwrite
|
||||
Toggles overwrite mode. In overwrite mode, any text inserted in a text
|
||||
field will replace existing text. Bound by default to \fI<Key>Insert\fP.
|
||||
Toggles overwrite mode.
|
||||
In overwrite mode, any text inserted in a text field will replace existing text.
|
||||
Bound by default to \fI<Key>Insert\fP.
|
||||
.TP 8
|
||||
.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.
|
||||
.PP
|
||||
New and modified Text widget resources include:
|
||||
.TP 8
|
||||
.B justify (\fPClass\fB Justify)
|
||||
Sets the text justification. Can be one of \fIleft, right, center\fP, or
|
||||
\fIfull\fP. Only enabled when the \fIautoFill\fP resource is set, and the
|
||||
Sets the text justification.
|
||||
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.
|
||||
.TP 8
|
||||
.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.
|
||||
.TP 8
|
||||
.B positionCallback (\fPClass\fB Callback)
|
||||
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:
|
||||
.nf
|
||||
.RS
|
||||
.PP
|
||||
.EX
|
||||
typedef struct {
|
||||
int line_number;
|
||||
int column_number;
|
||||
|
@ -552,7 +689,9 @@ typedef struct {
|
|||
XawTextPosition last_position;
|
||||
Boolean overwrite_mode;
|
||||
} XawTextPositionInfo;
|
||||
.fi
|
||||
.EE
|
||||
.RE
|
||||
.IP
|
||||
This callback is intended to help programmers write text editors based
|
||||
on the Xaw widget set.
|
||||
.TP 8
|
||||
|
@ -561,46 +700,54 @@ No longer supported, but recognized for backward compatibility with
|
|||
resource specifications written for the Xaw6 Text widget.
|
||||
.TP 8
|
||||
.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.
|
||||
.TP 8
|
||||
.B scrollHorizontal (\fPClass\fB Scroll)
|
||||
.TQ
|
||||
.B scrollVertical (\fPClass\fB Scroll)
|
||||
These resources control the placement of scrollbars on the left and bottom
|
||||
edges of the Text widget. They accept the values \fIXawtextScrollAlways\fP
|
||||
and \fIXawtextScrollNever\fP. A converter is registered for this resource
|
||||
that will convert the following strings: \fIalways\fP and \fInever\fP. The
|
||||
edges of the Text widget.
|
||||
They accept the values \fIXawtextScrollAlways\fP and \fIXawtextScrollNever\fP.
|
||||
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
|
||||
the converter), is accepted for backwards compatibility with resource
|
||||
specifications written for the Xaw6 Text widget, but ignored (effectively
|
||||
treated as \fIXawtextScrollNever\fP).
|
||||
.SH TEXT SOURCE OBJECT
|
||||
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:
|
||||
.TP 8
|
||||
.B callback (\fPClass\fB Callback)
|
||||
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.
|
||||
.TP 8
|
||||
.B enableUndo (\fPClass\fB Undo)
|
||||
A boolean resource that enables or disables the undo function. The default
|
||||
value is False.
|
||||
A boolean resource that enables or disables the undo function.
|
||||
The default value is False.
|
||||
.TP 8
|
||||
.B sourceChanged (\fPClass\fB Changed)
|
||||
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.
|
||||
.SH TEXT SINK OBJECT
|
||||
The textSinkObject subclasses asciiSinkObject and multiSinkObject have been
|
||||
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
|
||||
specification of the cursor color. The new resource is:
|
||||
specification of the cursor color.
|
||||
The new resource is:
|
||||
.TP 8
|
||||
.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.
|
||||
.SH SIMPLE MENU WIDGET
|
||||
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.
|
||||
.SH SME BSB OBJECT
|
||||
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
|
||||
.B menuName (\fPClass\fB MenuName)
|
||||
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.
|
||||
.SH AUTHORS
|
||||
The original X Consortium version of the Athena Widget Set and its
|
||||
|
|
|
@ -237,6 +237,7 @@ 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@
|
||||
|
|
|
@ -151,15 +151,17 @@ static Cardinal num_variable_list;
|
|||
Bool
|
||||
XawParseBoolean(Widget w, String param, XEvent *event, Bool *succeed)
|
||||
{
|
||||
char *tmp = (char *)param;
|
||||
int value;
|
||||
|
||||
if (!param)
|
||||
return (False);
|
||||
else
|
||||
{
|
||||
char *tmp = (char *)param;
|
||||
double dd = strtod(param, &tmp);
|
||||
int value = (int) dd;
|
||||
|
||||
value = (int)strtod(param, &tmp);
|
||||
if (*tmp == '\0')
|
||||
return (value);
|
||||
if (*tmp == '\0')
|
||||
return (value);
|
||||
}
|
||||
|
||||
if (XmuCompareISOLatin1(param, "true") == 0
|
||||
|| XmuCompareISOLatin1(param, "yes") == 0
|
||||
|
@ -188,7 +190,6 @@ Bool
|
|||
XawBooleanExpression(Widget w, String param, XEvent *event)
|
||||
{
|
||||
XawEvalInfo info;
|
||||
Bool retval;
|
||||
|
||||
if (!param)
|
||||
return (False);
|
||||
|
@ -215,16 +216,18 @@ XawBooleanExpression(Widget w, String param, XEvent *event)
|
|||
(void)get_token(&info);
|
||||
if (info.token == ERROR)
|
||||
return (False);
|
||||
retval = expr(&info);
|
||||
else
|
||||
{
|
||||
Bool retval = expr(&info);
|
||||
|
||||
return (info.token != ERROR ? retval : False);
|
||||
return (info.token != ERROR ? retval : False);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
get_token(XawEvalInfo *info)
|
||||
{
|
||||
int ch;
|
||||
char *p, name[256];
|
||||
|
||||
info->lp = info->cp;
|
||||
|
||||
|
@ -248,7 +251,8 @@ get_token(XawEvalInfo *info)
|
|||
{
|
||||
Bool succeed = True;
|
||||
|
||||
p = info->cp - 1;
|
||||
char *p = info->cp - 1;
|
||||
char name[256];
|
||||
|
||||
while ((ch = *info->cp) && (isalnum(ch) || ch == '_'))
|
||||
++info->cp;
|
||||
|
@ -409,6 +413,7 @@ XawSetValuesAction(Widget w, XEvent *event,
|
|||
#ifdef LONG64
|
||||
long c_8;
|
||||
#endif
|
||||
unsigned use_size;
|
||||
|
||||
if (!(*num_params & 1))
|
||||
{
|
||||
|
@ -440,13 +445,14 @@ XawSetValuesAction(Widget w, XEvent *event,
|
|||
from.size = (Cardinal) strlen(value) + 1;
|
||||
from.addr = (char *)value;
|
||||
to.size = resource->size;
|
||||
switch (to.size)
|
||||
use_size = resource->size;
|
||||
switch (use_size)
|
||||
{
|
||||
case 1: to.addr = (XPointer)&c_1; break;
|
||||
case 2: to.addr = (XPointer)&c_2; break;
|
||||
case 4: to.addr = (XPointer)&c_4; break;
|
||||
case 1: to.addr = (XPointer)&c_1; c_1 = 0; break;
|
||||
case 2: to.addr = (XPointer)&c_2; c_2 = 0; break;
|
||||
case 4: to.addr = (XPointer)&c_4; c_4 = 0; break;
|
||||
#ifdef LONG64
|
||||
case 8: to.addr = (XPointer)&c_8; break;
|
||||
case 8: to.addr = (XPointer)&c_8; c_8 = 0; break;
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
|
@ -466,10 +472,11 @@ XawSetValuesAction(Widget w, XEvent *event,
|
|||
c_4 = (int)from.addr;
|
||||
#endif
|
||||
else if (!XtConvertAndStore(w, XtRString, &from,
|
||||
XrmQuarkToString(resource->qtype), &to))
|
||||
XrmQuarkToString(resource->qtype), &to)
|
||||
|| to.size != use_size)
|
||||
continue;
|
||||
|
||||
switch (to.size)
|
||||
switch (use_size)
|
||||
{
|
||||
case 1:
|
||||
XtSetArg(arglist[num_args], XrmQuarkToString(resource->qname), c_1);
|
||||
|
@ -499,7 +506,6 @@ XawGetValuesAction(Widget w, XEvent *event,
|
|||
{
|
||||
XawActionResList *rlist;
|
||||
XawActionVarList *vlist;
|
||||
String value;
|
||||
Cardinal count;
|
||||
|
||||
if (!(*num_params & 1))
|
||||
|
@ -515,7 +521,8 @@ XawGetValuesAction(Widget w, XEvent *event,
|
|||
|
||||
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;
|
||||
XawDeclareActionVar(vlist, params[count], value);
|
||||
}
|
||||
|
@ -865,11 +872,9 @@ _XawFindActionRes(XawActionResList *list, Widget detail, String name)
|
|||
static char *
|
||||
_XawEscapeActionVarValue(String value)
|
||||
{
|
||||
char * escape;
|
||||
|
||||
if (value[0] == '$' || value[0] == '\\')
|
||||
{
|
||||
escape = XtMalloc((Cardinal)strlen(value) + 2);
|
||||
char *escape = XtMalloc((Cardinal)strlen(value) + 2);
|
||||
escape[0] = '\\';
|
||||
strcpy(escape + 1, value);
|
||||
return (escape);
|
||||
|
@ -881,11 +886,9 @@ _XawEscapeActionVarValue(String value)
|
|||
static char *
|
||||
_XawUnescapeActionVarValue(String value)
|
||||
{
|
||||
char * unescape;
|
||||
|
||||
if (value[0] == '\\')
|
||||
{
|
||||
unescape = XtMalloc((Cardinal)strlen(value));
|
||||
char *unescape = XtMalloc((Cardinal)strlen(value));
|
||||
strcpy(unescape, value + 1);
|
||||
return (unescape);
|
||||
}
|
||||
|
@ -918,7 +921,7 @@ XawDeclareActionVar(XawActionVarList *list, String name, String value)
|
|||
{
|
||||
String val = escape ? escape : value;
|
||||
|
||||
if (strcmp(XrmQuarkToString(variable->qvalue), val) == 0)
|
||||
if (val != NULL && strcmp(XrmQuarkToString(variable->qvalue), val) == 0)
|
||||
{
|
||||
if (escape)
|
||||
XtFree(escape);
|
||||
|
|
|
@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/Xaw/Tree.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[] = {
|
||||
DATA( "applicationShell", &applicationShellWidgetClass ),
|
||||
DATA( "asciiSink", &asciiSinkObjectClass ),
|
||||
|
|
|
@ -296,12 +296,13 @@ static int
|
|||
GetTextWidth(TextWidget ctx, int current_width, XFontStruct *font,
|
||||
XawTextPosition from, int length)
|
||||
{
|
||||
int i, width = 0;
|
||||
XawTextBlock block;
|
||||
XawTextPosition pos = from;
|
||||
int width = 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));
|
||||
from = pos;
|
||||
for (i = 0; i < block.length; i++)
|
||||
|
@ -340,7 +341,6 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y,
|
|||
XawTextAnchor *anchor;
|
||||
XawTextEntity *entity;
|
||||
XawTextProperty *property;
|
||||
XawTextPaintStruct *paint;
|
||||
XawTextBlock block;
|
||||
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 -
|
||||
font->per_char[c - font->min_char_or_byte2].width;
|
||||
if (rbearing > 0) {
|
||||
paint = XtNew(XawTextPaintStruct);
|
||||
XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
|
||||
paint->next = sink->text_sink.paint->bearings;
|
||||
sink->text_sink.paint->bearings = paint;
|
||||
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))
|
||||
lbearing = font->per_char[c - font->min_char_or_byte2].lbearing;
|
||||
if (lbearing < 0) {
|
||||
paint = XtNew(XawTextPaintStruct);
|
||||
XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
|
||||
paint->next = sink->text_sink.paint->bearings;
|
||||
sink->text_sink.paint->bearings = paint;
|
||||
paint->x = x;
|
||||
|
@ -438,14 +438,13 @@ AsciiPreparePaint(Widget w, int y, int line,
|
|||
|
||||
TextWidget ctx = (TextWidget)XtParent(w);
|
||||
AsciiSinkObject sink = (AsciiSinkObject)ctx->text.sink;
|
||||
XawTextPosition left, right, pos, pos2, tmp, length;
|
||||
XawTextPosition left, right, pos, tmp, length;
|
||||
XawTextAnchor *anchor;
|
||||
XawTextEntity *entity;
|
||||
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;
|
||||
XFontStruct *font;
|
||||
XawTextPaintStruct *paint;
|
||||
|
||||
if (!sink->ascii_sink.echo)
|
||||
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
|
||||
to calculate the ascent/descent, do it here to avoid an extra
|
||||
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 = XawMin(right, ctx->text.lastPos + 1);
|
||||
while (pos < right) {
|
||||
|
@ -530,7 +529,9 @@ AsciiPreparePaint(Widget w, int y, int line,
|
|||
/* pass 2: feed the XawTextPaintStruct lists */
|
||||
pos = from;
|
||||
while (pos < to) {
|
||||
paint = XtNew(XawTextPaintStruct);
|
||||
int bufsiz;
|
||||
XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
|
||||
|
||||
paint->next = sink->text_sink.paint->paint;
|
||||
sink->text_sink.paint->paint = paint;
|
||||
paint->x = x;
|
||||
|
@ -572,9 +573,8 @@ AsciiPreparePaint(Widget w, int y, int line,
|
|||
paint->length = 0;
|
||||
segment.x1 = x;
|
||||
|
||||
pos2 = tmp;
|
||||
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;
|
||||
tmp = pos2;
|
||||
for (i = 0; i < block.length; i++) {
|
||||
|
@ -736,9 +736,6 @@ AsciiDoPaint(Widget w)
|
|||
XmuScanline *scan;
|
||||
XmuSegment *seg;
|
||||
XawTextPaintList *list = sink->text_sink.paint;
|
||||
#if 0
|
||||
XawTextPaintStruct *base, *head;
|
||||
#endif
|
||||
XawTextPaintStruct *paint = list->paint;
|
||||
XawTextProperty *property;
|
||||
XFontStruct *font = NULL;
|
||||
|
@ -762,26 +759,6 @@ AsciiDoPaint(Widget w)
|
|||
(unsigned)(seg->x2 - seg->x1),
|
||||
(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) {
|
||||
XawTextPaintStruct **paints;
|
||||
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) */
|
||||
paint = list->bearings;
|
||||
while (paint) {
|
||||
XRectangle rect2;
|
||||
|
||||
if (paint->highlight)
|
||||
XSetForeground(XtDisplay(ctx), gc, sink->text_sink.background);
|
||||
if (!paint->property || !(paint->property->mask & XAW_TPROP_FONT))
|
||||
|
@ -999,10 +974,13 @@ AsciiDoPaint(Widget w)
|
|||
XSetForeground(XtDisplay(ctx), gc, paint->property->foreground);
|
||||
}
|
||||
if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) {
|
||||
rect2.x = (short)(paint->x + paint->width);
|
||||
rect2.width = (XawAbs(paint->width)); /* more than enough */
|
||||
rect2.y = (short)(paint->y - font->ascent);
|
||||
rect2.height = (unsigned short)(rect2.y + font->ascent + font->descent);
|
||||
XRectangle rect2 = {
|
||||
.x = (short)(paint->x + paint->width),
|
||||
.width = (unsigned short)(XawAbs(paint->width)), /* more than enough */
|
||||
.y = (short)(paint->y - font->ascent),
|
||||
.height = (unsigned short)((paint->y - font->ascent) +
|
||||
font->ascent + font->descent)
|
||||
};
|
||||
XSetClipRectangles(XtDisplay((Widget)ctx), gc,
|
||||
0, 0, &rect2, 1, Unsorted);
|
||||
XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y,
|
||||
|
@ -1387,7 +1365,7 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
#ifndef OLDXAW
|
||||
AsciiSinkObject sink = (AsciiSinkObject)w;
|
||||
TextWidget ctx = (TextWidget)XtParent(w);
|
||||
XFontStruct *font = sink->ascii_sink.font;
|
||||
XFontStruct *font;
|
||||
Widget source = ctx->text.source;
|
||||
XawTextPosition idx, pos;
|
||||
unsigned char c;
|
||||
|
@ -1401,12 +1379,11 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
|
||||
pos = idx = fromPos;
|
||||
rWidth = 0;
|
||||
c = 0;
|
||||
|
||||
while (!done) {
|
||||
if (XawTextSourceAnchorAndEntity(source, pos, &anchor, &entity)) {
|
||||
length = (Cardinal)(anchor->position + entity->offset + entity->length);
|
||||
length = (XawMin(toPos, length) - pos);
|
||||
length = (Cardinal)(XawMin(toPos, length) - pos);
|
||||
if ((property = XawTextSinkGetProperty((Widget)sink,
|
||||
entity->property)) != NULL &&
|
||||
(property->mask & XAW_TPROP_FONT))
|
||||
|
@ -1420,13 +1397,13 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
entity = entity->next;
|
||||
if (entity) {
|
||||
length = (Cardinal)(anchor->position + entity->offset);
|
||||
length = (XawMin(toPos, length) - pos);
|
||||
length = (Cardinal)(XawMin(toPos, length) - pos);
|
||||
}
|
||||
else
|
||||
length = (XawMin(toPos - pos, 4096));
|
||||
length = (Cardinal)(XawMin(toPos - pos, 4096));
|
||||
}
|
||||
else
|
||||
length = (XawMin(toPos - pos, 4096));
|
||||
length = (Cardinal)(XawMin(toPos - pos, 4096));
|
||||
font = sink->ascii_sink.font;
|
||||
}
|
||||
|
||||
|
@ -1462,16 +1439,17 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
XFontStruct *font = sink->ascii_sink.font;
|
||||
Widget source = ctx->text.source;
|
||||
XawTextPosition idx, pos;
|
||||
unsigned char c;
|
||||
XawTextBlock blk;
|
||||
int i, rWidth;
|
||||
|
||||
pos = XawTextSourceRead(source, fromPos, &blk, toPos - fromPos);
|
||||
pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos));
|
||||
rWidth = 0;
|
||||
for (i = 0, idx = fromPos; idx < toPos; i++, idx++) {
|
||||
unsigned char c;
|
||||
|
||||
if (i >= blk.length) {
|
||||
i = 0;
|
||||
pos = XawTextSourceRead(source, pos, &blk, toPos - pos);
|
||||
pos = XawTextSourceRead(source, pos, &blk, (int)(toPos - pos));
|
||||
if (blk.length == 0)
|
||||
break;
|
||||
}
|
||||
|
@ -1498,7 +1476,7 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width,
|
|||
AsciiSinkObject sink = (AsciiSinkObject)w;
|
||||
TextWidget ctx = (TextWidget)XtParent(w);
|
||||
Widget source = ctx->text.source;
|
||||
XFontStruct *font = sink->ascii_sink.font;
|
||||
XFontStruct *font;
|
||||
XawTextPosition idx, pos, whiteSpacePosition = 0;
|
||||
int i, lastWidth, whiteSpaceWidth, rWidth, ascent = 0, descent = 0;
|
||||
Boolean whiteSpaceSeen;
|
||||
|
@ -1653,16 +1631,16 @@ GetGC(AsciiSinkObject sink)
|
|||
{
|
||||
XtGCMask valuemask = (GCFont | GCGraphicsExposures | GCClipXOrigin |
|
||||
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 */
|
||||
values.clip_x_origin = (int)(long)sink;
|
||||
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;
|
||||
.foreground = sink->text_sink.foreground,
|
||||
.background = sink->text_sink.background
|
||||
};
|
||||
sink->ascii_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values,
|
||||
GCClipMask | GCFont | GCForeground |
|
||||
GCBackground, 0);
|
||||
|
|
|
@ -55,6 +55,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 0
|
||||
#endif
|
||||
|
||||
#if (defined(ASCII_STRING) || defined(ASCII_DISK))
|
||||
#include <X11/Xaw/AsciiText.h> /* for Widget Classes */
|
||||
#endif
|
||||
|
@ -240,6 +244,9 @@ AsciiSrcClassRec asciiSrcClassRec = {
|
|||
Search, /* Search */
|
||||
XtInheritSetSelection, /* SetSelection */
|
||||
XtInheritConvertSelection, /* ConvertSelection */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* ascii_src */
|
||||
{
|
||||
|
@ -389,7 +396,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length)
|
|||
text->format = XawFmt8Bit;
|
||||
if (length == 0) {
|
||||
text->firstPos = (int)(end = (offset + entity->length));
|
||||
text->ptr = "";
|
||||
text->ptr = (char*)"";
|
||||
}
|
||||
else {
|
||||
text->firstPos = (int)pos;
|
||||
|
@ -411,7 +418,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length)
|
|||
text->firstPos = (int)pos;
|
||||
text->ptr = piece->text + (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;
|
||||
|
||||
return (pos + text->length);
|
||||
|
@ -449,8 +456,10 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
|
|||
if (src->text_src.edit_mode == XawtextRead)
|
||||
return (XawEditError);
|
||||
|
||||
start_piece = FindPiece(src, startPos, &start_first);
|
||||
end_piece = FindPiece(src, endPos, &end_first);
|
||||
if ((start_piece = FindPiece(src, startPos, &start_first)) == NULL)
|
||||
return XawEditError;
|
||||
if ((end_piece = FindPiece(src, endPos, &end_first)) == NULL)
|
||||
return XawEditError;
|
||||
|
||||
#ifndef OLDXAW
|
||||
/*
|
||||
|
@ -461,7 +470,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
|
|||
if (start_piece->used) {
|
||||
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;
|
||||
TextWidget ctx = (TextWidget)src->text_src.text[i];
|
||||
|
||||
|
@ -514,7 +523,8 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
|
|||
* Remove Old Stuff
|
||||
*/
|
||||
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.
|
||||
|
@ -973,8 +983,7 @@ XawAsciiSrcSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
|
|||
AsciiSrcObject src = (AsciiSrcObject)cnew;
|
||||
AsciiSrcObject old_src = (AsciiSrcObject)current;
|
||||
Bool total_reset = False, string_set = False;
|
||||
FILE *file;
|
||||
unsigned int i;
|
||||
Cardinal i;
|
||||
|
||||
if (old_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)) {
|
||||
FILE *file;
|
||||
|
||||
RemoveOldStringOrFile(old_src, string_set); /* remove old info */
|
||||
file = InitStringOrFile(src, string_set); /* Init new info */
|
||||
LoadPieces(src, file, NULL); /* load new info into internal buffers */
|
||||
|
@ -1039,7 +1050,7 @@ static void
|
|||
XawAsciiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
|
||||
{
|
||||
AsciiSrcObject src = (AsciiSrcObject)w;
|
||||
unsigned int i;
|
||||
Cardinal i;
|
||||
|
||||
if (src->ascii_src.type == XawAsciiString) {
|
||||
for (i = 0; i < *num_args ; i++)
|
||||
|
@ -1280,7 +1291,7 @@ WriteToFile(String string, String name, unsigned length)
|
|||
{
|
||||
int fd;
|
||||
|
||||
if ((fd = creat(name, 0666)) == -1)
|
||||
if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666)) == -1)
|
||||
return (False);
|
||||
|
||||
if (write(fd, string, length) == -1) {
|
||||
|
@ -1317,14 +1328,13 @@ WritePiecesToFile(AsciiSrcObject src, String name)
|
|||
int fd;
|
||||
|
||||
if (src->ascii_src.data_compression) {
|
||||
Piece *tmp;
|
||||
|
||||
piece = src->ascii_src.first_piece;
|
||||
while (piece) {
|
||||
int bytes = (int)(src->ascii_src.piece_size - piece->used);
|
||||
Piece *tmp;
|
||||
|
||||
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);
|
||||
memmove(tmp->text, tmp->text + bytes, (size_t)(tmp->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);
|
||||
|
||||
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;
|
||||
const char *fdopen_mode = NULL;
|
||||
int fd;
|
||||
FILE *file;
|
||||
|
||||
if (src->ascii_src.type == XawAsciiString) {
|
||||
if (src->ascii_src.string == NULL)
|
||||
|
@ -1443,19 +1451,19 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
|
|||
XtErrorMsg("NoFile", "asciiSourceCreate", "XawError",
|
||||
"Creating a read only disk widget and no file specified.",
|
||||
NULL, NULL);
|
||||
open_mode = O_RDONLY;
|
||||
open_mode = O_RDONLY | O_CLOEXEC;
|
||||
fdopen_mode = "r";
|
||||
break;
|
||||
case XawtextAppend:
|
||||
case XawtextEdit:
|
||||
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;
|
||||
}
|
||||
else {
|
||||
/* O_NOFOLLOW is a FreeBSD & Linux extension */
|
||||
/* O_NOFOLLOW was a FreeBSD & Linux extension, now adopted by POSIX */
|
||||
#ifdef O_NOFOLLOW
|
||||
open_mode = O_RDWR | O_NOFOLLOW;
|
||||
open_mode = O_RDWR | O_NOFOLLOW | O_CLOEXEC;
|
||||
#else
|
||||
open_mode = O_RDWR; /* unsafe; subject to race conditions */
|
||||
#endif /* O_NOFOLLOW */
|
||||
|
@ -1477,8 +1485,12 @@ InitStringOrFile(AsciiSrcObject src, Bool newString)
|
|||
}
|
||||
|
||||
if (!src->ascii_src.is_tempfile) {
|
||||
if ((fd = open(src->ascii_src.string, (int)open_mode, 0666)) != -1) {
|
||||
if ((file = fdopen(fd, fdopen_mode))) {
|
||||
int fd = open(src->ascii_src.string, (int)open_mode, 0666);
|
||||
|
||||
if (fd != -1) {
|
||||
FILE *file = fdopen(fd, fdopen_mode);
|
||||
|
||||
if (file != NULL) {
|
||||
(void)fseek(file, 0, SEEK_END);
|
||||
src->ascii_src.length = (XawTextPosition)ftell(file);
|
||||
return (file);
|
||||
|
@ -1511,11 +1523,11 @@ LoadPieces(AsciiSrcObject src, FILE *file, char *string)
|
|||
if (string == NULL) {
|
||||
if (src->ascii_src.type == XawAsciiFile) {
|
||||
if (src->ascii_src.length != 0) {
|
||||
int len;
|
||||
|
||||
left = 0;
|
||||
fseek(file, 0, SEEK_SET);
|
||||
while (left < src->ascii_src.length) {
|
||||
int len;
|
||||
|
||||
ptr = XtMalloc((unsigned)src->ascii_src.piece_size);
|
||||
if ((len = (int)fread(ptr, sizeof(unsigned char),
|
||||
(size_t)src->ascii_src.piece_size, file)) < 0)
|
||||
|
|
|
@ -123,10 +123,15 @@ AsciiTextClassRec asciiTextClassRec = {
|
|||
NULL, /* callback_private */
|
||||
XtInheritTranslations, /* tm_table */
|
||||
XtInheritQueryGeometry, /* query_geometry */
|
||||
NULL, /* display_accelerator */
|
||||
NULL, /* extension */
|
||||
},
|
||||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* text */
|
||||
{
|
||||
|
|
|
@ -208,7 +208,6 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height,
|
|||
Dimension lw, lh; /* Width and height needed for current line */
|
||||
Dimension bw, bh; /* Width and height needed for current widget */
|
||||
Dimension h_space; /* Local copy of bbw->box.h_space */
|
||||
Widget widget; /* Current widget */
|
||||
unsigned int num_mapped_children = 0;
|
||||
|
||||
/* Box width and height */
|
||||
|
@ -230,7 +229,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height,
|
|||
lw = h_space;
|
||||
|
||||
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.mapped_when_managed)
|
||||
num_mapped_children++;
|
||||
|
@ -498,10 +497,12 @@ TryNewLayout(BoxWidget bbw)
|
|||
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);
|
||||
proposed_width = preferred_width;
|
||||
}
|
||||
|
@ -525,9 +526,6 @@ static XtGeometryResult
|
|||
XawBoxGeometryManager(Widget w, XtWidgetGeometry *request,
|
||||
XtWidgetGeometry *reply _X_UNUSED)
|
||||
{
|
||||
Dimension width, height, borderWidth;
|
||||
BoxWidget bbw;
|
||||
|
||||
/* Position request always denied */
|
||||
if (((request->request_mode & CWX) && request->x != XtX(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 */
|
||||
if (request->request_mode & (CWWidth | CWHeight | CWBorderWidth)) {
|
||||
Dimension width, height, borderWidth;
|
||||
BoxWidget bbw;
|
||||
|
||||
/* Make all three fields in the request valid */
|
||||
if ((request->request_mode & CWWidth) == 0)
|
||||
request->width = XtWidth(w);
|
||||
|
@ -544,12 +545,12 @@ XawBoxGeometryManager(Widget w, XtWidgetGeometry *request,
|
|||
request->border_width = XtBorderWidth(w);
|
||||
|
||||
/* Save current size and set to new size */
|
||||
width = XtWidth(w);
|
||||
height = XtHeight(w);
|
||||
borderWidth = XtBorderWidth(w);
|
||||
XtWidth(w) = request->width;
|
||||
XtHeight(w) = request->height;
|
||||
XtBorderWidth(w) = request->border_width;
|
||||
width = XtWidth(w);
|
||||
height = XtHeight(w);
|
||||
borderWidth = XtBorderWidth(w);
|
||||
XtWidth(w) = request->width;
|
||||
XtHeight(w) = request->height;
|
||||
XtBorderWidth(w) = request->border_width;
|
||||
|
||||
/* Decide if new layout works:
|
||||
(1) new widget is smaller,
|
||||
|
|
|
@ -200,6 +200,9 @@ CommandClassRec commandClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
ChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* label */
|
||||
{
|
||||
|
@ -219,17 +222,16 @@ WidgetClass commandWidgetClass = (WidgetClass)&commandClassRec;
|
|||
static GC
|
||||
Get_GC(CommandWidget cbw, Pixel fg, Pixel bg)
|
||||
{
|
||||
XGCValues values;
|
||||
|
||||
values.foreground = fg;
|
||||
values.background = bg;
|
||||
values.font = cbw->label.font->fid;
|
||||
values.cap_style = CapProjecting;
|
||||
XGCValues values = {
|
||||
.foreground = fg,
|
||||
.background = bg,
|
||||
.font = cbw->label.font->fid,
|
||||
.cap_style = CapProjecting,
|
||||
.line_width = 0
|
||||
};
|
||||
|
||||
if (cbw->command.highlight_thickness > 1)
|
||||
values.line_width = cbw->command.highlight_thickness;
|
||||
else
|
||||
values.line_width = 0;
|
||||
|
||||
if (cbw->simple.international == True)
|
||||
return (XtAllocateGC((Widget)cbw, 0,
|
||||
|
@ -296,8 +298,8 @@ HighlightRegion(CommandWidget cbw)
|
|||
rect.height = XtHeight(cbw);
|
||||
XUnionRectWithRegion(&rect, emptyRegion, outerRegion);
|
||||
rect.x = rect.y = (short)cbw->command.highlight_thickness;
|
||||
rect.width = (rect.width - cbw->command.highlight_thickness * 2);
|
||||
rect.height = (rect.height - cbw->command.highlight_thickness * 2);
|
||||
rect.width = (unsigned short)(rect.width - cbw->command.highlight_thickness * 2);
|
||||
rect.height = (unsigned short)(rect.height - cbw->command.highlight_thickness * 2);
|
||||
XUnionRectWithRegion(&rect, emptyRegion, innerRegion);
|
||||
XSubtractRegion(outerRegion, innerRegion, outerRegion);
|
||||
|
||||
|
@ -563,7 +565,7 @@ static void
|
|||
XawCommandGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
|
||||
{
|
||||
CommandWidget cbw = (CommandWidget)w;
|
||||
unsigned int i;
|
||||
Cardinal i;
|
||||
|
||||
for (i = 0; i < *num_args; i++) {
|
||||
if (STR_EQUAL(args[i].name, XtNforeground))
|
||||
|
|
|
@ -174,6 +174,9 @@ DialogClassRec dialogClassRec = {
|
|||
/* form */
|
||||
{
|
||||
XtInheritLayout, /* layout */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* dialog */
|
||||
{
|
||||
|
@ -271,7 +274,6 @@ XawDialogSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
|
|||
DialogWidget w = (DialogWidget)cnew;
|
||||
DialogWidget old = (DialogWidget)current;
|
||||
Arg args[5];
|
||||
Cardinal num_args;
|
||||
unsigned int i;
|
||||
Bool checks[NUM_CHECKS];
|
||||
|
||||
|
@ -310,7 +312,8 @@ XawDialogSetValues(Widget current, Widget request _X_UNUSED, Widget cnew,
|
|||
}
|
||||
|
||||
if (checks[LABEL]) {
|
||||
num_args = 0;
|
||||
Cardinal num_args = 0;
|
||||
|
||||
XtSetArg(args[num_args], XtNlabel, w->dialog.label); num_args++;
|
||||
if (w->dialog.iconW != NULL &&
|
||||
XtHeight(w->dialog.labelW) <= XtHeight(w->dialog.iconW)) {
|
||||
|
@ -359,9 +362,9 @@ XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
|
|||
Arg a[1];
|
||||
char * s;
|
||||
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)) {
|
||||
XtSetArg(a[0], XtNstring, &s);
|
||||
XtGetValues(src->dialog.valueW, a, 1);
|
||||
|
@ -372,6 +375,7 @@ XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
|
|||
XtGetValues(src->dialog.labelW, a, 1);
|
||||
*((char **)args[i].value) = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -122,7 +122,6 @@ void
|
|||
XawRunDisplayList(Widget w, _XawDisplayList *list,
|
||||
XEvent *event, Region region)
|
||||
{
|
||||
XawDLProc *proc;
|
||||
Cardinal i;
|
||||
|
||||
if (!XtIsRealized(w))
|
||||
|
@ -130,7 +129,7 @@ XawRunDisplayList(Widget w, _XawDisplayList *list,
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -236,8 +235,6 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen,
|
|||
char cname[64], fname[64], aname[1024];
|
||||
Cardinal i;
|
||||
String cp;
|
||||
String fp;
|
||||
String lp;
|
||||
int status;
|
||||
|
||||
xlibc = XawGetDisplayListClass(xlib);
|
||||
|
@ -264,6 +261,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen,
|
|||
status = 0;
|
||||
while (status != DLEOF)
|
||||
{
|
||||
String fp, lp;
|
||||
|
||||
lp = cp;
|
||||
cp = read_token(cp, fname, sizeof(fname), &status);
|
||||
|
||||
|
@ -449,16 +448,14 @@ void
|
|||
XawDestroyDisplayList(_XawDisplayList *dlist)
|
||||
{
|
||||
Cardinal i, j;
|
||||
XawDLProc *proc;
|
||||
XawDLData *data;
|
||||
|
||||
if (!dlist)
|
||||
return;
|
||||
|
||||
for (i = 0; i < dlist->num_procs; i++)
|
||||
{
|
||||
proc = dlist->procs[i];
|
||||
data = proc->data;
|
||||
XawDLProc *proc = dlist->procs[i];
|
||||
XawDLData *data = proc->data;
|
||||
|
||||
if (data)
|
||||
{
|
||||
|
@ -707,7 +704,6 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id)
|
|||
{
|
||||
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
|
||||
XawXlibData *xdata = (XawXlibData *)data;
|
||||
XawDLPosition *pos;
|
||||
XPoint points_buf[16];
|
||||
XPoint *points;
|
||||
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)
|
||||
{
|
||||
pos = &pos_ptr->pos[j];
|
||||
XawDLPosition *pos = &pos_ptr->pos[j];
|
||||
points[i].x = X_ARG(pos[0]);
|
||||
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);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (num_points != 0)
|
||||
{
|
||||
points[0].x = (short)(points[0].x + xpad);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -916,7 +914,7 @@ DlLineWidth(Widget w, XtPointer args, XtPointer data,
|
|||
XawXlibData *xdata = (XawXlibData *)data;
|
||||
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->values.line_width = (int)line_width;
|
||||
|
@ -938,7 +936,6 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data,
|
|||
{
|
||||
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
|
||||
XawXlibData *xdata = (XawXlibData *)data;
|
||||
XawDLPosition *pos;
|
||||
XSegment *segments;
|
||||
XSegment segments_buf[8];
|
||||
Display *display;
|
||||
|
@ -950,7 +947,7 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data,
|
|||
|
||||
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].y1 = Y_ARG(pos[1]);
|
||||
segments[i].x2 = X_ARG(pos[2]);
|
||||
|
@ -1323,10 +1320,8 @@ DlClipRectangles(Widget w, XtPointer args, XtPointer data,
|
|||
{
|
||||
XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args;
|
||||
XawXlibData *xdata = (XawXlibData *)data;
|
||||
XawDLPosition *pos;
|
||||
XRectangle *rects;
|
||||
XRectangle rects_buf[8];
|
||||
Position x1, y1, x2, y2;
|
||||
Cardinal num_rects, i, j;
|
||||
|
||||
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)
|
||||
{
|
||||
pos = &pos_ptr->pos[j];
|
||||
x1 = X_ARG(pos[0]);
|
||||
y1 = Y_ARG(pos[1]);
|
||||
x2 = X_ARG(pos[2]);
|
||||
y2 = Y_ARG(pos[3]);
|
||||
XawDLPosition *pos = &pos_ptr->pos[j];
|
||||
Position x1 = X_ARG(pos[0]);
|
||||
Position y1 = Y_ARG(pos[1]);
|
||||
Position x2 = X_ARG(pos[2]);
|
||||
Position y2 = Y_ARG(pos[3]);
|
||||
rects[i].x = XawMin(x1, x2);
|
||||
rects[i].y = XawMin(y1, y2);
|
||||
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;
|
||||
case LWIDTH:
|
||||
if (*num_params == 1)
|
||||
retval = (void *)read_int((char *)params[0], NULL);
|
||||
{
|
||||
long x = read_int((char *)params[0], NULL);
|
||||
retval = (void *)x;
|
||||
}
|
||||
break;
|
||||
case ARCMODE:
|
||||
if (*num_params == 1)
|
||||
|
@ -1896,7 +1894,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
|
|||
break;
|
||||
case PLANEMASK:
|
||||
if (*num_params == 1)
|
||||
retval = (void *)read_int((char *)params[0], NULL);
|
||||
{
|
||||
long x = read_int((char *)params[0], NULL);
|
||||
retval = (void *)x;
|
||||
}
|
||||
break;
|
||||
case DSTRING:
|
||||
case PSTRING:
|
||||
|
@ -1914,7 +1915,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params,
|
|||
break;
|
||||
case FONT:
|
||||
if (*num_params == 1)
|
||||
retval = (void *)XLoadFont(DisplayOfScreen(screen), params[0]);
|
||||
{
|
||||
Font x = XLoadFont(DisplayOfScreen(screen), params[0]);
|
||||
retval = (void *)x;
|
||||
}
|
||||
break;
|
||||
case DASHES:
|
||||
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 (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 ||
|
||||
XmuCompareISOLatin1(params[0], "on") == 0)
|
||||
retval = (void *)True;
|
||||
|
@ -2125,7 +2132,7 @@ Bool XawDeclareDisplayListProc(XawDLClass *lc, String name,
|
|||
if (!lc || !proc || !name || name[0] == '\0')
|
||||
return (False);
|
||||
|
||||
if ((info = _XawFindDLInfo(lc, name)) != NULL)
|
||||
if (_XawFindDLInfo(lc, name) != NULL)
|
||||
/* Since the data structures to the displayList classes are(should be)
|
||||
* opaque, it is not a good idea to allow overriding a displayList
|
||||
* procedure; it's better to choose another name or class name!
|
||||
|
|
|
@ -301,13 +301,12 @@ WidgetClass formWidgetClass = (WidgetClass)&formClassRec;
|
|||
static void
|
||||
XawFormRealize(Widget w, Mask *mask, XSetWindowAttributes *attr)
|
||||
{
|
||||
XawPixmap *pixmap;
|
||||
|
||||
(*formWidgetClass->core_class.superclass->core_class.realize)(w, mask, attr);
|
||||
|
||||
if (w->core.background_pixmap > XtUnspecifiedPixmap) {
|
||||
pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w),
|
||||
w->core.colormap, (int)w->core.depth);
|
||||
XawPixmap *pixmap =
|
||||
XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w),
|
||||
w->core.colormap, (int)w->core.depth);
|
||||
if (pixmap && pixmap->mask)
|
||||
XawReshapeWidget(w, pixmap);
|
||||
}
|
||||
|
@ -781,8 +780,8 @@ XawFormResize(Widget w)
|
|||
fw->form.old_height, XtHeight(fw),
|
||||
form->form.bottom) -
|
||||
(y + (XtBorderWidth(*childP) << 1));
|
||||
form->form.virtual_width = width;
|
||||
form->form.virtual_height = height;
|
||||
form->form.virtual_width = (short)width;
|
||||
form->form.virtual_height = (short)height;
|
||||
#endif
|
||||
|
||||
width = width < 1 ? 1 : width;
|
||||
|
@ -1022,10 +1021,8 @@ static void
|
|||
XawFormChangeManaged(Widget w)
|
||||
{
|
||||
FormWidget fw = (FormWidget)w;
|
||||
FormConstraints form;
|
||||
WidgetList children, childP;
|
||||
int num_children = (int)fw->composite.num_children;
|
||||
Widget child;
|
||||
|
||||
(*((FormWidgetClass)w->core.widget_class)->form_class.layout)
|
||||
(fw, XtWidth(w), XtHeight(w), True);
|
||||
|
@ -1035,7 +1032,8 @@ XawFormChangeManaged(Widget w)
|
|||
for (children = childP = fw->composite.children;
|
||||
childP - children < num_children;
|
||||
childP++) {
|
||||
child = *childP;
|
||||
FormConstraints form;
|
||||
Widget child = *childP;
|
||||
if (!XtIsManaged(child))
|
||||
continue;
|
||||
form = (FormConstraints)child->core.constraints;
|
||||
|
|
|
@ -160,6 +160,9 @@ GripClassRec gripClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* grip */
|
||||
{
|
||||
|
@ -175,11 +178,11 @@ WidgetClass gripWidgetClass = (WidgetClass)&gripClassRec;
|
|||
static void
|
||||
GripAction(Widget widget, XEvent *event, String *params, Cardinal *num_params)
|
||||
{
|
||||
XawGripCallDataRec call_data;
|
||||
|
||||
call_data.event = event;
|
||||
call_data.params = params;
|
||||
call_data.num_params = *num_params;
|
||||
XawGripCallDataRec call_data = {
|
||||
.event = event,
|
||||
.params = params,
|
||||
.num_params = *num_params
|
||||
};
|
||||
|
||||
XtCallCallbacks(widget, XtNcallback, (XtPointer)&call_data);
|
||||
}
|
||||
|
|
|
@ -253,6 +253,9 @@ LabelClassRec labelClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* label */
|
||||
{
|
||||
|
@ -355,10 +358,10 @@ SetTextWidthAndHeight(LabelWidget lw)
|
|||
label = nl + 1;
|
||||
if (*label)
|
||||
lw->label.label_height +=
|
||||
fs->max_bounds.ascent + fs->max_bounds.descent;
|
||||
(Dimension)(fs->max_bounds.ascent + fs->max_bounds.descent);
|
||||
}
|
||||
if (*label) {
|
||||
int width = XTextWidth(fs, label, (int)strlen(label));
|
||||
int width;
|
||||
|
||||
if (lw->label.encoding)
|
||||
width = XTextWidth16(fs, (XChar2b *)label, (int)(strlen(label) / 2));
|
||||
|
@ -384,12 +387,12 @@ SetTextWidthAndHeight(LabelWidget lw)
|
|||
static void
|
||||
GetNormalGC(LabelWidget lw)
|
||||
{
|
||||
XGCValues values;
|
||||
|
||||
values.foreground = lw->label.foreground;
|
||||
values.background = lw->core.background_pixel;
|
||||
values.font = lw->label.font->fid;
|
||||
values.graphics_exposures = False;
|
||||
XGCValues values = {
|
||||
.foreground = lw->label.foreground,
|
||||
.background = lw->core.background_pixel,
|
||||
.font = lw->label.font->fid,
|
||||
.graphics_exposures = False
|
||||
};
|
||||
|
||||
if (lw->simple.international == True)
|
||||
/* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC */
|
||||
|
@ -406,17 +409,17 @@ GetNormalGC(LabelWidget lw)
|
|||
static void
|
||||
GetGrayGC(LabelWidget lw)
|
||||
{
|
||||
XGCValues values;
|
||||
|
||||
values.foreground = lw->label.foreground;
|
||||
values.background = lw->core.background_pixel;
|
||||
values.font = lw->label.font->fid;
|
||||
values.fill_style = FillTiled;
|
||||
values.tile = XmuCreateStippledPixmap(XtScreen((Widget)lw),
|
||||
lw->label.foreground,
|
||||
lw->core.background_pixel,
|
||||
lw->core.depth);
|
||||
values.graphics_exposures = False;
|
||||
XGCValues values = {
|
||||
.foreground = lw->label.foreground,
|
||||
.background = lw->core.background_pixel,
|
||||
.font = lw->label.font->fid,
|
||||
.fill_style = FillTiled,
|
||||
.tile = XmuCreateStippledPixmap(XtScreen((Widget)lw),
|
||||
lw->label.foreground,
|
||||
lw->core.background_pixel,
|
||||
lw->core.depth),
|
||||
.graphics_exposures = False
|
||||
};
|
||||
|
||||
lw->label.stipple = values.tile;
|
||||
if (lw->simple.international == True)
|
||||
|
@ -492,9 +495,9 @@ XawLabelInitialize(Widget request _X_UNUSED, Widget cnew,
|
|||
set_bitmap_info(lw); /* need core.height */
|
||||
|
||||
if (XtWidth(lw) == 0) /* need label.lbm_width */
|
||||
XtWidth(lw) = (lw->label.label_width
|
||||
+ (2 * lw->label.internal_width)
|
||||
+ LEFT_OFFSET(lw));
|
||||
XtWidth(lw) = (Dimension)(lw->label.label_width
|
||||
+ (unsigned)(2 * lw->label.internal_width)
|
||||
+ LEFT_OFFSET(lw));
|
||||
|
||||
lw->label.label_x = lw->label.label_y = 0;
|
||||
(*XtClass(cnew)->core_class.resize)((Widget)lw);
|
||||
|
@ -511,10 +514,6 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
|
|||
(*Superclass->core_class.expose)(gw, event, region);
|
||||
|
||||
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) {
|
||||
int len = w->label.label_len;
|
||||
|
@ -532,7 +531,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
|
|||
if (w->simple.international == True) {
|
||||
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) {
|
||||
char *nl;
|
||||
|
@ -541,7 +540,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
|
|||
XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset,
|
||||
gc, w->label.label_x, ksy, label,
|
||||
(int)(nl - label));
|
||||
ksy = (ksy + ext->max_ink_extent.height);
|
||||
ksy = (Position) (ksy + ext->max_ink_extent.height);
|
||||
label = nl + 1;
|
||||
}
|
||||
len = (int)strlen(label);
|
||||
|
@ -562,8 +561,8 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
|
|||
else
|
||||
XDrawString(XtDisplay(gw), XtWindow(gw), gc,
|
||||
w->label.label_x, y, label, (int)(nl - label));
|
||||
y += (w->label.font->max_bounds.ascent +
|
||||
w->label.font->max_bounds.descent);
|
||||
y += (Position) (w->label.font->max_bounds.ascent +
|
||||
w->label.font->max_bounds.descent);
|
||||
label = nl + 1;
|
||||
}
|
||||
len = (int)strlen(label);
|
||||
|
@ -586,11 +585,6 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region)
|
|||
XCopyArea(XtDisplay(gw), w->label.pixmap, XtWindow(gw), gc,
|
||||
0, 0, w->label.label_width, w->label.label_height,
|
||||
w->label.label_x, w->label.label_y);
|
||||
|
||||
#ifdef notdef
|
||||
if (region != NULL)
|
||||
XSetClipMask(XtDisplay(gw), gc, (Pixmap)None);
|
||||
#endif /* notdef */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -598,7 +592,7 @@ _Reposition(LabelWidget lw, unsigned int width, unsigned int height,
|
|||
Position *dx, Position *dy)
|
||||
{
|
||||
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) {
|
||||
case XtJustifyLeft:
|
||||
|
@ -644,8 +638,8 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew,
|
|||
LabelWidget curlw = (LabelWidget)current;
|
||||
LabelWidget reqlw = (LabelWidget)request;
|
||||
LabelWidget newlw = (LabelWidget)cnew;
|
||||
unsigned int i;
|
||||
Boolean was_resized = False, redisplay = False, checks[NUM_CHECKS];
|
||||
Cardinal i;
|
||||
|
||||
for (i = 0; i < NUM_CHECKS; i++)
|
||||
checks[i] = False;
|
||||
|
@ -700,9 +694,9 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew,
|
|||
set_bitmap_info(newlw);
|
||||
|
||||
if (XtWidth(curlw) == XtWidth(reqlw) && !checks[WIDTH])
|
||||
XtWidth(newlw) = (newlw->label.label_width
|
||||
+ LEFT_OFFSET(newlw)
|
||||
+ (unsigned)(newlw->label.internal_width << 1));
|
||||
XtWidth(newlw) = (Dimension)(newlw->label.label_width
|
||||
+ LEFT_OFFSET(newlw)
|
||||
+ (unsigned)(newlw->label.internal_width << 1));
|
||||
}
|
||||
|
||||
if (curlw->label.foreground != newlw->label.foreground
|
||||
|
@ -753,9 +747,9 @@ XawLabelQueryGeometry(Widget w, XtWidgetGeometry *intended,
|
|||
LabelWidget lw = (LabelWidget)w;
|
||||
|
||||
preferred->request_mode = CWWidth | CWHeight;
|
||||
preferred->width = (lw->label.label_width
|
||||
+ (unsigned)(lw->label.internal_width << 1)
|
||||
+ LEFT_OFFSET(lw));
|
||||
preferred->width = (Dimension)(lw->label.label_width
|
||||
+ (unsigned)(lw->label.internal_width << 1)
|
||||
+ LEFT_OFFSET(lw));
|
||||
preferred->height = (Dimension)(lw->label.label_height +
|
||||
(lw->label.internal_height << 1));
|
||||
|
||||
|
|
|
@ -300,10 +300,15 @@ ListClassRec listClassRec = {
|
|||
NULL, /* callback_private */
|
||||
defaultTranslations, /* tm_table */
|
||||
XawListQueryGeometry, /* query_geometry */
|
||||
NULL, /* display_accelerator */
|
||||
NULL, /* extension */
|
||||
},
|
||||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* list */
|
||||
{
|
||||
|
@ -319,11 +324,11 @@ WidgetClass listWidgetClass = (WidgetClass)&listClassRec;
|
|||
static void
|
||||
GetGCs(Widget w)
|
||||
{
|
||||
XGCValues values;
|
||||
ListWidget lw = (ListWidget)w;
|
||||
|
||||
values.foreground = lw->list.foreground;
|
||||
values.font = lw->list.font->fid;
|
||||
XGCValues values = {
|
||||
.foreground = lw->list.foreground,
|
||||
.font = lw->list.font->fid
|
||||
};
|
||||
|
||||
if (lw->simple.international == True)
|
||||
lw->list.normgc = XtAllocateGC(w, 0, GCForeground, &values, GCFont, 0);
|
||||
|
@ -353,7 +358,6 @@ GetGCs(Widget w)
|
|||
static void
|
||||
CalculatedValues(Widget w)
|
||||
{
|
||||
int i, len;
|
||||
ListWidget lw = (ListWidget)w;
|
||||
|
||||
/* 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 */
|
||||
if (LongestFree(lw)) {
|
||||
int i;
|
||||
|
||||
lw->list.longest = 0; /* so it will accumulate real longest below */
|
||||
|
||||
for (i = 0 ; i < lw->list.nitems; i++) {
|
||||
int len;
|
||||
|
||||
if (lw->simple.international == True)
|
||||
len = XmbTextEscapement(lw->list.fontset, lw->list.list[i],
|
||||
(int)strlen(lw->list.list[i]));
|
||||
|
@ -432,11 +440,12 @@ ResetList(Widget w, Bool changex, Bool changey)
|
|||
static void
|
||||
ChangeSize(Widget w, unsigned int width, unsigned int height)
|
||||
{
|
||||
XtWidgetGeometry request, reply;
|
||||
|
||||
request.request_mode = CWWidth | CWHeight;
|
||||
request.width = (Dimension)width;
|
||||
request.height = (Dimension)height;
|
||||
XtWidgetGeometry request = {
|
||||
.request_mode = CWWidth | CWHeight,
|
||||
.width = (Dimension)width,
|
||||
.height = (Dimension)height
|
||||
};
|
||||
XtWidgetGeometry reply;
|
||||
|
||||
switch (XtMakeGeometryRequest(w, &request, &reply)) {
|
||||
case XtGeometryYes:
|
||||
|
@ -668,12 +677,15 @@ HighlightBackground(Widget w, int x, int y, GC gc)
|
|||
static void
|
||||
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)
|
||||
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;
|
||||
int item, item_len;
|
||||
XawListReturnStruct ret_value;
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
|
@ -1178,7 +1193,7 @@ XawListDestroy(Widget w)
|
|||
* If nitems is <= 0 then the list needs to be NULL terminated
|
||||
*/
|
||||
void
|
||||
XawListChange(Widget w, _Xconst char **list, int nitems, int longest,
|
||||
XawListChange(Widget w, String *list, int nitems, int longest,
|
||||
#if NeedWidePrototypes
|
||||
int resize_it
|
||||
#else
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
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 = \
|
||||
Actions.c \
|
||||
AllWidgets.c \
|
||||
|
@ -138,5 +130,3 @@ endif
|
|||
endif
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = sharedlib.c
|
||||
|
|
|
@ -306,6 +306,7 @@ 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@
|
||||
|
@ -364,14 +365,6 @@ top_build_prefix = @top_build_prefix@
|
|||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
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 = \
|
||||
Actions.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_LIBADD = $(XAW7_LIBS)
|
||||
EXTRA_DIST = sharedlib.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
|
|
@ -128,7 +128,10 @@ MenuButtonClassRec menuButtonClassRec = {
|
|||
},
|
||||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive /* change_sensitive */
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* 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;
|
||||
Position button_x, button_y;
|
||||
|
||||
temp = w;
|
||||
if ((temp = w) == NULL)
|
||||
return;
|
||||
|
||||
while(temp != NULL) {
|
||||
menu = XtNameToWidget(temp, mbw->menu_button.menu_name);
|
||||
if (menu == NULL)
|
||||
|
|
|
@ -551,7 +551,6 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
TextWidget ctx = (TextWidget)XtParent(w);
|
||||
Widget source = ctx->text.source;
|
||||
XawTextPosition idx, pos;
|
||||
wchar_t c;
|
||||
XFontSetExtents *ext = XExtentsOfFontSet(fontset);
|
||||
XawTextBlock blk;
|
||||
int i, rWidth;
|
||||
|
@ -559,6 +558,8 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx,
|
|||
pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos));
|
||||
rWidth = 0;
|
||||
for (i = 0, idx = fromPos; idx < toPos; i++, idx++) {
|
||||
wchar_t c;
|
||||
|
||||
if (i >= blk.length) {
|
||||
i = 0;
|
||||
XawTextSourceRead(source, pos, &blk, (int)(toPos - pos));
|
||||
|
@ -656,15 +657,15 @@ GetGC(MultiSinkObject sink)
|
|||
{
|
||||
XtGCMask valuemask = (GCGraphicsExposures | GCClipXOrigin |
|
||||
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 */
|
||||
values.clip_x_origin = (int)(long)sink;
|
||||
values.clip_mask = None;
|
||||
values.graphics_exposures = False;
|
||||
|
||||
values.foreground = sink->text_sink.foreground;
|
||||
values.background = sink->text_sink.background;
|
||||
.foreground = sink->text_sink.foreground,
|
||||
.background = sink->text_sink.background
|
||||
};
|
||||
|
||||
sink->multi_sink.normgc = XtAllocateGC((Widget)sink, 0, valuemask, &values,
|
||||
GCFont | GCClipMask, 0);
|
||||
|
|
|
@ -75,6 +75,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 0
|
||||
#endif
|
||||
|
||||
#define MAGIC_VALUE ((XawTextPosition)-1)
|
||||
#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->ptr = (char *)(piece->text + (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);
|
||||
}
|
||||
|
@ -404,12 +408,15 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos,
|
|||
if (src->text_src.edit_mode == XawtextRead)
|
||||
return (XawEditError);
|
||||
|
||||
start_piece = FindPiece(src, startPos, &start_first);
|
||||
end_piece = FindPiece(src, endPos, &end_first);
|
||||
if ((start_piece = FindPiece(src, startPos, &start_first)) == NULL)
|
||||
return XawEditError;
|
||||
if ((end_piece = FindPiece(src, endPos, &end_first)) == NULL)
|
||||
return XawEditError;
|
||||
|
||||
/* STEP 3: remove the empty pieces... */
|
||||
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 (((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 */
|
||||
return (0);
|
||||
ptr = piece->text + piece->used - 1;
|
||||
c = *ptr;
|
||||
}
|
||||
else if (ptr >= piece->text + piece->used) {
|
||||
piece = piece->next;
|
||||
|
@ -869,7 +875,7 @@ static void
|
|||
XawMultiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
|
||||
{
|
||||
MultiSrcObject src = (MultiSrcObject)w;
|
||||
unsigned int i;
|
||||
Cardinal i;
|
||||
|
||||
if (src->multi_src.type == XawAsciiString) {
|
||||
for (i = 0; i < *num_args ; i++) {
|
||||
|
@ -1034,13 +1040,10 @@ Bool
|
|||
_XawMultiSaveAsFile(Widget w, _Xconst char* name)
|
||||
{
|
||||
MultiSrcObject src = (MultiSrcObject)w;
|
||||
char * mb_string;
|
||||
Bool ret;
|
||||
|
||||
mb_string = StorePiecesInString(src);
|
||||
char *mb_string = StorePiecesInString(src);
|
||||
|
||||
if (mb_string != 0) {
|
||||
ret = WriteToFile(mb_string, (String)name);
|
||||
Bool ret = WriteToFile(mb_string, (String)name);
|
||||
XtFree(mb_string);
|
||||
|
||||
return (ret);
|
||||
|
@ -1089,7 +1092,7 @@ WriteToFile(String string, String name)
|
|||
int fd;
|
||||
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);
|
||||
|
||||
if (write(fd, string, strlen(string)) == -1)
|
||||
|
@ -1215,7 +1218,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString)
|
|||
XtErrorMsg("NoFile", "multiSourceCreate", "XawError",
|
||||
"Creating a read only disk widget and no file specified.",
|
||||
NULL, 0);
|
||||
open_mode = O_RDONLY;
|
||||
open_mode = O_RDONLY | O_CLOEXEC;
|
||||
fdopen_mode = "r";
|
||||
break;
|
||||
case XawtextAppend:
|
||||
|
@ -1225,9 +1228,9 @@ InitStringOrFile(MultiSrcObject src, Bool newString)
|
|||
src->multi_src.is_tempfile = True;
|
||||
}
|
||||
else {
|
||||
/* O_NOFOLLOW is a BSD & Linux extension */
|
||||
/* O_NOFOLLOW was a FreeBSD & Linux extension, now adopted by POSIX */
|
||||
#ifdef O_NOFOLLOW
|
||||
open_mode = O_RDWR | O_NOFOLLOW;
|
||||
open_mode = O_RDWR | O_NOFOLLOW | O_CLOEXEC;
|
||||
#else
|
||||
open_mode = O_RDWR; /* unsafe; subject to race conditions */
|
||||
#endif
|
||||
|
@ -1323,7 +1326,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string)
|
|||
else {
|
||||
if (src->multi_src.length != 0) {
|
||||
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);
|
||||
src->multi_src.length = (XawTextPosition)fread(temp_mb_holder,
|
||||
sizeof(unsigned char),
|
||||
|
|
|
@ -466,6 +466,10 @@ PanedClassRec panedClassRec = {
|
|||
XawPanedPaneSetValues, /* set_values */
|
||||
NULL, /* extension */
|
||||
},
|
||||
/* paned */
|
||||
{
|
||||
NULL, /* extension */
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
|
@ -792,9 +796,7 @@ static void
|
|||
CommitNewLocations(PanedWidget pw)
|
||||
{
|
||||
Widget *childP;
|
||||
XWindowChanges changes;
|
||||
|
||||
changes.stack_mode = Above;
|
||||
XWindowChanges changes = { .stack_mode = Above };
|
||||
|
||||
ForAllPanes(pw, childP) {
|
||||
Pane pane = PaneInfo(*childP);
|
||||
|
@ -910,7 +912,7 @@ static void
|
|||
_DrawInternalBorders(PanedWidget pw, GC gc)
|
||||
{
|
||||
Widget *childP;
|
||||
int on_loc, off_loc;
|
||||
int off_loc;
|
||||
unsigned int on_size, off_size;
|
||||
|
||||
/*
|
||||
|
@ -925,7 +927,7 @@ _DrawInternalBorders(PanedWidget pw, GC gc)
|
|||
on_size = (unsigned int)pw->paned.internal_bw;
|
||||
|
||||
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;
|
||||
|
||||
_DrawRect(pw, gc, on_loc, off_loc, on_size, off_size);
|
||||
|
@ -1041,7 +1043,6 @@ static void
|
|||
StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir)
|
||||
{
|
||||
Widget *childP;
|
||||
Cursor cursor;
|
||||
|
||||
pw->paned.whichadd = pw->paned.whichsub = NULL;
|
||||
|
||||
|
@ -1054,6 +1055,8 @@ StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir)
|
|||
* Change the cursor
|
||||
*/
|
||||
if (XtIsRealized(grip)) {
|
||||
Cursor cursor;
|
||||
|
||||
if (IsVert(pw)) {
|
||||
if (dir == UpLeftPane)
|
||||
cursor = pw->paned.adjust_upper_cursor;
|
||||
|
@ -1122,11 +1125,17 @@ MoveGripAdjustment(PanedWidget pw, Widget grip, Direction dir, int loc)
|
|||
if (dir == ThisBorderOnly) {
|
||||
int old_add_size = add_size, old_sub_size;
|
||||
|
||||
if (pw->paned.whichadd == NULL)
|
||||
return;
|
||||
|
||||
AssignMax(add_size, (int)PaneInfo(pw->paned.whichadd)->min);
|
||||
AssignMin(add_size, (int)PaneInfo(pw->paned.whichadd)->max);
|
||||
if (add_size != old_add_size)
|
||||
sub_size += old_add_size - add_size;
|
||||
|
||||
if (pw->paned.whichsub == NULL)
|
||||
return;
|
||||
|
||||
old_sub_size = sub_size;
|
||||
AssignMax(sub_size, (int)PaneInfo(pw->paned.whichsub)->min);
|
||||
AssignMin(sub_size, (int)PaneInfo(pw->paned.whichsub)->max);
|
||||
|
@ -1452,7 +1461,6 @@ ChangeAllGripCursors(PanedWidget pw)
|
|||
Widget *childP;
|
||||
|
||||
ForAllPanes(pw, childP) {
|
||||
Arg arglist[1];
|
||||
Cursor cursor;
|
||||
|
||||
if ((cursor = pw->paned.grip_cursor) == None) {
|
||||
|
@ -1463,6 +1471,8 @@ ChangeAllGripCursors(PanedWidget pw)
|
|||
}
|
||||
|
||||
if (HasGrip(*childP)) {
|
||||
Arg arglist[1];
|
||||
|
||||
XtSetArg(arglist[0], XtNcursor, cursor);
|
||||
XtSetValues(PaneInfo(*childP)->grip, arglist, 1);
|
||||
}
|
||||
|
|
|
@ -39,12 +39,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/Xaw/PannerP.h>
|
||||
#include <X11/Xaw/XawInit.h>
|
||||
#include "Private.h"
|
||||
|
||||
#if defined(ISC) && __STDC__ && !defined(ISC30)
|
||||
extern double atof(char *);
|
||||
#else
|
||||
#include <stdlib.h> /* for atof() */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Class Methods
|
||||
|
@ -342,7 +337,7 @@ WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
|
|||
static void
|
||||
reset_shadow_gc(PannerWidget pw)
|
||||
{
|
||||
XtGCMask valuemask = GCForeground;
|
||||
XtGCMask valuemask;
|
||||
XGCValues values;
|
||||
unsigned long pixels[3];
|
||||
|
||||
|
@ -981,11 +976,11 @@ ActionPage(Widget gw, XEvent *event, String *params, Cardinal *num_params)
|
|||
y += pw->panner.knob_y;
|
||||
|
||||
if (isin) { /* if in, then use move */
|
||||
XEvent ev;
|
||||
|
||||
ev.xbutton.type = ButtonPress;
|
||||
ev.xbutton.x = x;
|
||||
ev.xbutton.y = y;
|
||||
XEvent ev = {
|
||||
.xbutton.type = ButtonPress,
|
||||
.xbutton.x = x,
|
||||
.xbutton.y = y
|
||||
};
|
||||
ActionMove(gw, &ev, NULL, &zero);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -469,14 +469,15 @@ _XawFindCache(XawCache *xaw,
|
|||
static XawCache *
|
||||
_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);
|
||||
|
||||
if (!cache)
|
||||
{
|
||||
s_cache = _XawFindCache(xaw,
|
||||
screen, colormap, depth, FIND_SCREEN);
|
||||
XawCache *c_cache, *d_cache, *pcache;
|
||||
XawCache *s_cache = _XawFindCache(xaw,
|
||||
screen, colormap, depth, FIND_SCREEN);
|
||||
if (!s_cache)
|
||||
{
|
||||
pcache = (XawCache *)XtMalloc(sizeof(XawCache));
|
||||
|
@ -664,7 +665,7 @@ GetResourcePixmapPath(Display *display)
|
|||
XrmRepresentation rep_type;
|
||||
XrmValue value;
|
||||
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[1] = NULLQUARK;
|
||||
|
@ -707,7 +708,6 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
{
|
||||
Pixel fg, bg;
|
||||
XColor color, exact;
|
||||
Pixmap pixmap;
|
||||
unsigned int width, height;
|
||||
unsigned char *data = NULL;
|
||||
int hotX, hotY;
|
||||
|
@ -716,8 +716,8 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
static SubstitutionRec sub[] = {
|
||||
{'H', NULL},
|
||||
{'N', NULL},
|
||||
{'T', "bitmaps"},
|
||||
{'P', PROJECT_ROOT},
|
||||
{'T', (_XtString) "bitmaps"},
|
||||
{'P', (_XtString) PROJECT_ROOT},
|
||||
};
|
||||
char *filename;
|
||||
|
||||
|
@ -747,7 +747,7 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
{
|
||||
if (!sub[0].substitution)
|
||||
sub[0].substitution = getenv("HOME");
|
||||
sub[1].substitution = params->name;
|
||||
sub[1].substitution = (_XtString)params->name;
|
||||
if (pixmap_path == NULL)
|
||||
GetResourcePixmapPath(DisplayOfScreen(screen));
|
||||
filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL);
|
||||
|
@ -755,15 +755,16 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
return (FALSE);
|
||||
}
|
||||
else
|
||||
filename = params->name;
|
||||
filename = (char*)params->name;
|
||||
|
||||
if (XReadBitmapFileData(filename, &width, &height, &data,
|
||||
&hotX, &hotY) == BitmapSuccess)
|
||||
{
|
||||
pixmap = XCreatePixmapFromBitmapData(DisplayOfScreen(screen),
|
||||
RootWindowOfScreen(screen),
|
||||
(char *)data,
|
||||
width, height, fg, bg, (unsigned)depth);
|
||||
Pixmap pixmap =
|
||||
XCreatePixmapFromBitmapData(DisplayOfScreen(screen),
|
||||
RootWindowOfScreen(screen),
|
||||
(char *)data,
|
||||
width, height, fg, bg, (unsigned)depth);
|
||||
if (data)
|
||||
XFree(data);
|
||||
*pixmap_return = pixmap;
|
||||
|
@ -828,7 +829,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
|
||||
value = NULL;
|
||||
if ((argval = XawFindArgVal(params, "start")) != NULL)
|
||||
value = argval->value;
|
||||
value = (char*)argval->value;
|
||||
if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
|
||||
&start, &color))
|
||||
return (False);
|
||||
|
@ -839,7 +840,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth,
|
|||
}
|
||||
value = NULL;
|
||||
if ((argval = XawFindArgVal(params, "end")) != NULL)
|
||||
value = argval->value;
|
||||
value = (char*)argval->value;
|
||||
if (value && !XAllocNamedColor(DisplayOfScreen(screen), colormap, value,
|
||||
&end, &color))
|
||||
return (False);
|
||||
|
@ -936,8 +937,8 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth _X
|
|||
static SubstitutionRec sub[] = {
|
||||
{'H', NULL},
|
||||
{'N', NULL},
|
||||
{'T', "pixmaps"},
|
||||
{'P', PROJECT_ROOT},
|
||||
{'T', (_XtString) "pixmaps"},
|
||||
{'P', (_XtString) PROJECT_ROOT},
|
||||
};
|
||||
const char *filename;
|
||||
|
||||
|
@ -949,7 +950,7 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth _X
|
|||
{
|
||||
if (!sub[0].substitution)
|
||||
sub[0].substitution = getenv("HOME");
|
||||
sub[1].substitution = params->name;
|
||||
sub[1].substitution = (_XtString)params->name;
|
||||
if (pixmap_path == NULL)
|
||||
GetResourcePixmapPath(DisplayOfScreen(screen));
|
||||
filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL);
|
||||
|
|
|
@ -153,15 +153,15 @@ SendReport(PortholeWidget pw, unsigned int changed)
|
|||
Widget child = find_child(pw);
|
||||
|
||||
if (pw->porthole.report_callbacks && child) {
|
||||
XawPannerReport prep;
|
||||
|
||||
prep.changed = changed;
|
||||
prep.slider_x = (Position)(-XtX(child)); /* porthole is "inner" */
|
||||
prep.slider_y = (Position)(-XtY(child)); /* child is outer since it is larger */
|
||||
prep.slider_width = XtWidth(pw);
|
||||
prep.slider_height = XtHeight(pw);
|
||||
prep.canvas_width = XtWidth(child);
|
||||
prep.canvas_height = XtHeight(child);
|
||||
XawPannerReport prep = {
|
||||
.changed = changed,
|
||||
.slider_x = (Position)(-XtX(child)), /* porthole is "inner" */
|
||||
.slider_y = (Position)(-XtY(child)), /* child is outer since it is larger */
|
||||
.slider_width = XtWidth(pw),
|
||||
.slider_height = XtHeight(pw),
|
||||
.canvas_width = XtWidth(child),
|
||||
.canvas_height = XtHeight(child)
|
||||
};
|
||||
XtCallCallbackList((Widget)pw, pw->porthole.report_callbacks,
|
||||
(XtPointer)&prep);
|
||||
}
|
||||
|
@ -351,9 +351,8 @@ XawPortholeChangeManaged(Widget gw)
|
|||
|
||||
if (child) {
|
||||
if (!XtIsRealized (gw)) {
|
||||
XtWidgetGeometry geom, retgeom;
|
||||
XtWidgetGeometry geom = { .request_mode = 0 }, retgeom;
|
||||
|
||||
geom.request_mode = 0;
|
||||
if (XtWidth(pw) == 0) {
|
||||
geom.width = XtWidth(child);
|
||||
geom.request_mode |= CWWidth;
|
||||
|
|
|
@ -190,6 +190,9 @@ RepeaterClassRec repeaterClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* label */
|
||||
{
|
||||
|
|
|
@ -316,6 +316,9 @@ ScrollbarClassRec scrollbarClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* scrollbar */
|
||||
{
|
||||
|
|
|
@ -225,6 +225,9 @@ SimpleClassRec simpleClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
ChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -272,6 +272,9 @@ static CompositeClassExtensionRec extension_rec = {
|
|||
XtCompositeExtensionVersion, /* version */
|
||||
sizeof(CompositeClassExtensionRec), /* record_size */
|
||||
True, /* accepts_objects */
|
||||
#ifndef OLDXAW
|
||||
False, /* allows_change_managed_set */
|
||||
#endif
|
||||
};
|
||||
|
||||
#define Superclass (&overrideShellClassRec)
|
||||
|
@ -1070,7 +1073,9 @@ CreateLabel(Widget w)
|
|||
*next_child = *child;
|
||||
next_child = child;
|
||||
}
|
||||
*child = (Widget)smw->simple_menu.label;
|
||||
|
||||
if (child != NULL)
|
||||
*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;
|
||||
Dimension *widths;
|
||||
|
||||
height = 0;
|
||||
|
||||
if (XtIsSubclass(w, simpleMenuWidgetClass)) {
|
||||
smw = (SimpleMenuWidget)w;
|
||||
current_entry = NULL;
|
||||
|
@ -1196,7 +1199,7 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret)
|
|||
++n;
|
||||
}
|
||||
|
||||
height = (tmp_h + smw->simple_menu.bottom_margin);
|
||||
height = (Dimension)(tmp_h + smw->simple_menu.bottom_margin);
|
||||
width = (Dimension)(width + tmp_w);
|
||||
|
||||
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
|
||||
FindMenu(Widget widget, String name)
|
||||
{
|
||||
Widget w, menu;
|
||||
Widget w;
|
||||
|
||||
for (w = widget; w != NULL; w = XtParent(w))
|
||||
if ((menu = XtNameToWidget(w, name)) != NULL)
|
||||
for (w = widget; w != NULL; w = XtParent(w)) {
|
||||
Widget menu = XtNameToWidget(w, name);
|
||||
|
||||
if (menu != NULL)
|
||||
return (menu);
|
||||
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -1458,11 +1463,12 @@ static void
|
|||
MakeSetValuesRequest(Widget w, unsigned int width, unsigned int height)
|
||||
{
|
||||
SimpleMenuWidget smw = (SimpleMenuWidget)w;
|
||||
Arg arglist[2];
|
||||
Cardinal num_args = 0;
|
||||
|
||||
if (!smw->simple_menu.recursive_set_values) {
|
||||
if (XtWidth(smw) != width || XtHeight(smw) != height) {
|
||||
Arg arglist[2];
|
||||
Cardinal num_args = 0;
|
||||
|
||||
smw->simple_menu.recursive_set_values = True;
|
||||
XtSetArg(arglist[num_args], XtNwidth, width); 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 &&
|
||||
XtX(w) + XtWidth(w) + (XtBorderWidth(w)) > x_root) {
|
||||
warp = -8;
|
||||
if (smw->simple_menu.entry_set) {
|
||||
entry = DoGetEventEntry(w,
|
||||
XtX(smw->simple_menu.entry_set)
|
||||
|
|
|
@ -705,15 +705,16 @@ static void
|
|||
CreateGCs(Widget w)
|
||||
{
|
||||
SmeBSBObject entry = (SmeBSBObject)w;
|
||||
XGCValues values;
|
||||
XtGCMask mask, mask_i18n;
|
||||
XGCValues values = {
|
||||
.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)
|
||||
entry->sme_bsb.rev_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0);
|
||||
else
|
||||
|
|
|
@ -181,12 +181,12 @@ static void
|
|||
CreateGC(Widget w)
|
||||
{
|
||||
SmeLineObject entry = (SmeLineObject)w;
|
||||
XGCValues values;
|
||||
XtGCMask mask = GCForeground | GCGraphicsExposures | GCLineWidth;
|
||||
|
||||
values.foreground = entry->sme_line.foreground;
|
||||
values.graphics_exposures = False;
|
||||
values.line_width = entry->sme_line.line_width;
|
||||
XGCValues values = {
|
||||
.foreground = entry->sme_line.foreground,
|
||||
.graphics_exposures = False,
|
||||
.line_width = entry->sme_line.line_width
|
||||
};
|
||||
|
||||
if (entry->sme_line.stipple != XtUnspecifiedPixmap) {
|
||||
values.stipple = entry->sme_line.stipple;
|
||||
|
|
|
@ -318,7 +318,7 @@ static void
|
|||
draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED)
|
||||
{
|
||||
StripChartWidget w = (StripChartWidget)client_data;
|
||||
double value;
|
||||
double value = 0.0;
|
||||
|
||||
if (w->strip_chart.update > 0)
|
||||
w->strip_chart.interval_id =
|
||||
|
@ -385,7 +385,6 @@ draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED)
|
|||
static int
|
||||
repaint_window(StripChartWidget w, int left, int width)
|
||||
{
|
||||
int i, j;
|
||||
int next = w->strip_chart.interval;
|
||||
int scale = w->strip_chart.scale;
|
||||
int scalewidth = 0;
|
||||
|
@ -410,6 +409,7 @@ repaint_window(StripChartWidget w, int left, int width)
|
|||
}
|
||||
|
||||
if (XtIsRealized((Widget)w)) {
|
||||
int i;
|
||||
Display *dpy = XtDisplay(w);
|
||||
Window win = XtWindow(w);
|
||||
|
||||
|
@ -434,7 +434,7 @@ repaint_window(StripChartWidget w, int left, int width)
|
|||
|
||||
/* Draw graph reference lines */
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -474,9 +474,7 @@ static XtResource resources[] = {
|
|||
{ toVal->size = sizeof(type); toVal->addr = (XPointer)address; }
|
||||
|
||||
static XrmQuark QWrapNever, QWrapLine, QWrapWord;
|
||||
#ifndef notdef
|
||||
static XrmQuark QScrollNever, QScrollWhenNeeded, QScrollAlways;
|
||||
#endif
|
||||
static XrmQuark QJustifyLeft, QJustifyRight, QJustifyCenter, QJustifyFull;
|
||||
|
||||
/*ARGSUSED*/
|
||||
|
@ -795,7 +793,7 @@ CreateVScrollBar(TextWidget ctx)
|
|||
XtAddCallback(vbar, XtNscrollProc, VScroll, (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;
|
||||
|
||||
PositionVScrollBar(ctx);
|
||||
|
@ -950,7 +948,7 @@ XawTextInitialize(Widget request _X_UNUSED, Widget cnew,
|
|||
if (XtHeight(ctx) == DEFAULT_TEXT_HEIGHT) {
|
||||
XtHeight(ctx) = (Dimension)VMargins(ctx);
|
||||
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)
|
||||
|
@ -1069,14 +1067,16 @@ void
|
|||
_XawTextNeedsUpdating(TextWidget ctx,
|
||||
XawTextPosition left, XawTextPosition right)
|
||||
{
|
||||
XmuSegment segment;
|
||||
|
||||
if (left >= right)
|
||||
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 *
|
||||
_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 */
|
||||
if (XawTextFormat(ctx, XawFmtWide)) {
|
||||
MultiSinkObject sink = (MultiSinkObject)ctx->text.sink;
|
||||
ws = (wchar_t *)_XawTextGetText(ctx, left, right);
|
||||
n = (long)wcslen(ws);
|
||||
wchar_t *ws = (wchar_t *)_XawTextGetText(ctx, left, right);
|
||||
long n = (long)wcslen(ws);
|
||||
long i, 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)
|
||||
|| (wc == _Xaw_atowc(XawTAB)) || (wc == _Xaw_atowc(XawLF))
|
||||
|| (wc == _Xaw_atowc(XawESC)))
|
||||
|
@ -1145,12 +1142,13 @@ _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right)
|
|||
return ((char *)ws);
|
||||
}
|
||||
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 */
|
||||
n = (long)strlen((char *)s);
|
||||
i = 0;
|
||||
long n = (long)strlen((char *)s);
|
||||
long i = 0, j;
|
||||
|
||||
for (j = 0; j < n; j++) {
|
||||
c = s[j];
|
||||
unsigned char c = s[j];
|
||||
if (((c >= 0x20) && c <= 0x7f)
|
||||
||(c >= 0xa0) || (c == XawTAB) || (c == XawLF)
|
||||
|| (c == XawESC)) {
|
||||
|
@ -1222,14 +1220,15 @@ static Bool
|
|||
LineAndXYForPosition(TextWidget ctx, XawTextPosition pos,
|
||||
int *line, int *x, int *y)
|
||||
{
|
||||
XawTextPosition linePos, endPos;
|
||||
Boolean visible;
|
||||
int realW, realH;
|
||||
|
||||
*line = 0;
|
||||
*x = ctx->text.left_margin;
|
||||
*y = ctx->text.margin.top + 1;
|
||||
if ((visible = IsPositionVisible(ctx, pos)) != False) {
|
||||
XawTextPosition linePos, endPos;
|
||||
int realW, realH;
|
||||
|
||||
*line = LineForPosition(ctx, pos);
|
||||
*y = ctx->text.lt.info[*line].y;
|
||||
linePos = ctx->text.lt.info[*line].position;
|
||||
|
@ -1252,12 +1251,11 @@ void
|
|||
_XawTextBuildLineTable(TextWidget ctx, XawTextPosition position,
|
||||
_XtBoolean force_rebuild)
|
||||
{
|
||||
Dimension height = 0;
|
||||
int lines = 0;
|
||||
Cardinal size;
|
||||
|
||||
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);
|
||||
}
|
||||
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)
|
||||
ctx->text.clear_to_eol = True;
|
||||
lt->textWidth = (unsigned)width;
|
||||
lt->textWidth = (Dimension)width;
|
||||
}
|
||||
y = (Position)(y + height);
|
||||
|
||||
|
@ -1486,9 +1484,11 @@ GetWidestLine(TextWidget ctx)
|
|||
void
|
||||
_XawTextSetScrollBars(TextWidget ctx)
|
||||
{
|
||||
float first, last, denom, widest;
|
||||
float first;
|
||||
|
||||
if (ctx->text.scroll_vert == XawtextScrollAlways) {
|
||||
float last;
|
||||
|
||||
if (ctx->text.lastPos == 0)
|
||||
first = 0.0;
|
||||
else
|
||||
|
@ -1504,7 +1504,10 @@ _XawTextSetScrollBars(TextWidget ctx)
|
|||
}
|
||||
|
||||
if (ctx->text.scroll_horiz == XawtextScrollAlways) {
|
||||
denom = (float)GetWidestLine(ctx);
|
||||
unsigned value = GetWidestLine(ctx);
|
||||
float denom = (float)value;
|
||||
float widest;
|
||||
|
||||
if (denom <= 0)
|
||||
denom = (float)((int)XtWidth(ctx) - RHMargins(ctx));
|
||||
if (denom <= 0)
|
||||
|
@ -1712,7 +1715,6 @@ XawTextScroll(TextWidget ctx, int vlines, int hpixels)
|
|||
else {
|
||||
update_from = lt->info[lt->lines - vlines].position;
|
||||
update_to = lt->info[lt->lines].position;
|
||||
y1 = lt->info[lt->lines - vlines].y;
|
||||
y2 = lt->info[vlines].y;
|
||||
DoCopyArea(ctx, ctx->text.r_margin.left, 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;
|
||||
float percent = *(float *)callData;
|
||||
unsigned value = GetWidestLine(ctx);
|
||||
long pixels;
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -1956,7 +1959,6 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
TextWidget ctx = (TextWidget)w;
|
||||
Widget src = ctx->text.source;
|
||||
XawTextEditType edit_mode;
|
||||
Arg args[1];
|
||||
XawTextSelectionSalt *salt = NULL;
|
||||
XawTextSelection *s;
|
||||
|
||||
|
@ -1966,9 +1968,12 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
|
||||
if (SrcCvtSel(src, selection, target, type, value, length, format))
|
||||
return (True);
|
||||
else {
|
||||
Arg args[1];
|
||||
|
||||
XtSetArg(args[0], XtNeditType, &edit_mode);
|
||||
XtGetValues(src, args, ONE);
|
||||
XtSetArg(args[0], XtNeditType, &edit_mode);
|
||||
XtGetValues(src, args, ONE);
|
||||
}
|
||||
|
||||
XmuConvertStandardSelection(w, ctx->text.time, selection,
|
||||
target, type, (XPointer*)&std_targets,
|
||||
|
@ -2045,20 +2050,21 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
*length = strlen((char *)*value);
|
||||
}
|
||||
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);
|
||||
*length = (unsigned long)salt->length;
|
||||
}
|
||||
/* Got *value,*length, now in COMPOUND_TEXT format. */
|
||||
if (XawTextFormat(ctx, XawFmtWide) && *type == XA_STRING) {
|
||||
XTextProperty textprop;
|
||||
wchar_t **wlist;
|
||||
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)
|
||||
< Success
|
||||
|| count < 1) {
|
||||
|
@ -2075,14 +2081,15 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
*length = textprop.nitems;
|
||||
XwcFreeStringList(wlist);
|
||||
} else if (*type == XA_UTF8_STRING(d)) {
|
||||
XTextProperty textprop;
|
||||
char **list;
|
||||
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)
|
||||
< Success
|
||||
|| count < 1) {
|
||||
|
@ -2352,10 +2359,10 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right,
|
|||
|
||||
if (left < right) {
|
||||
Widget w = (Widget)ctx;
|
||||
int buffer;
|
||||
|
||||
while (count) {
|
||||
Atom selection = selections[--count];
|
||||
int buffer;
|
||||
|
||||
/*
|
||||
* If this is a cut buffer
|
||||
|
@ -2396,7 +2403,7 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right,
|
|||
while (len > max_len) {
|
||||
len -= max_len;
|
||||
tptr += max_len;
|
||||
amount = Min (len, max_len);
|
||||
amount = (unsigned) Min (len, max_len);
|
||||
XChangeProperty(XtDisplay(w), RootWindow(XtDisplay(w), 0),
|
||||
selection, XA_STRING, 8, PropModeAppend,
|
||||
tptr, (int)amount);
|
||||
|
@ -2679,12 +2686,13 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right)
|
|||
|
||||
TextWidget ctx = (TextWidget)w;
|
||||
int x, y, line;
|
||||
XawTextPosition start, end, last, final;
|
||||
XawTextPosition last;
|
||||
XmuScanline *scan;
|
||||
XmuSegment *seg;
|
||||
XmuArea *clip = NULL;
|
||||
Bool cleol = ctx->text.clear_to_eol;
|
||||
Bool has_selection = ctx->text.s.right > ctx->text.s.left;
|
||||
XawTextPosition start;
|
||||
|
||||
left = left < ctx->text.lt.top ? ctx->text.lt.top : left;
|
||||
|
||||
|
@ -2697,7 +2705,10 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right)
|
|||
if (cleol)
|
||||
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)
|
||||
end = right;
|
||||
|
||||
|
@ -2756,10 +2767,11 @@ DisplayText(Widget w, XawTextPosition left, XawTextPosition right)
|
|||
|
||||
TextWidget ctx = (TextWidget)w;
|
||||
int y, line;
|
||||
XawTextPosition from, to, lastPos;
|
||||
XawTextPosition lastPos;
|
||||
Bool cleol = ctx->text.clear_to_eol;
|
||||
Bool has_selection = ctx->text.s.right > ctx->text.s.left;
|
||||
XawTextPaintList *paint_list;
|
||||
XawTextPosition from;
|
||||
|
||||
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;
|
||||
|
||||
for (from = left; from < right && line < ctx->text.lt.lines; line++) {
|
||||
if ((to = ctx->text.lt.info[line + 1].position) > right)
|
||||
for (from = left;
|
||||
from < right && line < ctx->text.lt.lines; line++) {
|
||||
XawTextPosition to = ctx->text.lt.info[line + 1].position;
|
||||
|
||||
if (to > right)
|
||||
to = right;
|
||||
|
||||
if (to > lastPos)
|
||||
|
@ -2834,7 +2849,7 @@ static void
|
|||
DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion)
|
||||
{
|
||||
XawTextPosition newLeft, newRight;
|
||||
XawTextSelectType newType, *sarray;
|
||||
XawTextSelectType newType;
|
||||
Widget src = ctx->text.source;
|
||||
|
||||
if (motion)
|
||||
|
@ -2842,7 +2857,8 @@ DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion)
|
|||
else {
|
||||
if ((labs((long) time - (long) ctx->text.lasttime) < MULTI_CLICK_TIME)
|
||||
&& (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;
|
||||
sarray++)
|
||||
;
|
||||
|
@ -3062,7 +3078,7 @@ _XawTextClearAndCenterDisplay(TextWidget ctx)
|
|||
left_margin == ctx->text.left_margin) {
|
||||
int insert_line = LineForPosition(ctx, ctx->text.insertPos);
|
||||
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);
|
||||
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)
|
||||
return (1);
|
||||
else {
|
||||
XawTextPosition tmp;
|
||||
int dim, lines = 0, wwidth = GetMaxTextWidth(ctx);
|
||||
|
||||
while (left < right) {
|
||||
tmp = left;
|
||||
XawTextPosition tmp = left;
|
||||
|
||||
XawTextSinkFindPosition(ctx->text.sink, left,
|
||||
ctx->text.left_margin,
|
||||
wwidth, ctx->text.wrap == XawtextWrapWord,
|
||||
|
|
|
@ -403,14 +403,14 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection _X_UNUSED,
|
|||
|
||||
StartAction(ctx, NULL);
|
||||
if (XawTextFormat(ctx, XawFmtWide)) {
|
||||
XTextProperty textprop;
|
||||
wchar_t **wlist;
|
||||
int count;
|
||||
|
||||
textprop.encoding = *type;
|
||||
textprop.value = (unsigned char *)value;
|
||||
textprop.nitems = strlen(value);
|
||||
textprop.format = 8;
|
||||
XTextProperty textprop = {
|
||||
.encoding = *type,
|
||||
.value = (unsigned char *)value,
|
||||
.nitems = strlen(value),
|
||||
.format = 8
|
||||
};
|
||||
|
||||
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
|
||||
!= 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 "
|
||||
"an illegal selection.\n");
|
||||
|
||||
textprop.value = (const unsigned char *)" >> ILLEGAL SELECTION << ";
|
||||
textprop.value = (unsigned char *)" >> ILLEGAL SELECTION << ";
|
||||
textprop.nitems = strlen((char *) textprop.value);
|
||||
if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count)
|
||||
!= Success
|
||||
|
@ -950,7 +950,6 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
TextWidget ctx = (TextWidget)w;
|
||||
Widget src = ctx->text.source;
|
||||
XawTextEditType edit_mode;
|
||||
Arg args[1];
|
||||
XawTextSelectionSalt *salt = NULL;
|
||||
XawTextSelection *s;
|
||||
|
||||
|
@ -960,9 +959,12 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
|
||||
if (SrcCvtSel(src, selection, target, type, value, length, format))
|
||||
return (True);
|
||||
else {
|
||||
Arg args[1];
|
||||
|
||||
XtSetArg(args[0], XtNeditType,&edit_mode);
|
||||
XtGetValues(src, args, 1);
|
||||
XtSetArg(args[0], XtNeditType,&edit_mode);
|
||||
XtGetValues(src, args, 1);
|
||||
}
|
||||
|
||||
XmuConvertStandardSelection(w, ctx->text.time, selection,
|
||||
target, type, (XPointer *)&std_targets,
|
||||
|
@ -1035,21 +1037,22 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
*length = strlen(*value);
|
||||
}
|
||||
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);
|
||||
*length = (unsigned long)salt->length;
|
||||
}
|
||||
/* Got *value,*length, now in COMPOUND_TEXT format. */
|
||||
if (XawTextFormat(ctx, XawFmtWide)) {
|
||||
if (*type == XA_STRING) {
|
||||
XTextProperty textprop;
|
||||
wchar_t **wlist;
|
||||
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)
|
||||
< Success
|
||||
|| count < 1) {
|
||||
|
@ -1067,14 +1070,15 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
|
|||
XwcFreeStringList((wchar_t**) wlist);
|
||||
}
|
||||
else if (*type == XA_UTF8_STRING(d)) {
|
||||
XTextProperty textprop;
|
||||
char **list;
|
||||
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)
|
||||
< Success
|
||||
|| count < 1) {
|
||||
|
@ -1194,7 +1198,7 @@ _LoseSelection(Widget w, Atom *selection, char **contents _X_UNUSED, int *length
|
|||
tail = kill_ring;
|
||||
kill_ring = kill_ring->next;
|
||||
}
|
||||
if (kill_ring->refcount == 0) {
|
||||
if (tail != NULL && kill_ring->refcount == 0) {
|
||||
--num_kill_rings;
|
||||
tail->next = NULL;
|
||||
XtFree(kill_ring->contents);
|
||||
|
@ -1289,16 +1293,24 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
|||
if (!append)
|
||||
salt->contents = string;
|
||||
else {
|
||||
salt->contents = XtMalloc((length + size + 1));
|
||||
salt->contents = XtMalloc((Cardinal)(length + size + 1));
|
||||
if (from >= old_from) {
|
||||
strncpy(salt->contents, ring, (size_t)size);
|
||||
salt->contents[size] = '\0';
|
||||
if (ring != NULL) {
|
||||
strncpy(salt->contents, ring, (size_t)size);
|
||||
salt->contents[size] = '\0';
|
||||
} else {
|
||||
salt->contents[size = 0] = '\0';
|
||||
}
|
||||
strncat(salt->contents, string, (size_t)length);
|
||||
}
|
||||
else {
|
||||
strncpy(salt->contents, string, (size_t)length);
|
||||
salt->contents[length] = '\0';
|
||||
strncat(salt->contents, ring, (size_t)size);
|
||||
if (ring != NULL) {
|
||||
strncat(salt->contents, ring, (size_t)size);
|
||||
} else {
|
||||
size = 0;
|
||||
}
|
||||
}
|
||||
salt->contents[length + size] = '\0';
|
||||
XtFree(ring);
|
||||
|
@ -1330,7 +1342,7 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
|||
text.firstPos = 0;
|
||||
|
||||
text.format = (unsigned long)_XawTextFormat(ctx);
|
||||
text.ptr = "";
|
||||
text.ptr = (char*)"";
|
||||
|
||||
if (_XawTextReplace(ctx, from, to, &text)) {
|
||||
XBell(XtDisplay(ctx), 50);
|
||||
|
@ -1399,7 +1411,8 @@ DeleteChar(Widget w, XEvent *event, XawTextScanDirection dir)
|
|||
short mul = MULT(ctx);
|
||||
|
||||
if (mul < 0) {
|
||||
ctx->text.mult = mul = (short)(-mul);
|
||||
mul = -mul;
|
||||
ctx->text.mult = mul;
|
||||
dir = dir == XawsdLeft ? XawsdRight : XawsdLeft;
|
||||
}
|
||||
DeleteOrKill(ctx, event, dir, XawstPositions, True, False);
|
||||
|
@ -1600,11 +1613,10 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
|
|||
|
||||
text.firstPos = 0;
|
||||
text.format = XawFmt8Bit;
|
||||
text.ptr = " ";
|
||||
text.ptr = (char*)" ";
|
||||
text.length = 1;
|
||||
|
||||
position = XawTextSourceRead(ctx->text.source, position,
|
||||
&block, (int)(right - left));
|
||||
XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
|
||||
done = False;
|
||||
space = False;
|
||||
/* convert tabs and returns to spaces */
|
||||
|
@ -1637,11 +1649,10 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right,
|
|||
done = True;
|
||||
}
|
||||
|
||||
text.ptr = "";
|
||||
text.ptr = (char*)"";
|
||||
text.length = 0;
|
||||
position = tmp = left;
|
||||
position = XawTextSourceRead(ctx->text.source, position,
|
||||
&block, (int)(right - left));
|
||||
XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
|
||||
ipos = ctx->text.insertPos;
|
||||
done = False;
|
||||
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;
|
||||
|
||||
text.firstPos = 0;
|
||||
text.ptr = "\t";
|
||||
text.ptr = (char*)"\t";
|
||||
text.format = XawFmt8Bit;
|
||||
text.length = 1;
|
||||
|
||||
position = XawTextSourceRead(ctx->text.source, position,
|
||||
&block, (int)(right - left));
|
||||
XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
|
||||
ipos = ctx->text.insertPos;
|
||||
done = zero = False;
|
||||
if (tab_count)
|
||||
|
@ -1859,14 +1869,13 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right,
|
|||
short *char_tabs = sink->text_sink.char_tabs;
|
||||
int tab_count = sink->text_sink.tab_count;
|
||||
int tab_index = 0, tab_column = 0, tab_base = 0;
|
||||
static char *tabs = " ";
|
||||
static char *tabs = (char*)" ";
|
||||
|
||||
text.firstPos = 0;
|
||||
text.format = XawFmt8Bit;
|
||||
text.ptr = tabs;
|
||||
|
||||
position = XawTextSourceRead(ctx->text.source, position,
|
||||
&block, (int)(right - left));
|
||||
XawTextSourceRead(ctx->text.source, position, &block, (int)(right - left));
|
||||
ipos = ctx->text.insertPos;
|
||||
done = False;
|
||||
zero = False;
|
||||
|
@ -2182,7 +2191,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
|
|||
position = tmp;
|
||||
if (position > left && position - left > ctx->text.left_column
|
||||
&& position != right) {
|
||||
text.ptr = "\n";
|
||||
text.ptr = (char*)"\n";
|
||||
text.length = 1;
|
||||
CHECK_SAVE();
|
||||
if (_XawTextReplace(ctx, position, position + 1, &text))
|
||||
|
@ -2235,7 +2244,6 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
|
|||
}
|
||||
XawStackFree(text.ptr, buf);
|
||||
position += count;
|
||||
right += count;
|
||||
if (num_pos) {
|
||||
for (cpos = 0; cpos < num_pos; cpos++)
|
||||
if (pos[cpos] > left)
|
||||
|
@ -2297,7 +2305,6 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level,
|
|||
inc += ii;
|
||||
}
|
||||
position += count;
|
||||
right += count;
|
||||
XawStackFree(text.ptr, buf);
|
||||
}
|
||||
break;
|
||||
|
@ -2322,18 +2329,17 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
|
|||
TextWidget ctx = (TextWidget)w;
|
||||
TextSrcObject src = (TextSrcObject)ctx->text.source;
|
||||
XawTextPosition from, to, tmp, end = 0, *pos, *posbuf[32];
|
||||
char buf[32];
|
||||
XawTextBlock text;
|
||||
int i, spaces = MULT(ctx);
|
||||
char *lbuf = NULL, *rbuf;
|
||||
unsigned llen = 0, rlen, size;
|
||||
unsigned llen = 0;
|
||||
Bool undo = src->textSrc.enable_undo && src->textSrc.undo_state == False;
|
||||
Bool format = ctx->text.auto_fill
|
||||
&& ctx->text.left_column < ctx->text.right_column;
|
||||
|
||||
text.firstPos = 0;
|
||||
text.format = XawFmt8Bit;
|
||||
text.ptr = "";
|
||||
text.ptr = (char*)"";
|
||||
|
||||
StartAction(ctx, event);
|
||||
|
||||
|
@ -2370,6 +2376,8 @@ Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _
|
|||
tmp = from;
|
||||
|
||||
if (spaces > 0) {
|
||||
char buf[32];
|
||||
|
||||
text.ptr = XawStackAlloc((unsigned)spaces, buf);
|
||||
for (i = 0; i < spaces; 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);
|
||||
|
||||
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);
|
||||
|
||||
text.format = (unsigned long)_XawTextFormat(ctx);
|
||||
|
@ -2601,7 +2611,7 @@ InsertNewLineAndIndent(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n
|
|||
char *ptr;
|
||||
|
||||
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[0] = XawLF;
|
||||
strcpy(++ptr, line_to_ip);
|
||||
|
@ -3020,7 +3030,7 @@ AutoFill(TextWidget ctx)
|
|||
return;
|
||||
|
||||
text.format = XawFmt8Bit;
|
||||
text.ptr = "\n";
|
||||
text.ptr = (char*)"\n";
|
||||
}
|
||||
text.length = 1;
|
||||
text.firstPos = 0;
|
||||
|
@ -3295,7 +3305,7 @@ InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
|||
|
||||
StartAction(ctx, event);
|
||||
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)
|
||||
continue;
|
||||
|
@ -3370,7 +3380,7 @@ DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
|||
|
||||
if (*num_params > 0) { /* default arg is "True" */
|
||||
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);
|
||||
|
||||
if (to.addr != NULL)
|
||||
|
@ -3416,7 +3426,6 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params)
|
|||
return;
|
||||
}
|
||||
else if (mult == 32767) {
|
||||
mult = ctx->text.mult = (short)(- (params[0][0] - '0'));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
@ -3520,19 +3529,20 @@ static XawTextPosition
|
|||
StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
||||
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;
|
||||
XawTextBlock text;
|
||||
char *buf;
|
||||
static wchar_t wc_two_spaces[3];
|
||||
int idx;
|
||||
|
||||
/* Initialize our TextBlock with two spaces. */
|
||||
text.firstPos = 0;
|
||||
text.format = (unsigned long)_XawTextFormat(ctx);
|
||||
if (text.format == XawFmt8Bit)
|
||||
text.ptr= " ";
|
||||
else {
|
||||
if (text.format == XawFmt8Bit) {
|
||||
text.ptr= (char*)" ";
|
||||
} else {
|
||||
static wchar_t wc_two_spaces[3];
|
||||
|
||||
wc_two_spaces[0] = _Xaw_atowc(XawSP);
|
||||
wc_two_spaces[1] = _Xaw_atowc(XawSP);
|
||||
wc_two_spaces[2] = 0;
|
||||
|
@ -3540,11 +3550,13 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
|||
}
|
||||
|
||||
/* Strip out CR's. */
|
||||
eop_begin = eop_end = startPos = endPos = from;
|
||||
eop_begin = eop_end = startPos = from;
|
||||
|
||||
/* CONSTCOND */
|
||||
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, temp, XawstWhiteSpace, XawsdRight,1, False);
|
||||
|
@ -3626,19 +3638,19 @@ static void
|
|||
InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
||||
XawTextPosition *pos, int num_pos)
|
||||
{
|
||||
XawTextPosition startPos, endPos, space, eol;
|
||||
XawTextPosition startPos;
|
||||
XawTextBlock text;
|
||||
int i, width, height, len, wwidth, idx;
|
||||
char *buf;
|
||||
static wchar_t wide_CR[2];
|
||||
int i, width, height, wwidth, idx;
|
||||
|
||||
text.firstPos = 0;
|
||||
text.length = 1;
|
||||
text.format = (unsigned long)_XawTextFormat(ctx);
|
||||
|
||||
if (text.format == XawFmt8Bit)
|
||||
text.ptr = "\n";
|
||||
else {
|
||||
if (text.format == XawFmt8Bit) {
|
||||
text.ptr = (char*)"\n";
|
||||
} else {
|
||||
static wchar_t wide_CR[2];
|
||||
|
||||
wide_CR[0] = _Xaw_atowc(XawLF);
|
||||
wide_CR[1] = 0;
|
||||
text.ptr = (char*)wide_CR;
|
||||
|
@ -3657,6 +3669,10 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
|||
|
||||
/* CONSTCOND */
|
||||
while (TRUE) {
|
||||
int len;
|
||||
char *buf;
|
||||
XawTextPosition endPos, space, eol;
|
||||
|
||||
XawTextSinkFindPosition(ctx->text.sink, startPos,
|
||||
(int)ctx->text.r_margin.left, wwidth,
|
||||
True, &eol, &width, &height);
|
||||
|
@ -3735,14 +3751,12 @@ FormRegion(TextWidget ctx, XawTextPosition from, XawTextPosition to,
|
|||
ctx->text.justify == XawjustifyFull) {
|
||||
Untabify(ctx, from, to, pos, num_pos, NULL);
|
||||
to += ctx->text.lastPos - len;
|
||||
len = ctx->text.insertPos;
|
||||
(void)BlankLine((Widget)ctx, from, &inc);
|
||||
if (from + inc >= to)
|
||||
return (XawEditDone);
|
||||
}
|
||||
if (!StripSpaces(ctx, from + inc, to, pos, num_pos, NULL))
|
||||
return (XawReplaceError);
|
||||
to += ctx->text.lastPos - len;
|
||||
|
||||
FormatText(ctx, from, ctx->text.justify != XawjustifyFull, pos, num_pos);
|
||||
}
|
||||
|
|
|
@ -61,6 +61,12 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/Xaw/Toggle.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* SEARCH_LABEL_1 = "Use <Tab> to change fields.";
|
||||
static _Xconst char* SEARCH_LABEL_2 = "Use ^q<Tab> for <Tab>.";
|
||||
|
@ -305,7 +311,8 @@ InsertFileNamed(Widget tw, String str)
|
|||
XawTextBlock text;
|
||||
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);
|
||||
|
||||
pos = XawTextGetInsertionPoint(tw);
|
||||
|
|
|
@ -198,6 +198,9 @@ TextSinkClassRec textSinkClassRec = {
|
|||
MaxHeight, /* MaxHeight */
|
||||
SetTabs, /* SetTabs */
|
||||
GetCursorBounds, /* GetCursorBounds */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -423,10 +426,10 @@ ClearToBackground(Widget w, int x, int y,
|
|||
TextWidget xaw = (TextWidget)XtParent(w);
|
||||
Position x1, y1, x2, y2;
|
||||
|
||||
x1 = (XawMax(x, xaw->text.r_margin.left));
|
||||
y1 = (XawMax(y, xaw->text.r_margin.top));
|
||||
x2 = (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));
|
||||
x1 = (Position) (XawMax(x, xaw->text.r_margin.left));
|
||||
y1 = (Position) (XawMax(y, xaw->text.r_margin.top));
|
||||
x2 = (Position) (XawMin(x + (int)width, (int)XtWidth(xaw) - xaw->text.r_margin.right));
|
||||
y2 = (Position) (XawMin(y + (int)height, (int)XtHeight(xaw) - xaw->text.r_margin.bottom));
|
||||
|
||||
x = (int)x1;
|
||||
y = (int)y1;
|
||||
|
@ -939,15 +942,6 @@ XawTextSinkPreparePaint(Widget w, int y, int line, XawTextPosition from,
|
|||
(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
|
||||
XawTextSinkDoPaint(Widget w)
|
||||
{
|
||||
|
@ -956,14 +950,6 @@ XawTextSinkDoPaint(Widget w)
|
|||
(*cclass->text_sink_class.extension->DoPaint)(w);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
DoPaint(Widget w)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
Bool
|
||||
XawTextSinkEndPaint(Widget w)
|
||||
{
|
||||
|
|
|
@ -231,6 +231,9 @@ TextSrcClassRec textSrcClassRec = {
|
|||
Search, /* Search */
|
||||
SetSelection, /* SetSelection */
|
||||
ConvertSelection, /* ConvertSelection */
|
||||
#ifndef OLDXAW
|
||||
NULL, /* extension */
|
||||
#endif
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -238,7 +241,7 @@ WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec;
|
|||
|
||||
static XrmQuark QRead, QAppend, QEdit;
|
||||
#ifndef OLDXAW
|
||||
static char *SrcNL = "\n";
|
||||
static char *SrcNL = (char*)"\n";
|
||||
static wchar_t SrcWNL[2];
|
||||
#endif
|
||||
|
||||
|
@ -732,6 +735,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
|
|||
Bool enable_undo;
|
||||
XawTextPosition start, end;
|
||||
int i, error, lines = 0;
|
||||
Cardinal j;
|
||||
|
||||
if (src->textSrc.edit_mode == XawtextRead)
|
||||
return (XawEditError);
|
||||
|
@ -751,9 +755,9 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
|
|||
if (left < right) {
|
||||
Widget ctx = NULL;
|
||||
|
||||
for (i = 0; i < src->textSrc.num_text; i++)
|
||||
if (XtIsSubclass(src->textSrc.text[i], textWidgetClass)) {
|
||||
ctx = src->textSrc.text[i];
|
||||
for (j = 0; j < src->textSrc.num_text; j++)
|
||||
if (XtIsSubclass(src->textSrc.text[j], textWidgetClass)) {
|
||||
ctx = src->textSrc.text[j];
|
||||
break;
|
||||
}
|
||||
l_state->buffer = _XawTextGetText((TextWidget)ctx, left, right);
|
||||
|
@ -823,8 +827,8 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
|
|||
*/
|
||||
if (left > LARGE_VALUE) {
|
||||
start = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 2, False);
|
||||
for (i = 0; i < src->textSrc.num_text; i++) {
|
||||
TextWidget tw = (TextWidget)src->textSrc.text[i];
|
||||
for (j = 0; j < src->textSrc.num_text; j++) {
|
||||
TextWidget tw = (TextWidget)src->textSrc.text[j];
|
||||
|
||||
if (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;
|
||||
|
||||
if (error == XawEditDone) {
|
||||
XawTextPropertyInfo info;
|
||||
XawTextAnchor *anchor;
|
||||
|
||||
/* find anchor and index */
|
||||
|
@ -1051,7 +1054,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left,
|
|||
offset = anchor->position + entity->offset + entity->length;
|
||||
|
||||
if (offset > right) {
|
||||
entity->length = (XawMin(entity->length, offset - right));
|
||||
entity->length = (Cardinal) (XawMin(entity->length, offset - right));
|
||||
goto exit_anchor_loop;
|
||||
}
|
||||
|
||||
|
@ -1183,10 +1186,15 @@ exit_anchor_loop:
|
|||
}
|
||||
}
|
||||
|
||||
info.left = left;
|
||||
info.right = right;
|
||||
info.block = block;
|
||||
XtCallCallbacks(w, XtNpropertyCallback, &info);
|
||||
{
|
||||
XawTextPropertyInfo info = {
|
||||
.left = left,
|
||||
.right = right,
|
||||
.block = block
|
||||
};
|
||||
|
||||
XtCallCallbacks(w, XtNpropertyCallback, &info);
|
||||
}
|
||||
|
||||
TellSourceChanged(src, left, right, block, lines);
|
||||
/* Call callbacks, we have changed the buffer */
|
||||
|
@ -1349,7 +1357,6 @@ FreeUndoBuffer(XawTextUndo *undo)
|
|||
static void
|
||||
UndoGC(XawTextUndo *undo)
|
||||
{
|
||||
unsigned i;
|
||||
XawTextUndoList *head = undo->head, *redo = head->redo;
|
||||
|
||||
if (head == undo->pointer || head == undo->end_mark
|
||||
|
@ -1362,6 +1369,8 @@ UndoGC(XawTextUndo *undo)
|
|||
|
||||
--head->left->refcount;
|
||||
if (--head->right->refcount == 0) {
|
||||
unsigned i;
|
||||
|
||||
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+1]) {
|
||||
|
@ -1673,13 +1682,15 @@ XawTextAnchor *
|
|||
XawTextSourceFindAnchor(Widget w, XawTextPosition position)
|
||||
{
|
||||
TextSrcObject src = (TextSrcObject)w;
|
||||
int i = 0, left, right, nmemb = src->textSrc.num_anchors;
|
||||
XawTextAnchor *anchor, **anchors = src->textSrc.anchors;
|
||||
int left, right, nmemb = src->textSrc.num_anchors;
|
||||
XawTextAnchor **anchors = src->textSrc.anchors;
|
||||
|
||||
left = 0;
|
||||
right = nmemb - 1;
|
||||
while (left <= right) {
|
||||
anchor = anchors[i = (left + right) >> 1];
|
||||
int i = (left + right) >> 1;
|
||||
XawTextAnchor *anchor = anchors[i];
|
||||
|
||||
if (anchor->position == position)
|
||||
return (anchor);
|
||||
else if (position < anchor->position)
|
||||
|
@ -1701,7 +1712,6 @@ XawTextSourceAnchorAndEntity(Widget w, XawTextPosition position,
|
|||
{
|
||||
XawTextAnchor *anchor = XawTextSourceFindAnchor(w, position);
|
||||
XawTextEntity *pentity, *entity;
|
||||
XawTextPosition offset;
|
||||
Bool next_anchor = True, retval = False;
|
||||
|
||||
if (anchor->cache && anchor->position + anchor->cache->offset +
|
||||
|
@ -1710,7 +1720,7 @@ XawTextSourceAnchorAndEntity(Widget w, XawTextPosition position,
|
|||
else
|
||||
pentity = entity = anchor->entities;
|
||||
while (entity) {
|
||||
offset = anchor->position + entity->offset;
|
||||
XawTextPosition offset = anchor->position + entity->offset;
|
||||
|
||||
if (offset > position) {
|
||||
retval = next_anchor = False;
|
||||
|
@ -1899,7 +1909,6 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
|
|||
XawTextAnchor *anchor = XawTextSourceFindAnchor(w, left);
|
||||
XawTextEntity *entity, *eprev, *enext;
|
||||
XawTextPosition offset;
|
||||
int length;
|
||||
|
||||
while (anchor && anchor->entities == NULL)
|
||||
anchor = XawTextSourceRemoveAnchor(w, anchor);
|
||||
|
@ -1928,7 +1937,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
|
|||
|
||||
offset = anchor->position + entity->offset;
|
||||
if (offset <= left) {
|
||||
length = (XawMin(entity->length, left - offset));
|
||||
int length = (int) (XawMin(entity->length, left - offset));
|
||||
|
||||
if (length <= 0) {
|
||||
enext = entity->next;
|
||||
|
@ -1963,7 +1972,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right
|
|||
if (offset > right) {
|
||||
anchor->cache = NULL;
|
||||
entity->offset = XawMax(entity->offset, right - anchor->position);
|
||||
entity->length = (XawMin(entity->length, offset - right));
|
||||
entity->length = (Cardinal) (XawMin(entity->length, offset - right));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -330,13 +330,13 @@ XawTipExpose(Widget w, XEvent *event, Region region)
|
|||
Position ksy = (Position)tip->tip.top_margin;
|
||||
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) {
|
||||
XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset,
|
||||
gc, tip->tip.left_margin, ksy, label,
|
||||
(int)(nl - label));
|
||||
ksy = (ksy + ext->max_ink_extent.height);
|
||||
ksy = (Position) (ksy + ext->max_ink_extent.height);
|
||||
label = nl + 1;
|
||||
}
|
||||
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 ||
|
||||
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);
|
||||
newtip->tip.gc = XtAllocateGC(cnew, 0, GCForeground | GCBackground |
|
||||
GCFont | GCGraphicsExposures, &values,
|
||||
|
@ -454,10 +455,10 @@ TipLayout(XawTipInfo *info)
|
|||
XTextWidth16(fs, (_Xconst XChar2b*)label, (int)(strlen(label) >> 1)) :
|
||||
XTextWidth(fs, label, (int)strlen(label));
|
||||
}
|
||||
XtWidth(info->tip) = (width + info->tip->tip.left_margin +
|
||||
info->tip->tip.right_margin);
|
||||
XtHeight(info->tip) = (height + info->tip->tip.top_margin +
|
||||
info->tip->tip.bottom_margin);
|
||||
XtWidth(info->tip) = (Dimension) (width + info->tip->tip.left_margin +
|
||||
info->tip->tip.right_margin);
|
||||
XtHeight(info->tip) = (Dimension) (height + info->tip->tip.top_margin +
|
||||
info->tip->tip.bottom_margin);
|
||||
}
|
||||
|
||||
#define DEFAULT_TIP_Y_OFFSET 12
|
||||
|
@ -526,7 +527,7 @@ FindTipInfo(Widget w)
|
|||
Screen *screen = XtScreenOfObject(w);
|
||||
|
||||
if (tip == NULL)
|
||||
return (first_tip = tip = CreateTipInfo(w));
|
||||
return (first_tip = CreateTipInfo(w));
|
||||
|
||||
for (ptip = tip; tip; ptip = tip, tip = tip->next)
|
||||
if (tip->screen == screen)
|
||||
|
|
|
@ -159,6 +159,9 @@ ToggleClassRec toggleClassRec = {
|
|||
/* simple */
|
||||
{
|
||||
XtInheritChangeSensitive, /* change_sensitive */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* label */
|
||||
{
|
||||
|
@ -489,7 +492,6 @@ void
|
|||
XawToggleChangeRadioGroup(Widget w, Widget radio_group)
|
||||
{
|
||||
ToggleWidget tw = (ToggleWidget)w;
|
||||
RadioGroup *group;
|
||||
|
||||
RemoveFromRadioGroup(w);
|
||||
|
||||
|
@ -502,7 +504,9 @@ XawToggleChangeRadioGroup(Widget w, Widget radio_group)
|
|||
XawToggleUnsetCurrent(radio_group);
|
||||
|
||||
if (radio_group != NULL) {
|
||||
if ((group = GetRadioGroup(radio_group)) == NULL)
|
||||
RadioGroup *group = GetRadioGroup(radio_group);
|
||||
|
||||
if (group == NULL)
|
||||
CreateRadioGroup(w, radio_group);
|
||||
else
|
||||
AddToRadioGroup(group, w);
|
||||
|
@ -611,12 +615,13 @@ XawToggleSetCurrent(Widget radio_group, XtPointer radio_data)
|
|||
void
|
||||
XawToggleUnsetCurrent(Widget radio_group)
|
||||
{
|
||||
ToggleWidgetClass cclass;
|
||||
ToggleWidget local_tog = (ToggleWidget)radio_group;
|
||||
|
||||
/* Special Case no radio group */
|
||||
|
||||
if (local_tog->command.set) {
|
||||
ToggleWidgetClass cclass;
|
||||
|
||||
cclass = (ToggleWidgetClass)local_tog->core.widget_class;
|
||||
cclass->toggle_class.Unset(radio_group, NULL, NULL, NULL);
|
||||
Notify(radio_group, NULL, NULL, NULL);
|
||||
|
|
|
@ -206,9 +206,6 @@ WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
|
|||
static void
|
||||
initialize_dimensions(Dimension **listp, int *sizep, int n)
|
||||
{
|
||||
int i;
|
||||
Dimension *l;
|
||||
|
||||
if (!*listp) {
|
||||
*listp = (Dimension *) XtCalloc ((unsigned int) n,
|
||||
(unsigned int) sizeof(Dimension));
|
||||
|
@ -221,9 +218,14 @@ initialize_dimensions(Dimension **listp, int *sizep, int n)
|
|||
if (!*listp) {
|
||||
*sizep = 0;
|
||||
return;
|
||||
} else {
|
||||
int i;
|
||||
Dimension *l;
|
||||
|
||||
for (i = *sizep, l = (*listp) + i; i < n; i++, l++)
|
||||
*l = 0;
|
||||
*sizep = n;
|
||||
}
|
||||
for (i = *sizep, l = (*listp) + i; i < n; i++, l++) *l = 0;
|
||||
*sizep = n;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -282,7 +284,8 @@ static void
|
|||
delete_node(Widget parent, Widget node)
|
||||
{
|
||||
TreeConstraints pc;
|
||||
int pos, i;
|
||||
int pos;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Make sure the parent exists.
|
||||
|
@ -587,6 +590,8 @@ static void
|
|||
XawTreeRedisplay(Widget gw, XEvent *event _X_UNUSED, Region region _X_UNUSED)
|
||||
{
|
||||
TreeWidget tw = (TreeWidget) gw;
|
||||
Cardinal i;
|
||||
int j;
|
||||
|
||||
#ifndef OLDXAW
|
||||
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 (tw->core.visible) {
|
||||
Cardinal i;
|
||||
int j;
|
||||
Display *dpy = XtDisplay (tw);
|
||||
Window w = XtWindow (tw);
|
||||
|
||||
|
@ -722,10 +725,10 @@ static void
|
|||
compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth)
|
||||
{
|
||||
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
|
||||
int i;
|
||||
Bool horiz = IsHorizontal (tree);
|
||||
Dimension newwidth, newheight;
|
||||
Dimension bw2 = (Dimension)(w->core.border_width * 2);
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Set the max-size per level.
|
||||
|
@ -792,10 +795,9 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth)
|
|||
static void
|
||||
set_positions(TreeWidget tw, Widget w, int level)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (w) {
|
||||
TreeConstraints tc = TREE_CONSTRAINT(w);
|
||||
int i;
|
||||
|
||||
if (level > 0) {
|
||||
/*
|
||||
|
@ -832,15 +834,13 @@ static void
|
|||
arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y)
|
||||
{
|
||||
TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */
|
||||
TreeConstraints firstcc, lastcc;
|
||||
int i;
|
||||
int newx, newy;
|
||||
Bool horiz = IsHorizontal (tree);
|
||||
Widget child = NULL;
|
||||
Dimension tmp;
|
||||
Dimension bw2 = (Dimension)(w->core.border_width * 2);
|
||||
Bool relayout = True;
|
||||
|
||||
int i;
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
if (relayout) {
|
||||
if (relayout && (child != NULL)) {
|
||||
Position adjusted;
|
||||
firstcc = TREE_CONSTRAINT (tc->tree.children[0]);
|
||||
lastcc = TREE_CONSTRAINT (child);
|
||||
TreeConstraints firstcc = TREE_CONSTRAINT (tc->tree.children[0]);
|
||||
TreeConstraints lastcc = TREE_CONSTRAINT (child);
|
||||
|
||||
/* Adjustments are disallowed if they result in a position above
|
||||
* or to the left of the originally requested position, because
|
||||
|
|
|
@ -204,7 +204,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = {
|
|||
}
|
||||
};
|
||||
|
||||
#if !defined(__UNIXOS2__) && !defined(__APPLE__)
|
||||
#if !defined(__APPLE__)
|
||||
externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
|
||||
(WidgetClass) (&vendorShellClassRec);
|
||||
#endif
|
||||
|
@ -280,16 +280,16 @@ XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *n
|
|||
XrmValue *fromVal, XrmValue *toVal,
|
||||
XtPointer *cvt_data _X_UNUSED)
|
||||
{
|
||||
XTextProperty prop;
|
||||
char **list;
|
||||
int count;
|
||||
static char *mbs = NULL;
|
||||
int len;
|
||||
|
||||
prop.value = (unsigned char *)fromVal->addr;
|
||||
prop.encoding = XA_COMPOUND_TEXT(dpy);
|
||||
prop.format = 8;
|
||||
prop.nitems = fromVal->size;
|
||||
XTextProperty prop = {
|
||||
.value = (unsigned char *)fromVal->addr,
|
||||
.encoding = XA_COMPOUND_TEXT(dpy),
|
||||
.format = 8,
|
||||
.nitems = fromVal->size
|
||||
};
|
||||
|
||||
if(XmbTextPropertyToTextList(dpy, &prop, &list, &count) < Success) {
|
||||
XtAppWarningMsg(XtDisplayToApplicationContext(dpy),
|
||||
|
@ -330,11 +330,11 @@ XawVendorShellClassPartInit(WidgetClass cclass)
|
|||
CompositeClassExtension ext;
|
||||
VendorShellWidgetClass vsclass = (VendorShellWidgetClass)cclass;
|
||||
|
||||
if ((ext = (CompositeClassExtension)
|
||||
XtGetClassExtension (cclass,
|
||||
XtOffsetOf(CompositeClassRec,
|
||||
composite_class.extension),
|
||||
NULLQUARK, 1L, (Cardinal) 0)) == NULL) {
|
||||
if (((CompositeClassExtension)
|
||||
XtGetClassExtension (cclass,
|
||||
XtOffsetOf(CompositeClassRec,
|
||||
composite_class.extension),
|
||||
NULLQUARK, 1L, (Cardinal) 0)) == NULL) {
|
||||
ext = (CompositeClassExtension) XtNew (CompositeClassExtensionRec);
|
||||
if (ext != NULL) {
|
||||
ext->next_extension = vsclass->composite_class.extension;
|
||||
|
@ -348,8 +348,8 @@ XawVendorShellClassPartInit(WidgetClass cclass)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
|
||||
/* stupid OSF/1 shared libraries have the wrong semantics */
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
|
||||
/* shared libraries on these platforms have the wrong semantics */
|
||||
/* symbols do not get resolved external to the shared library */
|
||||
void _XawFixupVendorShell()
|
||||
{
|
||||
|
|
|
@ -216,6 +216,9 @@ ViewportClassRec viewportClassRec = {
|
|||
/* form */
|
||||
{
|
||||
Layout, /* layout */
|
||||
#ifndef OLDXAW
|
||||
NULL,
|
||||
#endif
|
||||
},
|
||||
/* viewport */
|
||||
{
|
||||
|
@ -441,10 +444,6 @@ XawViewportChangeManaged(Widget widget)
|
|||
((FormWidget)w, XtWidth(w), XtHeight(w), True /* True? */);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
(*Superclass->composite_class.change_managed)(widget);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -472,19 +471,18 @@ RedrawThumbs(ViewportWidget w)
|
|||
static void
|
||||
SendReport(ViewportWidget w, unsigned int changed)
|
||||
{
|
||||
XawPannerReport rep;
|
||||
|
||||
if (w->viewport.report_callbacks) {
|
||||
Widget child = w->viewport.child;
|
||||
Widget clip = w->viewport.clip;
|
||||
|
||||
rep.changed = changed;
|
||||
rep.slider_x = (Position) -XtX(child); /* child is canvas */
|
||||
rep.slider_y = (Position) -XtY(child); /* clip is slider */
|
||||
rep.slider_width = XtWidth(clip);
|
||||
rep.slider_height = XtHeight(clip);
|
||||
rep.canvas_width = XtWidth(child);
|
||||
rep.canvas_height = XtHeight(child);
|
||||
XawPannerReport rep = {
|
||||
.changed = changed,
|
||||
.slider_x = (Position) -XtX(child), /* child is canvas */
|
||||
.slider_y = (Position) -XtY(child), /* clip is slider */
|
||||
.slider_width = XtWidth(clip),
|
||||
.slider_height = XtHeight(clip),
|
||||
.canvas_width = XtWidth(child),
|
||||
.canvas_height = XtHeight(child)
|
||||
};
|
||||
XtCallCallbackList((Widget)w, w->viewport.report_callbacks,
|
||||
(XtPointer)&rep);
|
||||
}
|
||||
|
|
|
@ -76,20 +76,6 @@ _Xaw_atowc(unsigned char c)
|
|||
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
|
||||
_Xaw_iswalnum(wchar_t ch)
|
||||
{
|
||||
|
|
|
@ -38,29 +38,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <wchar.h>
|
||||
#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>
|
||||
|
||||
#ifdef USE_XWCHAR_STRING
|
||||
|
@ -103,10 +80,16 @@ wchar_t _Xaw_atowc
|
|||
);
|
||||
|
||||
#ifndef HAS_ISW_FUNCS
|
||||
#include <ctype.h>
|
||||
#ifndef iswspace
|
||||
#define iswspace(c) (isascii(c) && isspace(toascii(c)))
|
||||
#endif
|
||||
# include <ctype.h>
|
||||
# ifndef isascii
|
||||
# define isascii(c) ((unsigned char)(c) < 127)
|
||||
# endif
|
||||
# ifndef toascii
|
||||
# define toascii(c) ((c) & 0x7f)
|
||||
# endif
|
||||
# ifndef iswspace
|
||||
# define iswspace(c) (isascii(c) && isspace(toascii(c)))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(iswalnum) && !defined(HAVE_ISWALNUM)
|
||||
|
|
|
@ -80,6 +80,18 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
#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
|
||||
|
@ -264,18 +276,19 @@ GetInputStyleOfIC(XawVendorShellExtPart *ve)
|
|||
static void
|
||||
ConfigureCB(Widget w, XtPointer closure _X_UNUSED, XEvent *event, Boolean *unused _X_UNUSED)
|
||||
{
|
||||
XawIcTableList p;
|
||||
XawVendorShellExtPart *ve;
|
||||
VendorShellWidget vw;
|
||||
XVaNestedList pe_attr;
|
||||
XRectangle pe_area;
|
||||
XawTextMargin *margin;
|
||||
|
||||
if (event->type != ConfigureNotify) return;
|
||||
|
||||
if ((vw = SearchVendorShell(w)) == NULL) return;
|
||||
|
||||
if ((ve = GetExtPart(vw)) != NULL) {
|
||||
XawIcTableList p;
|
||||
XVaNestedList pe_attr;
|
||||
XRectangle pe_area;
|
||||
XawTextMargin *margin;
|
||||
|
||||
if (IsSharedIC(ve)) return;
|
||||
if ((ve->im.xim == NULL) ||
|
||||
((p = GetIcTableShared(w, ve)) == NULL) ||
|
||||
|
@ -314,20 +327,6 @@ static Widget SetErrCnxt(Widget w, XIM xim)
|
|||
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
|
||||
CloseIM(XawVendorShellExtPart *ve)
|
||||
{
|
||||
|
@ -426,31 +425,15 @@ VendorShellDestroyed(Widget w, XtPointer cl_data _X_UNUSED, XtPointer ca_data _X
|
|||
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
|
||||
*/
|
||||
|
||||
static void
|
||||
OpenIM(XawVendorShellExtPart *ve)
|
||||
{
|
||||
int i;
|
||||
_Xconst char *s, *ns, *end;
|
||||
char *p, *pbuf, buf[32];
|
||||
char *p, buf[32];
|
||||
XIM xim = NULL;
|
||||
XIMStyles *xim_styles;
|
||||
XIMStyle input_style = 0;
|
||||
|
@ -462,6 +445,8 @@ OpenIM(XawVendorShellExtPart *ve)
|
|||
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
|
||||
xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL);
|
||||
} else {
|
||||
char *pbuf;
|
||||
|
||||
/* no fragment can be longer than the whole string */
|
||||
Cardinal len = (Cardinal)strlen (ve->im.input_method) + 5;
|
||||
|
||||
|
@ -496,7 +481,7 @@ OpenIM(XawVendorShellExtPart *ve)
|
|||
if (pbuf != buf) XtFree (pbuf);
|
||||
}
|
||||
if (xim == NULL) {
|
||||
if ((p = XSetLocaleModifiers("")) != NULL) {
|
||||
if (XSetLocaleModifiers("") != NULL) {
|
||||
xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -513,7 +498,7 @@ OpenIM(XawVendorShellExtPart *ve)
|
|||
return;
|
||||
}
|
||||
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++;
|
||||
if (!*s) break;
|
||||
if ((ns = end = strchr(s, ',')) == NULL)
|
||||
|
@ -720,18 +705,18 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
|
|||
|
||||
if (p->input_style & XIMPreeditArea) {
|
||||
pe_attr = XVaCreateNestedList(0, XNAreaNeeded, &pe_area_needed, NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++;
|
||||
ADD_IC(XNPreeditAttributes);
|
||||
ADD_IC(pe_attr);
|
||||
}
|
||||
if (p->input_style & XIMStatusArea) {
|
||||
st_attr = XVaCreateNestedList(0, XNAreaNeeded, &st_area_needed, NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
|
||||
ADD_IC(XNStatusAttributes);
|
||||
ADD_IC(st_attr);
|
||||
}
|
||||
ic_a[ic_cnt] = (XPointer) NULL;
|
||||
END_IC();
|
||||
|
||||
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 (st_attr) XFree(st_attr);
|
||||
if (p->xic == NULL) {
|
||||
|
@ -752,8 +737,8 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
|
|||
|
||||
XFree(st_area_needed);
|
||||
st_attr = XVaCreateNestedList(0, XNArea, &st_area, NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
|
||||
ADD_IC(XNStatusAttributes);
|
||||
ADD_IC(st_attr);
|
||||
}
|
||||
if (p->input_style & XIMPreeditArea) {
|
||||
if (p->input_style & XIMStatusArea) {
|
||||
|
@ -767,11 +752,11 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height)
|
|||
XFree(pe_area_needed);
|
||||
pe_area.y = (short)(height - pe_area.height);
|
||||
pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++;
|
||||
ADD_IC(XNPreeditAttributes);
|
||||
ADD_IC(pe_attr);
|
||||
}
|
||||
ic_a[ic_cnt] = (XPointer) NULL;
|
||||
XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], NULL);
|
||||
END_IC();
|
||||
XSetICValues(p->xic, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3), NULL);
|
||||
if (pe_attr) XFree(pe_attr);
|
||||
if (st_attr) XFree(st_attr);
|
||||
if (p->xic == NULL) {
|
||||
|
@ -791,7 +776,6 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
|
|||
XPointer ic_a[20], pe_a[20], st_a[20];
|
||||
Dimension height = 0;
|
||||
int ic_cnt = 0, pe_cnt = 0, st_cnt = 0;
|
||||
XawTextMargin *margin;
|
||||
|
||||
if (!XtIsRealized(w)) return;
|
||||
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->flg & CIFontSet) {
|
||||
pe_a[pe_cnt] = (XPointer) XNFontSet; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
|
||||
ADD_PE(XNFontSet);
|
||||
ADD_PE(p->font_set);
|
||||
ADD_ST(XNFontSet);
|
||||
ADD_ST(p->font_set);
|
||||
if (p->font_set) {
|
||||
height = (Dimension)(maxAscentOfFontSet(p->font_set)
|
||||
+ maxDescentOfFontSet(p->font_set));
|
||||
|
@ -815,39 +799,43 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
|
|||
height = (Dimension)SetVendorShellHeight(ve, height);
|
||||
}
|
||||
if (p->flg & CIFg) {
|
||||
pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->foreground; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNForeground; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->foreground; st_cnt++;
|
||||
ADD_PE(XNForeground);
|
||||
ADD_PE(p->foreground);
|
||||
ADD_ST(XNForeground);
|
||||
ADD_ST(p->foreground);
|
||||
}
|
||||
if (p->flg & CIBg) {
|
||||
pe_a[pe_cnt] = (XPointer) XNBackground; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->background; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNBackground; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->background; st_cnt++;
|
||||
ADD_PE(XNBackground);
|
||||
ADD_PE(p->background);
|
||||
ADD_ST(XNBackground);
|
||||
ADD_ST(p->background);
|
||||
}
|
||||
if (p->flg & CIBgPixmap) {
|
||||
pe_a[pe_cnt] = (XPointer) XNBackgroundPixmap; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->bg_pixmap; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNBackgroundPixmap; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->bg_pixmap; st_cnt++;
|
||||
ADD_PE(XNBackgroundPixmap);
|
||||
ADD_PE(p->bg_pixmap);
|
||||
ADD_ST(XNBackgroundPixmap);
|
||||
ADD_ST(p->bg_pixmap);
|
||||
}
|
||||
if (p->flg & CILineS) {
|
||||
pe_a[pe_cnt] = (XPointer) XNLineSpace; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->line_spacing; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNLineSpace; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->line_spacing; st_cnt++;
|
||||
ADD_PE(XNLineSpace);
|
||||
ADD_PE(p->line_spacing);
|
||||
ADD_ST(XNLineSpace);
|
||||
ADD_ST(p->line_spacing);
|
||||
}
|
||||
}
|
||||
|
||||
if (p->input_style & XIMPreeditArea) {
|
||||
pe_area.x = 0;
|
||||
pe_area.y = (short)(ve->parent->core.height - height);
|
||||
pe_area.width = ve->parent->core.width;
|
||||
pe_area.height = height;
|
||||
pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++;
|
||||
ADD_PE(XNArea);
|
||||
ADD_PE(&pe_area);
|
||||
}
|
||||
|
||||
if (p->input_style & XIMPreeditPosition) {
|
||||
XawTextMargin *margin;
|
||||
|
||||
pe_area.x = 0;
|
||||
pe_area.y = 0;
|
||||
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.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_a[pe_cnt] = (XPointer) XNArea; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++;
|
||||
ADD_PE(XNArea);
|
||||
ADD_PE(&pe_area);
|
||||
if (p->flg & CICursorP) {
|
||||
_XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y);
|
||||
} else {
|
||||
position.x = position.y = 0;
|
||||
}
|
||||
pe_a[pe_cnt] = (XPointer) XNSpotLocation; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) &position; pe_cnt++;
|
||||
ADD_PE(XNSpotLocation);
|
||||
ADD_PE(&position);
|
||||
}
|
||||
if (p->input_style & XIMStatusArea) {
|
||||
st_area.x = 0;
|
||||
st_area.y = (short)(ve->parent->core.height - height);
|
||||
st_area.width = ve->parent->core.width;
|
||||
st_area.height = height;
|
||||
st_a[st_cnt] = (XPointer) XNArea; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) &st_area; st_cnt++;
|
||||
ADD_ST(XNArea);
|
||||
ADD_ST(&st_area);
|
||||
}
|
||||
|
||||
ic_a[ic_cnt] = (XPointer) XNInputStyle; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) p->input_style; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) XNClientWindow; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) XtWindow(ve->parent); ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) XNFocusWindow; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) XtWindow(w); ic_cnt++;
|
||||
ADD_IC(XNInputStyle);
|
||||
ADD_IC(p->input_style);
|
||||
ADD_IC(XNClientWindow);
|
||||
ADD_IC(XtWindow(ve->parent));
|
||||
ADD_IC(XNFocusWindow);
|
||||
ADD_IC(XtWindow(w));
|
||||
|
||||
if (pe_cnt > 0) {
|
||||
pe_a[pe_cnt] = (XPointer) NULL;
|
||||
pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
|
||||
pe_a[4], pe_a[5], pe_a[6], pe_a[7], pe_a[8],
|
||||
pe_a[9], pe_a[10], pe_a[11], pe_a[12],
|
||||
pe_a[13], pe_a[14], pe_a[15], pe_a[16],
|
||||
pe_a[17], pe_a[18], NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++;
|
||||
END_PE();
|
||||
pe_attr = XVaCreateNestedList(0, USE_PE(0), USE_PE(1), USE_PE(2),
|
||||
USE_PE(3), USE_PE(4), USE_PE(5),
|
||||
USE_PE(6), USE_PE(7), USE_PE(8),
|
||||
USE_PE(9), USE_PE(10), USE_PE(11),
|
||||
USE_PE(12), USE_PE(13), USE_PE(14),
|
||||
USE_PE(15), NULL);
|
||||
ADD_IC(XNPreeditAttributes);
|
||||
ADD_IC(pe_attr);
|
||||
}
|
||||
|
||||
if (st_cnt > 0) {
|
||||
st_a[st_cnt] = (XPointer) NULL;
|
||||
st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
|
||||
st_a[4], st_a[5], st_a[6], st_a[7], st_a[8],
|
||||
st_a[9], st_a[10], st_a[11], st_a[12],
|
||||
st_a[13], st_a[14], st_a[15], st_a[16],
|
||||
st_a[17], st_a[18], NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
|
||||
END_ST();
|
||||
st_attr = XVaCreateNestedList(0, USE_ST(0), USE_ST(1), USE_ST(2),
|
||||
USE_ST(3), USE_ST(4), USE_ST(5),
|
||||
USE_ST(6), USE_ST(7), USE_ST(8),
|
||||
USE_ST(9), USE_ST(10), USE_ST(11), NULL);
|
||||
ADD_IC(XNStatusAttributes);
|
||||
ADD_IC(st_attr);
|
||||
}
|
||||
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],
|
||||
ic_a[4], ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9],
|
||||
ic_a[10], 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);
|
||||
p->xic = XCreateIC(ve->im.xim, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3),
|
||||
USE_IC(4), USE_IC(5), USE_IC(6), USE_IC(7), USE_IC(8),
|
||||
USE_IC(9), NULL);
|
||||
if (pe_attr) XtFree(pe_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->flg & CIFontSet) {
|
||||
pe_a[pe_cnt] = (XPointer) XNFontSet; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
|
||||
ADD_PE(XNFontSet);
|
||||
ADD_PE(p->font_set);
|
||||
ADD_ST(XNFontSet);
|
||||
ADD_ST(p->font_set);
|
||||
if (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) {
|
||||
pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->foreground; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNForeground; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->foreground; st_cnt++;
|
||||
ADD_PE(XNForeground);
|
||||
ADD_PE(p->foreground);
|
||||
ADD_ST(XNForeground);
|
||||
ADD_ST(p->foreground);
|
||||
}
|
||||
if (p->flg & CIBg) {
|
||||
pe_a[pe_cnt] = (XPointer) XNBackground; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->background; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNBackground; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->background; st_cnt++;
|
||||
ADD_PE(XNBackground);
|
||||
ADD_PE(p->background);
|
||||
ADD_ST(XNBackground);
|
||||
ADD_ST(p->background);
|
||||
}
|
||||
if (p->flg & CIBgPixmap) {
|
||||
pe_a[pe_cnt] = (XPointer) XNBackgroundPixmap; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->bg_pixmap; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNBackgroundPixmap; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->bg_pixmap; st_cnt++;
|
||||
ADD_PE(XNBackgroundPixmap);
|
||||
ADD_PE(p->bg_pixmap);
|
||||
ADD_ST(XNBackgroundPixmap);
|
||||
ADD_ST(p->bg_pixmap);
|
||||
}
|
||||
if (p->flg & CILineS) {
|
||||
pe_a[pe_cnt] = (XPointer) XNLineSpace; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) p->line_spacing; pe_cnt++;
|
||||
st_a[st_cnt] = (XPointer) XNLineSpace; st_cnt++;
|
||||
st_a[st_cnt] = (XPointer) p->line_spacing; st_cnt++;
|
||||
ADD_PE(XNLineSpace);
|
||||
ADD_PE(p->line_spacing);
|
||||
ADD_ST(XNLineSpace);
|
||||
ADD_ST(p->line_spacing);
|
||||
}
|
||||
}
|
||||
if (p->input_style & XIMPreeditPosition) {
|
||||
if (p->flg & CICursorP) {
|
||||
_XawMultiSinkPosToXY(w, p->cursor_position, &position.x, &position.y);
|
||||
pe_a[pe_cnt] = (XPointer) XNSpotLocation; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) &position; pe_cnt++;
|
||||
ADD_PE(XNSpotLocation);
|
||||
ADD_PE(&position);
|
||||
}
|
||||
}
|
||||
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.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_a[pe_cnt] = (XPointer) XNArea; pe_cnt++;
|
||||
pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++;
|
||||
ADD_PE(XNArea);
|
||||
ADD_PE(&pe_area);
|
||||
}
|
||||
}
|
||||
|
||||
if (pe_cnt > 0) {
|
||||
pe_a[pe_cnt] = (XPointer) NULL;
|
||||
pe_attr = XVaCreateNestedList(0, pe_a[0], pe_a[1], pe_a[2], pe_a[3],
|
||||
pe_a[4], pe_a[5], pe_a[6], pe_a[7],
|
||||
pe_a[8], pe_a[9], pe_a[10], pe_a[11],
|
||||
pe_a[12], pe_a[13], pe_a[14], pe_a[15],
|
||||
pe_a[16], pe_a[17], pe_a[18], NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++;
|
||||
END_PE();
|
||||
pe_attr = XVaCreateNestedList(0, USE_PE(0), USE_PE(1), USE_PE(2),
|
||||
USE_PE(3), USE_PE(4), USE_PE(5),
|
||||
USE_PE(6), USE_PE(7), USE_PE(8),
|
||||
USE_PE(9), USE_PE(10), USE_PE(11),
|
||||
USE_PE(12), USE_PE(13), NULL);
|
||||
ADD_IC(XNPreeditAttributes);
|
||||
ADD_IC(pe_attr);
|
||||
}
|
||||
if (st_cnt > 0) {
|
||||
st_a[st_cnt] = (XPointer) NULL;
|
||||
st_attr = XVaCreateNestedList(0, st_a[0], st_a[1], st_a[2], st_a[3],
|
||||
st_a[4], st_a[5], st_a[6], st_a[7],
|
||||
st_a[8], st_a[9], st_a[10], st_a[11],
|
||||
st_a[12], st_a[13], st_a[14], st_a[15],
|
||||
st_a[16], st_a[17], st_a[18], NULL);
|
||||
ic_a[ic_cnt] = (XPointer) XNStatusAttributes; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) st_attr; ic_cnt++;
|
||||
END_ST();
|
||||
st_attr = XVaCreateNestedList(0, USE_ST(0), USE_ST(1), USE_ST(2),
|
||||
USE_ST(3), USE_ST(4), USE_ST(5),
|
||||
USE_ST(6), USE_ST(7), USE_ST(8),
|
||||
USE_ST(9), NULL);
|
||||
ADD_IC(XNStatusAttributes);
|
||||
ADD_IC(st_attr);
|
||||
}
|
||||
if (focus == TRUE) {
|
||||
ic_a[ic_cnt] = (XPointer) XNFocusWindow; ic_cnt++;
|
||||
ic_a[ic_cnt] = (XPointer) XtWindow(w); ic_cnt++;
|
||||
ADD_IC(XNFocusWindow);
|
||||
ADD_IC(XtWindow(w));
|
||||
}
|
||||
if (ic_cnt > 0) {
|
||||
ic_a[ic_cnt] = (XPointer) NULL;
|
||||
XSetICValues(p->xic, ic_a[0], ic_a[1], ic_a[2], ic_a[3], ic_a[4],
|
||||
ic_a[5], ic_a[6], ic_a[7], ic_a[8], ic_a[9], ic_a[10],
|
||||
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);
|
||||
END_IC();
|
||||
XSetICValues(p->xic, USE_IC(0), USE_IC(1), USE_IC(2), USE_IC(3),
|
||||
USE_IC(4), USE_IC(5), NULL);
|
||||
if (pe_attr) XtFree(pe_attr);
|
||||
if (st_attr) XtFree(st_attr);
|
||||
}
|
||||
|
@ -1085,13 +1069,13 @@ CurrentSharedIcTable(XawVendorShellExtPart *ve)
|
|||
static void
|
||||
SetICFocus(Widget w, XawVendorShellExtPart *ve)
|
||||
{
|
||||
XawIcTableList p, pp;
|
||||
XawIcTableList p;
|
||||
|
||||
if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
|
||||
(p->xic == NULL)) return;
|
||||
|
||||
if (IsSharedIC(ve)) {
|
||||
pp = CurrentSharedIcTable(ve);
|
||||
XawIcTableList pp = CurrentSharedIcTable(ve);
|
||||
if (pp == NULL || pp->widget != w) {
|
||||
SharedICChangeFocusWindow(w, ve, p);
|
||||
}
|
||||
|
@ -1232,10 +1216,12 @@ UnsetFocus(Widget inwidg)
|
|||
{
|
||||
XawVendorShellExtPart *ve;
|
||||
VendorShellWidget vw;
|
||||
XawIcTableList p;
|
||||
|
||||
if ((vw = SearchVendorShell(inwidg)) == NULL) return;
|
||||
|
||||
if ((ve = GetExtPart(vw)) != NULL) {
|
||||
XawIcTableList p;
|
||||
|
||||
if ((p = GetIcTableShared(inwidg, ve)) == NULL) return;
|
||||
if (p->flg & CIICFocus) {
|
||||
p->flg &= (unsigned long)(~CIICFocus);
|
||||
|
|
|
@ -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
153
lib/libXaw/test-driver
Normal 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='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # 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:
|
|
@ -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
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Sun Apr 3 09:55:44 2022 -0700
|
||||
|
@ -1296,19 +1379,19 @@ Date: Mon Jun 13 16:44:53 2005 +0000
|
|||
Bug #1043: Fix leak when creating animated cursors.
|
||||
|
||||
commit 89e52cde6eaf5e2d46198ee2fa16b67ef7e1dd32
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Wed Jun 8 20:51:37 2005 +0000
|
||||
|
||||
Remove experiment with calling the man page file 4x
|
||||
|
||||
commit 5589b4f6a36f2c039adc81fa4d406574eeef35b3
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Wed Jun 8 20:44:18 2005 +0000
|
||||
|
||||
Remove all the not found with pkgconfig stuff
|
||||
|
||||
commit 4070c0af6c7bfe12218181d56e8e3cbb86006d27
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Wed Jun 8 19:15:43 2005 +0000
|
||||
|
||||
- Add Xcursor build system
|
||||
|
|
|
@ -211,7 +211,6 @@ CC = @CC@
|
|||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
94
lib/libXcursor/aclocal.m4
vendored
94
lib/libXcursor/aclocal.m4
vendored
|
@ -13,8 +13,8 @@
|
|||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
[m4_warning([this file was generated for autoconf 2.69.
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
|
||||
[m4_warning([this file was generated for autoconf 2.71.
|
||||
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.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
|
|||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
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;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*)
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -2734,7 +2734,7 @@ newsos6)
|
|||
dynamic_linker='ldqnx.so'
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
version_type=sunos
|
||||
sys_lib_dlsearch_path_spec="/usr/lib"
|
||||
need_lib_prefix=no
|
||||
|
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
|
|||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# 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_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
|
@ -3320,7 +3320,7 @@ newos6*)
|
|||
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
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
|
||||
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++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
@ -5377,7 +5377,7 @@ _LT_EOF
|
|||
*nto* | *qnx*)
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
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 Permission is hereby granted, free of charge, to any person obtaining a
|
||||
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
|
||||
# version you require.
|
||||
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_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
|
@ -9963,7 +9963,7 @@ AM_MAINTAINER_MODE
|
|||
# such as man pages and config files
|
||||
AC_DEFUN([XORG_PROG_RAWCPP],[
|
||||
AC_REQUIRE([AC_PROG_CPP])
|
||||
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||
AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
|
||||
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
|
||||
|
||||
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
||||
|
@ -9989,10 +9989,10 @@ rm -f conftest.$ac_ext
|
|||
|
||||
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
|
||||
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])
|
||||
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"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
AC_MSG_RESULT([yes])
|
||||
|
@ -10273,7 +10273,7 @@ AC_SUBST(MAKE_HTML)
|
|||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-xmlto option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-doxygen option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-groff option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-fop option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
# presence of the tool and obtain it's path in separate variables. Coupled with
|
||||
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
|
||||
# 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,
|
||||
# --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
|
||||
# documentation targets except traditional man pages.
|
||||
# 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:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# XORG_WITH_ASCIIDOC --with-asciidoc
|
||||
|
@ -10931,7 +10931,7 @@ AC_MSG_RESULT([$build_docs])
|
|||
#
|
||||
# This macro enables a builder to skip all developer documentation.
|
||||
# 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:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# 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.
|
||||
# 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:
|
||||
# XORG_WITH_XMLTO --with-xmlto
|
||||
# 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
|
||||
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
|
||||
case $host_os in
|
||||
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
*linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
lint_name=splint
|
||||
lint_options="-badflag"
|
||||
;;
|
||||
|
@ -11439,7 +11439,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
|||
AC_DEFUN([XORG_COMPILER_BRAND], [
|
||||
AC_LANG_CASE(
|
||||
[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++], [
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
|
@ -11455,7 +11459,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
|||
# Minimum version: 1.16.0
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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(
|
||||
[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([CACHE_PREFIX], [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-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.
|
||||
|
||||
if test "x$SELECTIVE_WERROR" = "xyes" ; then
|
||||
|
@ -11721,23 +11729,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
|
|||
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
# XORG_DEFAULT_NOCODE_OPTIONS
|
||||
# ---------------------------
|
||||
# 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])
|
||||
XORG_COMPILER_FLAGS
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_INSTALL
|
||||
XORG_MANPAGE_SECTIONS
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
||||
[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_INSTALL()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# 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>.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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
|
||||
# distribute this file as part of a program that contains a
|
||||
|
@ -53,7 +53,7 @@ func_file_conv ()
|
|||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
|
@ -67,7 +67,7 @@ func_file_conv ()
|
|||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
|
@ -255,7 +255,8 @@ EOF
|
|||
echo "compile $scriptversion"
|
||||
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...
|
||||
;;
|
||||
esac
|
||||
|
@ -339,9 +340,9 @@ exit $ret
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# 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-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
1783
lib/libXcursor/config.guess
vendored
1783
lib/libXcursor/config.guess
vendored
File diff suppressed because it is too large
Load diff
|
@ -6,12 +6,15 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#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. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
|
@ -30,6 +33,9 @@
|
|||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#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 */
|
||||
#undef HAVE_XFIXES
|
||||
|
||||
|
@ -67,28 +73,96 @@
|
|||
/* Patch version of this package */
|
||||
#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
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#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. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#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
|
||||
# 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 general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||
to make mbstate_t available. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -103,13 +177,3 @@
|
|||
|
||||
/* Micro revision of libXcursor */
|
||||
#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
|
||||
|
|
2954
lib/libXcursor/config.sub
vendored
2954
lib/libXcursor/config.sub
vendored
File diff suppressed because it is too large
Load diff
8645
lib/libXcursor/configure
vendored
8645
lib/libXcursor/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -26,12 +26,15 @@ AC_PREREQ([2.60])
|
|||
# This is the package version number, not the shared library
|
||||
# version. This version number will be substituted into Xcursor.h
|
||||
#
|
||||
AC_INIT([libXcursor], [1.2.1],
|
||||
[https://gitlab.freedesktop.org/xorg/lib/libXcursor/issues],[libXcursor])
|
||||
AC_INIT([libXcursor], [1.2.2],
|
||||
[https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/issues],
|
||||
[libXcursor])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
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
|
||||
# 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.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
|
@ -39,7 +42,7 @@ AC_USE_SYSTEM_EXTENSIONS
|
|||
AM_INIT_AUTOMAKE([foreign dist-xz])
|
||||
|
||||
# Initialize libtool
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# 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
|
||||
# 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
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
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-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
|
|||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -97,7 +87,7 @@ dir_arg=
|
|||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
|
@ -114,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-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.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
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
|
||||
|
@ -137,46 +137,62 @@ while test $# -ne 0; do
|
|||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
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
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
|
@ -207,6 +223,15 @@ if test $# -eq 0; then
|
|||
exit 0
|
||||
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
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
|
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
|
|||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
|
@ -250,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -266,178 +295,148 @@ do
|
|||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
posix_mkdir=false
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
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 &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
mkdir_mode=
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
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
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -450,14 +449,25 @@ do
|
|||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(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.
|
||||
#
|
||||
|
@ -472,20 +482,24 @@ do
|
|||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
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.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -493,24 +507,24 @@ do
|
|||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
|
@ -519,9 +533,9 @@ do
|
|||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
8400
lib/libXcursor/m4/libtool.m4
vendored
Normal file
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
437
lib/libXcursor/m4/ltoptions.m4
vendored
Normal 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
124
lib/libXcursor/m4/ltsugar.m4
vendored
Normal 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
24
lib/libXcursor/m4/ltversion.m4
vendored
Normal 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
99
lib/libXcursor/m4/lt~obsolete.m4
vendored
Normal 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])])
|
|
@ -127,7 +127,6 @@ CC = @CC@
|
|||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -167,7 +167,6 @@ CC = @CC@
|
|||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -146,7 +146,7 @@ _XcursorPixelToColor (XcursorPixel p, XColor *color)
|
|||
static void
|
||||
_XcursorDumpImage (XImage *image)
|
||||
{
|
||||
FILE *f = fopen ("/tmp/images", "a");
|
||||
FILE *f = fopen ("/tmp/images", "a" FOPEN_CLOEXEC);
|
||||
int x, y;
|
||||
if (!f)
|
||||
return;
|
||||
|
@ -164,7 +164,7 @@ _XcursorDumpImage (XImage *image)
|
|||
static void
|
||||
_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,
|
||||
color->red, color->green, color->blue);
|
||||
fflush (f);
|
||||
|
|
|
@ -780,10 +780,14 @@ XcursorXcFileLoad (XcursorFile *file,
|
|||
}
|
||||
images = XcursorImagesCreate (nimage);
|
||||
if (!images)
|
||||
{
|
||||
_XcursorFileHeaderDestroy (fileHeader);
|
||||
return 0;
|
||||
}
|
||||
comments = XcursorCommentsCreate (ncomment);
|
||||
if (!comments)
|
||||
{
|
||||
_XcursorFileHeaderDestroy (fileHeader);
|
||||
XcursorImagesDestroy (images);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1019,7 +1023,7 @@ XcursorFilenameLoadImage (const char *file, int size)
|
|||
if (!file || size < 0)
|
||||
return NULL;
|
||||
|
||||
f = fopen (file, "r");
|
||||
f = fopen (file, "r" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return NULL;
|
||||
image = XcursorFileLoadImage (f, size);
|
||||
|
@ -1036,7 +1040,7 @@ XcursorFilenameLoadImages (const char *file, int size)
|
|||
if (!file || size < 0)
|
||||
return NULL;
|
||||
|
||||
f = fopen (file, "r");
|
||||
f = fopen (file, "r" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return NULL;
|
||||
images = XcursorFileLoadImages (f, size);
|
||||
|
@ -1053,7 +1057,7 @@ XcursorFilenameLoadAllImages (const char *file)
|
|||
if (!file)
|
||||
return NULL;
|
||||
|
||||
f = fopen (file, "r");
|
||||
f = fopen (file, "r" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return NULL;
|
||||
images = XcursorFileLoadAllImages (f);
|
||||
|
@ -1072,7 +1076,7 @@ XcursorFilenameLoad (const char *file,
|
|||
if (!file)
|
||||
return XcursorFalse;
|
||||
|
||||
f = fopen (file, "r");
|
||||
f = fopen (file, "r" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return 0;
|
||||
ret = XcursorFileLoad (f, commentsp, imagesp);
|
||||
|
@ -1089,7 +1093,7 @@ XcursorFilenameSaveImages (const char *file, const XcursorImages *images)
|
|||
if (!file || !images)
|
||||
return XcursorFalse;
|
||||
|
||||
f = fopen (file, "w");
|
||||
f = fopen (file, "w" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return 0;
|
||||
ret = XcursorFileSaveImages (f, images);
|
||||
|
@ -1107,7 +1111,7 @@ XcursorFilenameSave (const char *file,
|
|||
if (!file || !comments || !images)
|
||||
return XcursorFalse;
|
||||
|
||||
f = fopen (file, "w");
|
||||
f = fopen (file, "w" FOPEN_CLOEXEC);
|
||||
if (!f)
|
||||
return 0;
|
||||
ret = XcursorFileSave (f, comments, images);
|
||||
|
|
|
@ -159,6 +159,12 @@ _XcursorNextPath (const char *path)
|
|||
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 XcursorSep(c) ((c) == ';' || (c) == ',')
|
||||
|
||||
|
@ -172,7 +178,7 @@ _XcursorThemeInherits (const char *full)
|
|||
if (!full)
|
||||
return NULL;
|
||||
|
||||
f = fopen (full, "r");
|
||||
f = fopen (full, "r" FOPEN_CLOEXEC);
|
||||
if (f)
|
||||
{
|
||||
while (fgets (line, sizeof (line), f))
|
||||
|
@ -254,7 +260,7 @@ XcursorScanTheme (const char *theme, const char *name)
|
|||
full = _XcursorBuildFullname (dir, "cursors", name);
|
||||
if (full)
|
||||
{
|
||||
f = fopen (full, "r");
|
||||
f = fopen (full, "r" FOPEN_CLOEXEC);
|
||||
free (full);
|
||||
}
|
||||
if (!f && inherits[d + 1].line == NULL)
|
||||
|
|
|
@ -36,7 +36,13 @@
|
|||
#endif
|
||||
|
||||
#include "Xcursor.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#ifdef O_CLOEXEC
|
||||
#define FOPEN_CLOEXEC "e"
|
||||
#else
|
||||
#define FOPEN_CLOEXEC ""
|
||||
#endif
|
||||
|
||||
typedef struct _XcursorFontInfo {
|
||||
struct _XcursorFontInfo *next;
|
||||
|
|
|
@ -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
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Nov 18 15:05:39 2022 -0800
|
||||
|
@ -585,7 +696,7 @@ Date: Thu Dec 16 17:55:30 2010 -0800
|
|||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b64cac63e0bcdd87bbfd19678552fd7ed1a3b58f
|
||||
Author: Cristian Rodríguez <cristian.rodriguez@opensuse.org>
|
||||
Author: Cristian Rodríguez <cristian.rodriguez@opensuse.org>
|
||||
Date: Tue Dec 14 15:40:20 2010 -0500
|
||||
|
||||
Export only public API symbols
|
||||
|
@ -1102,7 +1213,7 @@ Date: Thu May 19 00:10:07 2005 +0000
|
|||
Require automake 1.7 in AM_INIT_AUTOMAKE
|
||||
|
||||
commit 2f31285482451b8ed44b0b61969a7f324dbe905a
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Tue May 17 14:43:47 2005 +0000
|
||||
|
||||
Tue May 17 10:38:30 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
@ -1129,7 +1240,7 @@ Date: Sat May 14 07:46:48 2005 +0000
|
|||
source can reference them with <X11/...>.
|
||||
|
||||
commit 0ea8a9fde966a2fbdc075e4cfc47235d3c899022
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Thu May 12 16:27:25 2005 +0000
|
||||
|
||||
Thu May 12 12:24:16 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
@ -1137,7 +1248,7 @@ Date: Thu May 12 16:27:25 2005 +0000
|
|||
add Makefile.am
|
||||
|
||||
commit 845dff36906d99a80ea920a8d0efb73bd0b88d56
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
|
||||
Date: Thu May 12 16:12:34 2005 +0000
|
||||
|
||||
Make xtrans install in $(includedir)/X11/Xtrans. Remove all references to
|
||||
|
|
|
@ -31,6 +31,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include <X11/X.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/Xdmcp.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
static void
|
||||
|
@ -41,12 +42,9 @@ getbits (long data, unsigned char *dst)
|
|||
dst[2] = (data >> 16) & 0xff;
|
||||
dst[3] = (data >> 24) & 0xff;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define Time_t time_t
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(HAVE_LRAND48) && defined(HAVE_SRAND48)
|
||||
#define srandom srand48
|
||||
#define random lrand48
|
||||
|
@ -58,8 +56,6 @@ getbits (long data, unsigned char *dst)
|
|||
#define getpid(x) _getpid(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
|
||||
/* Solaris 11.3.0 - 11.4.15 only define getentropy() in <sys/random.h> */
|
||||
#if HAVE_GETENTROPY && HAVE_SYS_RANDOM_H
|
||||
# include <sys/random.h>
|
||||
|
|
|
@ -232,7 +232,6 @@ CC = @CC@
|
|||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
|
@ -42,10 +42,10 @@ XdmcpWriteHeader (
|
|||
|
||||
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)
|
||||
return FALSE;
|
||||
free((unsigned long *)(buffer->data));
|
||||
free(buffer->data);
|
||||
buffer->data = newData;
|
||||
buffer->size = XDM_MAX_MSGLEN;
|
||||
}
|
||||
|
|
30
lib/libXdmcp/aclocal.m4
vendored
30
lib/libXdmcp/aclocal.m4
vendored
|
@ -13,8 +13,8 @@
|
|||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
[m4_warning([this file was generated for autoconf 2.69.
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
|
||||
[m4_warning([this file was generated for autoconf 2.71.
|
||||
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.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
@ -1483,7 +1483,7 @@ old_postuninstall_cmds=
|
|||
|
||||
if test -n "$RANLIB"; then
|
||||
case $host_os in
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
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;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | secbsd* | darwin* | dragonfly*)
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
|
@ -2734,7 +2734,7 @@ newsos6)
|
|||
dynamic_linker='ldqnx.so'
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
version_type=sunos
|
||||
sys_lib_dlsearch_path_spec="/usr/lib"
|
||||
need_lib_prefix=no
|
||||
|
@ -3246,7 +3246,7 @@ freebsd* | dragonfly*)
|
|||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# 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_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
|
@ -3320,7 +3320,7 @@ newos6*)
|
|||
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
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
|
||||
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++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
@ -5377,7 +5377,7 @@ _LT_EOF
|
|||
*nto* | *qnx*)
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
;;
|
||||
|
||||
openbsd* | secbsd*)
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
_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
|
||||
# version you require.
|
||||
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_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
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_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])
|
||||
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"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
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
|
||||
# The lint program on FreeBSD and NetBSD is different from the one on Solaris
|
||||
case $host_os in
|
||||
*linux* | *openbsd* | *secbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
*linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
|
||||
lint_name=splint
|
||||
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]], [-Wmissing-noreturn])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
|
||||
# These are currently disabled because they are noisy. They will be enabled
|
||||
|
|
1783
lib/libXdmcp/config.guess
vendored
1783
lib/libXdmcp/config.guess
vendored
File diff suppressed because it is too large
Load diff
|
@ -21,8 +21,8 @@
|
|||
/* Define to 1 if you have the `lrand48' function. */
|
||||
#undef HAVE_LRAND48
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the `srand48' function. */
|
||||
#undef HAVE_SRAND48
|
||||
|
@ -30,6 +30,9 @@
|
|||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#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. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
|
@ -51,6 +54,9 @@
|
|||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#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.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
@ -85,40 +91,98 @@
|
|||
/* Patch version of this package */
|
||||
#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
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_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
|
||||
/* 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. */
|
||||
#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 */
|
||||
#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
|
||||
|
|
2954
lib/libXdmcp/config.sub
vendored
2954
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
Loading…
Add table
Add a link
Reference in a new issue