diff options
Diffstat (limited to 'lib/libXt')
200 files changed, 7812 insertions, 7996 deletions
diff --git a/lib/libXt/COPYING b/lib/libXt/COPYING index cf7bbf361..2e737692f 100644 --- a/lib/libXt/COPYING +++ b/lib/libXt/COPYING @@ -1,4 +1,24 @@ +Copyright © 2003,2019 Thomas E. Dickey + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +ABOVE LISTED COPYRIGHT HOLDER(S) 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. + Copyright © 2001,2003 Keith Packard Permission to use, copy, modify, distribute, and sell this software and its diff --git a/lib/libXt/ChangeLog b/lib/libXt/ChangeLog index 3da9d3532..f940bd64f 100644 --- a/lib/libXt/ChangeLog +++ b/lib/libXt/ChangeLog @@ -1,3 +1,1605 @@ +commit 93ffd50ccf04d02fc94565d8ee831c7b63d6d71a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Jun 18 19:23:24 2019 -0400 + + add a dependency on makestrs to help with parallel builds + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6abd578a6f761c6c0563d63749bb11f9277b5897 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Jun 18 07:08:47 2019 -0400 + + force a version-bump + +commit 3e2002294b130f1f46ab026075b9d7e83c94bd60 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Jun 18 05:07:00 2019 -0400 + + fix a typo + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 59d9be57268c14e6995dff47a9f3f9d173b2b8a0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Jun 17 03:53:23 2019 -0400 + + update for proposed release as 1.2.0 + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ae293e379419e7e8451422fdd7a899a819db362b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Jun 15 10:45:54 2019 -0400 + + update to 1.1.5.3 to reflect documentation updates/review + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 17b77304b23965c1c8ac6a260636f37c23f60ff6 +Author: Walter Harms <wharms@bfs.de> +Date: Fri Jun 14 21:55:45 2019 +0200 + + remove dead code + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit f09cef2528b664b0029242c5643246e28d0395b3 +Author: Walter Harms <wharms@bfs.de> +Date: Fri Jun 14 21:31:49 2019 +0200 + + make _XtWaitForSomething accept always the same number of arguments + + to reduce the #ifdef forrest make _XtWaitForSomething + accept all arguments. Also add a dummy use for drop_lock + to avoid unused warnings + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit c33fc7df82276b3dd06428d8ac34be39b6e1afd6 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jun 13 21:21:40 2019 -0400 + + fix some more errata, plus reformat a list for consistency + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 880876ba1aff9cf56d574d2bf486856f5bf20107 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jun 13 19:05:55 2019 -0400 + + fix some punctuation errata + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 86073013496a2f45ebde242001e82cf5049d51cd +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jun 13 18:28:58 2019 -0400 + + reduce ifdef/ifndef inconsistency for USE_POLL + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 190c027e3e594afb15c6d613d95ce5af9e22fcf7 +Author: Walter Harms <wharms@bfs.de> +Date: Mon Jun 10 13:29:14 2019 +0200 + + fix documentation to refect reality.. + + XtNewString is strdup() with NULL check. A Function not a macro. + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit 26337b48bd14b40b392b76e00aaa9563658e5789 +Author: Walter Harms <wharms@bfs.de> +Date: Mon Jun 10 13:13:20 2019 +0200 + + remove useles else + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit 17c723643d0fb218b53ed04f837addb9d7de0d15 +Author: Walter Harms <wharms@bfs.de> +Date: Mon Jun 10 12:48:46 2019 +0200 + + no need to check arument for XtFree() + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit fbbf91c17b8a85acfe883a103b43c21ddf1e6398 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Jun 9 20:21:38 2019 -0400 + + use strdup in two places; remove a bogus "else" from X11R6.4 changes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 15f9eb3f0bb8cf4a5ea1279e58e1205aada3188b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Jun 7 05:27:14 2019 -0400 + + fix formatting errata + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 3d65748dee9a6d2e34b7cafec09b1ec7a6f5eb43 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jun 6 21:01:06 2019 -0400 + + correct markup for header- and library-filenames; they are not functions + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ab1b99130f98a3767589519c37ce78b3dcb8ce8e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 30 19:59:02 2019 -0400 + + fix a syntax mess introduced by R6.6 ifdef'ing + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 040eeec1d8034dbf2f432d792c90dbedc5148aea +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 30 18:59:30 2019 -0400 + + fix fake-quotes in manpages + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fad2c6c20a793b20974a72b2fabb2eca668e69f3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 30 18:19:28 2019 -0400 + + drop "session" resource XtNsession / XtCSession, which was listed in X11R6 but never defined in headers + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c588859147c66561a839bc5d2eb3d2242bd377e9 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 30 17:32:59 2019 -0400 + + add superscript-markup in range definitions + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9f556b46f0009e58a2c30c3ba3c9f223ae9f6255 +Author: Walter Harms <wharms@bfs.de> +Date: Sun Jun 9 18:26:23 2019 +0200 + + no need to check argument for X(t)Free + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit 7c0ed275e4c0e86e23c5f93647e03fa4b71797b3 +Merge: d4208c7 4194ff5 +Author: Walter Harms <wharms@bfs.de> +Date: Wed Jun 5 18:58:45 2019 +0200 + + Merge branch 'master' of ssh://gitlab.freedesktop.org/xorg/lib/libxt + +commit 4194ff5b427e39bb5325db0f377e80b3e6982e17 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 18:49:25 2019 -0400 + + fix compiler warnings when WHITEFILL is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 66c1ea79516a0b31043dc604172a42cd859e5b47 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 18:46:27 2019 -0400 + + fix compiler warnings when _TRACE_HEAP is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 390e9e20c029e4eb159d39bd3d79160ca4567650 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 18:35:16 2019 -0400 + + build- and compiler-warning fixes when XTTRACEMEMORY is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5ad20c90e31abfb9854cf2eae8292e44f2e18671 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 17:06:15 2019 -0400 + + build-fix and compiler-warnings when TRACE_TM is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7a6ca8784b3b1d75539962ad7b303ad0e5167e6a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 05:27:52 2019 -0400 + + add prototype for DEBUG-function + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7c4a5b577637f113372005fc360e03db9b058564 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 28 05:25:02 2019 -0400 + + fix compiler-warning when DEBUG is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9ffc4ff7eb22b96472aa299b60dc3ed1550a7d6c +Merge: 2d0140c 405e038 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 19 18:58:53 2019 -0400 + + Merge remote-tracking branch 'upstream/master' + +commit 405e03828dfc2a3d69a32236ae8f1214e7185cff +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 19 11:35:47 2019 -0400 + + bump to 1.1.5.2 to reflect noreturn-changes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2d0140cf36ad3a3f8496d8e2da888efb9304af67 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 19 11:35:47 2019 -0400 + + bump to 1.1.5.2 to reflect noreturn-changes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d4208c7734fb12adbfb5ef1b65dfcfe7126380d6 +Merge: b3b86a2 4264ac5 +Author: Walter Harms <wharms@bfs.de> +Date: Sat May 18 19:31:28 2019 +0200 + + Merge branch 'master' of ssh://gitlab.freedesktop.org/xorg/lib/libxt + +commit b3b86a2f6b974f5e040d64aa3778075c987bf0fa +Author: Walter Harms <wharms@bfs.de> +Date: Sat May 18 19:31:08 2019 +0200 + + save one indent level + +commit 4264ac5f8bc959844ae8ac623d4db491fc691fa5 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri May 17 20:39:24 2019 -0400 + + trim obsolete ifdef for ISC, and correct nonstandard "NaNS" to "NaN" + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 41ba4dec60f7d9495c8d45c068d5c3d17e035e1e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri May 17 19:57:28 2019 -0400 + + use _X_NORETURN, works for gcc and clang + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 36019ab614068bdf3fc933addc3a9b4cb512c9e0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri May 17 04:52:57 2019 -0400 + + use explicit pointer check to eliminate a clang --analyze warning in VarGet.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1f0e3238352a497a59a36e0b8a5b4723c634b2e1 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 16 20:53:42 2019 -0400 + + fix most clang --analyze warnings about null-pointers + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fb78a7c881adbe46f1f8c6e8e429bc8963c9b3e8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 16 17:09:13 2019 -0400 + + fix unused-assignment warnings (clang --analyze) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7fa9ee9e656ec32cc382f7acc552d0b4c9bf952c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu May 16 05:21:06 2019 -0400 + + ensure XWindowChanges value is initialized before updating it (clang --analyze) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 91f1119528b57f94d178f0cfb12efafd0c90bbc9 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed May 8 21:15:08 2019 -0400 + + fixes cppcheck "style" warnings (mostly variable-scope) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 43a65ae23370e0f7fb427e96c6d9037d8fa1af35 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed May 8 17:56:58 2019 -0400 + + add casts to quiet compiler warnings with Solaris 11.4 / gcc 7.3.0 + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9c45da7cb487b8b6980ff3020468e0fb582bdd7f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 20:37:37 2019 -0400 + + remove an #include used in debugging + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 0eedde5df39ac754623511c06c5573ad62ca4c4c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 20:15:12 2019 -0400 + + manpage style fix: sentences should end at the end of a line + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit b7a87ccb07f816e7b9579d91bd66552e86ef0e8e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 20:05:38 2019 -0400 + + add a note pointing out the change in design + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit adf962f3b2c4539e555bfda600d34b63c9e5e002 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 19:59:07 2019 -0400 + + updated spec to correspond to the current implementation of XtAppMainLoop + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2286ca56529f27b0f6a809314e8303591c7fe240 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 19:42:59 2019 -0400 + + update manpage for changes to XtAppMainLoop() + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit dc33dc58f8ec841f002b9c65fb86b879b2d7d44a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue May 7 19:04:10 2019 -0400 + + Proposed revision of XtAppMainLoop() in + + https://gitlab.freedesktop.org/xorg/lib/libxt/issues/7 + + caused applications such as xclock to hang, because it did first not + check if there was an available event corresponding to the mask + parameter before calling XtAppProcessEvent(). + + For instance, if the mask was XtIMXEvent, it would ignore timer events + until an X event occurred. + + Fix this by checking with XtAppPending() when the mask is not XtIMAll. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit f0ff9ea4fc653d27db3251a5bae97df4b963b1ba +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 19:35:36 2019 -0400 + + Add related fix from + https://gitlab.freedesktop.org/xorg/lib/libxt/issues/6 + https://bugs.chromium.org/p/chromium/issues/detail?id=284595 + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 27778fd000d417dd81b940fc8a7855d4b4ccd068 +Merge: bb511a5 0b80bc9 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 18:22:25 2019 -0400 + + Merge branch 'ffontaine/libxt-master' into HEAD + +commit bb511a50f14c69deaf67ef411aeb6eea03eca975 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 16:49:32 2019 -0400 + + add casts to fix compiler warnings + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 86d7036808a6958f5937a81044262afe2658e6ec +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 16:38:46 2019 -0400 + + eliminate an unnecessary cast which gave a gcc warning and add a null-pointer check + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit a9c54d128ac65a8fa065ef28cd51c42981949c60 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 16:09:04 2019 -0400 + + if Xalloca.h is corrected to use size_t param, one change is still needed in + libXt to fix compiler warnings - done here. + +commit 9112c3c104f0b3ec45ae776279e276034bc7dcc5 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 05:16:24 2019 -0400 + + fixes for gcc warnings, no object-change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 37dce673d841e7df75091a3b31828431e71bd78f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon May 6 04:08:42 2019 -0400 + + XtAppProcessEvent expects XtInputMask parameter, which is unsigned-long + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 8905b82df8a6dc1668d8e817924fb7b8cd574bdc +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 5 21:06:35 2019 -0400 + + use "const void *" rather than "char *" for memcmp, etc + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fb1d51d4da8f303e92c8b30e4503dc7f9c01b3a8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 5 20:49:13 2019 -0400 + + fix 5 more simple gcc warnings + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5ee9a5d2de4e50552e50247e745f92b61f9784c0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 5 20:16:31 2019 -0400 + + fix gcc warnings when assigning into a bit-field by first masking the value + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c9f5ccd2e6c301853ebf1595ca12b377a991a095 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 5 18:36:04 2019 -0400 + + fixes for typos and formatting glitches + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 02bc6c1091fca1beeda6b0d79017c106655e913c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun May 5 14:43:08 2019 -0400 + + ignore the generated file used for version-number + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6d1d29a92b9726c8f960d96cd3d896d314963341 +Author: Jon Turney <jon.turney@dronecode.org.uk> +Date: Wed May 1 18:20:07 2019 +0100 + + Provide suseconds_t typedef on Win32 + + Fix compilation on Win32 after cf9e8c73, where timeval is not defined in + terms of that type, but a plain long. + +commit 06cc5aa5a9f507bc1a5643854dcab33ad6d14761 +Author: Jon Turney <jon.turney@dronecode.org.uk> +Date: Wed May 1 18:31:29 2019 +0100 + + Fix WHITEFILL after const fixes + + Fix compilation of ExtractLocaleName() when WHITEFILL is defined (when + built for Win32) after const fixes in ffeb733d. + +commit 0b80bc9904c8d553c760651daca0c964df052c8b +Author: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Fri May 3 08:06:00 2019 +0200 + + libXt: util: don't link makestrs with target cflags + + The line: + + AM_CFLAGS = $(XT_CFLAGS) + + in util/Makefile.am is wrong because it adds target cflags to the + compilation of makestrs, which is built for the build machine, which + leads to build failures when cross-compiling. + + Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + [Retrieved from: + https://git.buildroot.net/buildroot/tree/package/x11r7/xlib_libXt/0001-util-don-t-link-makestrs-with-target-cflags.patch] + Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> + +commit 870954db9312d007a3c7620763e858cc0c03f753 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 28 19:54:36 2019 -0400 + + improved markup for the restored pages + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c6bd044933771201d13256b18fad0c0d027b650b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 28 19:23:48 2019 -0400 + + restore the last 3-4 pages of "Registering a New Resource Converter", + originally section 9.6.4 which lost in sgml/docbook conversion. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 3b18eab505cfef9cc6135f39ee9608e1366edd26 +Merge: 64b57b0 ba4ec93 +Author: Walter Harms <wharms@bfs.de> +Date: Sun Apr 28 17:31:32 2019 +0200 + + Merge branch 'master' of ssh://gitlab.freedesktop.org/xorg/lib/libxt + +commit 64b57b01feef4ddb85392eca013b756b2691106e +Author: Walter Harms <wharms@bfs.de> +Date: Sun Apr 28 17:00:17 2019 +0200 + + Fix input starvation in XtMainLoop() closes bug #7 + + the function XtAppProcessEvent() can handle only one of + XtIMXEvent | XtIMTimer | XtIMAlternateInput | XtIMSignal + propperly. It returns after processing one type of input + others are left unprocessed. putting enought input of one + type, the later once will never processed. + +commit ba4ec937680ee72f2fcd463752766340a4b3729d +Author: Benjamin Tissoires <benjamin.tissoires@gmail.com> +Date: Thu Apr 11 17:21:17 2019 +0200 + + Fix covscan complain + + covscan gets confused by the test before the XtFree. + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/Event.c:743: alloc_fn: Storage is returned from allocation function "__XtMalloc". + libXt-20190411/src/Event.c:743: var_assign: Assigning: "proc" = storage returned from "__XtMalloc((Cardinal)((size_t)numprocs * 16UL))". + libXt-20190411/src/Event.c:745: var_assign: Assigning: "closure" = "proc". + libXt-20190411/src/Event.c:776: leaked_storage: Variable "closure" going out of scope leaks the storage it points to. + libXt-20190411/src/Event.c:776: leaked_storage: Variable "proc" going out of scope leaks the storage it points to. + + Mixing static arrays and dynamic ones was a good idea + in the 90s when malloc was expensive, but now, we should + probably make the code clearer by just allocating the + memory when needed. + + Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> + +commit 6a7584e0337bb5cfec7f786231597f46c6d5fb16 +Author: Benjamin Tissoires <benjamin.tissoires@gmail.com> +Date: Thu Apr 11 17:27:12 2019 +0200 + + dummy fix for covscan + + covscan seems lost here: + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/Intrinsic.c:1074: alloc_fn: Storage is returned from allocation function "__XtMalloc". + libXt-20190411/src/Intrinsic.c:1074: var_assign: Assigning: "buf2" = storage returned from "__XtMalloc(4096U)". + libXt-20190411/src/Intrinsic.c:1110: leaked_storage: Variable "buf2" going out of scope leaks the storage it points to. + + Error: USE_AFTER_FREE (CWE-416): + libXt-20190411/src/Intrinsic.c:1113: alias: Assigning: "buf" = "buf2". Now both point to the same storage. + libXt-20190411/src/Intrinsic.c:1108: freed_arg: "XtFree" frees "buf2". + libXt-20190411/src/Intrinsic.c:1110: use_after_free: Using freed pointer "buf". + + Both are false positive, but we can make it understand where it + is wrong. + + Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> + +commit bca67f981dd3bcf730ac3816836b66049dd09f33 +Author: Benjamin Tissoires <benjamin.tissoires@gmail.com> +Date: Thu Apr 11 17:26:58 2019 +0200 + + Fix leaks detected by covscan + + The following leaks are reported by covscan: + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/ResConfig.c:542: alloc_arg: "_get_part" allocates memory that is stored into "part". + libXt-20190411/src/ResConfig.c:544: noescape: Resource "part" is not freed or pointed-to in "_match_resource_to_widget". + libXt-20190411/src/ResConfig.c:560: leaked_storage: Variable "part" going out of scope leaks the storage it points to. + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/TMgrab.c:108: alloc_arg: "XtKeysymToKeycodeList" allocates memory that is stored into "keycodes". + libXt-20190411/src/TMgrab.c:115: var_assign: Assigning: "keycodeP" = "keycodes". + libXt-20190411/src/TMgrab.c:124: leaked_storage: Variable "keycodeP" going out of scope leaks the storage it points to. + libXt-20190411/src/TMgrab.c:124: leaked_storage: Variable "keycodes" going out of scope leaks the storage it points to. + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/TMparse.c:1544: alloc_fn: Storage is returned from allocation function "XtMalloc". + libXt-20190411/src/TMparse.c:1544: var_assign: Assigning: "event" = storage returned from "XtMalloc(88U)". + libXt-20190411/src/TMparse.c:1549: noescape: Resource "event" is not freed or pointed-to in "ParseQuotedStringEvent". + libXt-20190411/src/TMparse.c:1555: leaked_storage: Variable "event" going out of scope leaks the storage it points to. + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/TMparse.c:1779: alloc_fn: Storage is returned from allocation function "XtMalloc". + libXt-20190411/src/TMparse.c:1779: var_assign: Assigning: "action" = storage returned from "XtMalloc(32U)". + libXt-20190411/src/TMparse.c:1784: noescape: Resource "action" is not freed or pointed-to in "ParseAction". + libXt-20190411/src/TMparse.c:1785: leaked_storage: Variable "action" going out of scope leaks the storage it points to. + + In addition to this legitimate leaks, covscan can get confused by + the allocated memory in XtKeysymToKeycodeList: + + Error: RESOURCE_LEAK (CWE-772): + libXt-20190411/src/TMgrab.c:108: alloc_arg: "XtKeysymToKeycodeList" allocates memory that is stored into "keycodes". + libXt-20190411/src/TMgrab.c:114: leaked_storage: Variable "keycodes" going out of scope leaks the storage it points to. + + Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> + +commit 64dcec64b294d67a45596d84f91c876f15a5d95f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 19:44:10 2019 -0400 + + adapt change from libXaw for inserting the package version into the spec + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 29bfd6ce3d9b9a1040ee2edf4ac5f83b54ac1932 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 19:25:11 2019 -0400 + + bump to 1.1.5.1 (actually 1.2.0 should be the target) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 182d2029f4adc89dd78f52a55d626a8419ae0c09 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 18:18:54 2019 -0400 + + updated the acknowledgements section, and added a few notes to the release-7 section + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c1b8a6690b26bd7f802f953f4bd8f00f5937283c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 15:12:45 2019 -0400 + + summarize the const-changes in X11R7+ + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 04b44ef88aa59705acb38347a0d184d3287f6dd3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 14:44:46 2019 -0400 + + add #include for <X11/Intrinsic.h> to manpages, per convention + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit f89906ffa8b65b9875053acbd52a7380a21c626f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 14:26:17 2019 -0400 + + move MenuPopdown and MenuPopup to section to distinguish these actions from C prototypes (and use the "Xt" prefix for these names as implemented since X11R4). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5d5811668fd06d50d8ff6f22159325e2328d0ee8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 14:23:53 2019 -0400 + + minor tweak to work around docbook's limited formatting + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c605f7d108365fdd4e46a032fcaaa812cef56f83 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 21 13:47:49 2019 -0400 + + fill in a few missing typedef keywords, and a missing "*" in prototype, as well as minor clarification of "XtIs<class>" + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 3637c0988df16732dbbd121760688ee82b9d3882 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Apr 20 10:00:15 2019 -0400 + + add some missing "typedef" keywords for prototyped function-pointers. + also, use "type" markup in some of the places where it's needed. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit dca1a94c4d08009af860012cba6c4849f4a04a9a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 19 18:53:13 2019 -0400 + + fill in prototype information for a code example, as well as for + the XtRFunction resource type. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d2df1c47e7f0511c2f1c269bec25a0c4b519fe88 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 19 05:29:53 2019 -0400 + + fill in background for wide-prototypes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 52999015089e38705454d0f6f2ea7b544c993bf3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Apr 18 21:08:22 2019 -0400 + + begin section on the conversion to standard C + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 725f2f79c6f79d8b0aaea4dd37f56856efcf3a2d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 17 20:43:56 2019 -0400 + + finish summarizing X11R6 vs documentation updates + +commit 3864d90245b8be233005bed639ec8cd7b5577cea +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 17 20:08:22 2019 -0400 + + summarize X11R6.3 and X11R6.4 changes + +commit c65723b624b0718f020868ac3aa9a19542434d50 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 17 19:47:04 2019 -0400 + + The interface changes made recently have to be documented, and due to the + time interval, etc., in turn requires an update to the specification version. + Update that now. + +commit 533e88162b1540e2ed7d3c6ccdae5f50aac3d69d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 17 19:42:43 2019 -0400 + + update xorg's documentation-urls + +commit 1fd61d36009090cb8e2d95b861ae2c02cb874c77 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 17 04:38:05 2019 -0400 + + fix cut/paste error in description of --enable-geo-tattler configure option + (reported by Alan Coopersmith) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4bd13f2bb92aafe66205160d55b3dc4cae98cda3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 16 21:20:21 2019 -0400 + + remove calls to "IN" macro, which was recently removed from header + +commit 735ee4b6cc90c9ebfc33680c820c299545aa02ed +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 16 21:13:57 2019 -0400 + + Add --disable-const and --enable-geo-tattler options for new/updated features. + Also, show configure choices for build-logs. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit f2418d6ff43197d7e51404aa13ca9cb2434669ff +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 16 17:42:59 2019 -0400 + + update manpage prototype for XtFindFile() + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + + Conflicts: + man/XtFindFile.man + +commit ea2247ee98b9c7357dccbba13df96ffc6d08b65a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Apr 15 17:46:18 2019 -0400 + + use ldquo/rdquo/ndash where appropriate + +commit 44f5ef69ef6f1593d481a831d6aa4e035fc2e7bd +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Apr 15 17:21:58 2019 -0400 + + correct an error from the original document's depiction of escape_char + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit eaa1835ba58525c90ffa2dc5a5d409dd9e7a909f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Apr 15 17:20:57 2019 -0400 + + use ldquo/rdquo/ndash where appropriate + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit cbf4dd22eedc33309efacfb2a1a795debdd44b3b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Apr 15 17:13:05 2019 -0400 + + trim spurious backslashes from translation of nroff to docbook xml + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1474d2e826773f3f5aa61ef2ad827c977ee5d084 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Apr 15 05:01:33 2019 -0400 + + The conversion to xml overlooked the nroff document's use of "\%" for + hyphenation (remove those). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit df21efb1cfaea8d46135f830817e4170605bffc0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 20:50:44 2019 -0400 + + use lineannotation tag + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 26e04bcf5714149c8e047af5c5243a9755fe925a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 20:45:45 2019 -0400 + + whitespace/formatting fix + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1882fbe7a1a2f05c9939b40c7c07be83aea77698 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 20:37:45 2019 -0400 + + use lineannotation tag + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 46505ebf1bb23b05364ee6da4fda48ea03221f58 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 20:29:02 2019 -0400 + + whitespace/formatting fixes + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit a3bb222d24c12dad2744039b8d5caa6ce05ca3bf +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 20:11:47 2019 -0400 + + formatted sample code to fit in 80 columns + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 346716ffe321ad24b839d9b17eee300b41c899c2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 19:48:09 2019 -0400 + + use lineannotation tag to solve font mismatches for xref's inside + programlisting + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 015f1dd200334b656ff056b03662beee7ad7a9db +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 19:30:48 2019 -0400 + + use consistent labeling for xref's + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit aab9b50bb755d741ee54203f91bdfc464a95642f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 18:45:06 2019 -0400 + + use programlisting tag rather than workaround for literallayout font. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit aa871eb5c087f3af40e49e77378a04fa872c7465 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Apr 14 17:51:59 2019 -0400 + + fill in titles for some references to ICCCM and X11 documents + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 8905ee4cd409f22e940747b2dc0347c414011250 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 12 21:17:55 2019 -0400 + + fix ``fake quotes'' + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 8310d272d09132b86ed821b3abd3b85ceb2ea73c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 12 19:52:24 2019 -0400 + + corrected some nested list formatting + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 8000127db88f883a4e7c747560efeca536b1c14e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 12 19:23:58 2019 -0400 + + modify xml-files to use named-entities, for easier manipulation + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1380721b4d252b8ed32d6016f1635f861e75f453 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Apr 12 04:35:13 2019 -0400 + + use DOCTYPE consistently in included xml files, to allow using named entities + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6f75d2fefcf4e5c158546590bcfafc73293e4038 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Apr 11 19:20:23 2019 -0400 + + add (with an external script "markup-literallayout") <code> tags + within <literallayout>. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d9afa0ca6e677b446ce43f2f189c08cfe87f68f3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Mar 29 21:47:33 2019 -0400 + + whitespace-fixes, plus convert examples to standard C + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1dd873e7bf2239b338d2b8c35607139c0d3d6e84 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Mar 28 20:17:57 2019 -0400 + + fix a typo + +commit 2e9edb068ef2a20fc33f484ffaf69174a0a0945a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Mar 28 19:55:53 2019 -0400 + + change ambiguous String's to char* or const-char*, as well as adding the + missing parameters to one prototype + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6d19d615ce6b23f2b14340682851b5eba64e32ca +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Mar 28 19:43:25 2019 -0400 + + The conversion to xml's funcdef dropped one or more parameters from several + functions. This commit restores those parameters to the function prototypes. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ae2808046eafcbbd5e96ce36b6735f2888bd2a19 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 21:24:42 2019 -0400 + + correct prototype for XtInitialize; error in spec + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 01d9652e223ddbf0756a6f8a57db8f44f37fe03f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 21:19:16 2019 -0400 + + correct prototype for XtDisplay; error in spec + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 37a65d8a0b8021c8c09f173c57f0c75bb035d556 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 21:13:41 2019 -0400 + + corrected prototype for XtAppSetFallbackResources; error in spec + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 01ddc661a67d4b578f34c612a900fc5ef760d8de +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 21:08:20 2019 -0400 + + updated return-type for XtFindFile, also due to _CONST_X_STRING + + The previous commit also adds the standard "...", for variable-length parameter + lists, which was omitted from the specification. + +commit e357bd3b79216923820c0a024f95026fdd4a1cf3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 21:04:44 2019 -0400 + + modify function prototypes in spec to correspond to updates made in headers + for the _CONST_X_STRING feature. + +commit 27483d8a3252e2c2a451976d4a99622becd83fe8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 20:07:55 2019 -0400 + + update several function prototypes to use void-return or void-parameter, + which were not in the original spec because it accommodated K&R C. + +commit a8dcb749458a723dd76e342162c5c00b629374fe +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 19:38:46 2019 -0400 + + by the way - an overdue notification + +commit 5dd96a769ed02a0125fa2f84a2f27a1f75bdcc8e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 27 18:51:41 2019 -0400 + + fix: some ASCII characters were mangled into Unicode look-alikes + +commit 464d6f0d396880152d1475f37459c38de5373d4f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Mar 24 14:32:41 2019 -0400 + + remove some debris... + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6b500c797a461c6da3baf6a1be208b232bf84366 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 23 11:51:55 2019 -0400 + + fix minor regression in prototype updates + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 101090b0a60c8bc9aa38c8fd42b35119739bc53f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 23 11:36:33 2019 -0400 + + avoid using C keyword "default" as parameter name + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 149159df368aaa50db9e3e02f725d147ff557dbd +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 23 06:46:42 2019 -0400 + + updated manual pages' C prototypes to agree with the header-files. + This takes into account the _CONST_X_STRING feature, distinguishing + between String and char* and const char*, but also in + several cases, such as XtSessionGetToken, the manual page was wrong. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + + Conflicts: + man/XtAppErrorMsg.man + +commit e5a1e228e7ab7332d46db9278fa7af85ae889e70 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 21:18:22 2019 -0400 + + change return-type to avoid const-mismatches + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e98352cebda8de6a715f6c5f35e549dc8cd55b8b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 21:16:25 2019 -0400 + + fix const-mismatches in Tmstate.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 973ebb581a2cd92349728e36ada108a2d8c68bc8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 21:13:17 2019 -0400 + + fix const-mismatches in TMprint.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7aa775b5a238e16bc752fe78327a4a6c73369305 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 21:10:06 2019 -0400 + + fix const-mismatches in TMparse.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ec3e02c88a72462100254723f96589e30cee2e8f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 20:55:18 2019 -0400 + + fix shadowing warning for widgetClass parameter; no binary-change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5037c01093c6a56728cab3096107d80052132dd3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 20:51:06 2019 -0400 + + fix gcc warnings in Display.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e19a99a733b3f1ed1b7120ef8355e2a449639242 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 19:07:52 2019 -0400 + + resolve const-mismatches in Shell.c + + some of those fixes use casts which elicit stricter warnings, but that's a + tradeoff needed to work with Xt's assumption that certain strings are + allocated (or const) in the calling application. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ffeb733db1384c6ffde199747fd84efe2e8d7499 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 05:17:11 2019 -0400 + + resolve const-mismatches in internal functions of Intrinsic.c + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e53726577e18f37186d7996dc85dc82de9532d22 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Mar 20 05:07:21 2019 -0400 + + Allow all of the "argv" strings to be writable, since those arrays may + be updated during initialization. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 13ed4421006c3bc7743233a401ce80f849dd889b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 19 21:20:03 2019 -0400 + + This is a minimal change which compiles when predefining _CONST_X_STRING, + by changing some function parameters and struct-members to _XtString + (always "char*") from String (which may be "const char *"). There are + still many compiler warnings; subsequent commits will reduce those. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d10e295117fdde9a085f12d90cab1adb978450bb +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 16 15:37:46 2019 -0400 + + The last commit removed "IN" macro, but not the lines which used it. + +commit 3f13df93468658cd48bb63a2d836c60d62494e4a +Author: Walter Harms <wharms@bfs.de> +Date: Tue Apr 16 14:42:41 2019 +0200 + + Remove unused macros to ease maintenance + + After the last cleanups all the private macros are + now obsolet. They are removed with: + sed -e'/^\.de/,/^\.ny/d' -i + +commit 2b26e9a5473e399c81ae11b98d1f0b38393dbd8c +Merge: 4b446ce 965bc25 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Apr 16 13:20:42 2019 +0200 + + Merge branch 'master' of ssh://gitlab.freedesktop.org/xorg/lib/libxt + + Conflicts: + man/XtManageChildren.man + +commit 965bc251c1d8391e672f277686254299627d4e3c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 19 20:31:29 2019 -0400 + + Referring to the xterm FAQ + + https://invisible-island.net/xterm/xterm.faq.html#building_it + + I would like to add an optional feature which makes the String typedef + "const" if _CONST_X_STRING is defined. Modifying the Intrinsic.h header + is only a partial solution because the library has not been modified to + take advantage of this (if it had, most of the const-warnings from gcc + would go away). + + This change modifies the header file as well as the makestrs.c program + which generates Shell.h and StringDefs.h so that they use String-casts + rather than char*-casts (reducing the warnings seen when compiling with + Xt's header files). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c131d277ef061716b97e27cccc094bf1c0ae222f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 19 20:04:40 2019 -0400 + + eliminate casts of NULL for String* and Cardinal*, since those are unnecessary + as well as interfere with proposed const-string changes. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4b446ce8b20b1de1488c73e1841dafbd25ca949f +Author: Walter Harms <wharms@bfs.de> +Date: Mon Apr 15 23:03:31 2019 +0200 + + remove in-text macros + + The in-text macros are a problem when maintaining the text. + While removing i noticed several problems with missing + definitions this is fixed also. + +commit c66f453b4089b7af7ee14be7c5f817e8dd98be1e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 10 20:09:29 2019 -0400 + + restore fixed-pitch formatting of code-examples + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit a89acaec14bd988659ebdc2ebb4b99c1eea5aa7e +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Apr 10 19:49:35 2019 -0400 + + The ".BR" macro is used to join bold/regular text. + Use ".B" when only bold is intended. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit cf9e8c73c4ffa671d580938c9a84d6ef0bd2710d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Mar 17 17:19:45 2019 -0400 + + This cleans up the "easy" warning fixes which can be made using my + Regress script, comparing object-files before/after the edits: + + https://invisible-island.net/ansification/index.html + https://invisible-island.net/scripts/readme.html + + The changes are casts, which quiet the gcc warnings about implicit + conversion that my "gcc-normal" script would show. I avoided + reformatting the code. + + The change reduces the number of gcc warnings from 769 to 163. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fb7e899e94dd402c868e8eb59ccf32284732f6ac +Author: Walter Harms <wharms@bfs.de> +Date: Thu Apr 4 22:32:20 2019 +0200 + + FIX: add missing .fi + +commit 76ed3193af4416324a18795fe3bee4fb37e9791f +Author: Walter Harms <wharms@bfs.de> +Date: Thu Apr 4 21:46:55 2019 +0200 + + replace the use of .Ds/.De macro with the std. RS/.RE macro + + this make way to remove all private macro definitions from + the header. Now only plain man macros are used. + +commit b01eaa82c190b390f6a0de74668ed88a41b3d6b8 +Author: Walter Harms <wharms@bfs.de> +Date: Thu Apr 4 18:58:44 2019 +0200 + + remove space after < for include filename + + using <X11/Xutil.h> instead of < X11/Xutil.h > make things + more easy and closer to std. man pages + + noted by Thomas Dickey + +commit 0f549e8992d568493415056ecda7fdbd7a6423ec +Merge: 7caf7f4 38c5ee4 +Author: Walter Harms <wharms@bfs.de> +Date: Wed Apr 3 17:06:30 2019 +0200 + + Merge branch 'master' of ssh://gitlab.freedesktop.org/xorg/lib/libxt + + Replace home made macros in man macros + +commit 7caf7f47d473e92cf0fc36bf03720765916c17be +Author: Walter Harms <wharms@bfs.de> +Date: Tue Apr 2 22:50:51 2019 +0200 + + replace .ZN with .BR + + By replacing we do two things: + 1. this fixes the troff behavier + 2. this moves us closer to std. man pages + 3. after this patch the macro ZN can be deleted + + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit 3b5b654d5b539364a2f19b5206a79fb2e13f810f +Author: Walter Harms <wharms@bfs.de> +Date: Tue Apr 2 21:49:28 2019 +0200 + + Replace last two uses of .Pn with .ZN + + After this patch the macro can savely be removed. + Signed-off-by: Walter Harms <wharms@bfs.de> + +commit 38c5ee4f77c1d837ed8936bad5a3a354701aaed2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Mar 18 05:06:06 2019 -0400 + + bzero was marked "legacy" in POSIX 2001, and is not part of the later revisions. + Use memset, which is standard (and supported for some 30 years). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 91c08f4d9cb915d5f7c3074db3e72ad15ec14c01 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sun Mar 17 20:59:21 2019 -0400 + + Use standard size_t type in the casts for length-parameter of memcpy, memmove + and bzero. When the library was written (1989), none of those had been + standardized, and the source-code used "(int)" casts to help with K&R + compilers. The cleanup done in the previous update used binary-compare + to validate, which does not work for these because the compiler is recording + the cast's effect. + + This change reduces the number of gcc warnings from 163 to 128. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4004d85df9e81fc8bcddacae15a2715ccdd6627c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 13:21:55 2019 -0400 + + update the "Ds" macro in the other files, for consistency + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ca3f8db51e629e59d94873c41642d1e8b8324c9a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 13:16:28 2019 -0400 + + None of the versions of the "Ds" macro (going back to X11R4) worked with + groff, and would display badly. Modified the macro in the files which use + it, to do what was intended. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4a04da5838bdea2893ebe63c97465fa7349d92ac +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 12:55:53 2019 -0400 + + fix typo from last change + +commit 56c998bc127581974fa277e4e2bfc3561ea3a897 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 12:34:08 2019 -0400 + + trim down the "De" macro by removing the parts that used never-defined registers + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fe0f501b0dfb2d69f5879588547d6994d93217c7 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 12:23:22 2019 -0400 + + cleanup undefined macros in manpages + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 1b2b648dbbc6f10b36e7914de8388b66bc93b45f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 11:51:09 2019 -0400 + + split-up lines longer than 80 columns in manpages + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit a009bc8f3d69a379593b21997bb08a73eb39a8f2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 11:47:40 2019 -0400 + + fix typo from last step + +commit b571da73755f65c206c0e7b82ade3876a921e2ea +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Mar 16 11:44:37 2019 -0400 + + trim undefined symbol "D" from ".Ds" macros in manpages. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7bdec43f299d2538d66f65892766bf3c5dd27056 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Mar 15 21:04:44 2019 -0400 + + workaround for obsolete macro/command ".ny", in the manpages since late + 1989 in X11R4. The command was given a ".ny0", but nroff did not accept + more than two-character names, so it "should" have been ".ny 0". Further, + since there is no standard macro "ny" (and no command), define a fallback. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 283db645c56a5aa55af1665c309182e492a3c863 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Fri Mar 15 20:06:26 2019 -0400 + + fix bug introduced by + commit 57c8b133bbcf38a9a1e345eabeeabe2a3e07c1c8, + which modified util/makestrs.c to avoid a shadowing warning of a + function parameter versus global variable, but overlooked use of the + parameter within the functions. That caused all of the resource strings + in Shell.h to have the same value. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fe32434ab1a6a85d222b15e730fed9a5d8a74a2d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Mar 12 04:34:28 2019 -0400 + + fix build when XT_GEO_TATTLER is defined + That turns on a debugging feature (activated by a resource setting). + Its use of <stdarg.h> was incorrect. Also fix compiler warnings in + the related file. + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit b724cd0d25dffe0091bb101ba8f993d0305844d3 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 15 19:45:29 2019 +0100 + + resolv:assignment discards 'const' qualifier from pointer target + +commit 93713f5b050fb40973775e13d8430d524e2d4d10 +Author: Walter Harms <wharms@bfs.de> +Date: Fri Jan 11 23:49:57 2019 +0100 + + no need to check XFree arguments + +commit 57c8b133bbcf38a9a1e345eabeeabe2a3e07c1c8 +Author: Walter Harms <wharms@bfs.de> +Date: Fri Jan 11 22:54:47 2019 +0100 + + resolv:shadows a global declaration + +commit d51325e11253f99bdcf672062cc04de80bc9c7e2 +Author: Walter Harms <wharms@bfs.de> +Date: Fri Jan 11 22:17:02 2019 +0100 + + alloc+bzero == calloc + +commit cc255601963479bd94c49851564f5004ac471093 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 23:10:10 2019 +0100 + + resolv:assignment discards 'const' qualifier from pointer target + +commit 12eda76f2c7ff5d43dd68d7ff0ebc29cf27e9897 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 22:26:25 2019 +0100 + + no need to check args for free + +commit bfd021ed1c2b126d3f78a1ffe639e25d11649b02 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 22:01:47 2019 +0100 + + resolv:shadows a previous local + +commit 252b69ea85041ac5b368c15afdb7d7b6dc28636e +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 21:54:51 2019 +0100 + + resolv:shadows a previous local + +commit c4897b56d853709aa2013ec16354e38f83465aaf +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 21:51:26 2019 +0100 + + resolv:shadows a previous local + +commit a343fb6d854dd345a0216435b97e51b8f4dd4425 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 21:45:09 2019 +0100 + + resolv:shadows a previous local + +commit 0aae899ba1724bfb16ab1bbe7238b3f75cbb6550 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 21:37:08 2019 +0100 + + resolv:shadows a previous local + +commit 102ba41a668568d7e7e506b0ab9f064d1f2c4ec5 +Author: Walter Harms <wharms@bfs.de> +Date: Tue Jan 8 21:25:00 2019 +0100 + + no need to check XFree arguments + +commit 8a25977b7ef3a5e96e57d0d56d597c9436a14871 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 7 19:51:23 2018 -0800 + + Update configure.ac bug URL for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 0dd0429f82298e294b7611fb6ed63a96af94e2ed +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Nov 19 22:41:26 2018 -0800 + + Update README for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 0659374e8c1a39433f074226a65f29ae6147157e +Author: Rin Okuyama <rin@NetBSD.org> +Date: Tue Feb 21 06:18:37 2017 +0000 + + avoid -Wformat errors from clang when building with -DDEBUG + + https://bugs.freedesktop.org/show_bug.cgi?id=99882 + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5ac10bc4b93942572118625c1c3b98e87d5ef9d7 +Author: Mihail Konev <k.mvc@ya.ru> +Date: Thu Jan 26 13:52:49 2017 +1000 + + autogen: add default patch prefix + + Signed-off-by: Mihail Konev <k.mvc@ya.ru> + +commit b2d06ea97f0b45c9f9cba00279afc376a21f854d +Author: Emil Velikov <emil.l.velikov@gmail.com> +Date: Mon Mar 9 12:00:52 2015 +0000 + + autogen.sh: use quoted string variables + + Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent + fall-outs, when they contain space. + + Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 5c8f59030c9407e657ba6824dcec151e904fc42d +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 24 10:32:07 2017 +1000 + + autogen.sh: use exec instead of waiting for configure to finish + + Syncs the invocation of configure with the one from the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Emil Velikov <emil.velikov@collabora.com> + +commit 238f339165921831333a962f0c4e8ef6612f3ce4 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Thu Sep 8 11:51:12 2016 -0700 + + darwin: Don't build libXt with -flat_namespace + + Force clients to be well-behaved. libXaw and libXaw3d were updated to not + depend on the flat_namespace hack, so be sure to also update to newer versions + of those libraries as well. + + cf-libXaw: b3049d9b13333c0e67f1f23959227020741f486b + cf-libXaw3d: b8891dae09e107be01520c41ca8d903fe74cf6a0 + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit e8e2560e3391fa9c240235207a909855bfa7c73f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Sep 27 18:54:57 2015 -0700 + + Get rid of some extraneous ; at the end of C source lines + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit e7411e7e5299116604ff1f01d9415802607f1051 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Apr 30 22:36:14 2015 -0700 @@ -664,9 +2266,9 @@ Date: Thu Mar 10 14:23:44 2011 -0800 Only two simple test cases to start with: - compares the results of snprintf of a short string to a static buffer - with the new buffer returned by XtAsprintf. + with the new buffer returned by XtAsprintf. - compare the results of using XtAsprintf to replicate a portion of a - very long string with the original string. + very long string with the original string. Uses malloc debugging flags for various platforms to try to catch errors with uninitialized memory (such as the recently fixed failure to terminate diff --git a/lib/libXt/Makefile.am b/lib/libXt/Makefile.am index 7aece78cd..f8d5a6b72 100644 --- a/lib/libXt/Makefile.am +++ b/lib/libXt/Makefile.am @@ -38,3 +38,4 @@ ChangeLog: dist-hook: ChangeLog INSTALL +EXTRA_DIST = README.md diff --git a/lib/libXt/Makefile.in b/lib/libXt/Makefile.in index b5cab2a1d..4146d7f14 100644 --- a/lib/libXt/Makefile.in +++ b/lib/libXt/Makefile.in @@ -72,7 +72,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in $(srcdir)/xt.pc.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL compile \ config.guess config.sub depcomp install-sh ltmain.sh missing @@ -364,6 +364,7 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xt.pc MAINTAINERCLEANFILES = ChangeLog INSTALL +EXTRA_DIST = README.md all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/lib/libXt/README b/lib/libXt/README deleted file mode 100644 index 40785f4cc..000000000 --- a/lib/libXt/README +++ /dev/null @@ -1,59 +0,0 @@ -libXt - X Toolkit Intrinsics library - -Documentation for this library can be found in the included man pages; -the libXt spec from the specs directory of the source, also available at: - - http://www.x.org/releases/X11R7.6/doc/Xt/Xt.html - http://www.x.org/releases/X11R7.6/doc/Xt/Xt.pdf - -and the O'Reilly X Toolkit books, which they have made freely available online: - - - X Series Volume 4: X Toolkit Intrinsics Programming Manual, - 1st Edition (1990, covers X11R3) - - http://www.archive.org/details/xtoolkitintrsin20400nyemiss - - - X Series Volume 4: X Toolkit Intrinsics Programming Manual, - 2nd Edition (1990, covers X11R4) - - http://www.archive.org/details/xtoolkitintrinsi04nyemiss - - - X Series Volume 4: X Toolkit Intrinsics Programming Manual, - Motif Edition (1990, covers X11R4/Motif 1.1) - - http://www.archive.org/details/xtoolktintrmotif04nyemiss - - - X Series Volume 4: X Toolkit Intrinsics Programming Manual, - 3rd Edition (1993, covers X11R5) - - http://www.archive.org/details/xtoolkitintrinsic04nyemiss - - - X Series Volume 5: X Toolkit Intrinsics Reference Manual - (1990, covers X11R4) - - http://www.archive.org/details/xtoolkitintrinsi04nyemiss - - -All questions regarding this software should be directed at the -Xorg mailing list: - - http://lists.freedesktop.org/mailman/listinfo/xorg - -Please submit bug reports to the Xorg bugzilla: - - https://bugs.freedesktop.org/enter_bug.cgi?product=xorg - -The master development code repository can be found at: - - git://anongit.freedesktop.org/git/xorg/lib/libXt - - http://cgit.freedesktop.org/xorg/lib/libXt - -For patch submission instructions, see: - - http://www.x.org/wiki/Development/Documentation/SubmittingPatches - -For more information on the git code manager, see: - - http://wiki.x.org/wiki/GitPage - diff --git a/lib/libXt/README.md b/lib/libXt/README.md new file mode 100644 index 000000000..e4a9b0d9a --- /dev/null +++ b/lib/libXt/README.md @@ -0,0 +1,52 @@ +libXt - X Toolkit Intrinsics library +------------------------------------ + +Documentation for this library can be found in the included man pages; and +the libXt spec from the specs directory of the source, also available at: + + - https://www.x.org/releases/current/doc/libXt/intrinsics.html + - https://www.x.org/releases/current/doc/libXt/intrinsics.pdf + +and the O'Reilly X Toolkit books, which they have made freely available online: + + - X Series Volume 4: X Toolkit Intrinsics Programming Manual, + 1st Edition (1990, covers X11R3) + + https://www.archive.org/details/xtoolkitintrsin20400nyemiss + + - X Series Volume 4: X Toolkit Intrinsics Programming Manual, + 2nd Edition (1990, covers X11R4) + + https://www.archive.org/details/xtoolkitintrinsi04nyemiss + + - X Series Volume 4: X Toolkit Intrinsics Programming Manual, + Motif Edition (1990, covers X11R4/Motif 1.1) + + https://www.archive.org/details/xtoolktintrmotif04nyemiss + + - X Series Volume 4: X Toolkit Intrinsics Programming Manual, + 3rd Edition (1993, covers X11R5) + + https://www.archive.org/details/xtoolkitintrinsic04nyemiss + + - X Series Volume 5: X Toolkit Intrinsics Reference Manual + (1990, covers X11R4) + + https://www.archive.org/details/xtoolkitintrinsi04nyemiss + +---------------------------------------------------------------------------- + +All questions regarding this software should be directed at the +Xorg mailing list: + + https://lists.x.org/mailman/listinfo/xorg + +The master development code repository can be found at: + + https://gitlab.freedesktop.org/xorg/lib/libXt + +Please submit bug reports and requests to merge patches there. + +For patch submission instructions, see: + + https://www.x.org/wiki/Development/Documentation/SubmittingPatches diff --git a/lib/libXt/aclocal.m4 b/lib/libXt/aclocal.m4 index a3b057b95..59f6dd6e7 100644 --- a/lib/libXt/aclocal.m4 +++ b/lib/libXt/aclocal.m4 @@ -19,32 +19,63 @@ 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'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, 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, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# 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. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29.1) +dnl +dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29.1]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -66,18 +97,19 @@ if test -n "$PKG_CONFIG"; then PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -87,8 +119,10 @@ m4_ifvaln([$3], [else $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -100,10 +134,11 @@ m4_define([_PKG_CONFIG], else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -111,19 +146,17 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -177,16 +210,40 @@ else AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -197,16 +254,18 @@ AC_ARG_WITH([pkgconfigdir], AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])dnl PKG_INSTALLDIR -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -217,7 +276,24 @@ AC_ARG_WITH([noarch-pkgconfigdir], AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR # Copyright (C) 2002-2012 Free Software Foundation, Inc. # @@ -1248,7 +1324,7 @@ m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl -dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), @@ -1285,7 +1361,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.0]) +m4_define([vers_have], [1.19.2]) 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,, @@ -1363,6 +1439,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + AC_CHECK_FILE([/usr/share/man/man7/attributes.7], + [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -1378,9 +1465,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -1388,9 +1475,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -1398,9 +1485,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -1408,9 +1495,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -1671,13 +1758,24 @@ m4_ifval([$1], fi]) # Test for the ability of xmlto to generate a text target +# +# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the +# following test for empty XML docbook files. +# For compatibility reasons use the following empty XML docbook file and if +# it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], - [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) + [# Try it again with a non-empty XML file. + cat > conftest.xml << "EOF" +<x></x> +EOF + AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) @@ -3073,8 +3171,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc @@ -3135,10 +3234,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ # # AC_DEFUN([XORG_CHANGELOG], [ -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG diff --git a/lib/libXt/compile b/lib/libXt/compile index a85b723c7..99e50524b 100644 --- a/lib/libXt/compile +++ b/lib/libXt/compile @@ -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-2018 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 @@ -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: diff --git a/lib/libXt/config.h.in b/lib/libXt/config.h.in index 0cc7e012e..ea9ac7d97 100644 --- a/lib/libXt/config.h.in +++ b/lib/libXt/config.h.in @@ -82,5 +82,11 @@ /* Define to 1 to use XKB for keysym resolution. */ #undef XKB +/* Define to 1 to enable geo-tattler traces. */ +#undef XT_GEO_TATTLER + +/* Define to 1 to use standard C const feature. */ +#undef _CONST_X_STRING + /* app default data directory */ #undef appdefaultdir diff --git a/lib/libXt/configure b/lib/libXt/configure index 21a5efdd9..d71323fbb 100644 --- a/lib/libXt/configure +++ b/lib/libXt/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXt 1.1.5. +# Generated by GNU Autoconf 2.69 for libXt 1.2.0. # -# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXt/issues>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -275,7 +275,7 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg +$0: https://gitlab.freedesktop.org/xorg/lib/libXt/issues $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -651,9 +651,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libXt' PACKAGE_TARNAME='libXt' -PACKAGE_VERSION='1.1.5' -PACKAGE_STRING='libXt 1.1.5' -PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' +PACKAGE_VERSION='1.2.0' +PACKAGE_STRING='libXt 1.2.0' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libXt/issues' PACKAGE_URL='' ac_unique_file="Makefile.am" @@ -901,6 +901,8 @@ with_fop with_xsltproc with_perl enable_xkb +enable_const +enable_geo_tattler enable_unit_tests with_glib with_xfile_search_path @@ -1467,7 +1469,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 libXt 1.1.5 to adapt to many kinds of systems. +\`configure' configures libXt 1.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1537,7 +1539,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXt 1.1.5:";; + short | recursive ) echo "Configuration of libXt 1.2.0:";; esac cat <<\_ACEOF @@ -1569,6 +1571,8 @@ Optional Features: malloc(0) returns NULL (default: auto) --enable-specs Enable building the specs (default: yes) --disable-xkb Disable XKB support + --disable-const Disable const-support + --enable-geo-tattler Enable geo-tattler traces --enable-unit-tests Enable building unit test cases (default: auto) Optional Packages: @@ -1621,7 +1625,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXt/issues>. _ACEOF ac_status=$? fi @@ -1684,7 +1688,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXt configure 1.1.5 +libXt configure 1.2.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2075,9 +2079,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## -## ---------------------------------------------------------------------- ##" +( $as_echo "## ------------------------------------------------------------------- ## +## Report this to https://gitlab.freedesktop.org/xorg/lib/libXt/issues ## +## ------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2099,7 +2103,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 libXt $as_me 1.1.5, which was +It was created by libXt $as_me 1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2929,7 +2933,7 @@ fi # Define the identity of the package. PACKAGE='libXt' - VERSION='1.1.5' + VERSION='1.2.0' cat >>confdefs.h <<_ACEOF @@ -17619,10 +17623,11 @@ _ACEOF -CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ -|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ -echo 'git directory not found: installing possibly empty changelog.' >&2)" +|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ +touch \$(top_srcdir)/ChangeLog; \ +echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" @@ -17630,14 +17635,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ -|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ -echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ +touch \$(top_srcdir)/INSTALL; \ +echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5 +$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; } +if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "/usr/share/man/man7/attributes.7"; then + ac_cv_file__usr_share_man_man7_attributes_7=yes +else + ac_cv_file__usr_share_man_man7_attributes_7=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5 +$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; } +if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then : + SYSV_MAN_SECTIONS=false +else + SYSV_MAN_SECTIONS=true +fi + + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -17653,9 +17689,9 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - solaris*) FILE_MAN_SUFFIX=4 ;; - *) FILE_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then @@ -17663,9 +17699,9 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - solaris*) MISC_MAN_SUFFIX=5 ;; - *) MISC_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then @@ -17673,9 +17709,9 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - solaris*) DRIVER_MAN_SUFFIX=7 ;; - *) DRIVER_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then @@ -17683,9 +17719,9 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - solaris*) ADMIN_MAN_SUFFIX=1m ;; - *) ADMIN_MAN_SUFFIX=8 ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then @@ -18004,6 +18040,11 @@ esac fi # Test for the ability of xmlto to generate a text target +# +# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the +# following test for empty XML docbook files. +# For compatibility reasons use the following empty XML docbook file and if +# it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF @@ -18011,10 +18052,18 @@ if test "$have_xmlto" = yes; then : if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then : have_xmlto_text=yes else + # Try it again with a non-empty XML file. + cat > conftest.xml << "EOF" +<x></x> +EOF + if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then : + have_xmlto_text=yes +else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5 $as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;} fi fi +fi rm -f conftest.xml if test $have_xmlto_text = yes; then HAVE_XMLTO_TEXT_TRUE= @@ -18706,9 +18755,13 @@ fi done else - CC_FOR_BUILD="$CC" + CC_FOR_BUILD="$CC" fi fi +if test x"$cross_compiling" != xyes; then + : ${CFLAGS_FOR_BUILD=${CFLAGS}} + : ${LDFLAGS_FOR_BUILD=${LDFLAGS}} +fi DEFAULT_CPPFLAGS_FOR_BUILD="${CPPFLAGS}" ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" @@ -18719,9 +18772,7 @@ fi CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${DEFAULT_CPPFLAGS_FOR_BUILD}} DEFAULT_CFLAGS_FOR_BUILD="${CFLAGS} ${CWARNFLAGS}" -CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${DEFAULT_CFLAGS_FOR_BUILD}} -LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} # Map function checks to old Imake #defines @@ -18809,6 +18860,8 @@ ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main esac # Options +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if XKB support is wanted" >&5 +$as_echo_n "checking if XKB support is wanted... " >&6; } # Check whether --enable-xkb was given. if test "${enable_xkb+set}" = set; then : enableval=$enable_xkb; XKB="$enableval" @@ -18816,12 +18869,48 @@ else XKB="yes" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XKB" >&5 +$as_echo "$XKB" >&6; } if test "x$XKB" = "xyes" ; then $as_echo "#define XKB 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C const-support is wanted" >&5 +$as_echo_n "checking if C const-support is wanted... " >&6; } +# Check whether --enable-const was given. +if test "${enable_const+set}" = set; then : + enableval=$enable_const; USE_CONST="$enableval" +else + USE_CONST="yes" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_CONST" >&5 +$as_echo "$USE_CONST" >&6; } +if test "x$USE_CONST" = "xyes" ; then + +$as_echo "#define _CONST_X_STRING 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if geo-tattler traces are wanted" >&5 +$as_echo_n "checking if geo-tattler traces are wanted... " >&6; } +# Check whether --enable-geo-tattler was given. +if test "${enable_geo_tattler+set}" = set; then : + enableval=$enable_geo_tattler; GEO_TATTLER="$enableval" +else + GEO_TATTLER="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEO_TATTLER" >&5 +$as_echo "$GEO_TATTLER" >&6; } +if test "x$GEO_TATTLER" = "xyes" ; then + +$as_echo "#define XT_GEO_TATTLER 1" >>confdefs.h + +fi + # --enable-unit-tests @@ -19043,8 +19132,8 @@ fi # Memory checking support case $host_os in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5 + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5 $as_echo_n "checking for umem_alloc in -lumem... " >&6; } if ${ac_cv_lib_umem_umem_alloc+:} false; then : $as_echo_n "(cached) " >&6 @@ -19084,28 +19173,38 @@ 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' - ;; - *bsd*|darwin*) - MALLOC_DEBUG_ENV='MallocPreScribble=1 MallocScribble=1' - ;; + ;; + *-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' + ;; + *bsd*|darwin*) + MALLOC_DEBUG_ENV='MallocPreScribble=1 MallocScribble=1' + ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for definitions to enable memory-checking support" >&5 +$as_echo_n "checking for definitions to enable memory-checking support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${MALLOC_DEBUG_ENV:-none}" >&5 +$as_echo "${MALLOC_DEBUG_ENV:-none}" >&6; } # Replaces XFileSearchPathDefault from Imake configs XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X files search path" >&5 +$as_echo_n "checking for X files search path... " >&6; } # Check whether --with-xfile-search-path was given. if test "${with_xfile_search_path+set}" = set; then : withval=$with_xfile_search_path; XFILESEARCHPATHDEFAULT="$withval" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XFILESEARCHPATHDEFAULT:-none}" >&5 +$as_echo "${XFILESEARCHPATHDEFAULT:-none}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5 +$as_echo_n "checking for X app-defaults directory... " >&6; } # Check whether --with-appdefaultdir was given. if test "${with_appdefaultdir+set}" = set; then : @@ -19114,6 +19213,8 @@ else appdefaultdir=${datadir}/X11/app-defaults fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $appdefaultdir" >&5 +$as_echo "$appdefaultdir" >&6; } prefix_NONE= exec_prefix_NONE= @@ -19134,10 +19235,12 @@ _ACEOF # Replacement for Imake ToolkitStringsABIOptions, controls string tables # generated by util/string.list in StringDefs.h & Shell.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI options" >&5 +$as_echo_n "checking for ABI options... " >&6; } case $host_os in solaris*) # Solaris uses -intelabi even on SPARC - STRINGSABIOPTIONS="-intelabi -solarisabinames" + STRINGSABIOPTIONS="-intelabi -solarisabinames" ;; sco* | svr4*) case $host_cpu in @@ -19146,23 +19249,14 @@ case $host_os in esac ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${STRINGSABIOPTIONS:-none}" >&5 +$as_echo "${STRINGSABIOPTIONS:-none}" >&6; } ERRORDBDIR=${datadir}/X11 -case $host_os in - darwin*) - OS_CFLAGS="-Wl,-flat_namespace" - ;; - *) - OS_CFLAGS= - ;; -esac - -XT_CFLAGS="$XT_CFLAGS $OS_CFLAGS" - -ac_config_files="$ac_config_files Makefile src/Makefile util/Makefile include/Makefile man/Makefile specs/Makefile test/Makefile xt.pc" +ac_config_files="$ac_config_files Makefile src/Makefile util/Makefile include/Makefile man/Makefile specs/Makefile specs/libXt.ent test/Makefile xt.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19734,7 +19828,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 libXt $as_me 1.1.5, which was +This file was extended by libXt $as_me 1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19794,13 +19888,13 @@ $config_headers Configuration commands: $config_commands -Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>." +Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXt/issues>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libXt config.status 1.1.5 +libXt config.status 1.2.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20215,6 +20309,7 @@ do "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "specs/Makefile") CONFIG_FILES="$CONFIG_FILES specs/Makefile" ;; + "specs/libXt.ent") CONFIG_FILES="$CONFIG_FILES specs/libXt.ent" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "xt.pc") CONFIG_FILES="$CONFIG_FILES xt.pc" ;; diff --git a/lib/libXt/configure.ac b/lib/libXt/configure.ac index d903cb30a..cc2f62304 100644 --- a/lib/libXt/configure.ac +++ b/lib/libXt/configure.ac @@ -1,4 +1,5 @@ # +# Copyright © 2019 Thomas Dickey # Copyright © 2003 Keith Packard, Noah Levitt # # Permission to use, copy, modify, distribute, and sell this software and its @@ -22,8 +23,8 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXt], [1.1.5], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXt]) +AC_INIT([libXt], [1.2.0], + [https://gitlab.freedesktop.org/xorg/lib/libXt/issues], [libXt]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -36,7 +37,7 @@ AC_PROG_LIBTOOL # Require X.Org macros 1.13 or later for XORG_ENABLE_UNIT_TESTS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.13 or later before running autoconf/autogen])]) + [m4_fatal([must install xorg-macros 1.13 or later before running autoconf/autogen])]) XORG_MACROS_VERSION(1.13) XORG_DEFAULT_OPTIONS XORG_CHECK_MALLOC_ZERO @@ -60,9 +61,13 @@ if test x"$CC_FOR_BUILD" = x; then if test x"$cross_compiling" = xyes; then AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) else - CC_FOR_BUILD="$CC" + CC_FOR_BUILD="$CC" fi fi +if test x"$cross_compiling" != xyes; then + : ${CFLAGS_FOR_BUILD=${CFLAGS}} + : ${LDFLAGS_FOR_BUILD=${LDFLAGS}} +fi AC_SUBST([CC_FOR_BUILD]) DEFAULT_CPPFLAGS_FOR_BUILD="${CPPFLAGS}" AC_CHECK_FUNC(asprintf, @@ -70,9 +75,7 @@ AC_CHECK_FUNC(asprintf, CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${DEFAULT_CPPFLAGS_FOR_BUILD}} AC_SUBST(CPPFLAGS_FOR_BUILD) DEFAULT_CFLAGS_FOR_BUILD="${CFLAGS} ${CWARNFLAGS}" -CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${DEFAULT_CFLAGS_FOR_BUILD}} AC_SUBST(CFLAGS_FOR_BUILD) -LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} AC_SUBST(LDFLAGS_FOR_BUILD) # Map function checks to old Imake #defines @@ -109,54 +112,79 @@ case $host_os in esac # Options +AC_MSG_CHECKING(if XKB support is wanted) AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Disable XKB support]), XKB="$enableval", XKB="yes") +AC_MSG_RESULT($XKB) if test "x$XKB" = "xyes" ; then AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.]) fi +AC_MSG_CHECKING(if C const-support is wanted) +AC_ARG_ENABLE(const, AS_HELP_STRING([--disable-const], [Disable const-support]), + USE_CONST="$enableval", USE_CONST="yes") +AC_MSG_RESULT($USE_CONST) +if test "x$USE_CONST" = "xyes" ; then + AC_DEFINE(_CONST_X_STRING, 1, [Define to 1 to use standard C const feature.]) +fi + +AC_MSG_CHECKING(if geo-tattler traces are wanted) +AC_ARG_ENABLE(geo-tattler, AS_HELP_STRING([--enable-geo-tattler], [Enable geo-tattler traces]), + GEO_TATTLER="$enableval", GEO_TATTLER="no") +AC_MSG_RESULT($GEO_TATTLER) +if test "x$GEO_TATTLER" = "xyes" ; then + AC_DEFINE(XT_GEO_TATTLER, 1, [Define to 1 to enable geo-tattler traces.]) +fi + # --enable-unit-tests XORG_ENABLE_UNIT_TESTS XORG_WITH_GLIB([2.16]) # Memory checking support case $host_os in - solaris*) - AC_CHECK_LIB([umem], [umem_alloc], - [MALLOC_DEBUG_ENV='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) - ;; - *-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' - ;; - *bsd*|darwin*) - MALLOC_DEBUG_ENV='MallocPreScribble=1 MallocScribble=1' - ;; + solaris*) + AC_CHECK_LIB([umem], [umem_alloc], + [MALLOC_DEBUG_ENV='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) + ;; + *-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' + ;; + *bsd*|darwin*) + MALLOC_DEBUG_ENV='MallocPreScribble=1 MallocScribble=1' + ;; esac +AC_MSG_CHECKING(for definitions to enable memory-checking support) +AC_MSG_RESULT(${MALLOC_DEBUG_ENV:-none}) AC_SUBST([MALLOC_DEBUG_ENV]) # Replaces XFileSearchPathDefault from Imake configs XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S' +AC_MSG_CHECKING(for X files search path) AC_ARG_WITH(xfile-search-path, AS_HELP_STRING([--with-xfile-search-path=<path>], [Set path to search for app-defaults and other files]), [XFILESEARCHPATHDEFAULT="$withval"], []) +AC_MSG_RESULT(${XFILESEARCHPATHDEFAULT:-none}) AC_SUBST([XFILESEARCHPATHDEFAULT]) +AC_MSG_CHECKING(for X app-defaults directory) AC_ARG_WITH(appdefaultdir, AS_HELP_STRING([--with-appdefaultdir=<path>], [Set app-default directory (default: ${datadir}/X11/app-defaults)]), [appdefaultdir="$withval"], [appdefaultdir=${datadir}/X11/app-defaults]) +AC_MSG_RESULT($appdefaultdir) AX_DEFINE_DIR([appdefaultdir], [appdefaultdir], [app default data directory]) # Replacement for Imake ToolkitStringsABIOptions, controls string tables # generated by util/string.list in StringDefs.h & Shell.h +AC_MSG_CHECKING(for ABI options) case $host_os in solaris*) # Solaris uses -intelabi even on SPARC - STRINGSABIOPTIONS="-intelabi -solarisabinames" + STRINGSABIOPTIONS="-intelabi -solarisabinames" ;; sco* | svr4*) case $host_cpu in @@ -165,28 +193,19 @@ case $host_os in esac ;; esac +AC_MSG_RESULT(${STRINGSABIOPTIONS:-none}) AC_SUBST(STRINGSABIOPTIONS) ERRORDBDIR=${datadir}/X11 AC_SUBST(ERRORDBDIR) -case $host_os in - darwin*) - OS_CFLAGS="-Wl,-flat_namespace" - ;; - *) - OS_CFLAGS= - ;; -esac - -XT_CFLAGS="$XT_CFLAGS $OS_CFLAGS" - AC_CONFIG_FILES([Makefile src/Makefile util/Makefile include/Makefile man/Makefile specs/Makefile + specs/libXt.ent test/Makefile xt.pc]) AC_OUTPUT diff --git a/lib/libXt/include/X11/ConvertI.h b/lib/libXt/include/X11/ConvertI.h index 760d4776a..e7a963638 100644 --- a/lib/libXt/include/X11/ConvertI.h +++ b/lib/libXt/include/X11/ConvertI.h @@ -93,4 +93,8 @@ extern Boolean _XtConvert( void _XtConvertInitialize(void); +#ifdef DEBUG +void _XtConverterCacheStats(void); +#endif + _XFUNCPROTOEND diff --git a/lib/libXt/include/X11/CreateI.h b/lib/libXt/include/X11/CreateI.h index e00ba6550..6b47c7ce7 100644 --- a/lib/libXt/include/X11/CreateI.h +++ b/lib/libXt/include/X11/CreateI.h @@ -28,13 +28,13 @@ _XFUNCPROTOBEGIN extern Widget _XtVaOpenApplication(XtAppContext *app_context_return, _Xconst char* application_class, XrmOptionDescList options, Cardinal num_options, - int *argc_in_out, String *argv_in_out, + int *argc_in_out, _XtString *argv_in_out, String *fallback_resources, WidgetClass widget_class, va_list var_args); extern Widget _XtVaAppInitialize(XtAppContext *app_context_return, _Xconst char* application_class, XrmOptionDescList options, Cardinal num_options, - int *argc_in_out, String *argv_in_out, + int *argc_in_out, _XtString *argv_in_out, String *fallback_resources, va_list var_args); _XFUNCPROTOEND diff --git a/lib/libXt/include/X11/InitialI.h b/lib/libXt/include/X11/InitialI.h index 0827df0a7..f64a68dc6 100644 --- a/lib/libXt/include/X11/InitialI.h +++ b/lib/libXt/include/X11/InitialI.h @@ -185,7 +185,7 @@ typedef struct _XtAppStruct { Widget in_phase2_destroy; LangProcRec langProcRec; struct _TMBindCacheRec * free_bindings; - String display_name_tried; + _XtString display_name_tried; Display **dpy_destroy_list; int dpy_destroy_count; Boolean exit_flag; @@ -209,7 +209,7 @@ extern void _XtHeapFree(Heap* heap); extern char *_XtHeapMalloc( Heap* /* heap */, Cardinal /* size */, - char * /* file */, + const char */* file */, int /* line */ ); @@ -250,7 +250,7 @@ _XtAppInit( XrmOptionDescRec* /* options */, Cardinal /* num_options */, int* /* argc_in_out */, - String** /* argv_in_out */, + _XtString** /* argv_in_out */, String* /* fallback_resources */ ); @@ -384,7 +384,7 @@ extern void _XtDisplayInitialize( XrmOptionDescRec* /* urlist */, Cardinal /* num_urs */, int* /* argc */, - char** /* argv */ + _XtString* /* argv */ ); extern void _XtCacheFlushTag( @@ -419,9 +419,9 @@ extern void _XtFreeWWTable( XtPerDisplay pd ); -extern String _XtGetUserName(String dest, int len); +extern String _XtGetUserName(_XtString dest, int len); extern XrmDatabase _XtPreparseCommandLine(XrmOptionDescRec *urlist, - Cardinal num_urs, int argc, String *argv, + Cardinal num_urs, int argc, _XtString *argv, String *applName, String *displayName, String *language); diff --git a/lib/libXt/include/X11/Intrinsic.h b/lib/libXt/include/X11/Intrinsic.h index 794b820d3..cf8d3fe41 100644 --- a/lib/libXt/include/X11/Intrinsic.h +++ b/lib/libXt/include/X11/Intrinsic.h @@ -61,9 +61,18 @@ in this Software without prior written authorization from The Open Group. #include <string.h> /* for XtNewString */ #endif /* XT_BC else */ -#define XtSpecificationRelease 6 +#define XtSpecificationRelease 7 +/* + * As used in its function interface, the String type of libXt can be readonly. + * But compiling libXt with this feature may require some internal changes, + * e.g., casts and occasionally using a plain "char*". + */ +#ifdef _CONST_X_STRING +typedef const char *String; +#else typedef char *String; +#endif /* We do this in order to get "const" declarations to work right. We * use _XtString instead of String so that C++ applications can @@ -396,7 +405,7 @@ typedef Boolean (*XtWorkProc)( typedef struct { char match; - String substitution; + _XtString substitution; } SubstitutionRec, *Substitution; typedef Boolean (*XtFilePredicate)( @@ -1437,7 +1446,7 @@ extern void XtDisplayInitialize( XrmOptionDescRec* /* options */, Cardinal /* num_options */, int* /* argc */, - char** /* argv */ + _XtString* /* argv */ ); extern Widget XtOpenApplication( @@ -1446,7 +1455,7 @@ extern Widget XtOpenApplication( XrmOptionDescList /* options */, Cardinal /* num_options */, int* /* argc_in_out */, - String* /* argv_in_out */, + _XtString* /* argv_in_out */, String* /* fallback_resources */, WidgetClass /* widget_class */, ArgList /* args */, @@ -1459,7 +1468,7 @@ extern Widget XtVaOpenApplication( XrmOptionDescList /* options */, Cardinal /* num_options */, int* /* argc_in_out */, - String* /* argv_in_out */, + _XtString* /* argv_in_out */, String* /* fallback_resources */, WidgetClass /* widget_class */, ... @@ -1471,7 +1480,7 @@ extern Widget XtAppInitialize( /* obsolete */ XrmOptionDescList /* options */, Cardinal /* num_options */, int* /* argc_in_out */, - String* /* argv_in_out */, + _XtString* /* argv_in_out */, String* /* fallback_resources */, ArgList /* args */, Cardinal /* num_args */ @@ -1483,7 +1492,7 @@ extern Widget XtVaAppInitialize( /* obsolete */ XrmOptionDescList /* options */, Cardinal /* num_options */, int* /* argc_in_out */, - String* /* argv_in_out */, + _XtString* /* argv_in_out */, String* /* fallback_resources */, ... ) _X_SENTINEL(0); @@ -1494,7 +1503,7 @@ extern Widget XtInitialize( /* obsolete */ XrmOptionDescRec* /* options */, Cardinal /* num_options */, int* /* argc */, - char** /* argv */ + _XtString* /* argv */ ); extern Display *XtOpenDisplay( @@ -1505,7 +1514,7 @@ extern Display *XtOpenDisplay( XrmOptionDescRec* /* options */, Cardinal /* num_options */, int* /* argc */, - char** /* argv */ + _XtString* /* argv */ ); extern XtAppContext XtCreateApplicationContext( @@ -1703,11 +1712,11 @@ void XtSessionReturnToken( extern XtErrorMsgHandler XtAppSetErrorMsgHandler( XtAppContext /* app_context */, - XtErrorMsgHandler /* handler */ + XtErrorMsgHandler /* handler */ _X_NORETURN ); extern void XtSetErrorMsgHandler( /* obsolete */ - XtErrorMsgHandler /* handler */ + XtErrorMsgHandler /* handler */ _X_NORETURN ); extern XtErrorMsgHandler XtAppSetWarningMsgHandler( @@ -1727,7 +1736,7 @@ extern void XtAppErrorMsg( _Xconst _XtString /* default */, String* /* params */, Cardinal* /* num_params */ -); +) _X_NORETURN; extern void XtErrorMsg( /* obsolete */ _Xconst _XtString /* name */, @@ -1736,7 +1745,7 @@ extern void XtErrorMsg( /* obsolete */ _Xconst _XtString /* default */, String* /* params */, Cardinal* /* num_params */ -); +) _X_NORETURN; extern void XtAppWarningMsg( XtAppContext /* app_context */, @@ -1759,11 +1768,11 @@ extern void XtWarningMsg( /* obsolete */ extern XtErrorHandler XtAppSetErrorHandler( XtAppContext /* app_context */, - XtErrorHandler /* handler */ + XtErrorHandler /* handler */ _X_NORETURN ); extern void XtSetErrorHandler( /* obsolete */ - XtErrorHandler /* handler */ + XtErrorHandler /* handler */ _X_NORETURN ); extern XtErrorHandler XtAppSetWarningHandler( @@ -1778,11 +1787,11 @@ extern void XtSetWarningHandler( /* obsolete */ extern void XtAppError( XtAppContext /* app_context */, _Xconst _XtString /* message */ -); +) _X_NORETURN; extern void XtError( /* obsolete */ _Xconst _XtString /* message */ -); +) _X_NORETURN; extern void XtAppWarning( XtAppContext /* app_context */, @@ -1807,7 +1816,7 @@ extern void XtAppGetErrorDatabaseText( _Xconst _XtString /* type */, _Xconst _XtString /* class */, _Xconst _XtString /* default */, - String /* buffer_return */, + _XtString /* buffer_return */, int /* nbytes */, XrmDatabase /* database */ ); @@ -1817,7 +1826,7 @@ extern void XtGetErrorDatabaseText( /* obsolete */ _Xconst _XtString /* type */, _Xconst _XtString /* class */, _Xconst _XtString /* default */, - String /* buffer_return */, + _XtString /* buffer_return */, int /* nbytes */ ); @@ -1849,7 +1858,7 @@ extern void XtFree( # define _X_RESTRICT_KYWD #endif extern Cardinal XtAsprintf( - String *new_string, + _XtString *new_string, _Xconst char * _X_RESTRICT_KYWD format, ... ) _X_ATTRIBUTE_PRINTF(2,3); @@ -1858,21 +1867,21 @@ extern Cardinal XtAsprintf( extern char *_XtMalloc( /* implementation-private */ Cardinal /* size */, - char * /* file */, + const char */* file */, int /* line */ ); extern char *_XtRealloc( /* implementation-private */ char * /* ptr */, Cardinal /* size */, - char * /* file */, + const char */* file */, int /* line */ ); extern char *_XtCalloc( /* implementation-private */ Cardinal /* num */, Cardinal /* size */, - char * /* file */, + const char */* file */, int /* line */ ); @@ -1880,6 +1889,12 @@ extern void _XtFree( /* implementation-private */ char * /* ptr */ ); +extern Boolean _XtIsValidPointer( /* implementation-private */ + char * /* ptr */); + +extern void _XtPrintMemory( /* implementation-private */ + const char */* filename */); + #define XtMalloc(size) _XtMalloc(size, __FILE__, __LINE__) #define XtRealloc(ptr,size) _XtRealloc(ptr, size, __FILE__, __LINE__) #define XtCalloc(num,size) _XtCalloc(num, size, __FILE__, __LINE__) @@ -1974,14 +1989,14 @@ extern void XtSetWMColormapWindows( Cardinal /* count */ ); -extern String XtFindFile( +extern _XtString XtFindFile( _Xconst _XtString /* path */, Substitution /* substitutions */, Cardinal /* num_substitutions */, XtFilePredicate /* predicate */ ); -extern String XtResolvePathname( +extern _XtString XtResolvePathname( Display* /* dpy */, _Xconst _XtString /* type */, _Xconst _XtString /* filename */, diff --git a/lib/libXt/include/X11/IntrinsicI.h b/lib/libXt/include/X11/IntrinsicI.h index 845ab483a..a8b7f48cf 100644 --- a/lib/libXt/include/X11/IntrinsicI.h +++ b/lib/libXt/include/X11/IntrinsicI.h @@ -101,6 +101,14 @@ SOFTWARE. /**************************************************************** * + * Bit utilities + * + ****************************************************************/ +#define XtSetBits(dst,src,len) dst = (((1U << (len)) - 1) & (unsigned)(src)) +#define XtSetBit(dst,src) XtSetBits(dst,src,1) + +/**************************************************************** + * * Byte utilities * ****************************************************************/ @@ -109,15 +117,15 @@ SOFTWARE. #include <X11/Xfuncs.h> #define XtMemmove(dst, src, size) \ - if ((char *)(dst) != (char *)(src)) { \ - (void) memcpy((char *) (dst), (char *) (src), (int) (size)); \ + if ((const void *)(dst) != (const void *)(src)) { \ + (void) memcpy((void *) (dst), (const void *) (src), (size_t) (size)); \ } #define XtBZero(dst, size) \ - bzero((char *) (dst), (int) (size)) + memset((void *) (dst), 0, (size_t) (size)) #define XtMemcmp(b1, b2, size) \ - memcmp((char *) (b1), (char *) (b2), (int) (size)) + memcmp((const void *) (b1), (const void *) (b2), (size_t) (size)) /**************************************************************** @@ -129,7 +137,7 @@ SOFTWARE. #define XtStackAlloc(size, stack_cache_array) \ ((size) <= sizeof(stack_cache_array) \ ? (XtPointer)(stack_cache_array) \ - : XtMalloc((unsigned)(size))) + : XtMalloc((Cardinal)(size))) #define XtStackFree(pointer, stack_cache_array) \ { if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); } @@ -164,7 +172,7 @@ extern String XtCXtToolkitError; extern void _XtAllocError( String /* alloc_type */ -); +) _X_NORETURN; extern void _XtCompileResourceList( XtResourceList /* resources */, @@ -196,6 +204,7 @@ extern void _XtGClistFree(Display *dpy, XtPerDisplay pd); extern void _XtGeoTab (int); extern void _XtGeoTrace ( Widget widget, + const char *, ... ) _X_ATTRIBUTE_PRINTF(2,3); diff --git a/lib/libXt/include/X11/IntrinsicP.h b/lib/libXt/include/X11/IntrinsicP.h index f2ded6f74..9f1ae4038 100644 --- a/lib/libXt/include/X11/IntrinsicP.h +++ b/lib/libXt/include/X11/IntrinsicP.h @@ -246,15 +246,15 @@ extern Boolean XtIsTopLevelShell(Widget); #ifdef DEBUG #define XtCheckSubclass(w, widget_class_ptr, message) \ if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) { \ - String params[3]; \ - Cardinal num_params = 3; \ - params[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\ - params[1] = (widget_class_ptr)->core_class.class_name; \ - params[2] = (message); \ + String dbgArgV[3]; \ + Cardinal dbgArgC = 3; \ + dbgArgV[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\ + dbgArgV[1] = (widget_class_ptr)->core_class.class_name; \ + dbgArgV[2] = (message); \ XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)), \ "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \ "Widget class %s found when subclass of %s expected: %s",\ - params, &num_params); \ + dbgArgV, &dbgArgC); \ } #else #define XtCheckSubclass(w, widget_class, message) /* nothing */ diff --git a/lib/libXt/include/X11/ShellP.h b/lib/libXt/include/X11/ShellP.h index 51ac3a063..f7aa4c1e0 100644 --- a/lib/libXt/include/X11/ShellP.h +++ b/lib/libXt/include/X11/ShellP.h @@ -332,7 +332,7 @@ typedef struct { #endif XrmClass xrm_class; int argc; - char **argv; + _XtString *argv; } ApplicationShellPart; typedef struct { @@ -376,14 +376,14 @@ typedef struct _XtSaveYourselfRec *XtSaveYourself; /* implementation-private */ typedef struct { SmcConn connection; - String session_id; - String* restart_command; - String* clone_command; - String* discard_command; - String* resign_command; - String* shutdown_command; - String* environment; - String current_dir; + _XtString session_id; + _XtString* restart_command; + _XtString* clone_command; + _XtString* discard_command; + _XtString* resign_command; + _XtString* shutdown_command; + _XtString* environment; + _XtString current_dir; String program_path; unsigned char restart_style; unsigned char checkpoint_state; diff --git a/lib/libXt/include/X11/TranslateI.h b/lib/libXt/include/X11/TranslateI.h index 7da70b9d9..02e2f3df0 100644 --- a/lib/libXt/include/X11/TranslateI.h +++ b/lib/libXt/include/X11/TranslateI.h @@ -380,7 +380,7 @@ extern void _XtPopup( _XtBoolean /* spring_loaded */ ); -extern String _XtPrintXlations( +extern _XtString _XtPrintXlations( Widget /* w */, XtTranslations /* xlations */, Widget /* accelWidget */, diff --git a/lib/libXt/man/XtAddActions.man b/lib/libXt/man/XtAddActions.man index 6b728a370..a56a1be73 100644 --- a/lib/libXt/man/XtAddActions.man +++ b/lib/libXt/man/XtAddActions.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtApp-Add-Actions wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddActions __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAddActions \- register an action table .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAddActions(XtActionList \fIactions\fP, Cardinal \fInum_actions\fP); .SH ARGUMENTS @@ -74,9 +47,9 @@ Specifies the action table to register. .IP \fInum_args\fP 1i Specifies the number of entries in this action table. .SH DESCRIPTION -.ZN XtAddActions +.B XtAddActions has been replaced by -.ZN XtAppAddActions . +.BR XtAppAddActions . .SH "SEE ALSO" XtAppAddActions(__libmansuffix__) .br diff --git a/lib/libXt/man/XtAddCallback.man b/lib/libXt/man/XtAddCallback.man index 440074dc8..e4a4bed81 100644 --- a/lib/libXt/man/XtAddCallback.man +++ b/lib/libXt/man/XtAddCallback.man @@ -32,92 +32,65 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtAdd-Callback XtAdd-Callbacks XtRemove-Callback XtRemove-Callbacks XtRemove-All-Callbacks wid-get +.hw XtAdd-Callback XtAdd-Callbacks XtRemove-Callback +.hw XtRemove-Callbacks XtRemove-All-Callbacks wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddCallback __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAddCallback, XtAddCallbacks, XtRemoveCallback, XtRemoveCallbacks, XtRemoveAllCallbacks \- add and remove callback procedures .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtAddCallback(Widget \fIw\fP, String \fIcallback_name\fP, XtCallbackProc +void XtAddCallback(Widget \fIw\fP, const char *\fIcallback_name\fP, XtCallbackProc \fIcallback\fP, XtPointer \fIclient_data\fP); .HP -void XtAddCallbacks(Widget \fIw\fP, String \fIcallback_name\fP, XtCallbackList +void XtAddCallbacks(Widget \fIw\fP, const char *\fIcallback_name\fP, XtCallbackList \fIcallbacks\fP); .HP -void XtRemoveCallback(Widget \fIw\fP, String \fIcallback_name\fP, +void XtRemoveCallback(Widget \fIw\fP, const char *\fIcallback_name\fP, XtCallbackProc \fIcallback\fP, XtPointer \fIclient_data\fP); .HP -void XtRemoveCallbacks(Widget \fIw\fP, String \fIcallback_name\fP, +void XtRemoveCallbacks(Widget \fIw\fP, const char *\fIcallback_name\fP, XtCallbackList \fIcallbacks\fP); .HP -void XtRemoveAllCallbacks(Widget \fIw\fP, String \fIcallback_name\fP, +void XtRemoveAllCallbacks(Widget \fIw\fP, const char *\fIcallback_name\fP); .SH ARGUMENTS .IP \fIcallback\fP 1i -Specifies the callback procedure\*(Cb. +Specifies the callback procedure. .IP \fIcallbacks\fP 1i Specifies the null-terminated list of callback procedures and corresponding client data. -.ds Cn \ to which the procedure is to be appended or deleted .IP \fIcallback_name\fP 1i -Specifies the callback list\*(Cn. -.ds Cd it is invoked by XtCallbacks or NULL, \ -or the client data to match on the registered callback procedures +Specifies the callback list to which the procedure is to be appended or +deleted. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when it is invoked by XtCallbacks or NULL, +or the client data to match on the registered callback procedures. .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION The -.ZN XtAddCallback +.B XtAddCallback function adds the specified callback procedure to the specified widget's callback list. .LP The -.ZN XtAddCallbacks +.B XtAddCallbacks add the specified list of callbacks to the specified widget's callback list. .LP The -.ZN XtRemoveCallback +.B XtRemoveCallback function removes a callback only if both the procedure and the client data match. .LP The -.ZN XtRemoveCallbacks +.B XtRemoveCallbacks function removes the specified callback procedures from the specified widget's callback list. .LP The -.ZN XtRemoveAllCallbacks +.B XtRemoveAllCallbacks function removes all the callback procedures from the specified widget's callback list. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAddEventHandler.man b/lib/libXt/man/XtAddEventHandler.man index 9dfb6a1c6..92a4f0cfd 100644 --- a/lib/libXt/man/XtAddEventHandler.man +++ b/lib/libXt/man/XtAddEventHandler.man @@ -31,40 +31,15 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtAdd-Event-Handler XtAdd-Raw-Event-Handler XtRemove-Event-Handler XtRemove-Raw-Event-Handler XtInsert-Event-Handler XtInsert-Raw-Event-Handler wid-get +.hw XtAdd-Event-Handler XtAdd-Raw-Event-Handler +.hw XtRemove-Event-Handler XtRemove-Raw-Event-Handler +.hw XtInsert-Event-Handler XtInsert-Raw-Event-Handler wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddEventHandler __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAddEventHandler, XtAddRawEventHandler, XtRemoveEventHandler, XtRemoveRawEventHandler, XtInsertEventHandler, XtInsertRawEventHandler \- add and remove event handlers .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAddEventHandler(Widget \fIw\fP, EventMask \fIevent_mask\fP, Boolean \fInonmaskable\fP, XtEventHandler \fIproc\fP, XtPointer \fIclient_data\fP); @@ -91,81 +66,80 @@ typedef enum { XtListHead, XtListTail } XtListPosition; .SH ARGUMENTS .IP \fIclient_data\fP 1i Specifies additional data to be passed to the client's event handler. -.ds Em to call or unregister this procedure .IP \fIevent_mask\fP 1i -Specifies the event mask for which \*(Em. -.ds Nm called or removed +Specifies the event mask for which to call or unregister this procedure. .IP \fInonmaskable\fP 1i Specifies a Boolean value that indicates whether this procedure should be -\*(Nm on the nonmaskable events -.Pn ( GraphicsExpose , -.ZN NoExpose , -.ZN SelectionClear , -.ZN SelectionRequest , -.ZN SelectionNotify , -.ZN ClientMessage , +called or removed on the nonmaskable events ( +.BR GraphicsExpose , +.BR NoExpose , +.BR SelectionClear , +.BR SelectionRequest , +.BR SelectionNotify , +.BR ClientMessage , and -.ZN MappingNotify ). -.ds Pr \ to be added or removed +.BR MappingNotify ). .IP \fIproc\fP 1i -Specifies the procedure that is\*(Pr. -.ds Wi for which this event handler is being registered +Specifies the procedure that is to be added or removed. .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget for which this event handler is being registered. .IP \fIposition\fP 1i Specifies when the event handler is to be called relative to other previously registered handlers. .SH DESCRIPTION The -.ZN XtAddEventHandler +.B XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, -.ZN XtAddEventHandler +.B XtAddEventHandler calls -.ZN XSelectInput , +.BR XSelectInput , if necessary. .LP The -.ZN XtAddRawEventHandler +.B XtAddRawEventHandler function is similar to -.ZN XtAddEventHandler +.B XtAddEventHandler except that it does not affect the widget's mask and never causes an -.ZN XSelectInput +.B XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it. .LP The -.ZN XtRemoveRawEventHandler +.B XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget's mask and never causes a call on -.ZN XSelectInput . +.BR XSelectInput . .LP -.ZN XtInsertEventHandler +.B XtInsertEventHandler is identical to -.ZN XtAddEventHandler -with the additional \fIposition\fP argument. if \fIposition\fP is -.ZN XtListHead , +.B XtAddEventHandler +with the additional \fIposition\fP argument. +If \fIposition\fP is +.BR XtListHead , the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If \fIposition\fP is -.ZN XtListTail , +.BR XtListTail , the event handler is registered to be called after any previously -registered event handlers. If the procedure is already registered with +registered event handlers. +If the procedure is already registered with the same \fIclient_data\fP value, the specified mask augments the existing mask and the procedure is repositioned in the list. .LP -.ZN XtInsertRawEventHandler +.B XtInsertRawEventHandler is similar to -.ZN XtInsertEventHandler +.B XtInsertEventHandler except that it does not modify the widget's event mask and never causes an -.ZN XSelectInput -for the specified events. If the procedure is already registered with the +.B XSelectInput +for the specified events. +If the procedure is already registered with the same \fIclient_data\fP value, the specified mask augments the existing mask and the procedure is repositioned in the list. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAddExposureToRegion.man b/lib/libXt/man/XtAddExposureToRegion.man index e009e8113..8e200cf41 100644 --- a/lib/libXt/man/XtAddExposureToRegion.man +++ b/lib/libXt/man/XtAddExposureToRegion.man @@ -34,62 +34,35 @@ .ds Vn 2.2 .hw XtAdd-Exposure-To-Region wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddExposureToRegion __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAddExposureToRegion \- merge exposure events into a region .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAddExposureToRegion(XEvent *\fIevent\fP, Region \fIregion\fP); .SH ARGUMENTS .IP \fIevent\fP 1i Specifies a pointer to the -.ZN Expose +.B Expose or -.ZN GraphicsExpose +.B GraphicsExpose event. .IP \fIregion\fP 1i -Specifies the region object (as defined in -.Pn < X11/Xutil.h >). +Specifies the region object (as defined in +.BR <X11/Xutil.h> ). .SH DESCRIPTION The -.ZN XtAddExposureToRegion +.B XtAddExposureToRegion function computes the union of the rectangle defined by the exposure event and the specified region. Then, it stores the results back in region. If the event argument is not an -.ZN Expose +.B Expose or -.ZN GraphicsExpose +.B GraphicsExpose event, -.ZN XtAddExposureToRegion +.B XtAddExposureToRegion returns without an error and without modifying region. .LP This function is used by the exposure compression mechanism diff --git a/lib/libXt/man/XtAddGrab.man b/lib/libXt/man/XtAddGrab.man index ab8c80b12..8c8bc5346 100644 --- a/lib/libXt/man/XtAddGrab.man +++ b/lib/libXt/man/XtAddGrab.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtAdd-Grab wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddGrab __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAddGrab, XtRemoveGrab \- redirect user input to a modal widget .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAddGrab(Widget \fIw\fP, Boolean \fIexclusive\fP, Boolean \fIspring_loaded\fP); @@ -78,31 +51,30 @@ or also to previous widgets in the cascade. .IP \fIspring_loaded\fP 1i Specifies whether this widget was popped up because the user pressed a pointer button. -.ds Wi to add to or remove from the modal cascade .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget to add to or remove from the modal cascade. .SH DESCRIPTION The -.ZN XtAddGrab +.B XtAddGrab function appends the widget (and associated parameters) to the modal cascade and checks that exclusive is -.ZN True +.B True if spring_loaded is -.ZN True . +.BR True . If these are not -.ZN True , -.ZN XtAddGrab +.BR True , +.B XtAddGrab generates an error. .LP The modal cascade is used by -.ZN XtDispatchEvent +.B XtDispatchEvent when it tries to dispatch a user event. When at least one modal widget is in the widget cascade, -.ZN XtDispatchEvent +.B XtDispatchEvent first determines if the event should be delivered. It starts at the most recent cascade entry and follows the cascade up to and including the most recent cascade entry added with the exclusive parameter -.ZN True . +.BR True . .LP This subset of the modal cascade along with all descendants of these widgets comprise the active subset. @@ -110,10 +82,10 @@ User events that occur outside the widgets in this subset are ignored or remapped. Modal menus with submenus generally add a submenu widget to the cascade with exclusive -.ZN False . +.BR False . Modal dialog boxes that need to restrict user input to the most deeply nested dialog box add a subdialog widget to the cascade with exclusive -.ZN True . +.BR True . User events that occur within the active subset are delivered to the appropriate widget, which is usually a child or further descendant of the modal widget. @@ -121,11 +93,11 @@ widget. Regardless of where on the screen they occur, remap events are always delivered to the most recent widget in the active subset of the cascade that has spring_loaded -.ZN True , +.BR True , if any such widget exists. .LP The -.ZN XtRemoveGrab +.B XtRemoveGrab function removes widgets from the modal cascade starting at the most recent widget up to and including the specified widget. It issues an error if the specified widget is not on the modal cascade. diff --git a/lib/libXt/man/XtAddInput.man b/lib/libXt/man/XtAddInput.man index 783738f31..1e6982130 100644 --- a/lib/libXt/man/XtAddInput.man +++ b/lib/libXt/man/XtAddInput.man @@ -33,43 +33,16 @@ .ds Vn 2.2 .hw XtAdd-Input XtAdd-TimeOut XtAddWorkProc wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAddInput __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAddInput, XtAddTimeOut, XtAddWorkProc \- register input, timeout, and workprocs .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtInputId XtAddInput(int \fIsource\fP, XtPointer \fIcondition\fP, XtInputCallbackProc \fIproc\fP, XtPointer \fIclient_data\fP); .HP -XtIntervalId XtAddTimeOut(unsigned long \fIinterval\fP, XtInputCallbackProc +XtIntervalId XtAddTimeOut(unsigned long \fIinterval\fP, XtTimerCallbackProc \fIproc\fP, XtPointer \fIclient_data\fP); .HP XtWorkProcId XtAddWorkProc(XtWorkProc \fIproc\fP, XtPointer @@ -88,17 +61,17 @@ Specifies the procedure that is to be called when input is available. Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification. .SH DESCRIPTION -.ZN XtAddInput +.B XtAddInput has been replaced by -.ZN XtAppAddInput. +.B XtAppAddInput. .LP -.ZN XtAddTimeOut +.B XtAddTimeOut has been replaced by -.ZN XtAppAddTimeOut. +.B XtAppAddTimeOut. .LP -.ZN XtAddWorkProc +.B XtAddWorkProc has been replaced by -.ZN XtAppAddWorkProc . +.BR XtAppAddWorkProc . .SH "SEE ALSO" XtAppAddInput(__libmansuffix__), XtAppAddTimeOut(__libmansuffix__), XtAppAddWorkProc(__libmansuffix__) .br diff --git a/lib/libXt/man/XtAllocateGC.man b/lib/libXt/man/XtAllocateGC.man index 29784d96a..30eab5964 100644 --- a/lib/libXt/man/XtAllocateGC.man +++ b/lib/libXt/man/XtAllocateGC.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtAllocate-GC wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAllocateGC __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAllocateGC \- obtain a sharable GC with modifiable fields .SH SYNTAX +#include <X11/Intrinsic.h> .HP GC XtAllocateGC(Widget \fIw\fP, Cardinal \fIdepth\fP, XtGCMask \fIvalue_mask\fP, XGCValues *\fIvalues\fP, XtGCMask \fIdynamic_mask\fP, @@ -72,9 +45,8 @@ XtGCMask \fIunused_mask\fP); .SH ARGUMENTS .IP \fIvalues\fP 1i Specifies the actual values for this GC. -.ds Vm fields of the values are specified .IP \fIvalue_mask\fP 1i -Specifies which \*(Vm. +Specifies which fields of the values are specified. .IP \fIw\fP 1i Specifies the widget. .IP \fIdepth\fP 1i @@ -85,22 +57,25 @@ Specifies the fields of the GC that will be modified by the caller. Specifies the fields of the GC that will not be needed by the caller. .SH DESCRIPTION The -.ZN XtAllocateGC +.B XtAllocateGC function returns a sharable GC that may be modified by the client. The \fIscreen\fP field of the specified widget or of the nearest widget ancestor of the specified object and the specified \fIdepth\fP argument supply the root and drawable depths for which the GC is to -be valid. If \fIdepth\fP is zero the depth is taken from the \fIdepth\fP +be valid. +If \fIdepth\fP is zero the depth is taken from the \fIdepth\fP field of the specified widget or of the nearest widget ancestor of the specified object. .LP The \fIvalue_mask\fP argument specifies the fields of the GC that will be initialized with the respective members of the \fIvalues\fP structure. The \fIdynamic_mask\fP argument specifies fields that the caller intends -to modify during program execution. The caller must ensure that the +to modify during program execution. +The caller must ensure that the corresponding GC field is set prior to each use of the GC. The \fIunused_mask\fP argument specifies fields of the GC that are of no -interest to the caller. The caller may make no assumptions about the +interest to the caller. +The caller may make no assumptions about the contents of any fields specified in \fIunused_mask\fP. The caller may assume that at all times all fields not specified in either \fIdynamic_mask\fP or \fIunused_mask\fP have their default value if @@ -111,15 +86,15 @@ then immediately set to the value in \fIvalues\fP. If a field is set in \fIunused_mask\fP and also in either \fIvalue_mask\fP or \fIdynamic_mask\fP, the specification in \fIunused_mask\fP is ignored. .LP -.ZN XtAllocateGC +.B XtAllocateGC tries to minimize the number of unique GCs created by comparing the arguments with those of previous calls and returning an existing GC when there are no conflicts. -.ZN XtAllocateGC +.B XtAllocateGC may modify and return an existing GC if it was allocated with a nonzero \fIunused_mask\fP. .SH "SEE ALSO" -.ZN XtGetGC +.B XtGetGC .br \fI\*(xT\fP .br diff --git a/lib/libXt/man/XtAppAddActionHook.man b/lib/libXt/man/XtAppAddActionHook.man index 8df2165eb..1f506ae1c 100644 --- a/lib/libXt/man/XtAppAddActionHook.man +++ b/lib/libXt/man/XtAppAddActionHook.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Add-Action-Hook XtRemove-Action-Hook wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddActionHook __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddActionHook, XtRemoveActionHook \- register an action hook procedure .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtActionHookId XtAppAddActionHook(XtAppContext \fIapp_context\fP, XtActionHookProc \fIproc\fP, XtPointer \fIclient_data\fP); @@ -78,21 +51,22 @@ Specifies the action hook procedure. .IP \fInum_args\fP 1i Specifies the application-specific data to be passed to the action hook. .SH DESCRIPTION -.ZN XtAppAddActionHook +.B XtAppAddActionHook adds the specified procedure to the front of a list maintained in the -application context. In the future, when an action routine is about to +application context. +In the future, when an action routine is about to be invoked for any widget in this application context, either through the translation manager or via -.ZN XtCallActionProc , +.BR XtCallActionProc , the action hohok procedures will be called in reverse order of registration jut prior to invoking the action routine. .LP Action hook procedures are removed automatically and the -.ZN XtActionHookId +.B XtActionHookId s destroyed when the application context in which they were added is destroyed. .LP -.ZN XtRemoveActionHook +.B XtRemoveActionHook removes the specified action hook procedure from the list in which it was registered. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppAddActions.man b/lib/libXt/man/XtAppAddActions.man index bc039f518..e21145f67 100644 --- a/lib/libXt/man/XtAppAddActions.man +++ b/lib/libXt/man/XtAppAddActions.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtApp-Add-Actions wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddActions __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddActions \- register an action table .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppAddActions(XtAppContext \fIapp_context\fP, XtActionList \fIactions\fP, Cardinal \fInum_actions\fP); @@ -78,7 +51,7 @@ Specifies the action table to register. Specifies the number of entries in this action table. .SH DESCRIPTION The -.ZN XtAppAddActions +.B XtAppAddActions function adds the specified action table and registers it with the translation manager. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppAddBlockHook.man b/lib/libXt/man/XtAppAddBlockHook.man index cc84923c7..14a00d7b4 100644 --- a/lib/libXt/man/XtAppAddBlockHook.man +++ b/lib/libXt/man/XtAppAddBlockHook.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Add-Block-Hook XtRemove-Block-Hook wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddBlockHook __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddBlockHook, XtRemoveBlockHook \- register a block hook procedure .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtBlockHookId XtAppAddBlockHook(XtAppContext \fIapp_context\fP, XtBlockHookProc \fIproc\fP, XtPointer \fIclient_data\fP); @@ -78,17 +51,17 @@ Specifies the block hook procedure. .IP \fInum_args\fP 1i Specifies the application-specific data to be passed to the block hook. .SH DESCRIPTION -.ZN XtAppAddBlockHook +.B XtAppAddBlockHook registers the specified procedure and returns an identifier for it. The hook is called at any time in the future when the Intrinsics are about to block pending some input. .LP Block hook procedures are removed automatically and the -.ZN XtBlockHookId +.B XtBlockHookId is destroyed when the application context in which they were added is destroyed. .LP -.ZN XtRemoveBlockHook +.B XtRemoveBlockHook removes the specified block hook procedure from the list in which it was registered. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppAddConverter.man b/lib/libXt/man/XtAppAddConverter.man index b3b90cdf1..d873b678e 100644 --- a/lib/libXt/man/XtAppAddConverter.man +++ b/lib/libXt/man/XtAppAddConverter.man @@ -34,46 +34,19 @@ .ds Vn 2.2 .hw XtApp-Add-Converter XtAdd-Converter wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddConverter __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtAppAddConverter, XtAddConverter \- register resource converter .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtAppAddConverter(XtAppContext \fIapp_context\fP, String \fIfrom_type\fP, -String \fIto_type\fP, XtConverter \fIconverter\fP, XtConvertArgList -\fIconvert_args\fP, Cardinal \fInum_args\fP); +void XtAppAddConverter(XtAppContext \fIapp_context\fP, const char *\fIfrom_type\fP, +const char *\fIto_type\fP, XtConverter \fIconverter\fP, +XtConvertArgList \fIconvert_args\fP, Cardinal \fInum_args\fP); .HP -void XtAddConverter(String \fIfrom_type\fP, String \fIto_type\fP, XtConverter -\fIconverter\fP, XtConvertArgList \fIconvert_args\fP, Cardinal -\fInum_args\fP); +void XtAddConverter(const char *\fIfrom_type\fP, const char *\fIto_type\fP, +XtConverter \fIconverter\fP, XtConvertArgList \fIconvert_args\fP, +Cardinal \fInum_args\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. @@ -88,21 +61,23 @@ Specifies the number of additional arguments to the converter or zero. .IP \fIto_type\fP 1i Specifies the destination type. .SH DESCRIPTION -.ZN XtAppAddConverter +.B XtAppAddConverter is equivalent in function to -.ZN XtAppSetTypeConverter +.B XtAppSetTypeConverter with \fIcache_type\fP equal to -.ZN XtCacheAll -for old-format type converters. It has been superseded by -.ZN XtAppSetTypeConverter . +.B XtCacheAll +for old-format type converters. +It has been superseded by +.BR XtAppSetTypeConverter . .LP -.ZN XtAddConverter +.B XtAddConverter is equivalent in function to -.ZN XtSetTypeConverter +.B XtSetTypeConverter with \fIcache_type\fP equal to -.ZN XtCacheAll -for old-format type converters. It has been superseded by -.ZN XtSetTypeConverter . +.B XtCacheAll +for old-format type converters. +It has been superseded by +.BR XtSetTypeConverter . .SH "SEE ALSO" XtConvert(__libmansuffix__), XtStringConversionWarning(__libmansuffix__) diff --git a/lib/libXt/man/XtAppAddInput.man b/lib/libXt/man/XtAppAddInput.man index 333dafde7..a4ca7dbb0 100644 --- a/lib/libXt/man/XtAppAddInput.man +++ b/lib/libXt/man/XtAppAddInput.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtApp-Add-Input wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddInput __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddInput, XtRemoveInput \- register and remove an input source .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtInputId XtAppAddInput(XtAppContext \fIapp_context\fP, int \fIsource\fP, XtPointer \fIcondition\fP, XtInputCallbackProc \fIproc\fP, XtPointer @@ -73,34 +46,31 @@ XtPointer \fIcondition\fP, XtInputCallbackProc \fIproc\fP, XtPointer .HP void XtRemoveInput(XtInputId \fIid\fP); .SH ARGUMENTS -.ds Co that identifies the application .IP \fIapp_context\fP 1i -Specifies the application context \*(Co. -.ds Cd input is available +Specifies the application context that identifies the application. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when input is available. .IP \fIcondition\fP 1i Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition. .IP \fIid\fP 1i Specifies the ID returned from the corresponding -.ZN XtAppAddInput +.B XtAppAddInput call. -.ds Pr \ to be called when input is available .IP \fIproc\fP 1i -Specifies the procedure that is\*(Pr. +Specifies the procedure that is to be called when input is available. .IP \fIsource\fP 1i Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification. .SH DESCRIPTION The -.ZN XtAppAddInput +.B XtAppAddInput function registers with the \*(xI read routine a new source of events, which is usually file input but can also be file output. Note that file should be loosely interpreted to mean any sink or source of data. -.ZN XtAppAddInput +.B XtAppAddInput also specifies the conditions under which the source can generate events. When input is pending on this source, the callback procedure is called. @@ -108,12 +78,12 @@ the callback procedure is called. The legal values for the condition argument are operating-system dependent. On a UNIX-based system, the condition is some union of -.ZN XtInputReadMask , -.ZN XtInputWriteMask , +.BR XtInputReadMask , +.BR XtInputWriteMask , and -.ZN XtInputExceptMask . +.BR XtInputExceptMask . The -.ZN XtRemoveInput +.B XtRemoveInput function causes the \*(xI read routine to stop watching for input from the input source. .SH "SEE ALSO" @@ -126,16 +96,16 @@ XtAppAddTimeOut(__libmansuffix__),XtAppAddSignal(__libmansuffix__) .SH "BUGS" In ANSI C it is necessary to cast the condition to an XtPointer, e.g.: .RS 4 -.br +.ft CW XtAppAddInput(app_context, .RS 4 .br source, .br -.B (XtPointer) -(XtInputReadMask | XtInputWriteMask), +\fB(XtPointer)\fP (XtInputReadMask | XtInputWriteMask), .br proc, .br client_data); +.ft R .RE diff --git a/lib/libXt/man/XtAppAddSignal.man b/lib/libXt/man/XtAppAddSignal.man index 02bf08e15..53e336049 100644 --- a/lib/libXt/man/XtAppAddSignal.man +++ b/lib/libXt/man/XtAppAddSignal.man @@ -31,40 +31,17 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtApp-Add-Signal wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddSignal __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddSignal, XtRemoveSignal, XtNoticeSignal \- register and remove a signal source .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtSignalId XtAppAddSignal(XtAppContext \fIapp_context\fP, XtSignalCallbackProc \fIproc\fP, XtPointer \fIclient_data\fP); @@ -80,51 +57,54 @@ Specifies the argument that is to be passed to the specified procedure when a signal has been raised. .IP \fIid\fP 1i Specifies the ID returned from the corresponding -.ZN XtAppAddSignal +.B XtAppAddSignal call. .IP \fIproc\fP 1i Specifies the procedure that is to be called when the signal has been raised. .SH DESCRIPTION The -.ZN XtAppAddSignal +.B XtAppAddSignal function initiates a mechanism for handling signals within the context -of the Intrinsics. Prior to establishing an operating system dependent +of the Intrinsics. +Prior to establishing an operating system dependent signal handler the application may call -.ZN XtAppAddSignal +.B XtAppAddSignal and store the returned \fIid\fP in a place accessible to the signal handler. .LP Upon receipt of a signal from the operating system, the application may call -.ZN XtNoticeSignal +.B XtNoticeSignal passing the \fIid\fP returned by the call to -.ZN XtAppAddSignal . +.BR XtAppAddSignal . .LP -.ZN XtNoticeSignal +.B XtNoticeSignal is the only Intrinsics function that can safely be called from a signal -handler. If -.ZN XtNoticeSignal +handler. +If +.B XtNoticeSignal is called multiple times before the Intrinsics are able to invoke the -registered callback, the callback is only called once. Logically the -Intrinsics maintain ``pending'' for each registered callback. This -flag is initially -.ZN False +registered callback, the callback is only called once. +Logically the +Intrinsics maintain \*(``pending\*('' for each registered callback. +This flag is initially +.B False and is set to -.ZN True +.B True by -.ZN XtNoticeSignal ; +.BR XtNoticeSignal ; the Intrinsics invoke the callback whenever the flag is -.ZN True , +.BR True , and the flag is set to -.ZN False +.B False just before the callback is invoked. .LP The -.ZN XtRemoveSignal -function is called to remove the specified Intrinsics signal handler. The -client should disable the source of the signal before calling -.ZN XtRemoveSignal . +.B XtRemoveSignal +function is called to remove the specified Intrinsics signal handler. +The client should disable the source of the signal before calling +.BR XtRemoveSignal . .SH "SEE ALSO" XtAppAddTimeOut(__libmansuffix__),XtAppAddInput(__libmansuffix__),XtAppAddWorkProc(__libmansuffix__) .br diff --git a/lib/libXt/man/XtAppAddTimeOut.man b/lib/libXt/man/XtAppAddTimeOut.man index 360c13786..cb2efaf12 100644 --- a/lib/libXt/man/XtAppAddTimeOut.man +++ b/lib/libXt/man/XtAppAddTimeOut.man @@ -34,67 +34,38 @@ .ds Vn 2.2 .hw XtApp-Add-Time-Out XtRemove-Time-Out wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddTimeOut __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddTimeOut, XtRemoveTimeOut \- register and remove timeouts .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtIntervalId XtAppAddTimeOut(XtAppContext \fIapp_context\fP, unsigned long \fIinterval\fP, XtTimerCallbackProc \fIproc\fP, XtPointer \fIclient_data\fP); .HP void XtRemoveTimeOut(XtIntervalId \fItimer\fP); .SH ARGUMENTS -.ds Co for which the timer is to be set .IP \fIapp_context\fP 1i -Specifies the application context \*(Co. +Specifies the application context for which the timer is to be set. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when handling the callback. .IP \fIinterval\fP 1i Specifies the time interval in milliseconds. -.ds Pr \ to be called when time expires .IP \fIproc\fP 1i -Specifies the procedure that is\*(Pr. +Specifies the procedure that is to be called when time expires. .IP \fItimer\fP 1i Specifies the ID for the timeout request to be destroyed. .SH DESCRIPTION The -.ZN XtAppAddTimeOut +.B XtAppAddTimeOut function creates a timeout and returns an identifier for it. The timeout value is set to interval. The callback procedure is called when the time interval elapses, and then the timeout is removed. .LP The -.ZN XtRemoveTimeOut +.B XtRemoveTimeOut function removes the timeout. Note that timeouts are automatically removed once they trigger. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppAddWorkProc.man b/lib/libXt/man/XtAppAddWorkProc.man index 5a1d02e23..a2cc3a423 100644 --- a/lib/libXt/man/XtAppAddWorkProc.man +++ b/lib/libXt/man/XtAppAddWorkProc.man @@ -34,63 +34,34 @@ .ds Vn 2.2 .hw XtApp-AddWork-Proc, XtRemove-Work-Proc wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppAddWorkProc __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppAddWorkProc, XtRemoveWorkProc \- Add and remove background processing procedures .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtWorkProcId XtAppAddWorkProc(XtAppContext \fIapp_context\fP, XtWorkProc \fIproc\fP, XtPointer \fIclient_data\fP); .HP void XtRemoveWorkProc(XtWorkProcId \fIid\fP); .SH ARGUMENTS -.ds Co that identifies the application .IP \fIapp_context\fP 1i -Specifies the application context \*(Co. -.ds Cd it is called +Specifies the application context that identifies the application. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when it is called. .IP \fIproc\fP 1i -Specifies the procedure that is\*(Pr. +Specifies the procedure that is to be called. .IP \fIid\fP 1i Specifies which work procedure to remove. .SH DESCRIPTION The -.ZN XtAppAddWorkProc +.B XtAppAddWorkProc function adds the specified work procedure for the application identified by app_context. .LP The -.ZN XtRemoveWorkProc +.B XtRemoveWorkProc function explicitly removes the specified background work procedure. .SH "SEE ALSO" XtAppNextEvent(__libmansuffix__) diff --git a/lib/libXt/man/XtAppCreateShell.man b/lib/libXt/man/XtAppCreateShell.man index ec1cbc8c8..428ad1ccb 100644 --- a/lib/libXt/man/XtAppCreateShell.man +++ b/lib/libXt/man/XtAppCreateShell.man @@ -33,72 +33,43 @@ .ds Vn 2.2 .hw XtApp-Create-Shell XtVa-App-Create-Shell wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppCreateShell __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppCreateShell, XtVaAppCreateShell \- create top-level widget instance .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtAppCreateShell(String \fIapplication_name\fP, String -\fIapplication_class\fP, WidgetClass \fIwidget_class\fP, Display -*\fIdisplay\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); +Widget XtAppCreateShell(const char *\fIapplication_name\fP, +const char *\fIapplication_class\fP, WidgetClass \fIwidget_class\fP, +Display *\fIdisplay\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaAppCreateShell(String \fIapplication_name\fP, String +Widget XtVaAppCreateShell(const char * \fIapplication_name\fP, const char * \fIapplication_class\fP, WidgetClass \fIwidget_class\fP, Display *\fIdisplay\fP, ...\^); .SH ARGUMENTS .IP \fIapplication_name\fP 1i Specifies the name of the application instance. -.ds Ac , which usually is the generic name for all instances of this application .IP \fIapplication_class\fP 1i -Specifies the class name of this application\*(Ac. -.ds Wc \ that the application top-level widget should be +Specifies the class name of this application, which +usually is the generic name for all instances of this application. .IP \fIwidget_class\fP 1i -Specifies the widget class\*(Wc. -.ds Di \ from which to get the resources +Specifies the widget class that the application top-level widget should be. .IP \fIdisplay\fP 1i -Specifies the display\*(Di. +Specifies the display from which to get the resources. .IP \fIargs\fP 1i -Specifies the argument list\*(Di. +Specifies the argument list from which to get the resources. .IP \fInum_args\fP 1i Specifies the number of arguments in the argument list. .IP \fI...\fP 1i -Specifies the variable argument list\*(Di. +Specifies the variable argument list from which to get the resources. .SH DESCRIPTION The -.ZN XtAppCreateShell +.B XtAppCreateShell function saves the specified application name and application class for qualifying all widget resource specifiers. The application name and application class are used as the left-most components in all widget resource names for this application. -.ZN XtAppCreateShell +.B XtAppCreateShell should be used to create a new logical application within a program or to create a shell on another display. In the first case, @@ -107,7 +78,7 @@ In the second case, it uses the resource database associated with the other display. .LP Note that the widget returned by -.ZN XtAppCreateShell +.B XtAppCreateShell has the \s-1WM_COMMAND\s+1 property set for session managers (see Chapter 4). .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppError.man b/lib/libXt/man/XtAppError.man index bd0f5bcb2..f0d2b4172 100644 --- a/lib/libXt/man/XtAppError.man +++ b/lib/libXt/man/XtAppError.man @@ -32,79 +32,51 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtApp-Error XtApp-Set-Error-Handler XtApp-Set-Warning-Handler XtApp-Warning wid-get +.hw XtApp-Error XtApp-Set-Error-Handler XtApp-Set-Warning-Handler +.hw XtApp-Warning wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppError __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppError, XtAppSetErrorHandler, XtAppSetWarningHandler, XtAppWarning \- low-level error handlers .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtAppError(XtAppContext \fIapp_context\fP, String \fImessage\fP); +void XtAppError(XtAppContext \fIapp_context\fP, const char *\fImessage\fP); .HP -void XtAppSetErrorHandler(XtAppContext \fIapp_context\fP, XtErrorHandler +XtErrorHandler XtAppSetErrorHandler(XtAppContext \fIapp_context\fP, XtErrorHandler \fIhandler\fP); .HP -void XtAppSetWarningHandler(XtAppContext \fIapp_context\fP, XtErrorHandler +XtErrorHandler XtAppSetWarningHandler(XtAppContext \fIapp_context\fP, XtErrorHandler \fIhandler\fP); .HP -void XtAppWarning(XtAppContext \fIapp_context\fP, String \fImessage\fP); +void XtAppWarning(XtAppContext \fIapp_context\fP, const char *\fImessage\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. .IP \fImessage\fP 1i Specifies the nonfatal error message that is to be reported. -.ds Ha fatal error procedure, which should not return, \ -or the nonfatal error procedure, which usually returns .IP \fIhandler\fP 1i -Specifies the new \*(Ha. -.ds Me reported +Specifies the new fatal error procedure, which should not return, +or the nonfatal error procedure, which usually returns. .IP \fImessage\fP 1i -Specifies the message that is to be \*(Me. +Specifies the message that is to be reported. .SH DESCRIPTION The -.ZN XtAppError +.B XtAppError function calls the installed error procedure and passes the specified message. .LP The -.ZN XtAppSetErrorHandler +.B XtAppSetErrorHandler function registers the specified procedure, which is called when a fatal error condition occurs. .LP The -.ZN XtAppSetWarningHandler +.B XtAppSetWarningHandler registers the specified procedure, which is called when a nonfatal error condition occurs. .LP The -.ZN XtAppWarning +.B XtAppWarning function calls the installed nonfatal error procedure and passes the specified message. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppErrorMsg.man b/lib/libXt/man/XtAppErrorMsg.man index 3be79d913..9a59779ee 100644 --- a/lib/libXt/man/XtAppErrorMsg.man +++ b/lib/libXt/man/XtAppErrorMsg.man @@ -32,92 +32,64 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtApp-Error-Msg XtApp-Set-Error-Msg-Handler XtApp-Set-Warning-Msg-Handler XtApp-Warning-Msg wid-get +.hw XtApp-Error-Msg XtApp-Set-Error-Msg-Handler +.hw XtApp-Set-Warning-Msg-Handler XtApp-Warning-Msg wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppErrorMsg __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppErrorMsg, XtAppSetErrorMsgHandler, XtAppSetWarningMsgHandler, XtAppWarningMsg \- high-level error handlers .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtAppErrorMsg(XtAppContext \fIapp_context\fP, String \fIname\fP, String -\fItype\fP, String \fIclass\fP, String \fIdefault\fP, String *\fIparams\fP, -Cardinal *\fInum_params\fP); +void XtAppErrorMsg(XtAppContext \fIapp_context\fP, const char *\fIname\fP, +const char *\fItype\fP, const char *\fIclass\fP, const char *\fIdefaultMsg\fP, +String *\fIparams\fP, Cardinal *\fInum_params\fP); .HP -void XtAppSetErrorMsgHandler(XtAppContext \fIapp_context\fP, XtErrorMsgHandler +XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext \fIapp_context\fP, XtErrorMsgHandler \fImsg_handler\fP); .HP -void XtAppSetWarningMsgHandler(XtAppContext \fIapp_context\fP, +XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext \fIapp_context\fP, XtErrorMsgHandler \fImsg_handler\fP); .HP -void XtAppWarningMsg(XtAppContext \fIapp_context\fP, String \fIname\fP, String -\fItype\fP, String \fIclass\fP, String \fIdefault\fP, String *\fIparams\fP, -Cardinal *\fInum_params\fP); +void XtAppWarningMsg(XtAppContext \fIapp_context\fP, const char *\fIname\fP, +const char *\fItype\fP, const char *\fIclass\fP, const char *\fIdefaultMsg\fP, +String *\fIparams\fP, Cardinal *\fInum_params\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. -.ds Cl .IP \fIclass\fP 1i -Specifies the resource class\*(Cl. -.IP \fIdefault\fP 1i -Specifies the default message to use\*(Dm. +Specifies the resource class of the error message. +.IP \fIdefaultMsg\fP 1i +Specifies the default message to use. .IP \fIname\fP 1i Specifies the general kind of error. .IP \fItype\fP 1i Specifies the detailed name of the error. -.ds Mh fatal error procedure, which should not return \ -or the nonfatal error procedure, which usually returns .IP \fImsg_handler\fP 1i -Specifies the new \*(Mh. +Specifies the new fatal error procedure, which should not return \ +or the nonfatal error procedure, which usually returns. .IP \fInum_params\fP 1i Specifies the number of values in the parameter list. .IP \fIparams\fP 1i Specifies a pointer to a list of values to be stored in the message. .SH DESCRIPTION The -.ZN XtAppErrorMsg +.B XtAppErrorMsg function calls the high-level error handler and passes the specified information. .LP The -.ZN XtAppSetErrorMsgHandler +.B XtAppSetErrorMsgHandler function registers the specified procedure, which is called when a fatal error occurs. .LP The -.ZN XtAppSetWarningMsgHandler +.B XtAppSetWarningMsgHandler function registers the specified procedure, which is called when a nonfatal error condition occurs. .LP The -.ZN XtAppWarningMsg +.B XtAppWarningMsg function calls the high-level error handler and passes the specified information. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppGetErrorDatabase.man b/lib/libXt/man/XtAppGetErrorDatabase.man index babb5f205..7d1d28b33 100644 --- a/lib/libXt/man/XtAppGetErrorDatabase.man +++ b/lib/libXt/man/XtAppGetErrorDatabase.man @@ -34,57 +34,30 @@ .ds Vn 2.2 .hw XtApp-Get-Error-Database XtApp-Get-Error-Database-Text wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppGetErrorDatabase __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppGetErrorDatabase, XtAppGetErrorDatabaseText \- obtain error database .SH SYNTAX +#include <X11/Intrinsic.h> .HP XrmDatabase *XtAppGetErrorDatabase(\^XtAppContext \fIapp_context\fP); .HP -void XtAppGetErrorDatabaseText(XtAppContext \fIapp_context\fP, char -*\fIname\fP, char *\fItype\fP, char *\fIclass\fP, char *\fIdefault\fP, char -*\fIbuffer_return\fP, int \fInbytes\fP, XrmDatabase \fIdatabase\fP); +void XtAppGetErrorDatabaseText(XtAppContext \fIapp_context\fP, +const char *\fIname\fP, const char *\fItype\fP, const char *\fIclass\fP, +const char *\fIdefaultMsg\fP, char *\fIbuffer_return\fP, int \fInbytes\fP, +XrmDatabase \fIdatabase\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. .IP \fIbuffer_return\fP 1i Specifies the buffer into which the error message is to be returned. -.ds Cl \ of the error message .IP \fIclass\fP 1i -Specifies the resource class\*(Cl. +Specifies the resource class of the error message. .IP \fIdatabase\fP 1i Specifies the name of the alternative database that is to be used or NULL if the application's database is to be used. -.IP \fIdefault\fP 1i -Specifies the default message to use\*(Dm. +.IP \fIdefaultMsg\fP 1i +Specifies the default message to use. .IP \fIname\fP 1i .br .ns @@ -95,14 +68,14 @@ of the error message. Specifies the size of the buffer in bytes. .SH DESCRIPTION The -.ZN XtAppGetErrorDatabase +.B XtAppGetErrorDatabase function returns the address of the error database. The \*(xI do a lazy binding of the error database and do not merge in the database file until the first call to -.ZN XtAppGetErrorDatbaseText . +.BR XtAppGetErrorDatbaseText . .LP The -.ZN XtAppGetErrorDatabaseText +.B XtAppGetErrorDatabaseText returns the appropriate message from the error database or returns the specified default message if one is not found in the error database. diff --git a/lib/libXt/man/XtAppGetSelectionTimeout.man b/lib/libXt/man/XtAppGetSelectionTimeout.man index 610ad0094..c78248091 100644 --- a/lib/libXt/man/XtAppGetSelectionTimeout.man +++ b/lib/libXt/man/XtAppGetSelectionTimeout.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtApp-Get-Selection-Timeout XtApp-Set-Selection-Timeout wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppGetSelectionTimeout __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppGetSelectionTimeout, XtAppSetSelectionTimeout \- set and obtain selection timeout values .SH SYNTAX +#include <X11/Intrinsic.h> .HP unsigned long XtAppGetSelectionTimeout(XtAppContext \fIapp_context\fP); .HP @@ -78,19 +51,19 @@ Specifies the application context. Specifies the selection timeout in milliseconds. .SH DESCRIPTION The -.ZN XtAppGetSelectionTimeout +.B XtAppGetSelectionTimeout function returns the current selection timeout value, in milliseconds. The selection timeout is the time within which the two communicating applications must respond to one another. The initial timeout value is set by the -.ZN selectionTimeout +.B selectionTimeout application resource, or, if -.ZN selectionTimeout +.B selectionTimeout is not specified, it defaults to five seconds. .LP The -.ZN XtAppSetSelectionTimeout +.B XtAppSetSelectionTimeout function sets the \*(xI's selection timeout mechanism. Note that most applications should not set the selection timeout. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtAppInitialize.man b/lib/libXt/man/XtAppInitialize.man index 97c25c128..c4ab2bf99 100644 --- a/lib/libXt/man/XtAppInitialize.man +++ b/lib/libXt/man/XtAppInitialize.man @@ -33,58 +33,30 @@ .ds Vn 2.2 .hw XtApp-Initialize XtVa-App-Initialize .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppInitialize __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppInitialize, XtVaAppInitialize \- initialize, open, or close a display .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtAppInitialize(XtAppContext* \fIapp_context_return\fP, String -\fIapplication_class\fP, XrmOptionDescRec* \fIoptions\fP, Cardinal -\fInum_options\fP, int* \fIargc_in_out\fP, String* \fIargv_in_out\fP, String* -\fIfallback_resources\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); +Widget XtAppInitialize(XtAppContext* \fIapp_context_return\fP, +const char *\fIapplication_class\fP, XrmOptionDescRec* \fIoptions\fP, +Cardinal \fInum_options\fP, int *\fIargc_in_out\fP, char **\fIargv_in_out\fP, +String *\fIfallback_resources\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaAppInitialize(XtAppContext* \fIapp_context_return\fP, String -\fIapplication_class\fP, XrmOptionDescRec* \fIoptions\fP, Cardinal -\fInum_options\fP, int* \fIargc_in_out\fP, String* \fIargv_in_out\fP, String* -\fIfallback_resources\fP, ...\^); +Widget XtVaAppInitialize(XtAppContext* \fIapp_context_return\fP, +const char *\fIapplication_class\fP, XrmOptionDescRec* \fIoptions\fP, +Cardinal \fInum_options\fP, int *\fIargc_in_out\fP, char **\fIargv_in_out\fP, +String *\fIfallback_resources\fP, ...\^); .SH ARGUMENTS .IP \fIapp_context_return\fP 1i Specifies the application context. -.ds Ac , which usually is the generic name for all instances of this application .IP \fIapplication_class\fP 1i -Specifies the class name of this application\*(Ac. +Specifies the class name of this application, which usually is the generic name for all instances of this application. .IP \fIoptions\fP 1i Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to -.ZN XrmParseCommand . +.BR XrmParseCommand . For further information, see \fI\*(xL\fP. .IP \fInum_options\fP 1i @@ -106,35 +78,38 @@ Specifies the variable argument list to override any other resource specification for the created shell widget. .SH DESCRIPTION The -.ZN XtAppInitialize +.B XtAppInitialize function calls -.ZN XtToolkitInitialize +.B XtToolkitInitialize followed by -.ZN XtCreateApplicationContext , +.BR XtCreateApplicationContext , then calls -.ZN XtOpenDisplay +.B XtOpenDisplay with \fIdisplay_string\fP NULL and \fIapplication_name\fP NULL, and finally calls -.ZN XtAppCreateShell +.B XtAppCreateShell with \fIapplication_name\fP NULL, \fIwidget_class\fP -.ZN applicationShellWidgetClass , +.BR applicationShellWidgetClass , and the specified \fIargs\fP and \fInum_args\fP and returns the -created shell. The modified \fIargc\fP and \fIargv\fP returned by -.ZN XtDisplayInitialize +created shell. +The modified \fIargc\fP and \fIargv\fP returned by +.B XtDisplayInitialize are returned in \fIargc_in_out\fP and \fIargv_in_out\fP. If \fIapp_context_return\fP is not NULL, the created application context -is also returned. If the display specified by the command line cannot +is also returned. +If the display specified by the command line cannot be opened, an error message is issued and -.ZN XtAppInitialize -terminates the application. If \fIfallback_resources\fP is non-NULL, -.ZN XtAppSetFallbackResources +.B XtAppInitialize +terminates the application. +If \fIfallback_resources\fP is non-NULL, +.B XtAppSetFallbackResources is called with the value prior to calling -.ZN XtOpenDisplay . +.BR XtOpenDisplay . .LP XtAppInitialize and XtVaAppInitialize have been superceded by -.ZN XtOpenApplication +.B XtOpenApplication and -.ZN XtVaOpenApplication +.B XtVaOpenApplication respectively. .SH "SEE ALSO" XtOpenApplication(__libmansuffix__), XtVaOpenApplication(__libmansuffix__) diff --git a/lib/libXt/man/XtAppLock.man b/lib/libXt/man/XtAppLock.man index c38e6d875..276a9c3d1 100644 --- a/lib/libXt/man/XtAppLock.man +++ b/lib/libXt/man/XtAppLock.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Lock XtApp-Unlock wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppLock __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppLock, XtAppUnlock \- lock and unlock application context .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppLock(XtAppContext \fIapp_context\fP); .HP @@ -73,10 +46,10 @@ void XtAppUnlock(XtAppContext \fIapp_context\fP); .IP \fIapp_context\fP 1i Specifies the application context. .SH DESCRIPTION -.ZN XtAppLock +.B XtAppLock locks the application context including all its related displays and widgets. .LP -.ZN XtAppUnlock +.B XtAppUnlock unlocks the application context. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtAppNextEvent.man b/lib/libXt/man/XtAppNextEvent.man index 0bd1648cc..d04b7d758 100644 --- a/lib/libXt/man/XtAppNextEvent.man +++ b/lib/libXt/man/XtAppNextEvent.man @@ -32,40 +32,14 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtApp-Next-Event XtApp-Pending XtApp-Peek-Event XtApp-Process-Event Xt-Dispatch-Event XtApp-Main-Loop wid-get +.hw XtApp-Next-Event XtApp-Pending XtApp-Peek-Event XtApp-Process-Event +.hw Xt-Dispatch-Event XtApp-Main-Loop wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppNextEvent __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppNextEvent, XtAppPending, XtAppPeekEvent, XtAppProcessEvent, XtDispatchEvent, XtAppMainLoop \- query and process events and input .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppNextEvent(XtAppContext \fIapp_context\fP, XEvent *\fIevent_return\fP); @@ -82,9 +56,8 @@ Boolean XtDispatchEvent(XEvent *\fIevent\fP); .HP void XtAppMainLoop(XtAppContext \fIapp_context\fP); .SH ARGUMENTS -.ds Co that identifies the application .IP \fIapp_context\fP 1i -Specifies the application context \*(Co. +Specifies the application context that identifies the application. .IP \fIevent\fP 1i Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler. @@ -93,72 +66,74 @@ Returns the event information to the specified event structure. .IP \fImask\fP 1i Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of -.ZN XtIMXEvent , -.ZN XtIMTimer , -.ZN XtIMAlternateInput , +.BR XtIMXEvent , +.BR XtIMTimer , +.BR XtIMAlternateInput , and -.ZN XtIMSignal . +.BR XtIMSignal . As a convenience, the \*(tk defines the symbolic name -.ZN XtIMAll +.B XtIMAll to be the bitwise inclusive OR of all event types. .SH DESCRIPTION If the X event queue is empty, -.ZN XtAppNextEvent +.B XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures -triggered by them. This wait time can be used for background processing +triggered by them. +This wait time can be used for background processing (see Section 7.8). .LP If there is an event in the queue, -.ZN XtAppPeekEvent -fills in the event and returns a nonzero value. If no X input is on the -queue, -.ZN XtAppPeekEvent +.B XtAppPeekEvent +fills in the event and returns a nonzero value. +If no X input is on the queue, +.B XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, -.ZN XtAppPeekEvent +.B XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and -.ZN XtAppPeekEvent +.B XtAppPeekEvent returns zero. .LP The -.ZN XtAppPending +.B XtAppPending function returns a nonzero value if there are events pending from the -X server, timer pending, or other input sources pending. The value -returned is a bit mask that is the OR of -.ZN XtIMXEvent , -.ZN XtIMTimer , -.ZN XtIMAlternateInput , +X server, timer pending, or other input sources pending. +The value returned is a bit mask that is the OR of +.BR XtIMXEvent , +.BR XtIMTimer , +.BR XtIMAlternateInput , and -.ZN XtIMSignal +.B XtIMSignal (see -.ZN XtAppProcessEvent ). +.BR XtAppProcessEvent ). If there are no events pending, -.ZN XtAppPending +.B XtAppPending flushes the output buffer and returns zero. .LP The -.ZN XtAppProcessEvent +.B XtAppProcessEvent function processes one timer, alternate input, signal source, or X -event. If there is nothing of the appropriate type to process, -.ZN XtAppProcessEvent +event. +If there is nothing of the appropriate type to process, +.B XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see -.ZN XtAppMainLoop ). -.ZN XtAppProcessEvent +.BR XtAppMainLoop ). +.B XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling -.ZN XtDispatchEvent . +.BR XtDispatchEvent . .LP When an X event is received, it is passed to -.ZN XtDispatchEvent , +.BR XtDispatchEvent , which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. @@ -167,51 +142,48 @@ the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined. .LP The -.ZN XtDispatchEvent +.B XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. -.ZN XtDispatchEvent +.B XtDispatchEvent returns -.ZN True +.B True if it dispatched the event to some handler and -.ZN False +.B False if it found no handler to dispatch the event to. The most common use of -.ZN XtDispatchEvent +.B XtDispatchEvent is to dispatch events acquired with the -.ZN XtAppNextEvent +.B XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. -.ZN XtDispatchEvent +.B XtDispatchEvent also is responsible for implementing the grab semantics for -.ZN XtAddGrab . +.BR XtAddGrab . .LP The -.ZN XtAppMainLoop -function first reads the next incoming X event by calling -.ZN XtAppNextEvent -and then it dispatches the event to the appropriate registered procedure -by calling -.ZN XtDispatchEvent . +.B XtAppMainLoop +function processes events using +.BR XtAppProcessEvent , +varying the \fImask\fP parameter and using +.B XtAppPending +to ensure that it has a chance to handle events of all types, +i.e., X events, timer events, input events and signal sources. This constitutes the main loop of \*(tk applications, and, as such, it does not return unless -.ZN XtAppSetExitFlag +.B XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about -.ZN XtAppMainLoop ; -it is simply an loop that calls -.ZN XtAppNextEvent -and then -.ZN XtDispatchEvent , -until -.ZN XtAppGetExitFlag () +.BR XtAppMainLoop ; +it is simply an loop that processes events until +.BR XtAppGetExitFlag () returns true. .LP Applications can provide their own version of this loop, which tests some global termination flag or tests that the number -of top-level widgets is larger than zero before circling back to the call to -.ZN XtAppNextEvent . +of top-level widgets is larger than zero before circling back +for the next event. .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtAppReleaseCacheRefs.man b/lib/libXt/man/XtAppReleaseCacheRefs.man index d04484ad2..c217a68bf 100644 --- a/lib/libXt/man/XtAppReleaseCacheRefs.man +++ b/lib/libXt/man/XtAppReleaseCacheRefs.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Release-Cache-Refs wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppReleaseCacheRefs __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppReleaseCacheRefs \- decrement reference counts for resources .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppReleaseCacheRefs(XtAppContext \fIapp_context\fP, XtCacheRef* \fIrefs\fP); @@ -74,12 +47,13 @@ Specifies the application context. .IP \fIrefs\fP 1i Specifies the list of cache references to be released. .SH DESCRIPTION -.ZN XtAppReleaseCacheRefs +.B XtAppReleaseCacheRefs decrements the reference count for the conversion entries identified -by the \fIrefs\fP argument. This argument is a pointer to a NULL-terminated -list of -.ZN XtCacheRef -values. If any reference count reaches zero, the destructor, if any, will +by the \fIrefs\fP argument. +This argument is a pointer to a NULL-terminated list of +.B XtCacheRef +values. +If any reference count reaches zero, the destructor, if any, will be called and the resource removed from the conversion cache. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtAppSetExitFlag.man b/lib/libXt/man/XtAppSetExitFlag.man index b310c596f..33750857e 100644 --- a/lib/libXt/man/XtAppSetExitFlag.man +++ b/lib/libXt/man/XtAppSetExitFlag.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Set-Exit-Flag XtApp-Get-Exit-Flag wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppSetExitFlag __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppSetExitFlag, XtAppGetExitFlag \- thread support functions .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppSetExitFlag(XtAppContext \fIapp_context\fP); .HP @@ -74,10 +47,10 @@ Boolean XtAppGetExitFlag(XtAppContext \fIapp_context\fP); Specifies the application context. .SH DESCRIPTION To indicate that an application context should exit, use -.ZN XtAppSetExitFlag . +.BR XtAppSetExitFlag . .LP To test the exit status of an application context, use -.ZN XtAppGetExitFlag . +.BR XtAppGetExitFlag . .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtAppSetFallbackResources.man b/lib/libXt/man/XtAppSetFallbackResources.man index f48e47df1..25e987208 100644 --- a/lib/libXt/man/XtAppSetFallbackResources.man +++ b/lib/libXt/man/XtAppSetFallbackResources.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtApp-Set-Fallback-Resources wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppSetFallbackResources __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppSetFallbackResources \- set fallback resources .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtAppSetFallbackResources(XtAppContext \fIapp_context\fP, String* \fIspecification_list\fP); @@ -76,21 +49,22 @@ Specifies a NULL-terminated list of resource specifications to pre-load the database, or NULL. .SH DESCRIPTION Each entry in \fIspecification_list\fP points to a string in the format -.ZN XrmPutLineResource . +.BR XrmPutLineResource . following a call to -.ZN XtAppSetFallbackResources , +.BR XtAppSetFallbackResources , when a resource database is being created for a particular screen and the Intrinsics are not able to find or read an application-specific class resource file and if \fIspecification_list\fP is not NULL the resource specification in \fIspecification_list\fP will be merged into the screen resource database in place of the application-specific class resource file. -.ZN XtAppSetFallbackResources +.B XtAppSetFallbackResources is not required to copy \fIspecification_list\fP; the caller must ensure that the contents of the list and the strings addressed by the list remain valid until all displays are initialized or until -.ZN XtAppSetFallbackResources -is called again. The value NULL for \fIspecification_list\fP removes +.B XtAppSetFallbackResources +is called again. +The value NULL for \fIspecification_list\fP removes any previous fallback resource specification for the application context. The intended use for fallback resources is to provide a minimal number of resources that will make the application usable (or at least terminate diff --git a/lib/libXt/man/XtAppSetTypeConverter.man b/lib/libXt/man/XtAppSetTypeConverter.man index 97d5a981a..ee3b7d8b1 100644 --- a/lib/libXt/man/XtAppSetTypeConverter.man +++ b/lib/libXt/man/XtAppSetTypeConverter.man @@ -33,47 +33,22 @@ .ds Vn 2.2 .hw XtApp-Set-Type-Converter XtSet-Type-Converter wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtAppSetTypeConverter __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtAppSetTypeConverter, XtSetTypeConverter \- register resource converter .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtAppSetTypeConverter(XtAppContext \fIapp_context\fP, String -\fIfrom_type\fP, String \fIto_type\fP, XtConverter \fIconverter\fP, -XtConvertArgList \fIconvert_args\fP, Cardinal \fInum_args\fP, XtCacheType -\fIcache_type\fP, XtDestructor \fIdestructor\fP); +void XtAppSetTypeConverter(XtAppContext \fIapp_context\fP, +const char *\fIfrom_type\fP, const char * \fIto_type\fP, +XtTypeConverter \fIconverter\fP, XtConvertArgList \fIconvert_args\fP, +Cardinal \fInum_args\fP, XtCacheType \fIcache_type\fP, +XtDestructor \fIdestructor\fP); .HP -void XtSetTypeConverter(String \fIfrom_type\fP, String \fIto_type\fP, -XtConverter \fIconverter\fP, XtConvertArgList \fIconvert_args\fP, Cardinal -\fInum_args\fP, XtCacheType \fIcache_type\fP, XtDestructor \fIdestructor\fP); +void XtSetTypeConverter(const char *\fIfrom_type\fP, const char *\fIto_type\fP, +XtTypeConverter \fIconverter\fP, XtConvertArgList \fIconvert_args\fP, +Cardinal \fInum_args\fP, XtCacheType \fIcache_type\fP, +XtDestructor \fIdestructor\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. @@ -95,13 +70,14 @@ Specifies a destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallocate resources produced by the converter. .SH DESCRIPTION -.ZN XtSetTypeConverter +.B XtSetTypeConverter registers the specified type converter and destructor in all application contexts created by the calling process, including any future application contexts that may be created. -.ZN XtAppSetTypeConverter +.B XtAppSetTypeConverter registers the specified type converter in the single application context -specified. If the same \fIfrom_type\fP and \fIto_type\fP are specified +specified. +If the same \fIfrom_type\fP and \fIto_type\fP are specified in multiple calls to either function, the most recent overrides the previous ones. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtBuildEventMask.man b/lib/libXt/man/XtBuildEventMask.man index c1862aa2b..231db7507 100644 --- a/lib/libXt/man/XtBuildEventMask.man +++ b/lib/libXt/man/XtBuildEventMask.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtBuild-Event-Mask wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtBuildEventMask __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtBuildEventMask \- retrieve a widget's event mask .SH SYNTAX +#include <X11/Intrinsic.h> .HP EventMask XtBuildEventMask(Widget \fIw\fP); .SH ARGUMENTS @@ -73,16 +46,16 @@ EventMask XtBuildEventMask(Widget \fIw\fP); Specifies the widget. .SH DESCRIPTION The -.ZN XtBuildEventMask +.B XtBuildEventMask function returns the event mask representing the logical OR of all event masks for event handlers registered on the widget with -.ZN XtAddEventHandler +.B XtAddEventHandler and all event translations, including accelerators, installed on the widget. This is the same event mask stored into the -.ZN XSetWindowAttributes +.B XSetWindowAttributes structure by -.ZN XtRealizeWidget +.B XtRealizeWidget and sent to the server when event handlers and translations are installed or removed on the realized widget. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtCallAcceptFocus.man b/lib/libXt/man/XtCallAcceptFocus.man index 0649406ad..d8ad83a00 100644 --- a/lib/libXt/man/XtCallAcceptFocus.man +++ b/lib/libXt/man/XtCallAcceptFocus.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtCall-Accept-Focus wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCallAcceptFocus __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCallAcceptFocus \- calla widget's accept_focus procedure .SH SYNTAX +#include <X11/Intrinsic.h> .HP Boolean XtCallAcceptFocus(Widget \fIw\fP, Time *\fItime\fP); .SH ARGUMENTS @@ -75,14 +48,14 @@ Specifies the X time of the event that is causing the accept focus. Specifies the widget. .SH DESCRIPTION The -.ZN XtCallAcceptFocus +.B XtCallAcceptFocus function calls the specified widget's accept_focus procedure, passing it the specified widget and time, and returns what the accept_focus procedure returns. If accept_focus is NULL, -.ZN XtCallAcceptFocus +.B XtCallAcceptFocus returns -.ZN False . +.BR False . .SH "SEE ALSO" XtSetKeyboardFocus(__libmansuffix__) .br diff --git a/lib/libXt/man/XtCallActionProc.man b/lib/libXt/man/XtCallActionProc.man index 4c7cb0b37..18ce5285f 100644 --- a/lib/libXt/man/XtCallActionProc.man +++ b/lib/libXt/man/XtCallActionProc.man @@ -33,44 +33,18 @@ .ds Vn 2.2 .hw XtCall-Action-Proc wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCallActionProc __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCallActionProc \- invoke an action procedure directly .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtCallActionProc(Widget \fIwidget\fP, String \fIaction\fP, XEvent* -\fIevent\fP, String* \fIparams\fP, Cardinal \fInum_params\fP); +void XtCallActionProc(Widget \fIwidget\fP, const char *\fIaction\fP, +XEvent *\fIevent\fP, String *\fIparams\fP, Cardinal \fInum_params\fP); .SH ARGUMENTS .IP \fIwidget\fP 1i -Specifies the widget in which the action is to be invoked. Must be +Specifies the widget in which the action is to be invoked. +Must be of class core of any subclass thereof. .IP \fIaction\fP 1i Specifies the name of the action routine. @@ -81,15 +55,18 @@ Specifies the contents of the \fIparams\fP passed to the action routine. .IP \fInum_params\fP 1i Specifies the num of entries in \fIparams\fP. .SH DESCRIPTION -.ZN XtCallActionProc +.B XtCallActionProc searches for the named action routine in the same manner and order as -translation tables are bound. If found, the action routine is invoked -with the specified widget, event pointer, and parameters. It is the +translation tables are bound. +If found, the action routine is invoked +with the specified widget, event pointer, and parameters. +It is the responsibility of the caller to ensure that the contents of \fIevent\fP, \fIparams\fP, and \fInum_params\fP arguments are appropriate for the specified routine, and if necessary, that the specified widget is -realized or sensitive. If the named action routine cannot be found, -.ZN XtCallActionProc +realized or sensitive. +If the named action routine cannot be found, +.B XtCallActionProc generates a warning message and returns. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtCallCallbacks.man b/lib/libXt/man/XtCallCallbacks.man index 305c7e824..eecbddba6 100644 --- a/lib/libXt/man/XtCallCallbacks.man +++ b/lib/libXt/man/XtCallCallbacks.man @@ -33,41 +33,14 @@ .ds Vn 2.2 .hw XtCall-Callbacks XtHas-Callbacks XtCall-Callbacks-List wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCallCallbacks __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCallCallbacks, XtCallCallbackList, XtHasCallbacks \- process callbacks .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtCallCallbacks(Widget \fIw\fP, String \fIcallback_name\fP, XtPointer -\fIcall_data\fP); +void XtCallCallbacks(Widget \fIw\fP, const char *\fIcallback_name\fP, +XtPointer \fIcall_data\fP); .HP void XtCallCallbackList(Widget \fIw\fP, XtCallbackList \fIcallbacks\fP, XtPointer \fIcall_data\fP); @@ -75,11 +48,10 @@ XtPointer \fIcall_data\fP); typedef enum {XtCallbackNoList, XtCallbackHasNone, XtCallbackHasSome} XtCallbackStatus; .HP -XtCallbackStatus XtHasCallbacks(Widget \fIw\fP, String \fIcallback_name\fP); +XtCallbackStatus XtHasCallbacks(Widget \fIw\fP, const char *\fIcallback_name\fP); .SH ARGUMENTS -.ds Cn \ to be executed or checked .IP \fIcallback_name\fP 1i -Specifies the callback list\*(Cn. +Specifies the callback list to be executed or checked. .IP \fIcall_data\fP 1i Specifies a callback-list specific data value to pass to each of the callback procedure in the list. @@ -89,32 +61,32 @@ Specifies the callback list to be executed. Specifies the widget. .SH DESCRIPTION The -.ZN XtCallCallbacks +.B XtCallCallbacks function calls each procedure that is registered in the specified widget's callback list. .LP If \fIcallbacks\fP is not NULL, -.ZN XtCallCallbackList +.B XtCallCallbackList calls each of the callback procedures in the list, passing client data and \fIcall_data\fP. The \fIcallbacks\fP parameter must specify the contents of a widget or object resource declared with representation type -.ZN XtRCallback . +.BR XtRCallback . .LP The -.ZN XtHasCallbacks +.B XtHasCallbacks function first checks to see if the widget has a callback list identified by callback_name. If the callback list does not exist, -.ZN XtHasCallbacks +.B XtHasCallbacks returns -.ZN XtCallbackNoList . +.BR XtCallbackNoList . If the callback list exists but is empty, it returns -.ZN XtCallbackHasNone . +.BR XtCallbackHasNone . If the callback list exists and has at least one callback registered, it returns -.ZN XtCallbackHasSome . +.BR XtCallbackHasSome . .SH "SEE ALSO" XtAddCallback(__libmansuffix__) .br diff --git a/lib/libXt/man/XtClass.man b/lib/libXt/man/XtClass.man index 6bc4d5232..f23a40efc 100644 --- a/lib/libXt/man/XtClass.man +++ b/lib/libXt/man/XtClass.man @@ -32,40 +32,16 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtCheck-Subclass XtIs-Object XtIs-RectObj XtIs-Widget XtIs-Composite XtIs-Constraint XtIs-Shell XtIs-Override-Shell XtIs-WM-Shell XtIs-Vendor-Shell XtIs-Transient-Shell XtIs-Top-Level-Shell XtIs-Application-Shell wid-get +.hw XtCheck-Subclass XtIs-Object XtIs-RectObj XtIs-Widget XtIs-Composite +.hw XtIs-Constraint XtIs-Shell XtIs-Override-Shell XtIs-WM-Shell +.hw XtIs-Vendor-Shell XtIs-Transient-Shell XtIs-Top-Level-Shell +.hw XtIs-Application-Shell wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtClass __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtClass, XtSuperclass, XtIsSubclass, XtCheckSubclass, XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, XtIsSessionShell \- obtain and verify a widget's class .SH SYNTAX +#include <X11/Intrinsic.h> .HP WidgetClass XtClass(Widget \fIw\fP); .HP @@ -84,7 +60,7 @@ Boolean XtIsWidget(Widget \fIw\fP); .HP Boolean XtIsComposite(Widget \fIw\fP); .HP -Boolean XtIsConstraint(Widget \fIw\fP, +Boolean XtIsConstraint(Widget \fIw\fP); .HP Boolean XtIsShell(Widget \fIw\fP); .HP @@ -105,69 +81,71 @@ Boolean XtIsSessionShell(Widget \fIw\fP); .IP \fIw\fP 1i Specifies the widget. .IP \fIwidget_class\fP 1i -Specifies the widget class\*(Wc. -.ds Me used +Specifies the widget class. .IP \fImessage\fP 1i -Specifies the message that is to be \*(Me. +Specifies the message that is to be used. .SH DESCRIPTION The -.ZN XtClass +.B XtClass function returns a pointer to the widget's class structure. .LP The -.ZN XtSuperclass +.B XtSuperclass function returns a pointer to the widget's superclass class structure. .LP The -.ZN XtIsSubclass +.B XtIsSubclass function returns -.ZN True +.B True if the class of the specified widget is equal to or is a subclass of -the specified class. The widget's class can be any number of subclasses +the specified class. +The widget's class can be any number of subclasses down the chain and need not be an immediate subclass of the specified -class. Composite widgets that need to restrict the class of the items +class. +Composite widgets that need to restrict the class of the items they contain can use -.ZN XtIsSubclass +.B XtIsSubclass to find out if a widget belongs to the desired class of objects. .LP The -.ZN XtCheckSubclass +.B XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, -.ZN XtCheckSubclass +.B XtCheckSubclass constructs an error message from the supplied message, the widget's actual class, and the expected class and calls -.ZN XtErrorMsg . -.ZN XtCheckSubclass +.BR XtErrorMsg . +.B XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation. .LP -.ZN XtCheckSubclass +.B XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code. .LP To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to -.ZN XtIsSubclass -for each of the built-in classes. These procedures are -.ZN XtIsObject , -.ZN XtIsRectObj , -.ZN XtIsWidget , -.ZN XtIsComposite , -.ZN XtIsConstraint , -.ZN XtIsShell , -.ZN XtIsOverrideShell , -.ZN XtIsWMShell , -.ZN XtIsVendorShell , -.ZN XtIsTransientShell , -.ZN XtIsTopLevelShell , -.ZN XtIsApplicationShell , +.B XtIsSubclass +for each of the built-in classes. +These procedures are +.BR XtIsObject , +.BR XtIsRectObj , +.BR XtIsWidget , +.BR XtIsComposite , +.BR XtIsConstraint , +.BR XtIsShell , +.BR XtIsOverrideShell , +.BR XtIsWMShell , +.BR XtIsVendorShell , +.BR XtIsTransientShell , +.BR XtIsTopLevelShell , +.BR XtIsApplicationShell , and -.ZN XtIsSessionShell . +.BR XtIsSessionShell . .LP The .SH "SEE ALSO" diff --git a/lib/libXt/man/XtConfigureWidget.man b/lib/libXt/man/XtConfigureWidget.man index ce5f2150b..f064eafe8 100644 --- a/lib/libXt/man/XtConfigureWidget.man +++ b/lib/libXt/man/XtConfigureWidget.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtConfigure-Widget XtMove-Widget XtResize-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtConfigureWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtConfigureWidget, XtMoveWidget, XtResizeWidget \- move and resize widgets .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtConfigureWidget(Widget \fIw\fP, Position \fIx\fP, Position \fIy\fP, Dimension \fIwidth\fP, Dimension \fIheight\fP, Dimension \fIborder_width\fP); @@ -87,59 +60,58 @@ void XtResizeWindow(Widget \fIw\fP); Specify the new widget size. .IP \fIw\fP 1i Specifies the widget. -.ds Nu new widget .IP \fIx\fP 1i .br .ns .IP \fIy\fP 1i -Specify the \*(Nu x and y coordinates. +Specify the new widget x and y coordinates. .SH DESCRIPTION The -.ZN XtConfigureWidget +.B XtConfigureWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, -.ZN XtConfigureWidget +.B XtConfigureWidget writes the new x, y, width, height, and border_width values into the widget and, if the widget is realized, makes an Xlib -.ZN XConfigureWindow +.B XConfigureWindow call on the widget's window. .LP If either the new width or height is different from its old value, -.ZN XtConfigureWidget +.B XtConfigureWidget calls the widget's resize procedure to notify it of the size change; otherwise, it simply returns. .LP The -.ZN XtMoveWidget +.B XtMoveWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, -.ZN XtMoveWidget +.B XtMoveWidget writes the new x and y values into the widget and, if the widget is realized, issues an Xlib -.ZN XMoveWindow +.B XMoveWindow call on the widget's window. .LP The -.ZN XtResizeWidget +.B XtResizeWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, -.ZN XtResizeWidget +.B XtResizeWidget writes the new width, height, and border_width values into the widget and, if the widget is realized, issues an -.ZN XConfigureWindow +.B XConfigureWindow call on the widget's window. .LP If the new width or height are different from the old values, -.ZN XtResizeWidget +.B XtResizeWidget calls the widget's resize procedure to notify it of the size change. .LP The -.ZN XtResizeWindow +.B XtResizeWindow function calls the -.ZN XConfigureWindow +.B XConfigureWindow Xlib function to make the window of the specified widget match its width, height, and border width. This request is done unconditionally because there is no way to tell if these @@ -147,9 +119,9 @@ values match the current values. Note that the widget's resize procedure is not called. .LP There are very few times to use -.ZN XtResizeWindow ; +.BR XtResizeWindow ; instead, you should use -.ZN XtResizeWidget . +.BR XtResizeWidget . .SH "SEE ALSO" XtMakeGeometryRequest(__libmansuffix__), XtQueryGeometry(__libmansuffix__) diff --git a/lib/libXt/man/XtConvert.man b/lib/libXt/man/XtConvert.man index beba2639c..10f3e37b2 100644 --- a/lib/libXt/man/XtConvert.man +++ b/lib/libXt/man/XtConvert.man @@ -34,49 +34,21 @@ .ds Vn 2.2 .hw XtDirect-Convert wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtConvert __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtConvert, XtDirectConvert \- invoke resource converters .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtConvert(Widget \fIw\fP, String \fIfrom_type\fP, XrmValuePtr \fIfrom\fP, -String \fIto_type\fP, XrmValuePtr \fIto_return\fP); +void XtConvert(Widget \fIw\fP, +const char *\fIfrom_type\fP, XrmValuePtr \fIfrom\fP, +const char *\fIto_type\fP, XrmValuePtr \fIto_return\fP); .HP void XtDirectConvert(XtConverter \fIconverter\fP, XrmValuePtr \fIargs\fP, Cardinal \fInum_args\fP, XrmValuePtr \fIfrom\fP, XrmValuePtr \fIto_return\fP); .SH ARGUMENTS -.ds Al that contains the additional arguments needed to perform \ -the conversion (often NULL) .IP \fIargs\fP 1i -Specifies the argument list \*(Al. +Specifies the argument list that contains the additional arguments needed to perform the conversion (often NULL). .IP \fIconverter\fP 1i Specifies the conversion procedure that is to be called. .IP \fIfrom\fP 1i @@ -89,34 +61,33 @@ Specifies the number of additional arguments (often zero). Specifies the destination type. .IP \fIto_return\fP 1i Returns the converted value. -.ds Wi to use for additional arguments (if any are needed) .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget to use for additional arguments (if any are needed). .SH DESCRIPTION The -.ZN XtConvert +.B XtConvert function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls -.ZN XtDirectConvert . -.ZN XtConvert +.BR XtDirectConvert . +.B XtConvert has been replaced by -.ZN XtConvertAndStore . +.BR XtConvertAndStore . .LP The -.ZN XtDirectConvert +.B XtDirectConvert function looks in the converter cache to see if this conversion procedure has been called with the specified arguments. If so, it returns a descriptor for information stored in the cache; otherwise, it calls the converter and enters the result in the cache. .LP Before calling the specified converter, -.ZN XtDirectConvert +.B XtDirectConvert sets the return value size to zero and the return value address to NULL. To determine if the conversion was successful, the client should check to_return.address for non-NULL. -.ZN XtDirectConvert +.B XtDirectConvert has been replaced by -.ZN XtCallConverter . +.BR XtCallConverter . .SH "SEE ALSO" XtAppAddConverter(__libmansuffix__), XtStringConversionWarning(__libmansuffix__), diff --git a/lib/libXt/man/XtConvertAndStore.man b/lib/libXt/man/XtConvertAndStore.man index 0de0d503d..717aad713 100644 --- a/lib/libXt/man/XtConvertAndStore.man +++ b/lib/libXt/man/XtConvertAndStore.man @@ -33,43 +33,17 @@ .ds Vn 2.2 .hw XtConvert-And-Store XtCall-Converter wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtConvertAndStore __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtConvertAndStore, XtCallConverter \- invoke resource converters .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Boolean XtConvertAndStore(Widget \fIwidget\fP, String \fIfrom_type\fP, -XrmValuePtr \fIfrom\fP, String \fIto_type\fP, XrmValuePtr \fIto_in_out\fP); +Boolean XtConvertAndStore(Widget \fIwidget\fP, +const char *\fIfrom_type\fP, XrmValuePtr \fIfrom\fP, +const char *\fIto_type\fP, XrmValuePtr \fIto_in_out\fP); .HP -Boolean XtCallConverter(Display* \fIdpy\fP, XtConverter \fIconverter\fP, +Boolean XtCallConverter(Display* \fIdpy\fP, XtTypeConverter \fIconverter\fP, XrmValuePtr \fIargs\fP, Cardinal \fInum_args\fP, XrmValuePtr \fIfrom\fP, XrmValuePtr \fIto_in_out\fP, XtCacheRef* \fIcache_ref_return\fP); .SH ARGUMENTS @@ -95,62 +69,65 @@ and the destroy callback list. Specifies the display with which the conversion is to be associated. .SH DESCRIPTION The -.ZN XtConvertAndStore +.B XtConvertAndStore function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls -.ZN XtCallConverter . +.BR XtCallConverter . (or -.ZN XtDirectConvert +.B XtDirectConvert if an old-style converter was registered with -.ZN XtAddConverter +.B XtAddConverter or -.ZN XtAppAddConverter . +.BR XtAppAddConverter . ) with the from and to_in_out arguments. .LP The -.ZN XtCallConverter +.B XtCallConverter function looks up the specified type converter in the application context associated with the display and, if the converter was not registered or was registered with cache type -.ZN XtCacheAll +.B XtCacheAll or -.ZN XtCacheByDisplay +.B XtCacheByDisplay looks in the conversion cache to see if this conversion procedure -has been called with the specified conversion arguments. If so, it +has been called with the specified conversion arguments. +If so, it checks the success status of the prior call, and if the conversion failed, -.ZN XtCallConverter +.B XtCallConverter returns -.ZN False +.B False immediately; otherwise it checks the size specified in the \fIto\fP argument and, if it is greater than or equal to the size stored in the cache, copies the information stored in the cache into the location specified by \fIto->addr\fP, stores the cache size into \fIto->size\fP, and returns -.ZN True . +.BR True . If the size specified in the \fIto\fP argument is smaller than the size stored in the cache, -.ZN XtCallConverter +.B XtCallConverter copies the cache size into the \fIto->size\fP and returns -.ZN False . +.BR False . If the converter was registered with cache type -.ZN XtCacheNone +.B XtCacheNone or no value was found in the conversion cache, -.ZN XtCallConverter +.B XtCallConverter calls the converter and, if it was not registered with cache type -.ZN XtCacheNone , +.BR XtCacheNone , enters the result into the cache. -.ZN XtCallConverter +.B XtCallConverter then returns what the converter returned. .LP The \fIcache_ref_return\fP field specifies storage allocated by the -caller in which an opaque value will be stored. If the type converter +caller in which an opaque value will be stored. +If the type converter has been registered with the -.ZN XtCacheRefCount +.B XtCacheRefCount modifier and if the value returned in in \fIcache_ref_return\fP is non-NULL, then the call should store the \fIcache_ref_return\fP value in order to decrement the reference count when the converted value -is no longer required. The \fIcache_ref_return\fP argument should be +is no longer required. +The \fIcache_ref_return\fP argument should be NULL if the caller is unwilling or unable to store the value. .SH "SEE ALSO" XtAppReleaseCacheRefs(__libmansuffix__) diff --git a/lib/libXt/man/XtCreateApplicationContext.man b/lib/libXt/man/XtCreateApplicationContext.man index aabb682ce..1db8c60f6 100644 --- a/lib/libXt/man/XtCreateApplicationContext.man +++ b/lib/libXt/man/XtCreateApplicationContext.man @@ -32,40 +32,14 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtCreate-Application-Context XtDestroy-Application-Context XtWidget-To-Application-Context XtToolkit-Initialize wid-get +.hw XtCreate-Application-Context XtDestroy-Application-Context +.hw XtWidget-To-Application-Context XtToolkit-Initialize wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreateApplicationContext __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCreateApplicationContext, XtDestroyApplicationContext, XtWidgetToApplicationContext, XtToolkitInitialize \- create, destroy, and obtain an application context .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtAppContext XtCreateApplicationContext(void); .HP @@ -77,33 +51,32 @@ void XtToolkitInitialize(void); .SH ARGUMENTS .IP \fIapp_context\fP 1i Specifies the application context. -.ds wi that you want the application context for .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that you want the application context for. .SH DESCRIPTION The -.ZN XtCreateApplicationContext +.B XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context. .LP The -.ZN XtDestroyApplicationContext +.B XtDestroyApplicationContext function destroys the specified application context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), -.ZN XtDestroyApplicationContext +.B XtDestroyApplicationContext does not destroy the application context until the dispatch is complete. .LP The -.ZN XtWidgetToApplicationContext +.B XtWidgetToApplicationContext function returns the application context for the specified widget. .LP The -.ZN XtToolkitInitialize +.B XtToolkitInitialize function initializes the Intrinsics internals. If -.ZN XtToolkitInitialize +.B XtToolkitInitialize was previously called it returns immediately. .LP .SH "SEE ALSO" diff --git a/lib/libXt/man/XtCreateApplicationShell.man b/lib/libXt/man/XtCreateApplicationShell.man index f9ac5ceae..eb4f8854a 100644 --- a/lib/libXt/man/XtCreateApplicationShell.man +++ b/lib/libXt/man/XtCreateApplicationShell.man @@ -34,41 +34,14 @@ .ds Vn 2.2 .hw XtApp-Create-Application-Shell wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreateApplicationShell __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtCreateApplicationShell \- create top-level widget instance .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtCreateApplicationShell(String \fIname\fP, WidgetClass -\fIwidget_class\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); +Widget XtCreateApplicationShell(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, +ArgList \fIargs\fP, Cardinal \fInum_args\fP); .SH ARGUMENTS .IP \fIname\fP 1i Specifies the name of the shell. @@ -78,15 +51,15 @@ Specifies the argument list to override any other resource specifications. Specifies the number of arguments in the argument list. .SH DESCRIPTION The procedure -.ZN XtCreateApplicationShell +.B XtCreateApplicationShell calls -.ZN XtAppCreateShell +.B XtAppCreateShell with the \fIapplication\fP NULL, the application class passed to -.ZN XtInitialize , +.BR XtInitialize , and the default application context created by -.ZN XtInitialize . +.BR XtInitialize . This routine has been replaced by -.ZN XtAppCreateShell . +.BR XtAppCreateShell . .SH "SEE ALSO" XtAppCreateShell(__libmansuffix__) .br diff --git a/lib/libXt/man/XtCreatePopupShell.man b/lib/libXt/man/XtCreatePopupShell.man index 1aaf07dab..911a56da4 100644 --- a/lib/libXt/man/XtCreatePopupShell.man +++ b/lib/libXt/man/XtCreatePopupShell.man @@ -32,75 +32,48 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtCreate-Popup-Shell XtVaCreate-Popup-Shell wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreatePopupShell __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCreatePopupShell, XtVaCreatePopupShell \- create a popup shell .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtCreatePopupShell(String \fIname\fP, WidgetClass \fIwidget_class\fP, +Widget XtCreatePopupShell(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaCreatePopupShell(String \fIname\fP, WidgetClass \fIwidget_class\fP, +Widget XtVaCreatePopupShell(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ...\^); .SH ARGUMENTS -.ds Al to override the resource defaults .IP \fIargs\fP 1i -Specifies the argument list \*(Al. -.ds Sh \ shell +Specifies the argument list to override the resource defaults. .IP \fIname\fP 1i -Specifies the text name for the created\*(Sh widget. +Specifies the text name for the created shell widget. .IP \fInum_args\fP 1i Specifies the number of arguments in the argument list. .IP \fIparent\fP 1i Specifies the parent widget. -.ds Wc \ pointer for the created shell widget .IP \fIwidget_class\fP 1i -Specifies the widget class\*(Wc. +Specifies the widget class pointer for the created shell widget. .IP \fI...\fP 1i -Specifies the variable argument list \*(Al. +Specifies the variable argument list to override the resource defaults. .SH DESCRIPTION The -.ZN XtCreatePopupShell +.B XtCreatePopupShell function ensures that the specified class is a subclass of -.ZN Shell +.B Shell and, rather than using insert_child to attach the widget to the parent's -.IN "insert_child procedure" children list, attaches the shell to the parent's pop-ups list directly. .LP A spring-loaded pop-up invoked from a translation table already must exist at the time that the translation is invoked, so the translation manager can find the shell by name. -Pop-ups invoked in other ways can be created ``on-the-fly'' when +Pop-ups invoked in other ways can be created \*(``on-the-fly\*('' when the pop-up actually is needed. This delayed creation of the shell is particularly useful when you pop up an unspecified number of pop-ups. diff --git a/lib/libXt/man/XtCreateSelectionRequest.man b/lib/libXt/man/XtCreateSelectionRequest.man index e01289cb6..ea31ae313 100644 --- a/lib/libXt/man/XtCreateSelectionRequest.man +++ b/lib/libXt/man/XtCreateSelectionRequest.man @@ -31,42 +31,16 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtCreate-Selection-Request XtSend-Selection-Request XtCancel-Selection-Request wid-get +.hw XtCreate-Selection-Request XtSend-Selection-Request +.hw XtCancel-Selection-Request wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreateSelectionRequest __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCreateSelectionRequest, XtSendSelectionRequest, XtCancelSelectionRequest \- bundle multiple selection conversion requests into a single request using MULTIPLE target .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtCreateSelectionRequest(Widget \fIrequestor\fP, Atom \fIselection\fP): +void XtCreateSelectionRequest(Widget \fIrequestor\fP, Atom \fIselection\fP); .HP void XtSendSelectionRequest(Widget \fIrequestor\fP, Atom \fIselection\fP, Time \fItime\fP); @@ -74,7 +48,8 @@ void XtSendSelectionRequest(Widget \fIrequestor\fP, Atom \fIselection\fP, Time void XtCancelSelectionRequest(Widget \fIrequestor\fP, Atom \fIselection\fP); .SH ARGUMENTS .IP \fIrequestor\fP 1i -Specifies the widget making the request. Must be of class Core or a +Specifies the widget making the request. +Must be of class Core or a subclass thereof. .IP \fIselection\fP 1i Specifies the particular selection desired. @@ -82,51 +57,55 @@ Specifies the particular selection desired. Specifies the timestamp to be used in making the request. .SH DESCRIPTION When -.ZN XtCreateSelectionRequest +.B XtCreateSelectionRequest is called, subsequent calls to -.ZN XtGetSelectionValue +.B XtGetSelectionValue and -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental with the requestor and selection as specified to -.ZN XtCreateSelectionRequest +.B XtCreateSelectionRequest will be bundled into a single selection conversion request with -multiple targets. The request is actually initiated by calling -.ZN XtSendSelectionRequest . +multiple targets. +The request is actually initiated by calling +.BR XtSendSelectionRequest . .LP When -.ZN XtSendSelectionRequest +.B XtSendSelectionRequest is called with a value of \fIrequestor\fP and \fIselection\fP matching a previous call to -.ZN XtCreateSelectionRequest , +.BR XtCreateSelectionRequest , a selection conversion request is actually sent to the selection owner. -If a single target request is queued, that request is made. If multiple +If a single target request is queued, that request is made. +If multiple targets are queued they are bundled into a single request with the -target MULTIPLE using the specified timestamp. As the conversions are +target MULTIPLE using the specified timestamp. +As the conversions are made, the callbacks associated with each -.ZN XtGetSelectionValue +.B XtGetSelectionValue and -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental are invoked in turn. .LP Multi-threaded applications should lock the application context before calling -.ZN XtCreateSelectionRequest +.B XtCreateSelectionRequest and release the lock after calling -.ZN XtSendSelectionRequest +.B XtSendSelectionRequest to ensure that the thread assembling the request is safe from interference by another thread assembling a different request naming the same widget and selection. .LP When -.ZN XtCancelSelectionRequest +.B XtCancelSelectionRequest is called, any requests queued since the last call to -.ZN XtCreateSelectionRequest -are cleaned up. Subsequent calls to -.ZN XtGetSelectionValue , -.ZN XtGetSelectionValues , -.ZN XtGetSelectionValueIncremental , +.B XtCreateSelectionRequest +are cleaned up. +Subsequent calls to +.BR XtGetSelectionValue , +.BR XtGetSelectionValues , +.BR XtGetSelectionValueIncremental , and -.ZN XtGetSelectionValuesIncremental +.B XtGetSelectionValuesIncremental will not be deferred. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtCreateWidget.man b/lib/libXt/man/XtCreateWidget.man index 3e6475dd1..286c93087 100644 --- a/lib/libXt/man/XtCreateWidget.man +++ b/lib/libXt/man/XtCreateWidget.man @@ -32,59 +32,32 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtCreate-Widget XtCreate-Managed-Widget XtDestroy-Widget XtVa-Create-Widget XtVa-Create-Managed-Widget wid-get +.hw XtCreate-Widget XtCreate-Managed-Widget XtDestroy-Widget +.hw XtVa-Create-Widget XtVa-Create-Managed-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreateWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCreateWidget, XtVaCreateWidget, XtCreateManagedWidget, XtVaCreateManagedWidget, XtDestroyWidget \- create and destroy widgets .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtCreateWidget(String \fIname\fP, WidgetClass \fIwidget_class\fP, +Widget XtCreateWidget(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaCreateWidget(String \fIname\fP, WidgetClass \fIwidget_class\fP, +Widget XtVaCreateWidget(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ...\^); .HP -Widget XtCreateManagedWidget(String \fIname\fP, WidgetClass +Widget XtCreateManagedWidget(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaCreateManagedWidget(String \fIname\fP, WidgetClass +Widget XtVaCreateManagedWidget(const char *\fIname\fP, WidgetClass \fIwidget_class\fP, Widget \fIparent\fP, ...\^); .HP void XtDestroyWidget(Widget \fIw\fP); .SH ARGUMENTS -.ds Al to override the resource defaults .IP \fIargs\fP 1i -Specifies the argument list \*(Al. +Specifies the argument list to override the resource defaults. .IP \fIname\fP 1i Specifies the resource name for the created widget, which is used for retrieving resources @@ -96,14 +69,13 @@ Specifies the number of arguments in the argument list. Specifies the parent widget. .IP \fIw\fP 1i Specifies the widget. -.ds Wc \ pointer for the created widget .IP \fIwidget_class\fP 1i -Specifies the widget class\*(Wc. +Specifies the widget class pointer for the created widget. .IP \fI...\fP -Specifies the variable argument list \*(Al. +Specifies the variable argument list to override the resource defaults. .SH DESCRIPTION The -.ZN XtCreateWidget +.B XtCreateWidget function performs much of the boilerplate operations of widget creation: .IP \(bu 5 Checks to see if the class_initialize procedure has been called for this class @@ -113,7 +85,7 @@ superclass-to-subclass order. Allocates memory for the widget instance. .IP \(bu 5 If the parent is a subclass of -.ZN constraintWidgetClass , +.BR constraintWidgetClass , it allocates memory for the parent's constraints and stores the address of this memory into the constraints field. .IP \(bu 5 @@ -124,45 +96,45 @@ Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses. .IP \(bu 5 If the parent is a subclass of -.ZN constraintWidgetClass , +.BR constraintWidgetClass , it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent's class and all superclasses up to -.ZN constraintWidgetClass . +.BR constraintWidgetClass . .IP \(bu 5 Calls the initialize procedures for the widget by starting at the -.ZN Core +.B Core initialize procedure on down to the widget's initialize procedure. .IP \(bu 5 If the parent is a subclass of -.ZN compositeWidgetClass , +.BR compositeWidgetClass , it puts the widget into its parent's children list by calling its parent's insert_child procedure. For further information, see Section 3.5. .IP \(bu 5 If the parent is a subclass of -.ZN constraintWidgetClass , +.BR constraintWidgetClass , it calls the constraint initialize procedures, starting at -.ZN constraintWidgetClass +.B constraintWidgetClass on down to the parent's constraint initialize procedure. .LP Note that you can determine the number of arguments in an argument list by using the -.ZN XtNumber +.B XtNumber macro. For further information, see Section 11.1. .LP The -.ZN XtCreateManagedWidget +.B XtCreateManagedWidget function is a convenience routine that calls -.ZN XtCreateWidget +.B XtCreateWidget and -.ZN XtManageChild . +.BR XtManageChild . .LP The -.ZN XtDestroyWidget +.B XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, @@ -171,16 +143,16 @@ This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets. .LP In phase one, -.ZN XtDestroyWidget +.B XtDestroyWidget performs the following: .IP \(bu 5 If the being_destroyed field of the widget is -.ZN True , +.BR True , it returns immediately. .IP \(bu 5 Recursively descends the widget tree and sets the being_destroyed field to -.ZN True +.B True for the widget and all children. .IP \(bu 5 Adds the widget to a list of widgets (the destroy list) that should be @@ -194,12 +166,12 @@ Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of -.ZN XtDispatchEvent +.B XtDispatchEvent is about to return or immediately if not in -.ZN XtDispatchEvent . +.BR XtDispatchEvent . .LP In phase two, -.ZN XtDestroyWidget +.B XtDestroyWidget performs the following on each entry in the destroy list: .IP \(bu 5 Calls the destroy callback procedures registered on the widget @@ -207,19 +179,19 @@ Calls the destroy callback procedures registered on the widget before parent callbacks). .IP \(bu 5 If the widget's parent is a subclass of -.ZN compositeWidgetClass +.B compositeWidgetClass and if the parent is not being destroyed, it calls -.ZN XtUnmanageChild +.B XtUnmanageChild on the widget and then calls the widget's parent's delete_child procedure (see Section 3.4). .IP \(bu 5 If the widget's parent is a subclass of -.ZN constraintWidgetClass , +.BR constraintWidgetClass , it calls the constraint destroy procedure for the parent, then the parent's superclass, until finally it calls the constraint destroy procedure for -.ZN constraintWidgetClass . +.BR constraintWidgetClass . .IP \(bu 5 Calls the destroy methods for the widget (and all descendants) in post-order. @@ -230,13 +202,13 @@ until finally it calls the destroy procedure declared in the Core class record. .IP \(bu 5 Calls -.ZN XDestroyWindow +.B XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows. .IP \(bu 5 Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of -.ZN compositeWidgetClass , +.BR compositeWidgetClass , children. .SH "SEE ALSO" XtAppCreateShell(__libmansuffix__), diff --git a/lib/libXt/man/XtCreateWindow.man b/lib/libXt/man/XtCreateWindow.man index e997f06f7..a7ffe6ea4 100644 --- a/lib/libXt/man/XtCreateWindow.man +++ b/lib/libXt/man/XtCreateWindow.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtCreate-Window wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtCreateWindow __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtCreateWindow \- window creation convenience function .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtCreateWindow(Widget \fIw\fP, unsigned int \fIwindow_class\fP, Visual *\fIvisual\fP, XtValueMask \fIvalue_mask\fP, XSetWindowAttributes @@ -73,34 +46,32 @@ void XtCreateWindow(Widget \fIw\fP, unsigned int \fIwindow_class\fP, Visual .SH ARGUMENTS .IP \fIattributes\fP 1i Specifies the window attributes to use in the -.ZN XCreateWindow +.B XCreateWindow call. -.ds Vm attribute fields to use .IP \fIvalue_mask\fP 1i -Specifies which \*(Vm. +Specifies which attribute fields to use. .IP \fIvisual\fP 1i Specifies the visual type (usually -.ZN CopyFromParent ). -.ds Wi that is used to set the x,y coordinates and so on +.BR CopyFromParent ). .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that is used to set the x,y coordinates and so on. .IP \fIwindow_class\fP 1i Specifies the Xlib window class (for example, -.ZN InputOutput , -.ZN InputOnly , +.BR InputOutput , +.BR InputOnly , or -.ZN CopyFromParent ). +.BR CopyFromParent ). .SH DESCRIPTION The -.ZN XtCreateWindow +.B XtCreateWindow function calls the Xlib -.ZN XCreateWindow +.B XCreateWindow function with values from the widget structure and the passed parameters. Then, it assigns the created window to the widget's window field. .LP -.ZN XtCreateWindow +.B XtCreateWindow evaluates the following fields of the -.ZN Core +.B Core widget structure: .IP \(bu 5 depth diff --git a/lib/libXt/man/XtDisplay.man b/lib/libXt/man/XtDisplay.man index 3998ed760..06d327cbb 100644 --- a/lib/libXt/man/XtDisplay.man +++ b/lib/libXt/man/XtDisplay.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtDisplay-Of-Object XtScreen-Of-Object XtWindow-Of-Object wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtDisplay __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtDisplay, XtDisplayOfObject, XtScreen, XtScreenOfObject, XtWindow, XtWindowOfObject \- obtain window information about a widget .SH SYNTAX +#include <X11/Intrinsic.h> .HP Display *XtDisplay(Widget \fIw\fP); .HP @@ -84,22 +57,22 @@ Specifies the widget. .IP \fIobject\fP 1i Specifies the widget. .SH DESCRIPTION -.ZN XtDisplay +.B XtDisplay returns the display pointer for the specified widget. .LP -.ZN XtDisplayOfObject +.B XtDisplayOfObject returns the display pointer for the specified object. .LP -.ZN XtScreen +.B XtScreen returns the screen pointer for the specified widget. .LP -.ZN XtScreenOfObject +.B XtScreenOfObject returns the screen pointer for the specified object. .LP -.ZN XtWindow +.B XtWindow returns the window of the specified widget. .LP -.ZN XtWindowOfObject +.B XtWindowOfObject returns the window of the specified object. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtDisplayInitialize.man b/lib/libXt/man/XtDisplayInitialize.man index 63bcceecb..f0b6954a9 100644 --- a/lib/libXt/man/XtDisplayInitialize.man +++ b/lib/libXt/man/XtDisplayInitialize.man @@ -31,50 +31,28 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtDisplay-Initialize XtOpen-Display XtClose-Display XtDatabase XtScreen-Database wid-get +.hw XtDisplay-Initialize XtOpen-Display XtClose-Display XtDatabase +.hw XtScreen-Database wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtDisplayInitialize __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtDisplayInitialize, XtOpenDisplay, XtDatabase, XtScreenDatabase, XtCloseDisplay \- initialize, open, or close a display .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtDisplayInitialize(XtAppContext \fIapp_context\fP, Display -*\fIdisplay\fP, String \fIapplication_name\fP, String \fIapplication_class\fP, -XrmOptionDescRec *\fIoptions\fP, Cardinal \fInum_options\fP, int *\fIargc\fP, -String *\fIargv\fP); +void XtDisplayInitialize(XtAppContext \fIapp_context\fP, +Display *\fIdisplay\fP, +const char *\fIapplication_name\fP, +const char *\fIapplication_class\fP, +XrmOptionDescRec *\fIoptions\fP, Cardinal \fInum_options\fP, +int *\fIargc\fP, char **\fIargv\fP); .HP -Display *XtOpenDisplay(XtAppContext \fIapp_context\fP, String -\fIdisplay_string\fP, String \fIapplication_name\fP, String -\fIapplication_class\fP, XrmOptionDescRec *\fIoptions\fP, Cardinal -\fInum_options\fP, int *\fIargc\fP, String *\fIargv\fP); +Display *XtOpenDisplay(XtAppContext \fIapp_context\fP, +const char *\fIdisplay_string\fP, +const char *\fIapplication_name\fP, +const char *\fIapplication_class\fP, +XrmOptionDescRec *\fIoptions\fP, Cardinal \fInum_options\fP, +int *\fIargc\fP, char **\fIargv\fP); .HP void XtCloseDisplay(Display *\fIdisplay\fP); .HP @@ -88,33 +66,32 @@ Specifies a pointer to the number of command line parameters. Specifies the command line parameters. .IP \fIapp_context\fP 1i Specifies the application context. -.ds Ac , which usually is the generic name for all instances of this application .IP \fIapplication_class\fP 1i -Specifies the class name of this application\*(Ac. +Specifies the class name of this application, which usually is the generic name for all instances of this application. .IP \fIapplication_name\fP 1i Specifies the name of the application instance. .IP \fIdisplay\fP 1i -Specifies the display\*(Di. +Specifies the display. Note that a display can be in at most one application context. .IP \fInum_options\fP 1i Specifies the number of entries in the options list. .IP \fIoptions\fP 1i Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to -.ZN XrmParseCommand . +.BR XrmParseCommand . For further information, see \fI\*(xL\fP. .IP \fIscreen\fP 1i Specifies the screen whose resource database is to be returned. .SH DESCRIPTION The -.ZN XtDisplayInitialize +.B XtDisplayInitialize function builds the resource database, calls the Xlib -.ZN XrmParseCommand +.B XrmParseCommand function to parse the command line, and performs other per display initialization. After -.ZN XrmParseCommand +.B XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the @@ -125,77 +102,78 @@ listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is -.ZN True +.B True for the specified application, -.ZN XtDisplayInitialize +.B XtDisplayInitialize calls the Xlib -.ZN XSynchronize +.B XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is -.ZN True , +.BR True , the \*(xI exchange -.ZN XtDefaultForeground +.B XtDefaultForeground and -.ZN XtDefaultBackground +.B XtDefaultBackground for widgets created on this display. (See Section 9.6.1). .LP The -.ZN XtOpenDisplay +.B XtOpenDisplay function calls -.ZN XOpenDisplay +.B XOpenDisplay the specified display name. If display_string is NULL, -.ZN XtOpenDisplay +.B XtOpenDisplay uses the current value of the \-display option specified in argv and if no display is specified in argv, uses the user's default display (on UNIX-based systems, this is the value of the DISPLAY environment variable). .LP If this succeeds, it then calls -.ZN XtDisplayInitialize +.B XtDisplayInitialize and pass it the opened display and the value of the \-name option specified in argv as the application name. If no name option is specified, it uses the application name passed to -.ZN XtOpenDisplay . +.BR XtOpenDisplay . If the application name is NULL, it uses the last component of argv[0]. -.ZN XtOpenDisplay +.B XtOpenDisplay returns the newly opened display or NULL if it failed. .LP -.ZN XtOpenDisplay +.B XtOpenDisplay is provided as a convenience to the application programmer. .LP The -.ZN XtCloseDisplay +.B XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), -.ZN XtCloseDisplay +.B XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call -.ZN XtCloseDisplay +.B XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call -.ZN XtDestroyApplicationContext +.B XtDestroyApplicationContext or just exit. .LP The -.ZN XtDatabase +.B XtDatabase function returns the fully merged resource database that was built by -.ZN XtDisplayInitialize +.B XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by -.ZN XtDisplayInitialize , +.BR XtDisplayInitialize , the results are not defined. .LP The -.ZN XtScreenDatabase +.B XtScreenDatabase function returns the fully merged resource database associated with the -specified screen. If the \fIscreen\fP does not belong to a -.ZN Display +specified screen. +If the \fIscreen\fP does not belong to a +.B Display initialized by -.ZN XtDisplayInitialize , +.BR XtDisplayInitialize , the results are undefined. .SH "SEE ALSO" XtAppCreateShell(__libmansuffix__), diff --git a/lib/libXt/man/XtDisplayStringConversionWarning.man b/lib/libXt/man/XtDisplayStringConversionWarning.man index ce0ee11f1..3e0b0c98c 100644 --- a/lib/libXt/man/XtDisplayStringConversionWarning.man +++ b/lib/libXt/man/XtDisplayStringConversionWarning.man @@ -32,43 +32,21 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtDisplay-String-Conversion-Warning wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtDisplayStringConversionWarning __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtDisplayStringConversionWarning \- issue a conversion warning message .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtDisplayStringConversionWarning(Display* \fIdisplay\fP, String -\fIfrom_value\fP, \fIto_type\fP); +void XtDisplayStringConversionWarning(Display* \fIdisplay\fP, +const char *\fIfrom_value\fP, +const char *\fIto_type\fP); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the display connection with which the conversion is associated. @@ -78,18 +56,20 @@ Specifies the string that could not be converted. Specifies the target representation type requested. .SH DESCRIPTION The -.ZN XtDisplayStringConversionWarning +.B XtDisplayStringConversionWarning function issues a warning message using -.ZN XtAppWarningMsg -with name ``conversionError'', type ``string'', class ``XtToolkitError, -and the default message string ``Cannot convert "\fIfrom_value\fP" to -type \fIto_type\fP''. +.B XtAppWarningMsg +with name \*(``conversionError\*('', +type \*(``string\*('', +class \*(``XtToolkitError\*('', +and the default message string +\*(``Cannot convert "\fIfrom_value\fP" to type \fIto_type\fP\*(''. .LP To issue other types of warning or error messages, the type converter should use -.ZN XtAppWarningMsg +.B XtAppWarningMsg or -.ZN XtAppErrorMsg . +.BR XtAppErrorMsg . .SH "SEE ALSO" XtAppWarningMsg(3t) .br diff --git a/lib/libXt/man/XtDisplayToApplicationContext.man b/lib/libXt/man/XtDisplayToApplicationContext.man index 43f10d5a5..89837678b 100644 --- a/lib/libXt/man/XtDisplayToApplicationContext.man +++ b/lib/libXt/man/XtDisplayToApplicationContext.man @@ -33,47 +33,19 @@ .ds Vn 2.2 .hw XtDisplay-To-Application-Context wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtDisplayToApplicationContext __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtDisplayToApplicationContext \- obtain an application context .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtAppContext XtDisplayToApplicationContext(Display* \fIdpy\fP); .SH ARGUMENTS -.ds Wi that you want the application context for .IP \fIdpy\fP 1i -Specifies the display \*(Wi. +Specifies the display that you want the application context for. .SH DESCRIPTION The -.ZN XtDisplayToApplicationContext +.B XtDisplayToApplicationContext function returns the application context for the specified display. .SH "SEE ALSO" \fI\*(xT\fP diff --git a/lib/libXt/man/XtError.man b/lib/libXt/man/XtError.man index 449f7d07b..1c7e819de 100644 --- a/lib/libXt/man/XtError.man +++ b/lib/libXt/man/XtError.man @@ -33,76 +33,47 @@ .ds Vn 2.2 .hw XtError XtSet-Error-Handler XtSet-Warning-Handler XtWarning wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtError __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtError, XtSetErrorHandler, XtSetWarningHandler, XtWarning \- low-level error handlers .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtError(String \fImessage\fP); +void XtError(const char *\fImessage\fP); .HP -void XtSetErrorHandler(XtErrorHandler \fIhandler\fP): +void XtSetErrorHandler(XtErrorHandler \fIhandler\fP); .HP void XtSetWarningHandler(XtErrorHandler \fIhandler\fP); .HP -void XtWarning(String \fImessage\fP); +void XtWarning(const char *\fImessage\fP); .SH ARGUMENTS .IP \fImessage\fP 1i Specifies the nonfatal error message that is to be reported. -.ds Ha fatal error procedure, which should not return, \ -or the nonfatal error procedure, which usually returns .IP \fIhandler\fP 1i -Specifies the new \*(Ha. -.ds Me reported +Specifies the new fatal error procedure, which should not return, +or the nonfatal error procedure, which usually returns. .IP \fImessage\fP 1i -Specifies the message that is to be \*(Me. +Specifies the message that is to be reported. .SH DESCRIPTION The -.ZN XtError +.B XtError function has been superceded by -.ZN XtAppError . +.BR XtAppError . .LP The -.ZN XtSetErrorHandler +.B XtSetErrorHandler function has been superceded by -.ZN XtAppSetErrorHandler . +.BR XtAppSetErrorHandler . .LP The -.ZN XtSetWarningHandler +.B XtSetWarningHandler function has been superceded by -.ZN XtAppSetWarningHandler . +.BR XtAppSetWarningHandler . .LP The -.ZN XtWarning +.B XtWarning function has been superceded by -.ZN XtAppWarning . +.BR XtAppWarning . .SH "SEE ALSO" .BR XtAppError (__libmansuffix__) .br diff --git a/lib/libXt/man/XtErrorMsg.man b/lib/libXt/man/XtErrorMsg.man index 870a9a3a1..6f7371fbd 100644 --- a/lib/libXt/man/XtErrorMsg.man +++ b/lib/libXt/man/XtErrorMsg.man @@ -31,88 +31,66 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtError-Msg XtSet-Error-Msg-Handler XtSet-Warning-Msg-Handler XtWarning-Msg wid-get +.hw XtError-Msg XtSet-Error-Msg-Handler XtSet-Warning-Msg-Handler +.hw XtWarning-Msg wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtErrorMsg __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtErrorMsg, XtSetErrorMsgHandler, XtWarningMsg, XtSetWarningMsgHandler \- high-level error handlers .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtErrorMsg(String \fIname\fP, String \fItype\fP, String \fIclass\fP, -String \fIdefault\fP, String *\fIparams\fP, Cardinal *\fInum_params\fP); +void XtErrorMsg(const char *\fIname\fP, +const char *\fItype\fP, +const char *\fIclass\fP, +const char *\fIdefaultMsg\fP, +String *\fIparams\fP, Cardinal *\fInum_params\fP); .HP void XtSetErrorMsgHandler(XtErrorMsgHandler \fImsg_handler\fP); .HP void XtSetWarningMsgHandler(XtErrorMsgHandler \fImsg_handler\fP); .HP -void XtWarningMsg(String \fIname\fP, String \fItype\fP, String \fIclass\fP, -String \fIdefault\fP, String *\fIparams\fP, Cardinal *\fInum_params\fP); +void XtWarningMsg(const char *\fIname\fP, +const char *\fItype\fP, +const char *\fIclass\fP, +const char *\fIdefaultMsg\fP, +String *\fIparams\fP, Cardinal *\fInum_params\fP); .SH ARGUMENTS -.ds Cl .IP \fIclass\fP 1i -Specifies the resource class\*(Cl. +Specifies the resource class of the error message. .IP \fIdefault\fP 1i -Specifies the default message to use\*(Dm. +Specifies the default message to use. .IP \fIname\fP 1i Specifies the general kind of error. .IP \fItype\fP 1i Specifies the detailed name of the error. -.ds Mh fatal error procedure, which should not return \ -or the nonfatal error procedure, which usually returns .IP \fImsg_handler\fP 1i -Specifies the new \*(Mh. +Specifies the new fatal error procedure, which should not return +or the nonfatal error procedure, which usually returns. .IP \fInum_params\fP 1i Specifies the number of values in the parameter list. .IP \fIparams\fP 1i Specifies a pointer to a list of values to be stored in the message. .SH DESCRIPTION The -.ZN XtErrorMsg +.B XtErrorMsg function has been superceded by -.ZN XtAppErrorMsg . +.BR XtAppErrorMsg . .LP The -.ZN XtSetErrorMsgHandler +.B XtSetErrorMsgHandler function has been superceded by -.ZN XtAppSetErrorMsgHandler . +.BR XtAppSetErrorMsgHandler . .LP The -.ZN XtSetWarningMsgHandler +.B XtSetWarningMsgHandler function has been superceded by -.ZN XtAppSetWarningMsgHandler . +.BR XtAppSetWarningMsgHandler . .LP The -.ZN XtWarningMsg +.B XtWarningMsg function has been superceded by -.ZN XtAppWarningMsg +.B XtAppWarningMsg .SH "SEE ALSO" .BR XtAppErrorMsg (__libmansuffix__) .br diff --git a/lib/libXt/man/XtFindFile.man b/lib/libXt/man/XtFindFile.man index ced90be50..2a361b2cb 100644 --- a/lib/libXt/man/XtFindFile.man +++ b/lib/libXt/man/XtFindFile.man @@ -31,42 +31,19 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtFind-File wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtFindFile __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtFindFile \- search for a file using substitutions in the path list .SH SYNTAX +#include <X11/Intrinsic.h> .HP -String XtFindFile(String \fIpath\fP, Substitution \fIsubstitutions\fP, +char * XtFindFile(const char *\fIpath\fP, Substitution \fIsubstitutions\fP, Cardinal \fInum_substitutions\fP, XtFilePredicate \fIpredicate\fP); .SH ARGUMENTS .IP \fIpath\fP 1i @@ -79,45 +56,53 @@ Specifies the number of substitutions passed in. Specifies a procedure to call to judge a potential file name, or NULL. .SH DESCRIPTION The \fIpath\fP parameter specifies a string that consists of a series of -potential file names delimited by colons. Within each name, the +potential file names delimited by colons. +Within each name, the percent character specifies a string substitution selected by the -following character. The character sequence ``%:'' specifies an +following character. +The character sequence \*(``%:\*('' specifies an embedded colon that is not a delimiter; the sequence is replaced by a -single colon. The character sequence ``%%'' specifies a percent +single colon. +The character sequence \*(``%%\*('' specifies a percent character that does not introduce a substitution; the sequence is -replaced by a single percent character. If a percent character is +replaced by a single percent character. +If a percent character is followed by any other character, -.ZN XtFindFile +.B XtFindFile looks through the specified \fIsubstitutions\fP for that character in the \fImatch\fP field and if found replaces the percent and match characters with the string in the -corresponding \fIsubstitution\fP field. A \fIsubstitution\fP field entry of NULL -is equivalent to a pointer to an empty string. If the operating +corresponding \fIsubstitution\fP field. +A \fIsubstitution\fP field entry of NULL +is equivalent to a pointer to an empty string. +If the operating system does not interpret multiple embedded name separators in the -path (i.e., ``/'' in POSIX) the same way as a single separator, -.ZN XtFindFile +path (i.e., \*(``/\*('' in POSIX) the same way as a single separator, +.B XtFindFile will collapse multiple separators into a single one after performing -all string substitutions. Except for collapsing embedded separators, +all string substitutions. +Except for collapsing embedded separators, the contents of the string substitutions are not interpreted by -.ZN XtFindFile +.B XtFindFile and may therefore contain any operating-system-dependent -characters, including additional name separators. Each resulting +characters, including additional name separators. +Each resulting string is passed to the predicate procedure until a string is found for which the procedure returns -.ZN True ; +.BR True ; this string is the return value for -.ZN XtFindFile . +.BR XtFindFile . If no string yields a -.ZN True +.B True return from the predicate, -.ZN XtFindFile +.B XtFindFile returns NULL. .LP If the \fIpredicate\fP parameter is NULL, an internal procedure that checks if the file exists, is readable, and is not a directory will be used. .LP It is the responsibility of the caller to free the returned string using -.ZN XtFree +.B XtFree when it is no longer needed. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetActionKeysym.man b/lib/libXt/man/XtGetActionKeysym.man index f5dd21f83..c529d81d1 100644 --- a/lib/libXt/man/XtGetActionKeysym.man +++ b/lib/libXt/man/XtGetActionKeysym.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Action-Keysym wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetActionKeysym __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetActionKeysym \- obtain corresponding keysym .SH SYNTAX +#include <X11/Intrinsic.h> .HP KeySym XtGetActionKeysym(XEvent* \fIevent\fP, Modifiers* \fImodifiers_return\fP); @@ -76,29 +49,29 @@ Intrinsics. Returns the modifiers that caused the match, if non-NULL. .SH DESCRIPTION If -.ZN XtGetActionKeysym +.B XtGetActionKeysym is called after an action procedure has been invoked by the Intrinsics and before that action procedure returns, and if the event pointer has the same value as the event pointer passed to that action routine, and if the event is a -.ZN KeyPress +.B KeyPress or -.ZN KeyRelease +.B KeyRelease event, then -.ZN XtGetActionKeysym +.B XtGetActionKeysym returns the KeySym that matched the final event specification in the translation table and, if \fImodifiers_return\fP is non-NULL, the modifier state actually used to generate this KeySym; otherwise, if the event is a -.ZN KeyPress +.B KeyPress or -.ZN KeyRelease +.B KeyRelease event, then -.ZN XtGetActionKeysym +.B XtGetActionKeysym calls -.ZN XtTranslateKeycode +.B XtTranslateKeycode and returns the results; else it returns -.ZN NoSymbol +.B NoSymbol and does not examine \fImodifiers_return\fP. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetActionList.man b/lib/libXt/man/XtGetActionList.man index b9e7f57bc..9c62a1734 100644 --- a/lib/libXt/man/XtGetActionList.man +++ b/lib/libXt/man/XtGetActionList.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Action-List wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetActionList __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetActionList \- obtain class action list .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetActionList(WidgetClass \fIwidget_class\fP, XtActionList* \fIactions_return\fP, Cardinal* \fInum_actions_return\fP); @@ -76,16 +49,19 @@ Returns the action list. .IP \fInum_actions_return\fP 1i Returns the number of action procedures declared by the class. .SH DESCRIPTION -.ZN XtGetActionList -returns the action table defined by the specified widget class. This -table does not include actions defined by the superclasses. If +.B XtGetActionList +returns the action table defined by the specified widget class. +This +table does not include actions defined by the superclasses. +If \fIwidget_class\fP is not initialized, or is not -.ZN coreWidgetClass +.B coreWidgetClass or a subclass thereof, or if the class does not define any actions, *\fIactions_return\fP will be NULL and *\fInum_actions_return\fP will -be zero. If *\fIactions_return\fP is non-NULL the client is responsible +be zero. +If *\fIactions_return\fP is non-NULL the client is responsible for freeing the table using -.ZN XtFree +.B XtFree when it is no longer needed. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetApplicationNameAndClass.man b/lib/libXt/man/XtGetApplicationNameAndClass.man index 56a06e0eb..7ce6f8a67 100644 --- a/lib/libXt/man/XtGetApplicationNameAndClass.man +++ b/lib/libXt/man/XtGetApplicationNameAndClass.man @@ -33,55 +33,30 @@ .ds Vn 2.2 .hw XtGet-Application-Name-And-Class wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetApplicationNameAndClass __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetApplicationNameAndClass \- retrieve application name and class .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetApplicationNameAndClass(Display* \fIdisplay\fP, String* \fIname_return\fP, String* \fIclass_return\fP); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies an open display connection that has been initialized with -.ZN XtDisplayInitialize . +.BR XtDisplayInitialize . .IP \fIname_return\fP 1i Returns the application name. .IP \fIclass_return\fP 1i Returns the application class. .SH DESCRIPTION -.ZN XtGetApplicationNameAndClass +.B XtGetApplicationNameAndClass returns the application name and class passed to -.ZN XtDisplayInitialize -for the specified display. If the display was never initialized or -has been closed, the result is undefined. The returned strings are +.B XtDisplayInitialize +for the specified display. +If the display was never initialized or +has been closed, the result is undefined. +The returned strings are owned by the Intrinsics and must not be modified or freed by the caller. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtGetApplicationResources.man b/lib/libXt/man/XtGetApplicationResources.man index 4a0a8cd03..c888bca0c 100644 --- a/lib/libXt/man/XtGetApplicationResources.man +++ b/lib/libXt/man/XtGetApplicationResources.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtGet-Application-Resources, XtVa-Get-Application-Resources wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetApplicationResources __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetApplicationResources, XtVaGetApplicationResources \- obtain application resources .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetApplicationResources(Widget \fIw\fP, XtPointer \fIbase\fP, XtResourceList \fIresources\fP, Cardinal \fInum_resources\fP, ArgList @@ -73,36 +46,33 @@ XtResourceList \fIresources\fP, Cardinal \fInum_resources\fP, ArgList .HP void XtVaGetApplicationResources(Widget \fIw\fP, XtPointer \fIbase\fP, XtResourceList \fIresources\fP, Cardinal \fInum_resources\fP, ...\^); -.SH ARGUMENTS -.ds Al to override resources obtained from the resource database +.SH ARGUMENTS .IP \fIargs\fP 1i -Specifies the argument list \*(Al. -.ds Ba written +Specifies the argument list to override resources obtained from the resource database. .IP \fIbase\fP 1i Specifies the base address of the subpart data structure where the resources -should be \*(Ba. +should be written. .IP \fInum_args\fP 1i Specifies the number of arguments in the argument list. .IP \fInum_resources\fP 1i Specifies the number of resources in the resource list. .IP \fIresources\fP 1i Specifies the resource list for the subpart. -.ds Wi that wants resources for a subpart \ -or that identifies the resource database to search .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that wants resources for a subpart +or that identifies the resource database to search. .IP \fI...\fP 1i -Specifies the variable arguments \*(Al. +Specifies the variable arguments to override resources obtained from the resource database. .SH DESCRIPTION The -.ZN XtGetApplicationResources +.B XtGetApplicationResources function first uses the passed widget, which is usually an application shell, to construct a resource name and class list, Then, it retrieves the resources from the argument list, the resource database, or the resource list default values. After adding base to each address, -.ZN XtGetApplicationResources +.B XtGetApplicationResources copies the resources into the address given in the resource list. If args is NULL, num_args must be zero. diff --git a/lib/libXt/man/XtGetClassExtension.man b/lib/libXt/man/XtGetClassExtension.man index f28203c78..03132b663 100644 --- a/lib/libXt/man/XtGetClassExtension.man +++ b/lib/libXt/man/XtGetClassExtension.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Class-Extension wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetClassExtension __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetClassExtension \- locate a class extension record .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtPointer XtGetClassExtension(WidgetClass \fIobject_class\fP, Cardinal \fIbyte_offset\fP, XrmQuark \fItype\fP, long \fIversion\fP, Cardinal @@ -89,9 +62,10 @@ The list of extension records at the specified offset in the specified \fItype\fP, a version greater than or equal to the specified \fIversion\fP, and a record size greater than or equal the specified \fIrecord_size\fP if it is nonzero. -.ZN XtGetClassExtension +.B XtGetClassExtension returns a pointer to a matching extension record or NULL if no match -is found. The returned extension record is owned by the widget class +is found. +The returned extension record is owned by the widget class and must not be modified or freed by the caller, except possibly to be modified by the widget class owner. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtGetDisplays.man b/lib/libXt/man/XtGetDisplays.man index 673e7dc4f..ab4417952 100644 --- a/lib/libXt/man/XtGetDisplays.man +++ b/lib/libXt/man/XtGetDisplays.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Displays wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetDisplays __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetDisplays \- retrieve a list of displays associated with an application context .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetDisplays(XtAppContext \fIapp_context\fP, Display ***\fIdpy_return\fP, Cardinal* \fInum_dpy_return\fP); @@ -78,7 +51,7 @@ context. Returns the count of open X display connections in \fIdpy_return\fP. .SH DESCRIPTION To free the list of displays, use -.ZN XtFree . +.BR XtFree . .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtGetErrorDatabase.man b/lib/libXt/man/XtGetErrorDatabase.man index a7be9d839..e6a3851e5 100644 --- a/lib/libXt/man/XtGetErrorDatabase.man +++ b/lib/libXt/man/XtGetErrorDatabase.man @@ -34,52 +34,26 @@ .ds Vn 2.2 .hw XtGet-Error-Database XtGet-Error-Database-Text wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetErrorDatabase __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtGetErrorDatabase, XtGetErrorDatabaseText \- obtain error database .SH SYNTAX +#include <X11/Intrinsic.h> .HP XrmDatabase *XtGetErrorDatabase(void); .HP -void XtGetErrorDatabaseText(char *\fIname\fP, char *\fItype\fP, char -*\fIclass\fP, char *\fIdefault\fP, char *\fIbuffer_return\fP, int -\fInbytes\fP); +void XtGetErrorDatabaseText(const char *\fIname\fP, +const char *\fItype\fP, +const char *\fIclass\fP, +const char *\fIdefaultMsg\fP, +char *\fIbuffer_return\fP, int \fInbytes\fP); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i Specifies the buffer into which the error message is to be returned. -.ds Cl \ of the error message .IP \fIclass\fP 1i -Specifies the resource class\*(Cl. +Specifies the resource class of the error message. .IP \fIdefault\fP 1i -Specifies the default message to use\*(Dm. +Specifies the default message to use. .IP \fIname\fP 1i .br .ns @@ -90,14 +64,14 @@ of the error message. Specifies the size of the buffer in bytes. .SH DESCRIPTION The -.ZN XtGetErrorDatabase +.B XtGetErrorDatabase function has been superceded by -.ZN XtAppGetErrorDatabase . +.BR XtAppGetErrorDatabase . .LP The -.ZN XtGetErrorDatabaseText +.B XtGetErrorDatabaseText function has been superceded by -.ZN XtAppGetErrorDatabaseText . +.BR XtAppGetErrorDatabaseText . .SH "SEE ALSO" .BR XtAppGetErrorDatabase (__libmansuffix__) .BR XtAppGetErrorDatabaseText (__libmansuffix__) diff --git a/lib/libXt/man/XtGetGC.man b/lib/libXt/man/XtGetGC.man index 2b3b7583a..53cb79404 100644 --- a/lib/libXt/man/XtGetGC.man +++ b/lib/libXt/man/XtGetGC.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtGet-GC XtRelease-GC wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetGC __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetGC, XtReleaseGC \- obtain and destroy a sharable GC .SH SYNTAX +#include <X11/Intrinsic.h> .HP GC XtGetGC(Widget \fIw\fP, XtGCMask \fIvalue_mask\fP, XGCValues *\fIvalues\fP); @@ -76,21 +49,20 @@ void XtReleaseGC(Widget \fIw\fP, GC \fIgc\fP); Specifies the GC to be deallocated. .IP \fIvalues\fP 1i Specifies the actual values for this GC. -.ds Vm fields of the values are specified .IP \fIvalue_mask\fP 1i -Specifies which \*(Vm. +Specifies which fields of the values are specified. .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION The -.ZN XtGetGC +.B XtGetGC function returns a sharable, read-only GC. The parameters to this function are the same as those for -.ZN XCreateGC +.B XCreateGC except that a widget is passed instead of a display. -.ZN XtGetGC +.B XtGetGC shares only GCs in which all values in the GC returned by -.ZN XCreateGC +.B XCreateGC are the same. In particular, it does not use the value_mask provided to determine which fields of the GC a widget considers relevant. @@ -98,11 +70,11 @@ The value_mask is used only to tell the server which fields should be filled in with widget data and which it should fill in with default values. For further information about value_mask and values, see -.ZN XCreateGC +.B XCreateGC in the \fI\*(xL\fP. .LP The -.ZN XtReleaseGC +.B XtReleaseGC function deallocate the specified shared GC. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetKeyboardFocusWidget.man b/lib/libXt/man/XtGetKeyboardFocusWidget.man index d5937313a..3788c2b09 100644 --- a/lib/libXt/man/XtGetKeyboardFocusWidget.man +++ b/lib/libXt/man/XtGetKeyboardFocusWidget.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Keyboard-Focus-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetKeyboardFocusWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetKeyboardFocusWidget \- extension event handling .SH SYNTAX +#include <X11/Intrinsic.h> .HP Widget XtGetKeyboardFocusWidget(Widget \fIwidget\fP); .SH ARGUMENTS @@ -72,7 +45,7 @@ Widget XtGetKeyboardFocusWidget(Widget \fIwidget\fP); Specifies the widget for this event handler. Must be of class Core or any subclass thereof. .SH DESCRIPTION -.ZN XtGetKeyboardFocusWidget +.B XtGetKeyboardFocusWidget function returns the widget that would be the end result of keyboard event forwarding for a keyboard event for the specified widget. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtGetKeysymTable.man b/lib/libXt/man/XtGetKeysymTable.man index a771dc35e..ab276d1cc 100644 --- a/lib/libXt/man/XtGetKeysymTable.man +++ b/lib/libXt/man/XtGetKeysymTable.man @@ -34,40 +34,13 @@ .ds Vn 2.2 .hw XtGet-Keysym-Table XtKeysym-To-Keycode-List wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetKeysymTable __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetKeysymTable, XtKeysymToKeycodeList \- query keysyms and keycodes .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Keysym* XtGetKeysymTable(Display* \fIdisplay\fP, KeyCode* +KeySym* XtGetKeysymTable(Display* \fIdisplay\fP, KeyCode* \fImin_keycode_return\fP, int *\fIkeysyms_per_keycode_return\fP); .HP void XtKeysymToKeycodeList(Display* \fIdisplay\fP, KeySym \fIkeysym\fP, @@ -92,17 +65,18 @@ or NULL if \fIkeycount_return\fP is 0. .IP \fIkeycount_return\fP 1i Returns the number of KeyCodes in the keycode list. .SH DESCRIPTION -.ZN XtGetKeysymTable +.B XtGetKeysymTable returns a pointer to the Intrinsics' copy of the server's KeyCode-to-KeySym -table. This table must not be modified. +table. +This table must not be modified. .LP The -.ZN XtKeysymToKeycodeList +.B XtKeysymToKeycodeList procedure returns all the KeyCodes that have \fIkeysym\fP in their entry for the keyboard mapping table associated with \fIdisplay\fP. The caller should free the storage pointed to by \fIkeycodes_return\fP using -.ZN XtFree +.B XtFree when it is no longer useful. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetResourceList.man b/lib/libXt/man/XtGetResourceList.man index bfa9b763d..0bedaffe6 100644 --- a/lib/libXt/man/XtGetResourceList.man +++ b/lib/libXt/man/XtGetResourceList.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtGet-Resource-List XtGet-Constraint-Resource-List wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetResourceList __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetResourceList, XtGetConstraintResourceList \- obtain resource list .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetResourceList(WidgetClass \fIclass\fP, XtResourceList *\fIresources_return\fP, Cardinal *\fInum_resources_return\fP); @@ -79,43 +52,46 @@ resource list. .IP \fIresources_return\fP 1i Specifies a pointer to where to store the returned resource list. The caller must free this storage using -.ZN XtFree +.B XtFree when done with it. -.ds Cl \ for which you want the list .IP \fIwidget_class\fP 1i -Specifies the widget class\*(Wc. +Specifies the widget class for which you want the list. .SH DESCRIPTION If -.ZN XtGetResourceList +.B XtGetResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), -.ZN XtGetResourceList +.B XtGetResourceList returns the resource list as specified in the widget class record. If it is called after the widget class has been initialized, -.ZN XtGetResourceList +.B XtGetResourceList returns a merged resource list that contains the resources -for all superclasses. The list returned by -.ZN XtGetResourceList +for all superclasses. +The list returned by +.B XtGetResourceList should be freed using -.ZN XtFree +.B XtFree when it is no longer needed. .LP If -.ZN XtGetConstraintResourceList +.B XtGetConstraintResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), -.ZN XtGetConstraintResourceList +.B XtGetConstraintResourceList returns the resource list as specified in the widget class Constraint -part record. If it is called after the widget class has been initialized, -.ZN XtGetConstraintResourceList +part record. +If it is called after the widget class has been initialized, +.B XtGetConstraintResourceList returns a merged resource list that contains the Constraint resources -for all superclasses. If the specified class is not a subclass of -.ZN constraintWidgetClass , +for all superclasses. +If the specified class is not a subclass of +.BR constraintWidgetClass , \fI*resources_return\fP is set to NULL and \fI*num_resources_return\fP -is set to zero. The list returned by -.ZN XtGetConstraintResourceList +is set to zero. +The list returned by +.B XtGetConstraintResourceList should be freed using -.ZN XtFree +.B XtFree when it is no longer needed. .SH "SEE ALSO" XtGetSubresources(__libmansuffix__), diff --git a/lib/libXt/man/XtGetSelectionParameters.man b/lib/libXt/man/XtGetSelectionParameters.man index 91dc40160..6c22498f0 100644 --- a/lib/libXt/man/XtGetSelectionParameters.man +++ b/lib/libXt/man/XtGetSelectionParameters.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtSet-Selection-Parameters XtGet-Selection-Parameters wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSelectionParameters __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionParameters \- retrieve target parameters for a selection request with a single target .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetSelectionParameters(Widget \fIowner\fP, Atom \fIselection\fP, XtRequestId \fIrequest_id\fP, Atom *\fItype_return\fP, XtPointer @@ -83,7 +56,8 @@ Specifies a pointer to an atom in which the property type of the parameters will be stored. .IP \fIvalue_return\fP 1i Specifies a pointer into which a pointer to the parameters are to be -stored. A NULL will be stored if no parameters accompany the request. +stored. +A NULL will be stored if no parameters accompany the request. .IP \fIlength_return\fP 1i Specifies a pointer into which the number of data elements in \fIvalue_return\fP of size indicated by \fIformat_return\fP will be @@ -92,11 +66,11 @@ stored. Specifies a pointer into which the size in bits of the parameter data in the elements of \fIvalue_return\fP will be stored. .SH DESCRIPTION -.ZN XtGetSelectionParameters +.B XtGetSelectionParameters may only be called from within an -.ZN XtConvertSelectionProc +.B XtConvertSelectionProc or from within the last call to an -.ZN XtConvertSelectionIncrProc +.B XtConvertSelectionIncrProc with a new request_id. .SH "SEE ALSO" XtSetSelectionParameters(__libmansuffix__) diff --git a/lib/libXt/man/XtGetSelectionRequest.man b/lib/libXt/man/XtGetSelectionRequest.man index 7ecafcedc..50aec3cab 100644 --- a/lib/libXt/man/XtGetSelectionRequest.man +++ b/lib/libXt/man/XtGetSelectionRequest.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Selection-Request wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSelectionRequest __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionRequest \- retrieve the event that triggered the XtConvertSelectionProc .SH SYNTAX +#include <X11/Intrinsic.h> .HP XSelectionRequestEvent* XtGetSelectionRequest(Widget \fIw\fP, Atom \fIselection\fP, XtRequestId \fIrequest_id\fP); @@ -77,19 +50,21 @@ Specifies the selection being processed. Specifies the requestor id in the case of incremental selections, or NULL in the case of atomic transfers. .SH DESCRIPTION -.ZN XtGetSelectionRequest +.B XtGetSelectionRequest may only be called from within an -.ZN XtConvertSelectionProc +.B XtConvertSelectionProc procedure and returns a pointer to the -.ZN SelectionRequest -event that caused the conversion procedure to be invoked. \fIRequest_id\fP +.B SelectionRequest +event that caused the conversion procedure to be invoked. +\fIRequest_id\fP specifies a unique id for the individual request in the case that -multiple incremental transfers are outstanding. For atomic transfers, +multiple incremental transfers are outstanding. +For atomic transfers, \fIrequest_id\fP must be specified as NULL. If no -.ZN SelectionRequest +.B SelectionRequest event is being processed for the specified \fIwidget\fP, \fIselection\fP, and \fIrequest_id\fP, -.ZN XtGetSelectionRequest +.B XtGetSelectionRequest returns NULL. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetSelectionTimeout.man b/lib/libXt/man/XtGetSelectionTimeout.man index 8b04d98b1..e167e8173 100644 --- a/lib/libXt/man/XtGetSelectionTimeout.man +++ b/lib/libXt/man/XtGetSelectionTimeout.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Selection-Timeout XtSet-Selection-Timeout wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSelectionTimeout __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtGetSelectionTimeout, XtSetSelectionTimeout \- set and obtain selection timeout values .SH SYNTAX +#include <X11/Intrinsic.h> .HP unsigned long XtGetSelectionTimeout(void); .HP @@ -74,14 +47,14 @@ void XtSetSelectionTimeout(unsigned long \fItimeout\fP); Specifies the selection timeout in milliseconds. .SH DESCRIPTION The -.ZN XtGetSelectionTimeout +.B XtGetSelectionTimeout function has been superceded by -.ZN XtAppGetSelectionTimeout . +.BR XtAppGetSelectionTimeout . .LP The -.ZN XtSetSelectionTimeout +.B XtSetSelectionTimeout function has been superceded by -.ZN XtAppSetSelectionTimeout . +.BR XtAppSetSelectionTimeout . .SH "SEE ALSO" .BR XtAppGetSelectionTimeout (__libmansuffix__) .br diff --git a/lib/libXt/man/XtGetSelectionValue.man b/lib/libXt/man/XtGetSelectionValue.man index 6107174c4..d57900840 100644 --- a/lib/libXt/man/XtGetSelectionValue.man +++ b/lib/libXt/man/XtGetSelectionValue.man @@ -34,54 +34,29 @@ .ds Vn 2.2 .hw XtGet-Selection-Value XtGet-Selection-Values wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSelectionValue __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionValue, XtGetSelectionValues \- obtain selection values .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtGetSelectionValue(Widget \fIw\fP, Atom \fIselection\fP, Atom -\fItarget\fP, XtSelectionCallbackProc \fIcallback\fP, XtPointer -\fIclient_data\fP, Time \fItime\fP); -.HP -void XtGetSelectionValues(Widget \fIw\fP, Atom \fIselection\fP, Atom -*\fItargets\fP, int \fIcount\fP, XtSelectionCallbackProc \fIcallback\fP, +void XtGetSelectionValue(Widget \fIw\fP, +Atom \fIselection\fP, +Atom \fItarget\fP, +XtSelectionCallbackProc \fIcallback\fP, XtPointer \fIclient_data\fP, Time \fItime\fP); +.HP +void XtGetSelectionValues(Widget \fIw\fP, +Atom \fIselection\fP, +Atom *\fItargets\fP, int \fIcount\fP, +XtSelectionCallbackProc \fIcallback\fP, +XtPointer *\fIclient_data\fP, Time \fItime\fP); .SH ARGUMENTS -.ds Cb \ that is to be called when the selection value has been obtained .IP \fIcallback\fP 1i -Specifies the callback procedure\*(Cb. -.ds Cd it is called +Specifies the callback procedure that is to be called when the selection value has been obtained. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when it is called. .IP \fIclient_data\fP 1i Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target. @@ -93,38 +68,36 @@ Specifies the particular selection desired (that is, primary or secondary). Specifies the type of the information that is needed about the selection. .IP \fItargets\fP 1i Specifies the types of information that is needed about the selection. -.ds Ti value is desired .IP \fItime\fP 1i -Specifies the timestamp that indicates when the selection \*(Ti. -.ds Wi that is making the request +Specifies the timestamp that indicates when the selection value is desired. .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that is making the request. .SH DESCRIPTION The -.ZN XtGetSelectionValue +.B XtGetSelectionValue function requests the value of the selection that has been converted to the target type. The specified callback will be called some time after -.ZN XtGetSelectionValue +.B XtGetSelectionValue is called; in fact, it may be called before or after -.ZN XtGetSelectionValue +.B XtGetSelectionValue returns. .LP The -.ZN XtGetSelectionValues +.B XtGetSelectionValues function is similar to -.ZN XtGetSelectionValue +.B XtGetSelectionValue except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to -.ZN XtGetSelectionValue . +.BR XtGetSelectionValue . The callback is called once with the corresponding client data for each target. -.ZN XtGetSelectionValues +.B XtGetSelectionValues does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling -.ZN XtGetSelectionValue +.B XtGetSelectionValue repeatedly. .SH "SEE ALSO" XtAppGetSelectionTimeout(__libmansuffix__), diff --git a/lib/libXt/man/XtGetSelectionValueIncremental.man b/lib/libXt/man/XtGetSelectionValueIncremental.man index cbb0cebcd..7482d33e7 100644 --- a/lib/libXt/man/XtGetSelectionValueIncremental.man +++ b/lib/libXt/man/XtGetSelectionValueIncremental.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtGet-Selection-Value-Incremental XtGet-Selection-Values-Incremental wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSelectionValueIncremental __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetSelectionValueIncremental, XtGetSelectionValuesIncremental \- obtain selection values .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGetSelectionValueIncremental(Widget \fIw\fP, Atom \fIselection\fP, Atom \fItarget\fP, XtSelectionCallbackProc \fIcallback\fP, XtPointer @@ -72,15 +45,13 @@ void XtGetSelectionValueIncremental(Widget \fIw\fP, Atom \fIselection\fP, Atom .HP void XtGetSelectionValuesIncremental(Widget \fIw\fP, Atom \fIselection\fP, Atom *\fItargets\fP, int \fIcount\fP, XtSelectionCallbackProc \fIcallback\fP, -XtPointer \fIclient_data\fP, Time \fItime\fP); +XtPointer *\fIclient_data\fP, Time \fItime\fP); .SH ARGUMENTS -.ds Cb \ that is to be called when the selection value has been obtained .IP \fIcallback\fP 1i -Specifies the callback procedure\*(Cb. -.ds Cd it is called +Specifies the callback procedure that is to be called when the selection value has been obtained. .IP \fIclient_data\fP 1i Specifies the argument that is to be passed to the specified procedure -when \*(Cd. +when it is called. .IP \fIclient_data\fP 1i Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target. @@ -92,46 +63,46 @@ Specifies the particular selection desired (that is, primary or secondary). Specifies the type of the information that is needed about the selection. .IP \fItargets\fP 1i Specifies the types of information that is needed about the selection. -.ds Ti value is desired .IP \fItime\fP 1i -Specifies the timestamp that indicates when the selection \*(Ti. -.ds Wi that is making the request +Specifies the timestamp that indicates when the selection value is desired. .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that is making the request. .SH DESCRIPTION The -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental function is similar to -.ZN XtGetSelectionValue +.B XtGetSelectionValue except that the \fIselection_callback\fP procedure will be called repeatedly upon delivery of multiple segments of the selection value. The end of the selection value is indicated when \fIselection_callback\fP is called with a non-NULL value of length zero, which must still be -freed by the client. If the transfer of the selection is aborted in the +freed by the client. +If the transfer of the selection is aborted in the middle of a transfer (for example, because to timeout), the \fIselection_callback\fP procedure is called with a type value equal to the symbolic constant -.ZN XT_CONVERT_FAIL +.B XT_CONVERT_FAIL so that the requestor can dispose of the partial selection value it has -collected up until that point. Upon receiving -.ZN XT_CONVERT_FAIL , +collected up until that point. +Upon receiving +.BR XT_CONVERT_FAIL , the requesting client must determine for itself whether or not a partially completed transfer is meaningful. .LP The -.ZN XtGetSelectionValuesIncremental +.B XtGetSelectionValuesIncremental function is similar to -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to -.ZN XtGetSelectionValueIncremental . +.BR XtGetSelectionValueIncremental . The callback is called once with the corresponding client data for each target. -.ZN XtGetSelectionValuesIncremental +.B XtGetSelectionValuesIncremental does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental repeatedly. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtGetSubresources.man b/lib/libXt/man/XtGetSubresources.man index 76236ae00..238415125 100644 --- a/lib/libXt/man/XtGetSubresources.man +++ b/lib/libXt/man/XtGetSubresources.man @@ -34,54 +34,31 @@ .ds Vn 2.2 .hw XtGet-Subresources XtVa-Get-Subresources wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGetSubresources __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGetSubresources, XtVaGetSubresources \- obtain subresources .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtGetSubresources(Widget \fIw\fP, XtPointer \fIbase\fP, String -\fIname\fP, String \fIclass\fP, XtResourceList \fIresources\fP, Cardinal -\fInum_resources\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); +void XtGetSubresources(Widget \fIw\fP, +XtPointer \fIbase\fP, +const char *\fIname\fP, +const char * \fIclass\fP, +XtResourceList \fIresources\fP, Cardinal \fInum_resources\fP, +ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -void XtVaGetSubresources(Widget \fIw\fP, XtPointer \fIbase\fP, String -\fIname\fP, String \fIclass\fP, XtResourceList \fIresources\fP, Cardinal -\fInum_resources\fP); +void XtVaGetSubresources(Widget \fIw\fP, +XtPointer \fIbase\fP, +const char *\fIname\fP, +const char *\fIclass\fP, +XtResourceList \fIresources\fP, Cardinal +\fInum_resources\fP, ...); .SH ARGUMENTS -.ds Al to override resources obtained from the resource database .IP \fIargs\fP 1i -Specifies the argument list \*(Al. -.ds Ba written +Specifies the argument list to override resources obtained from the resource database. .IP \fIbase\fP 1i Specifies the base address of the subpart data structure where the resources -should be \*(Ba. +should be written. .IP \fIclass\fP 1i Specifies the class of the subpart. .IP \fIname\fP 1i @@ -92,15 +69,14 @@ Specifies the number of arguments in the argument list. Specifies the number of resources in the resource list. .IP \fIresources\fP 1i Specifies the resource list for the subpart. -.ds Wi that wants resources for a subpart \ -or that identifies the resource database to search .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that wants resources for a subpart +or that identifies the resource database to search. .IP \fI...\fP 1i -Specifies the variable arguments \*(Al. +Specifies the variable arguments to override resources obtained from the resource database. .SH DESCRIPTION The -.ZN XtGetSubresources +.B XtGetSubresources function constructs a name/class list from the application name/class, the name/classes of all its ancestors, and the widget itself. Then, it appends to this list the name/class pair passed in. diff --git a/lib/libXt/man/XtGrabKey.man b/lib/libXt/man/XtGrabKey.man index fa4b4c14e..7b97e65d4 100644 --- a/lib/libXt/man/XtGrabKey.man +++ b/lib/libXt/man/XtGrabKey.man @@ -31,40 +31,14 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtGrab-Key XtUngrab-Key XtGrab-Keyboard XtUngrab-Keyboard XtGrab-Button XtUngrab-Button XtGrab-Pointer XtUngrab-Pointer wid-get +.hw XtGrab-Key XtUngrab-Key XtGrab-Keyboard XtUngrab-Keyboard +.hw XtGrab-Button XtUngrab-Button XtGrab-Pointer XtUngrab-Pointer wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtGrabKey __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtGrabKey, XtUngrabKey, XtGrabKeyboard, XtUngrabKeyboard, XtGrabButton, XtUngrabButton, XtGrabPointer, XtUngrabPointer \- manage grabs .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtGrabKey(Widget \fIwidget\fP, KeyCode \fIkeycode\fP, Modifiers \fImodifiers\fP, Boolean \fIowner_events\fP, int \fIpointer_mode\fP, int @@ -83,7 +57,7 @@ void XtGrabButton(Widget \fIwidget\fP, int \fIbutton\fP, Modifiers int \fIpointer_mode\fP, int \fIkeyboard_mode\fP, Window \fIconfine_to\fP, Cursor \fIcursor\fP); .HP -void XtUngrabButton(Widget \fIwidget\fP, KeyCode \fIbutton\fP, Modifiers +void XtUngrabButton(Widget \fIwidget\fP, unsigned \fIbutton\fP, Modifiers \fImodifiers\fP); .HP int XtGrabPointer(Widget \fIwidget\fP, Boolean \fIowner_events\fP, unsigned @@ -93,7 +67,8 @@ int \fIevent_mask\fP, int \fIpointer_mode\fP, int \fIkeyboard_mode\fP, Window void XtUngrabPointer(Widget \fIwidget\fP, Time \fItime\fP); .SH ARGUMENTS .IP \fIwidget\fP 1i -Specifies the widget in whose window the grab will occur. Must be of +Specifies the widget in whose window the grab will occur. +Must be of class Core or a subclass thereof. .sp 6p .IP \fIkeycode\fP @@ -123,125 +98,133 @@ class Core or a subclass thereof. .IP \fIcursor\fP 1i Specifies arguments to the associated Xlib function call. .SH DESCRIPTION -.ZN XtGrabKey +.B XtGrabKey calls -.ZN XGrabKey +.B XGrabKey specifying the widget's window as the grab window if the widget is -realized. The remaining arguments are exactly as for -.ZN XGrabKey . +realized. +The remaining arguments are exactly as for +.BR XGrabKey . If the widget is not realized, or is later unrealized, the call to -.ZN XGrabKey +.B XGrabKey will be performed (again) when the widget is realized and its window -becomes mapped. In the future, if -.ZN XtDispatchEvent +becomes mapped. +In the future, if +.B XtDispatchEvent is called with a -.ZN KeyPress +.B KeyPress event matching the specified keycode and modifiers (which may be -.ZN AnyKey +.B AnyKey or -.ZN AnyModifier , +.BR AnyModifier , respectively) for the widget's window, the Intrinsics will call -.ZN XtUngrabKeyboard +.B XtUngrabKeyboard with the timestamp from the -.ZN KeyPress +.B KeyPress event if either of the following conditions is true: .IP \(bu 3 There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or .IP \(bu 3 -.ZN XFilterEvent +.B XFilterEvent returns -.ZN True . +.BR True . .LP -.ZN XtUngrabKey +.B XtUngrabKey calls -.ZN XUngrabKey +.B XUngrabKey specifying the widget's window as the ungrab window if the widget is -realized. The remaining arguments are exactly as for -.ZN XUngrabKey . +realized. +The remaining arguments are exactly as for +.BR XUngrabKey . If the widget is not realized, -.ZN XtUngrabKey +.B XtUngrabKey removes a deferred -.ZN XtGrabKey +.B XtGrabKey request, if any, for the specified widget, keycode, and modifiers. .LP If the specified widget is realized -.ZN XtGrabKeyboard +.B XtGrabKeyboard calls -.ZN XGrabKeyboard -specifying the widget's window as the grab window. The remaining +.B XGrabKeyboard +specifying the widget's window as the grab window. +The remaining arguments and return value are exactly as for -.ZN XGrabKeyboard . +.BR XGrabKeyboard . If the widget is not realized, -.ZN XtGrabKeyboard +.B XtGrabKeyboard immediately returns -.ZN GrabNotViewable . +.BR GrabNotViewable . No future ungrab is implied by -.ZN XtGrabKeyboard . +.BR XtGrabKeyboard . .LP -.ZN XtUngrabKeyboard +.B XtUngrabKeyboard calls -.ZN XUngrabKeyboard +.B XUngrabKeyboard with the specified time. .LP -.ZN XtGrabButton +.B XtGrabButton calls -.ZN XGrabButton +.B XGrabButton specifying the widget's window as the grab window if the widget is -realized. The remaining arguments are exactly as for -.ZN XGrabButton . +realized. +The remaining arguments are exactly as for +.BR XGrabButton . If the widget is not realized, or is later unrealized, the call to -.ZN XGrabButton +.B XGrabButton will be performed (again) when the widget is realized and its window -becomes mapped. In the future, if -.ZN XtDispatchEvent +becomes mapped. +In the future, if +.B XtDispatchEvent is called with a -.ZN ButtonPress +.B ButtonPress event matching the specified button and modifiers (which may be -.ZN AnyButton +.B AnyButton or -.ZN AnyModifier , +.BR AnyModifier , respectively) for the widget's window, the Intrinsics will call -.ZN XtUngrabPointer +.B XtUngrabPointer with the timestamp from the -.ZN ButtonPress +.B ButtonPress event if either of the following conditions is true: .IP \(bu 3 There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or .IP \(bu 3 -.ZN XFilterEvent +.B XFilterEvent returns -.ZN True . +.BR True . .LP -.ZN XtUngrabButton +.B XtUngrabButton calls -.ZN XUngrabButton +.B XUngrabButton specifying the widget's window as the ungrab window if the widget is -realized. The remaining arguments are exactly as for -.ZN XUngrabButton . +realized. +The remaining arguments are exactly as for +.BR XUngrabButton . If the widget is not realized, -.ZN XtUngrabButton +.B XtUngrabButton removes a deferred -.ZN XtGrabButton +.B XtGrabButton request, if any, for the specified widget, button, and modifiers. .LP -.ZN XtGrabPointer +.B XtGrabPointer calls -.ZN XGrabPointer -specifying the widget's window as the grab window. The remaining +.B XGrabPointer +specifying the widget's window as the grab window. +The remaining arguments and return value are exactly as for -.ZN XGrabPointer . +.BR XGrabPointer . If the widget is not realized, -.ZN XtGrabPointer +.B XtGrabPointer immediately returns -.ZN GrabNotViewable . +.BR GrabNotViewable . No future ungrab is implied by -.ZN XtGrabPointer . +.BR XtGrabPointer . .LP -.ZN XtUngrabPointer +.B XtUngrabPointer calls -.ZN XUngrabPointer +.B XUngrabPointer with the specified time. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtHooksOfDisplay.man b/lib/libXt/man/XtHooksOfDisplay.man index 55d50c6ce..10380de01 100644 --- a/lib/libXt/man/XtHooksOfDisplay.man +++ b/lib/libXt/man/XtHooksOfDisplay.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtHooks-Of-Display XtGet-Displays wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtHooksOfDisplay __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtHooksOfDisplay \- external agent access points .SH SYNTAX +#include <X11/Intrinsic.h> .HP Widget XtHooksOfDisplay(Display* \fIdisplay\fP); .SH ARGUMENTS @@ -72,7 +45,9 @@ Widget XtHooksOfDisplay(Display* \fIdisplay\fP); Specifies the desired display. .SH DESCRIPTION The class of this object is a private, implementation dependent, subclass -of Object. The hook object has no parent. The resources of this object are +of Object. +The hook object has no parent. +The resources of this object are the callback lists for hooks and the read-only resources for getting a list of parentless shells. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtInitialize.man b/lib/libXt/man/XtInitialize.man index 8ebfc2054..fd23c8e46 100644 --- a/lib/libXt/man/XtInitialize.man +++ b/lib/libXt/man/XtInitialize.man @@ -33,52 +33,25 @@ .ds Vn 2.2 .hw Xt-Initialize .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtInitialize __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtInitialize \- initialize .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtInitialize(String \fIshell_name\fP, String \fIapplication_class\fP, -XrmOptionDescRec* \fIoptions\fP, Cardinal \fInum_options\fP, int* \fIargc\fP, -char** \fIargv\fP); +Widget XtInitialize(const char *\fIshell_name\fP, +const char *\fIapplication_class\fP, +XrmOptionDescRec* \fIoptions\fP, Cardinal \fInum_options\fP, +int* \fIargc\fP, char** \fIargv\fP); .SH ARGUMENTS .IP \fIshell_name\fP 1i Specifies the name of the created shell widget. -.ds Ac , which usually is the generic name for all instances of this application .IP \fIapplication_class\fP 1i -Specifies the class name of this application\*(Ac. +Specifies the class name of this application, which usually is the generic name for all instances of this application. .IP \fIoptions\fP 1i Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to -.ZN XrmParseCommand . +.BR XrmParseCommand . For further information, see \fI\*(xL\fP. .IP \fInum_options\fP 1i @@ -88,21 +61,23 @@ Specifies a pointer to the number of command line parameters. .IP \fIargv\fP 1i Specifies the command line parameters. .SH DESCRIPTION -.ZN XtInitialize +.B XtInitialize calls -.ZN XtToolkitInitialize +.B XtToolkitInitialize followed by -.ZN XtOpenDisplay +.B XtOpenDisplay with \fIdisplay_string\fP NULL and \fIapplication_name\fP NULL, and finally calls -.ZN XtAppCreateShell +.B XtAppCreateShell with \fIapplication_name\fP NULL, \fIwidget_class\fP -.ZN applicationShellWidgetClass , +.BR applicationShellWidgetClass , and the specified \fIargs\fP and \fInum_args\fP and returns the -created shell. The semantics of calling -.ZN XtInitialize -more than once are undefined. This routine has been replaced by -.ZN XtAppInitialize . +created shell. +The semantics of calling +.B XtInitialize +more than once are undefined. +This routine has been replaced by +.BR XtAppInitialize . .SH "SEE ALSO" .BR XtAppInitialize (__libmansuffix__) .br diff --git a/lib/libXt/man/XtInitializeWidgetClass.man b/lib/libXt/man/XtInitializeWidgetClass.man index 801586bcc..de8187388 100644 --- a/lib/libXt/man/XtInitializeWidgetClass.man +++ b/lib/libXt/man/XtInitializeWidgetClass.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtInitialize-Widget-Class wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtInitializeWidgetClass __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtInitializeWidgetClass \- initialize a widget class .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtInitializeWidgetClass(WidgetClass \fIobject_class\fP); .SH ARGUMENTS @@ -72,13 +45,13 @@ void XtInitializeWidgetClass(WidgetClass \fIobject_class\fP); Specifies the object class to initialize. .SH DESCRIPTION If the specified widget class is already initialized, -.ZN XtInitializeWidgetClass +.B XtInitializeWidgetClass returns immediately. .LP If the class initialization procedure registers type converters, these type converters are not available until the first object of the class or subclass is created or -.ZN XtInitializeWidgetClass +.B XtInitializeWidgetClass is called. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtInsertEventTypeHandler.man b/lib/libXt/man/XtInsertEventTypeHandler.man index b116c701b..cfad4465f 100644 --- a/lib/libXt/man/XtInsertEventTypeHandler.man +++ b/lib/libXt/man/XtInsertEventTypeHandler.man @@ -31,42 +31,16 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtInsert-Event-Type-Handler XtRemove-Event-Type-Handler XtSet-Event-Dispatcher XtDispatch-Event-To-Widget wid-get +.hw XtInsert-Event-Type-Handler XtRemove-Event-Type-Handler +.hw XtSet-Event-Dispatcher XtDispatch-Event-To-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtInsertEventTypeHandler __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtInsertEventTypeHandler, XtRemoveEventTypeHandler, XtRegisterExtensionSelector, XtSetEventDispatcher, XtDispatchEventToWidget \- extension event handling .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtInsertEventTypeHandler(Widget \fIwidget\fP, int \fIevent_type\fP, XtPointer \fIselect_data\fP, XtEventHandler \fIproc\fP, XtPointer @@ -80,7 +54,7 @@ void XtRegisterExtensionSelector(Display* \fIdisplay\fP, int \fImin_event_type\fP, int \fImax_event_type\fP, XtExtensionSelectProc \fIproc\fP, XtPointer \fIclient_data\fP); .HP -XtEventDispatchProc XtSetEventDispatcher(Widget \fIwidget\fP, int +XtEventDispatchProc XtSetEventDispatcher(Display* \fIdisplay\fP, int \fIevent_type\fP, XtEventDispatchProc \fIproc\fP); .HP Boolean XtDispatchEventToWidget(Widget \fIwidget\fP, XEvent* \fIevent\fP); @@ -107,24 +81,26 @@ Specifies the range of event types for this extension. Specifies a pointer to the event to be dispatched. .SH DESCRIPTION The -.ZN XtInsertEventTypeHandler +.B XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified \fIevent_type\fP is dispatched to the specified \fIwidget\fP. .LP If \fIevent_type\fP is one of the core X protocol events then \fIselect_data\fP must be a pointer to a value of type -.ZN EventMask , +.BR EventMask , indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by -.ZN XtBuildEventMask . +.BR XtBuildEventMask . If the widget is realized -.ZN XtInsertEventTypeHandler +.B XtInsertEventTypeHandler calls -.ZN XSelectInput -if necessary. Specifying NULL for \fIselect_data\fP is equivalent to -specifying a pointer to an event mask containing 0. This is similar to the -.ZN XtInsertRawEventHandler +.B XSelectInput +if necessary. +Specifying NULL for \fIselect_data\fP is equivalent to +specifying a pointer to an event mask containing 0. +This is similar to the +.B XtInsertRawEventHandler function. .LP If \fIevent_type\fP specifies an extension event type then the semantics @@ -137,30 +113,34 @@ as long as the event handler remains registered with this value of \fIselect_data\fP. .LP The \fIposition\fP argument allows the client to control the order of the -invocation of event handlers registered for the same event type. If the +invocation of event handlers registered for the same event type. +If the client does not care about the order, it should normally specify -.ZN XtListTail , +.BR XtListTail , which registers this event handler after any previously registered handlers for this event type. .LP The -.ZN XtRemoveEventTypeHandler +.B XtRemoveEventTypeHandler function unregisters an even handler registered with -.ZN XtInsertEventTypeHandler -for the specified event type. The request is ignored if \fIclient_data\fP +.B XtInsertEventTypeHandler +for the specified event type. +The request is ignored if \fIclient_data\fP does not match the value given with the handler was registered. .LP If \fIevent_type\fP specifies on of the core X protocol events, \fIselect_data\fP must be a pointer to a value of type -.ZN EventMask , +.BR EventMask , indicating the mask to be used to deselect for the appropriate event. If the widget is realized, -.ZN XtRemoveEventTypeHandler +.B XtRemoveEventTypeHandler calls -.ZN XSelectInput -if necessary. Specifying NULL for \fIselect_data\fP is equivalent to -specifying a pointer to an event mask containing 0. This is similar to the -.ZN XtRemoveRawEventHandler +.B XSelectInput +if necessary. +Specifying NULL for \fIselect_data\fP is equivalent to +specifying a pointer to an event mask containing 0. +This is similar to the +.B XtRemoveRawEventHandler function. .LP If \fIevent_type\fP specifies an extension event type then the semantics @@ -168,56 +148,59 @@ of the data pointed to by \fIselect_data\fP are defined by the extension selector registered for the specified event type. .LP The -.ZN XtRegisterExtensionSelector +.B XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets. .LP If \fImin_event_type\fP and \fImax_event_type\fP match the parameters to a previous call to -.ZN XtRegisterExtensionSelector +.B XtRegisterExtensionSelector for the same display, the \fIproc\fP and \fIclient_data\fP replace the -previously registered values. If the range specified by \fImin_event_type\fP +previously registered values. +If the range specified by \fImin_event_type\fP and \fImax_event_type\fP overlaps the range of the parameters to a previous call for the same display in any other way, an error results. .LP The -.ZN XtSetEventDispatcher +.B XtSetEventDispatcher function registers the event dispatcher procedure specified by \fIproc\fP for events with the type \fIevent_type\fP. The previously registered dispatcher (or the default dispatcher if there was no previously registered -dispatcher) is returned. If \fIproc\fP is NULL, the default procedure is +dispatcher) is returned. +If \fIproc\fP is NULL, the default procedure is restored for the specified type. .LP In the future, when -.ZN XtDispatchEvent +.B XtDispatchEvent is called with an event of \fIevent_type\fP, the specified \fIproc\fP (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event. .LP The -.ZN XtDispatchEventToWidget +.B XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the \fIcontinue_to_dispatch\fP value returned by -each handler. The Intrinsics behave as if event handlers were registered +each handler. +The Intrinsics behave as if event handlers were registered at the head of the list for -.ZN Expose , -.ZN NoExpose , -.ZN GraphicsExpose , +.BR Expose , +.BR NoExpose , +.BR GraphicsExpose , and -.ZN VisibilityNotify +.B VisibilityNotify events to invoke the widget's expose procedure according to the exposure compression rules and to update the widget's \fIvisible\fP field if \fIvisible_interest\fP is -.ZN True . +.BR True . These internal event handlers never set \fIcontinue_to_dispatch\fP to -.ZN False . +.BR False . .LP -.ZN XtDispatchEventToWidget +.B XtDispatchEventToWidget returns -.ZN True +.B True if any event handler was called and -.ZN False +.B False otherwise. .LP .SH "SEE ALSO" diff --git a/lib/libXt/man/XtLastEventProcessed.man b/lib/libXt/man/XtLastEventProcessed.man index c1697954d..f74eb3678 100644 --- a/lib/libXt/man/XtLastEventProcessed.man +++ b/lib/libXt/man/XtLastEventProcessed.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtLast-Event-Processed XtLast-Timestamp-Processed wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtLastEventProcessed __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtLastEventProcessed, XtLastTimestampProcessed \- last event, last timestamp processed .SH SYNTAX +#include <X11/Intrinsic.h> .HP XEvent* XtLastEventProcessed(Display* \fIdisplay\fP); .HP @@ -73,26 +46,27 @@ Time XtLastTimestampProcessed(Display* \fIdisplay\fP); .IP \fIdisplay\fP 1i Specifies the open display connection. .SH DESCRIPTION -.ZN XtLastEventProcessed +.B XtLastEventProcessed returns the last event passed to -.ZN XtDispatchEvent -for the specified display and NULL if there has been no event. The +.B XtDispatchEvent +for the specified display and NULL if there has been no event. +The client must not modify the contents of the returned event. .LP -.ZN XtLastTimestampProcessed +.B XtLastTimestampProcessed returns the timestamp of the last -.ZN KeyPress , -.ZN KeyRelease , -.ZN ButtonPress , -.ZN ButtonRelease , -.ZN MotionNotify , -.ZN EnterNotify , -.ZN LeaveNotify , -.ZN PropertyNotify , +.BR KeyPress , +.BR KeyRelease , +.BR ButtonPress , +.BR ButtonRelease , +.BR MotionNotify , +.BR EnterNotify , +.BR LeaveNotify , +.BR PropertyNotify , or -.ZN SelectionClear +.B SelectionClear event that has been passed to -.ZN XtDispatchEvent +.B XtDispatchEvent for the specified display and zero if there has been no such event. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtMakeGeometryRequest.man b/lib/libXt/man/XtMakeGeometryRequest.man index d3d559bc9..23164cde9 100644 --- a/lib/libXt/man/XtMakeGeometryRequest.man +++ b/lib/libXt/man/XtMakeGeometryRequest.man @@ -34,55 +34,30 @@ .ds Vn 2.2 .hw XtMake-Geometry-Request XtMake-Resize-Request wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtMakeGeometryRequest __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtMakeGeometryRequest, XtMakeResizeRequest \- make geometry manager request .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtGeometryResult XtMakeGeometryRequest(Widget \fIw\fP, XtWidgetGeometry *\fIrequest\fP, XtWidgetGeometry *\fIreply_return\fP); .HP -XtGeometryResult XtMakeResizeRequest(Widget \fIw\fP, Dimension \fIwidth\fP, -\fIheight\fP, Dimension *\fIwidth_return\fP, Dimension *\fIheight_return\fP); +XtGeometryResult XtMakeResizeRequest(Widget \fIw\fP, +Dimension \fIwidth\fP, +Dimension \fIheight\fP, +Dimension *\fIwidth_return\fP, +Dimension *\fIheight_return\fP); .SH ARGUMENTS .IP \fIreply_return\fP 1i Returns the allowed widget size or may be NULL if the requesting widget is not interested in handling -.ZN XtGeometryAlmost . +.BR XtGeometryAlmost . .IP \fIrequest\fP 1i Specifies the desired widget geometry (size, position, border width, and stacking order). -.ds Wi that is making the request .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that is making the request. .IP \fIwidth_return\fP 1i .br .ns @@ -90,81 +65,81 @@ Specifies the widget \*(Wi. Return the allowed widget width and height. .SH DESCRIPTION Depending on the condition, -.ZN XtMakeGeometryRequest +.B XtMakeGeometryRequest performs the following: .IP \(bu 5 If the widget is unmanaged or the widget's parent is not realized, it makes the changes and returns -.ZN XtGeometryYes . +.BR XtGeometryYes . .IP \(bu 5 If the parent is not a subclass of -.ZN compositeWidgetClass +.B compositeWidgetClass or the parent's geometry_manager is NULL, it issues an error. .IP \(bu 5 If the widget's being_destroyed field is -.ZN True , +.BR True , it returns -.ZN XtGeometryNo . +.BR XtGeometryNo . .IP \(bu 5 If the widget x, y, width, height and border_width fields are all equal to the requested values, it returns -.ZN XtGeometryYes ; +.BR XtGeometryYes ; otherwise, it calls the parent's geometry_manager procedure with the given parameters. .IP \(bu 5 If the parent's geometry manager returns -.ZN XtGeometryYes +.B XtGeometryYes and if -.ZN XtCWQueryOnly +.B XtCWQueryOnly is not set in the request_mode and if the widget is realized, -.ZN XtMakeGeometryRequest +.B XtMakeGeometryRequest calls the -.ZN XConfigureWindow +.B XConfigureWindow Xlib function to reconfigure the widget's window (set its size, location, and stacking order as appropriate). .IP \(bu 5 If the geometry manager returns -.ZN XtGeometryDone , +.BR XtGeometryDone , the change has been approved and actually has been done. In this case, -.ZN XtMakeGeometryRequest +.B XtMakeGeometryRequest does no configuring and returns -.ZN XtGeometryYes . -.ZN XtMakeGeometryRequest +.BR XtGeometryYes . +.B XtMakeGeometryRequest never returns -.ZN XtGeometryDone . +.BR XtGeometryDone . .LP Otherwise, -.ZN XtMakeGeometryRequest +.B XtMakeGeometryRequest returns the resulting value from the parent's geometry manager. .LP Children of primitive widgets are always unmanaged; thus, -.ZN XtMakeGeometryRequest +.B XtMakeGeometryRequest always returns -.ZN XtGeometryYes +.B XtGeometryYes when called by a child of a primitive widget. .LP The -.ZN XtMakeResizeRequest +.B XtMakeResizeRequest function, a simple interface to -.ZN XtMakeGeometryRequest , +.BR XtMakeGeometryRequest , creates a -.ZN XtWidgetGeometry +.B XtWidgetGeometry structure and specifies that width and height should change. The geometry manager is free to modify any of the other window attributes (position or stacking order) to satisfy the resize request. If the return value is -.ZN XtGeometryAlmost , +.BR XtGeometryAlmost , width_return and height_return contain a compromise width and height. If these are acceptable, the widget should immediately make an -.ZN XtMakeResizeRequest +.B XtMakeResizeRequest and request that the compromise width and height be applied. If the widget is not interested in -.ZN XtGeometryAlmost +.B XtGeometryAlmost replies, it can pass NULL for width_return and height_return. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtMalloc.man b/lib/libXt/man/XtMalloc.man index 12c116afe..2fa1d571b 100644 --- a/lib/libXt/man/XtMalloc.man +++ b/lib/libXt/man/XtMalloc.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtNew-String wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtMalloc __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtMalloc, XtCalloc, XtRealloc, XtFree, XtNew, XtNewString \- memory management functions .SH SYNTAX +#include <X11/Intrinsic.h> .HP char *XtMalloc(Cardinal \fIsize\fP); .HP @@ -79,13 +52,12 @@ void XtFree(char *\fIptr\fP); .HP String XtNewString(String \fIstring\fP); .HP -Cardinal XtAsprintf(String *\fInew_string\fP, const char *\fIformat\fP, ...); +Cardinal XtAsprintf(char **\fInew_string\fP, const char *\fIformat\fP, ...); .SH ARGUMENTS .IP \fInum\fP 1i Specifies the number of bytes or array elements. -.ds Po to the old storage or to the block of storage that is to be freed .IP \fIptr\fP 1i -Specifies a pointer \*(Po. +Specifies a pointer to the old storage or to the block of storage that is to be freed. .IP \fIsize\fP 1i Specifies the size of an array element (in bytes) or the number of bytes desired. @@ -99,90 +71,81 @@ Specifies a pointer to write a newly allocated string to. Specifies a formatting string as defined by sprintf(3c) .SH DESCRIPTION The -.ZN XtMalloc +.B XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, -.ZN XtMalloc +.B XtMalloc calls -.ZN XtErrorMsg . +.BR XtErrorMsg . .LP The -.ZN XtCalloc +.B XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, -.ZN XtCalloc +.B XtCalloc calls -.ZN XtErrorMsg . +.BR XtErrorMsg . .LP The -.ZN XtRealloc +.B XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, -.ZN XtRealloc +.B XtRealloc calls -.ZN XtErrorMsg . +.BR XtErrorMsg . If ptr is NULL, -.ZN XtRealloc +.B XtRealloc allocates the new storage without copying the old contents; that is, it simply calls -.ZN XtMalloc . +.BR XtMalloc . .LP The -.ZN XtFree +.B XtFree function returns storage and allows it to be reused. If ptr is NULL, -.ZN XtFree +.B XtFree returns immediately. .LP -.ZN XtNew +.B XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, -.ZN XtNew +.B XtNew calls -.ZN XtErrorMsg . -.ZN XtNew +.BR XtErrorMsg . +.B XtNew is a convenience macro that calls -.ZN XtMalloc +.B XtMalloc with the following arguments specified: .LP -.Ds -.TA .5i -.ta .5i +.RS .5i +.ft CW ((type *) XtMalloc((unsigned) sizeof(type)) -.De -.LP -.ZN XtNewString -returns a pointer to the allocated storage. -If there is insufficient memory to allocate the new block, -.ZN XtNewString -calls -.ZN XtErrorMsg . -.ZN XtNewString -is a convenience macro that calls -.ZN XtMalloc -with the following arguments specified: +.ft R +.RE .LP -.Ds -.TA .5i -.ta .5i -(strcpy(XtMalloc((unsigned) strlen(str) + 1), str)) -.De +.B XtNewString +returns a pointer to a new string which is a duplicate of +.IR string . +If there is insufficient memory to allocate the new block, or the argument is NULL +.B XtNewString +returns NULL. The memory can be freed with +.BR XtFree . .LP The -.ZN XtAsprintf +.B XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, -.ZN XtAsprintf +.B XtAsprintf calls -.ZN XtErrorMsg . +.BR XtErrorMsg . .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtManageChildren.man b/lib/libXt/man/XtManageChildren.man index 4fb198474..2beb935a6 100644 --- a/lib/libXt/man/XtManageChildren.man +++ b/lib/libXt/man/XtManageChildren.man @@ -32,40 +32,15 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtManage-Children XtManage-Child XtUnmanage-Children XtUnmanage-Child XtChange-ManagedSet XtIs-Managed wid-get +.hw XtManage-Children XtManage-Child XtUnmanage-Children XtUnmanage-Child +.hw XtChange-ManagedSet XtIs-Managed wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtManageChildren __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtManageChildren, XtManageChild, XtUnmanageChildren, XtUnmanageChild, XtChangeManagedSet, XtIsManaged \- manage and unmanage children .SH SYNTAX +#include <X11/Intrinsic.h> +.HP typedef Widget *WidgetList; .HP void XtManageChildren(WidgetList \fIchildren\fP, Cardinal \fInum_children\fP); @@ -106,16 +81,16 @@ Specifies the post unmanage, pre manage hook procedure to invoke. Specifies the client data to be passed to the hook procedure. .SH DESCRIPTION The -.ZN XtManageChildren +.B XtManageChildren function performs the following: .IP \(bu 5 Issues an error if the children do not all have the same parent or if the parent is not a subclass of -.ZN compositeWidgetClass . +.BR compositeWidgetClass . .IP \(bu 5 Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, -.ZN XtManageChildren +.B XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not. .IP \(bu 5 @@ -126,21 +101,21 @@ it makes some of the newly managed children viewable: Calls the change_managed routine of the widgets' parent. .IP \- 5 Calls -.ZN XtRealizeWidget +.B XtRealizeWidget on each previously unmanaged child that is unrealized. .IP \- 5 Maps each previously unmanaged child that has map_when_managed -.ZN True . +.BR True . .RE .LP Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is -.ZN True +.B True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call -.ZN XtManageChild +.B XtManageChild from their insert_child procedure. .LP If the parent widget is realized, @@ -148,29 +123,29 @@ its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling -.ZN XtMoveWidget , +.BR XtMoveWidget , which first updates the x and y fields and then calls -.ZN XMoveWindow +.B XMoveWindow if the widget is realized. .LP The -.ZN XtManageChild +.B XtManageChild function constructs a -.ZN WidgetList +.B WidgetList of length one and calls -.ZN XtManageChildren . +.BR XtManageChildren . .LP The -.ZN XtUnmanageChildren +.B XtUnmanageChildren function performs the following: .IP \(bu 5 Issues an error if the children do not all have the same parent or if the parent is not a subclass of -.ZN compositeWidgetClass . +.BR compositeWidgetClass . .IP \(bu 5 Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, -.ZN XtUnmanageChildren +.B XtUnmanageChildren performs the following: .RS .IP \- 5 @@ -185,19 +160,19 @@ Calls the change_managed routine of the widgets' parent after all children have been marked if the parent is realized. .LP -.ZN XtUnmanageChildren +.B XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent's managed set is often a temporary banishment, and, some time later, you may manage the children again. .LP The -.ZN XtUnmanageChild +.B XtUnmanageChild function constructs a widget list of length one and calls -.ZN XtUnmanageChildren . +.BR XtUnmanageChildren . .LP The -.ZN XtChangeManagedSet +.B XtChangeManagedSet function performs the following: .IP \(bu 5 Issues an error if the widgets specified in the \fImanage_children\fP @@ -207,41 +182,41 @@ if that parent is not a subclass of compositeWidgetClass. Returns immediately if the common parent is being destroyed. .IP \(bu 5 If no -.ZN CompositeClassExtension +.B CompositeClassExtension is defined, or a -.ZN CompositeClassExtension +.B CompositeClassExtension is defined but with an \fIallows_change_managed_set\fP field with a value of -.ZN False , +.BR False , and -.ZN XtChangeManagedSet +.B XtChangeManagedSet was invoked with a non-NULL \fIdo_change_proc\fP procedure then -.ZN XtChangeManagedSet +.B XtChangeManagedSet performs the following: .RS .IP \- 5 Calls -.ZN XtUnmanageChildren +.B XtUnmanageChildren (\fIunmanage_children\fP, \fInum_unmanage_children\fP). .IP \- 5 Calls the \fIdo_change_proc\fP specified. .IP \- 5 Calls -.ZN XtManageChildren +.B XtManageChildren (\fImanage_children\fP, \fInum_manage_children\fP) and then returns immediately. .RE .IP \(bu 5 Otherwise, if a -.ZN CompositeClassExtension +.B CompositeClassExtension is defined with an \fIallows_change_managed_set\fP field with a value of -.ZN True , +.BR True , or if no -.ZN CompositeClassExtension +.B CompositeClassExtension is defined, and -.ZN XtChangeManagedSet was invoked with a NULL -\fIdo_change_proc\fP procedure, then the following is +.B XtChangeManagedSet +was invoked with a NULL \fIdo_change_proc\fP procedure, then the following is performed: .RS .IP \- 5 @@ -264,20 +239,20 @@ of the newly managed children are made viewable by: .RS .IP \- 5 Calling -.ZN XtRealizeWidget +.B XtRealizeWidget on each of the previously unmanaged child that is unrealized. .IP \- 5 Mapping each previously unmanaged child that has \fImap_when_managed\fP -.ZN True . +.BR True . .RE .LP The -.ZN XtIsManaged +.B XtIsManaged function returns -.ZN True +.B True if the specified widget is of class RectObj or any subclass thereof and is managed, or -.ZN False +.B False otherwise. .SH "SEE ALSO" XtMapWidget(__libmansuffix__), diff --git a/lib/libXt/man/XtMapWidget.man b/lib/libXt/man/XtMapWidget.man index 116402dcb..44b606df9 100644 --- a/lib/libXt/man/XtMapWidget.man +++ b/lib/libXt/man/XtMapWidget.man @@ -34,44 +34,17 @@ .ds Vn 2.2 .hw XtMap-Widget XtSet-Mapped-When-Managed XtUnmap-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtMapWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtMapWidget, XtSetMappedWhenManaged, XtUnmapWidget \- map and unmap widgets .SH SYNTAX +#include <X11/Intrinsic.h> .HP -int XtMapWidget(Widget \fIw\fP\^); +void XtMapWidget(Widget \fIw\fP\^); .HP void XtSetMappedWhenManaged(Widget \fIw\fP, Boolean \fImap_when_managed\fP); .HP -int XtUnmapWidget(Widget \fIw\fP\^); +void XtUnmapWidget(Widget \fIw\fP\^); .SH ARGUMENTS .IP \fImap_when_managed\fP 1i Specifies a Boolean value that indicates the new value of the map_when_managed @@ -81,27 +54,27 @@ Specifies the widget. .SH DESCRIPTION If the widget is realized and managed and if the new value of map_when_managed is -.ZN True , -.ZN XtSetMappedWhenManaged +.BR True , +.B XtSetMappedWhenManaged maps the window. If the widget is realized and managed and if the new value of map_when_managed is -.ZN False , +.BR False , it unmaps the window. -.ZN XtSetMappedWhenManaged +.B XtSetMappedWhenManaged is a convenience function that is equivalent to (but slightly faster than) calling -.ZN XtSetValues +.B XtSetValues and setting the new value for the mappedWhenManaged resource. As an alternative to using -.ZN XtSetMappedWhenManaged +.B XtSetMappedWhenManaged to control mapping, a client may set mapped_when_managed to -.ZN False +.B False and use -.ZN XtMapWidget +.B XtMapWidget and -.ZN XtUnmapWidget +.B XtUnmapWidget explicitly. .SH "SEE ALSO" XtManageChildren(__libmansuffix__) diff --git a/lib/libXt/man/XtName.man b/lib/libXt/man/XtName.man index 311f74dc8..8cfe5aa00 100644 --- a/lib/libXt/man/XtName.man +++ b/lib/libXt/man/XtName.man @@ -33,45 +33,18 @@ .ds Vn 2.2 .hw wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtName __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtName \- obtain widget's name .SH SYNTAX +#include <X11/Intrinsic.h> .HP String XtName(Widget \fIw\fP); .SH ARGUMENTS .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION -.ZN XtName +.B XtName returns the widget's name. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtNameToWidget.man b/lib/libXt/man/XtNameToWidget.man index dc483d39e..817732ab7 100644 --- a/lib/libXt/man/XtNameToWidget.man +++ b/lib/libXt/man/XtNameToWidget.man @@ -34,46 +34,18 @@ .ds Vn 2.2 .hw XtName-To-Widget XtWindow-To-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtNameToWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtNameToWidget, XtWindowToWidget \- translating strings to widgets or widgets to windows .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtNameToWidget(Widget \fIreference\fP, String \fInames\fP); +Widget XtNameToWidget(Widget \fIreference\fP, const char *\fInames\fP); .HP Widget XtWindowToWidget(Display *\fIdisplay\fP, Window \fIwindow\fP); .SH ARGUMENTS -.ds Di \ on which the window is defined .IP \fIdisplay\fP 1i -Specifies the display\*(Di. +Specifies the display on which the window is defined. .IP \fInames\fP 1i Specifies the fully qualified name of the desired widget. .IP \fIreference\fP 1i @@ -82,15 +54,15 @@ Specifies the widget from which the search is to start. Specify the window for which you want the widget. .SH DESCRIPTION The -.ZN XtNameToWidget +.B XtNameToWidget function looks for a widget whose name is the first component in the specified names and that is a pop-up child of reference (or a normal child if reference is a subclass of -.ZN compositeWidgetClass ). +.BR compositeWidgetClass ). It then uses that widget as the new reference and repeats the search after deleting the first component from the specified names. If it cannot find the specified widget, -.ZN XtNameToWidget +.B XtNameToWidget returns NULL. .LP Note that the names argument contains the name of a widget with respect to the @@ -99,20 +71,20 @@ specified reference widget and can contain more than one widget name of the specified reference widget. .LP If more than one child of the reference widget matches the name, -.ZN XtNameToWidget +.B XtNameToWidget can return any of the children. The \*(xI do not require that all children of a widget have unique names. If the specified names contain more than one component and if more than one child matches the first component, -.ZN XtNameToWidget +.B XtNameToWidget can return NULL if the single branch that it follows does not contain the named widget. That is, -.ZN XtNameToWidget +.B XtNameToWidget does not back up and follow other matching branches of the widget tree. .LP The -.ZN XtWindowToWidget +.B XtWindowToWidget function translates the specified window and display pointer into the appropriate widget instance. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtNextEvent.man b/lib/libXt/man/XtNextEvent.man index 3eea36ddc..3441686f9 100644 --- a/lib/libXt/man/XtNextEvent.man +++ b/lib/libXt/man/XtNextEvent.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtNext-Event XtPeek-Event XtProcess-Event XtMain-Loop wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtNextEvent __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtNextEvent, XtPending, XtPeekEvent, XtProcessEvent, XtMainLoop \- query and process events and input .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtNextEvent(XEvent *\fIevent_return\fP); .HP @@ -85,34 +58,34 @@ Returns the event information to the specified event structure. .IP \fImask\fP 1i Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of -.ZN XtIMXEvent , -.ZN XtIMTimer , -.ZN XtIMAlternateInput , +.BR XtIMXEvent , +.BR XtIMTimer , +.BR XtIMAlternateInput , and -.ZN XtIMSignal . +.BR XtIMSignal . As a convenience, the \*(tk defines the symbolic name -.ZN XtIMAll +.B XtIMAll to be the bitwise inclusive OR of all event types. .SH DESCRIPTION -.ZN XtNextEvent +.B XtNextEvent has been replaced by -.ZN XtAppNextEvent . +.BR XtAppNextEvent . .LP -.ZN XtPeekEvent +.B XtPeekEvent has been replaced by -.ZN XtAppPeekEvent . +.BR XtAppPeekEvent . .LP -.ZN XtPending +.B XtPending has been replaced by -.ZN XtAppPending . +.BR XtAppPending . .LP -.ZN XtProcessEvent +.B XtProcessEvent has been replaced by -.ZN XtAppProcessEvent . +.BR XtAppProcessEvent . .LP -.ZN XtMainLoop +.B XtMainLoop has been replaced by -.ZN XtAppMainLoop . +.BR XtAppMainLoop . .SH "SEE ALSO" XtAppNextEvent(3xt), XtAppPending(__libmansuffix__), XtAppPeekEvent(__libmansuffix__), XtAppProcessEvent(__libmansuffix__), XtAppMainLoop(__libmansuffix__) diff --git a/lib/libXt/man/XtOffset.man b/lib/libXt/man/XtOffset.man index db13de82b..abbba0159 100644 --- a/lib/libXt/man/XtOffset.man +++ b/lib/libXt/man/XtOffset.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtOffset __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtOffset, XtOffsetOf, XtNumber \- determine the byte offset or number of array elements .SH SYNTAX +#include <X11/Intrinsic.h> .HP Cardinal XtOffset(Type \fIpointer_type\fP, Field \fIfield_name\fP); .HP @@ -82,22 +55,22 @@ Specifies a type that is declared as a pointer to the structure. Specifies a type that is declared as a structure. .SH DESCRIPTION The -.ZN XtOffset +.B XtOffset macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations. .LP The -.ZN XtOffsetOf +.B XtOffsetOf macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than -.ZN XtOffset , +.BR XtOffset , which serves the same function. .LP The -.ZN XtNumber +.B XtNumber macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtOpenApplication.man b/lib/libXt/man/XtOpenApplication.man index c499eb580..7c1a1ee5d 100644 --- a/lib/libXt/man/XtOpenApplication.man +++ b/lib/libXt/man/XtOpenApplication.man @@ -33,59 +33,35 @@ .ds Vn 2.2 .hw XtOpen-Application XtVa-Open-Application .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtOpenApplication __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtOpenApplication, XtVaOpenApplication \- initialize, open, or close a display .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtOpenApplication(XtAppContext *\fIapp_context_return\fP, String -\fIapplication_class\fP, XrmOptionDescRec *\fIoptions\fP, Cardinal -\fInum_options\fP, int *\fIargc_in_out\fP, String *\fIargv_in_out\fP, String -*\fIfallback_resources\fP, WidgetClass \fIwidget_class\fP, ArgList \fIargs\fP, -Cardinal \fInum_args\fP); +Widget XtOpenApplication(XtAppContext *\fIapp_context_return\fP, +const char *\fIapplication_class\fP, +XrmOptionDescRec *\fIoptions\fP, Cardinal \fInum_options\fP, +int *\fIargc_in_out\fP, char **\fIargv_in_out\fP, +String *\fIfallback_resources\fP, +WidgetClass \fIwidget_class\fP, +ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP -Widget XtVaOpenApplication(XtAppContext *\fIapp_context_return\fP, String -\fIapplication_class\fP, XrmOptionDescRec *\fIoptions\fP, Cardinal -\fInum_options\fP, int *\fIargc_in_out\fP, String *\fIargv_in_out\fP, String -*\fIfallback_resources\fP, WidgetClass \fIwidget_class\fP, ...\^); +Widget XtVaOpenApplication(XtAppContext *\fIapp_context_return\fP, +const char *\fIapplication_class\fP, +XrmOptionDescRec *\fIoptions\fP, Cardinal \fInum_options\fP, +int *\fIargc_in_out\fP, char **\fIargv_in_out\fP, +String *\fIfallback_resources\fP, +WidgetClass \fIwidget_class\fP, ...\^); .SH ARGUMENTS .IP \fIapp_context_return\fP 1i Specifies the application context. -.ds Ac , which usually is the generic name for all instances of this application .IP \fIapplication_class\fP 1i -Specifies the class name of this application\*(Ac. +Specifies the class name of this application, which usually is the generic name for all instances of this application. .IP \fIoptions\fP 1i Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to -.ZN XrmParseCommand . +.BR XrmParseCommand . For further information, see \fI\*(xL\fP. .IP \fInum_options\fP 1i @@ -109,34 +85,37 @@ Specifies the variable argument list to override any other resource specification for the created shell widget. .SH DESCRIPTION The -.ZN XtOpenApplication +.B XtOpenApplication function calls -.ZN XtToolkitInitialize +.B XtToolkitInitialize followed by -.ZN XtCreateApplicationContext , +.BR XtCreateApplicationContext , then calls -.ZN XtOpenDisplay +.B XtOpenDisplay with \fIdisplay_string\fP NULL and \fIapplication_name\fP NULL, and finally calls -.ZN XtAppCreateShell +.B XtAppCreateShell with \fIapplication_name\fP NULL, the specified \fIwidget_class\fP, and the specified \fIargs\fP and \fInum_args\fP and returns the -created shell. The modified \fIargc\fP and \fIargv\fP returned by -.ZN XtDisplayInitialize +created shell. +The modified \fIargc\fP and \fIargv\fP returned by +.B XtDisplayInitialize are returned in \fIargc_in_out\fP and \fIargv_in_out\fP. If \fIapp_context_return\fP is not NULL, the created application context -is also returned. If the display specified by the command line cannot +is also returned. +If the display specified by the command line cannot be opened, an error message is issued and -.ZN XtOpenApplication -terminates the application. If \fIfallback_resources\fP is non-NULL, -.ZN XtAppSetFallbackResources +.B XtOpenApplication +terminates the application. +If \fIfallback_resources\fP is non-NULL, +.B XtAppSetFallbackResources is called with the value prior to calling -.ZN XtOpenDisplay . +.BR XtOpenDisplay . .LP XtAppInitialize and XtVaAppInitialize have been superceded by -.ZN XtOpenApplication +.B XtOpenApplication and -.ZN XtVaOpenApplication +.B XtVaOpenApplication respectively. .SH "SEE ALSO" XtAppInitialize(__libmansuffix__), XtVaAppInitialize(__libmansuffix__) diff --git a/lib/libXt/man/XtOwnSelection.man b/lib/libXt/man/XtOwnSelection.man index a355b1fc5..65d4b6014 100644 --- a/lib/libXt/man/XtOwnSelection.man +++ b/lib/libXt/man/XtOwnSelection.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtOwn-Selection XtOwn-Selection-Incremental XtDisown-Selection wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtOwnSelection __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtOwnSelection, XtOwnSelectionIncremental, XtDisownSelection \- set selection owner .SH SYNTAX +#include <X11/Intrinsic.h> .HP Boolean XtOwnSelection(Widget \fIw\fP, Atom \fIselection\fP, Time \fItime\fP, XtConvertSelectionProc \fIconvert_proc\fP, XtLoseSelectionProc @@ -92,25 +65,24 @@ lost selection ownership or NULL if the owner is not interested in being called back. .IP \fIselection\fP 1i Specifies an atom that describes the type of the selection (for example, -.ZN XA_PRIMARY , -.ZN XA_SECONDARY , +.BR XA_PRIMARY , +.BR XA_SECONDARY , or -.ZN XA_CLIPBOARD ). -.ds Ti ownership should commence or is to be relinquished +.BR XA_CLIPBOARD ). .IP \fItime\fP 1i -Specifies the timestamp that indicates when the selection \*(Ti. -.ds Wi that wishes to become the owner or to relinquish ownership +Specifies the timestamp that indicates when the selection +ownership should commence or is to be relinquished. .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget that wishes to become the owner or to relinquish ownership. .SH DESCRIPTION The -.ZN XtOwnSelection +.B XtOwnSelection function informs the \*(xI selection mechanism that a widget believes it owns a selection. It returns -.ZN True +.B True if the widget has successfully become the owner and -.ZN False +.B False otherwise. The widget may fail to become the owner if some other widget has asserted ownership at a time later than this widget. @@ -121,41 +93,43 @@ Also note that the lose_selection procedure is not called if the widget fails to obtain selection ownership in the first place. .LP The -.ZN XtOwnSelectionIncremental +.B XtOwnSelectionIncremental procedure informs the Intrinsics incremental selection mechanism that -the specified widget wishes to own the selection. It returns -.ZN True +the specified widget wishes to own the selection. +It returns +.B True if the specified widget successfully becomes the selection owner or -.ZN False -otherwise. For more information about \fIselection\fP, \fItarget\fP, +.B False +otherwise. +For more information about \fIselection\fP, \fItarget\fP, and \fItime\fP, see Section 2.6 of the \fIInter-Client Communication Conventions Manual\fP. .LP A widget that becomes the selection owner using -.ZN XtOwnSelectionIncremental +.B XtOwnSelectionIncremental may use -.ZN XtDisownSelection +.B XtDisownSelection to relinquish selection ownership. .LP The -.ZN XtDisownSelection +.B XtDisownSelection function informs the \*(xI selection mechanism that the specified widget is to lose ownership of the selection. If the widget does not currently own the selection either because it lost the selection or because it never had the selection to begin with, -.ZN XtDisownSelection +.B XtDisownSelection does nothing. .LP After a widget has called -.ZN XtDisownSelection , +.BR XtDisownSelection , its convert procedure is not called even if a request arrives later with a timestamp during the period that this widget owned the selection. However, its done procedure will be called if a conversion that started before the call to -.ZN XtDisownSelection +.B XtDisownSelection finishes after the call to -.ZN XtDisownSelection . +.BR XtDisownSelection . .SH "SEE ALSO" XtAppGetSelectionTimeout(__libmansuffix__), XtGetSelectionValue(__libmansuffix__) diff --git a/lib/libXt/man/XtParent.man b/lib/libXt/man/XtParent.man index 004402c1f..5a91983e8 100644 --- a/lib/libXt/man/XtParent.man +++ b/lib/libXt/man/XtParent.man @@ -34,45 +34,18 @@ .ds Vn 2.2 .hw wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtParent __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtParent \- obtain widget's parent widget id .SH SYNTAX +#include <X11/Intrinsic.h> .HP Widget XtParent(Widget \fIw\fP); .SH ARGUMENTS .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION -.ZN XtParent +.B XtParent returns the widget's parent widget ID. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtParseAcceleratorTable.man b/lib/libXt/man/XtParseAcceleratorTable.man index 71285fc3c..3e2d0fc5d 100644 --- a/lib/libXt/man/XtParseAcceleratorTable.man +++ b/lib/libXt/man/XtParseAcceleratorTable.man @@ -32,66 +32,38 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtParse-Accelerator-Table XtInstall-Accelerators XtInstall-All-Accelerators wid-get +.hw XtParse-Accelerator-Table XtInstall-Accelerators +.hw XtInstall-All-Accelerators wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtParseAcceleratorTable __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtParseAcceleratorTable, XtInstallAccelerators, XtInstallAllAccelerators \- managing accelerator tables .SH SYNTAX +#include <X11/Intrinsic.h> .HP -XtAccelerators XtParseAcceleratorTable(String \fIsource\fP); +XtAccelerators XtParseAcceleratorTable(const char * \fIsource\fP); .HP void XtInstallAccelerators(Widget \fIdestination\fP, Widget \fIsource\fP); .HP void XtInstallAllAccelerators(Widget \fIdestination\fP, Widget \fIsource\fP); .SH ARGUMENTS -.ds So to compile .IP \fIsource\fP 1i -Specifies the accelerator table \*(So. +Specifies the accelerator table to compile. .IP \fIdestination\fP 1i Specifies the widget on which the accelerators are to be installed. -.ds Sr widget or the root widget of the widget tree .IP \fIsource\fP 1i -Specifies the \*(Sr from which the accelerators are to come. +Specifies the widget or the root widget of the widget tree from which the accelerators are to come. .SH DESCRIPTION The -.ZN XtParseAcceleratorTable +.B XtParseAcceleratorTable function compiles the accelerator table into the opaque internal representation. .LP The -.ZN XtInstallAccelerators +.B XtInstallAccelerators function installs the accelerators from source onto destination by augmenting the destination translations with the source accelerators. If the source display_accelerator method is non-NULL, -.ZN XtInstallAccelerators +.B XtInstallAccelerators calls it with the source widget and a string representation of the accelerator table, which indicates that its accelerators have been installed @@ -100,11 +72,11 @@ The string representation of the accelerator table is its canonical translation table representation. .LP The -.ZN XtInstallAllAccelerators +.B XtInstallAllAccelerators function recursively descends the widget tree rooted at source and installs the accelerators of each widget encountered onto destination. A common use os to call -.ZN XtInstallAllAccelerators +.B XtInstallAllAccelerators and pass the application main window as the source. .SH "SEE ALSO" XtParseTranslationTable(1) diff --git a/lib/libXt/man/XtParseTranslationTable.man b/lib/libXt/man/XtParseTranslationTable.man index 271400ed9..60feaef8c 100644 --- a/lib/libXt/man/XtParseTranslationTable.man +++ b/lib/libXt/man/XtParseTranslationTable.man @@ -32,42 +32,16 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtParse-Translation-Table XtAugment-Translations XtOverride-Translations XtUninstall-Translations wid-get +.hw XtParse-Translation-Table XtAugment-Translations XtOverride-Translations +.hw XtUninstall-Translations wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtParseTranslationTable __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtParseTranslationTable, XtAugmentTranslations, XtOverrideTranslations, XtUninstallTranslations \- manage translation tables .SH SYNTAX +#include <X11/Intrinsic.h> .HP -XtTranslations XtParseTranslationTable(String \fItable\fP); +XtTranslations XtParseTranslationTable(const char *\fItable\fP); .HP void XtAugmentTranslations(Widget \fIw\fP, XtTranslations \fItranslations\fP); .HP @@ -80,22 +54,21 @@ void XtUninstallTranslations(Widget \fIw\fP); Specifies the translation table to compile. .IP \fItranslations\fP 1i Specifies the compiled translation table to merge in (must not be NULL). -.ds Wi into which the new translations are to be merged or removed .IP \fIw\fP 1i -Specifies the widget \*(Wi. +Specifies the widget into which the new translations are to be merged or removed. .SH DESCRIPTION The -.ZN XtParseTranslationTable +.B XtParseTranslationTable function compiles the translation table into the opaque internal representation of type -.ZN XtTranslations . +.BR XtTranslations . Note that if an empty translation table is required for any purpose, one can be obtained by calling -.ZN XtParseTranslationTable +.B XtParseTranslationTable and passing an empty string. .LP The -.ZN XtAugmentTranslations +.B XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that @@ -103,7 +76,7 @@ already exists in the widget's translations, the new translation is ignored. .LP The -.ZN XtOverrideTranslations +.B XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that @@ -111,12 +84,12 @@ already exists in the widget's translations, the new translation is merged in and override the widget's translation. .LP To replace a widget's translations completely, use -.ZN XtSetValues +.B XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value. .LP The -.ZN XtUninstallTranslations +.B XtUninstallTranslations function causes the entire translation table for widget to be removed. .SH "SEE ALSO" XtAppAddActions(__libmansuffix__), diff --git a/lib/libXt/man/XtPopdown.man b/lib/libXt/man/XtPopdown.man index 25e2e750d..2474a6b42 100644 --- a/lib/libXt/man/XtPopdown.man +++ b/lib/libXt/man/XtPopdown.man @@ -34,71 +34,43 @@ .ds Vn 2.2 .hw XtCallback-Popdown wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtPopdown __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtPopdown, XtCallbackPopdown \- unmap a pop-up .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtPopdown(Widget \fIpopup_shell\fP); .HP void XtCallbackPopdown(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer \fIcall_data\fP); +.SH ACTIONS .HP -void MenuPopdown(String \fIshell_name\fP); +void XtMenuPopdown(String \fIshell_name\fP); .SH ARGUMENTS .IP \fIcall_data\fP 1i Specifies the callback data, which is not used by this procedure. .IP \fIclient_data\fP 1i Specifies a pointer to the -.ZN XtPopdownID +.B XtPopdownID structure. -.ds Ps \ to pop down .IP \fIpopup_shell\fP 1i -Specifies the widget shell\*(Ps. -.ds Sn down +Specifies the widget shell to pop down. .IP \fIshell_name\fP 1i -Specifies the name of the widget shell to pop \*(Sn. +Specifies the name of the widget shell to pop down. .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION The -.ZN XtPopdown +.B XtPopdown function performs the following: .IP \(bu 5 Calls -.ZN XtCheckSubclass +.B XtCheckSubclass .\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass) to ensure popup_shell is a subclass of -.ZN Shell . +.BR Shell . .IP \(bu 5 Checks that popup_shell is currently popped_up; otherwise, it generates an error. @@ -106,49 +78,53 @@ otherwise, it generates an error. Unmaps popup_shell's window. .IP \(bu 5 If popup_shell's grab_kind is either -.ZN XtGrabNonexclusive +.B XtGrabNonexclusive or -.ZN XtGrabExclusive , +.BR XtGrabExclusive , it calls -.ZN XtRemoveGrab . +.BR XtRemoveGrab . .\".ZN XtRemoveGrab(popup_shell) .IP \(bu 5 Sets pop-up shell's popped_up field to -.ZN False . +.BR False . .IP \(bu 5 Calls the callback procedures on the shell's popdown_callback list. .LP The -.ZN XtCallbackPopdown +.B XtCallbackPopdown function casts the client data parameter to an -.ZN XtPopdownID +.B XtPopdownID pointer: .LP -.Ds 0 +.RS +.nf +.ft CW typedef struct { Widget shell_widget; Widget enable_widget; } XtPopdownIDRec, *XtPopdownID; -.De +.ft R +.fi +.RE .LP The shell_widget is the pop-up shell to pop down, and the enable_widget is the widget that was used to pop it up. .LP -.ZN XtCallbackPopdown +.B XtCallbackPopdown calls -.ZN XtPopdown +.B XtPopdown with the specified shell_widget and then calls -.ZN XtSetSensitive +.B XtSetSensitive to resensitize the enable_widget. .LP If a shell name is not given, -.ZN MenuPopdown +.B XtMenuPopdown calls -.ZN XtPopdown +.B XtPopdown with the widget for which the translation is specified. If a shell_name is specified in the translation table, -.ZN MenuPopdown +.B XtMenuPopdown tries to find the shell by looking up the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children @@ -156,7 +132,7 @@ of that parent, it pops down the shell; otherwise, it moves up the parent chain as needed. If -.ZN MenuPopdown +.B XtMenuPopdown gets to the application top-level shell widget and cannot find a matching shell, it generates an error. diff --git a/lib/libXt/man/XtPopup.man b/lib/libXt/man/XtPopup.man index 797379558..2035ef636 100644 --- a/lib/libXt/man/XtPopup.man +++ b/lib/libXt/man/XtPopup.man @@ -32,55 +32,30 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtPopup-Spring-Loaded XtCallback-None XtCallback-Nonexclusive XtCallback-Exclusive wid-get +.hw XtPopup-Spring-Loaded XtCallback-None XtCallback-Nonexclusive +.hw XtCallback-Exclusive wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtPopup __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive \- map a pop-up .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtPopup(Widget \fIpopup_shell\fP, XtGrabKind \fIgrab_kind\fP); .HP void XtPopupSpringLoaded(Widget \fIpopup_shell\fP); .HP void XtCallbackNone(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer -\fIcall_data\fP): +\fIcall_data\fP); .HP void XtCallbackNonexclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer \fIcall_data\fP); .HP void XtCallbackExclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer \fIcall_data\fP); +.SH ACTIONS .HP -void MenuPopup(String \fIshell_name\fP); +void XtMenuPopup(String \fIshell_name\fP); .SH ARGUMENTS .IP \fIcall_data\fP 1i Specifies the callback data, @@ -90,139 +65,143 @@ Specifies the pop-up shell. .IP \fIgrab_kind\fP 1i Specifies the way in which user events should be constrained. .IP \fIpopup_shell\fP 1i -Specifies the widget shell\*(Ps. +Specifies the widget shell. .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION The -.ZN XtPopup +.B XtPopup function performs the following: .IP \(bu 5 Calls -.ZN XtCheckSubclass +.B XtCheckSubclass .\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass) to ensure popup_shell is a subclass of -.ZN Shell . +.BR Shell . .IP \(bu 5 Generates an error if the shell's popped_up field is already -.ZN True . +.BR True . .IP \(bu 5 Calls the callback procedures on the shell's popup_callback list. .IP \(bu 5 Sets the shell popped_up field to -.ZN True , +.BR True , the shell spring_loaded field to -.ZN False , +.BR False , and the shell grab_kind field from grab_kind. .IP \(bu 5 If the shell's create_popup_child field is non-NULL, -.ZN XtPopup +.B XtPopup calls it with popup_shell as the parameter. .IP \(bu 5 If grab_kind is either -.ZN XtGrabNonexclusive +.B XtGrabNonexclusive or -.ZN XtGrabExclusive , +.BR XtGrabExclusive , it calls: .LP -.Ds +.RS +.ft CW +.nf XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False) -.De +.fi +.ft R +.RE .IP \(bu 5 Calls -.ZN XtRealizeWidget +.B XtRealizeWidget with popup_shell specified. .IP \(bu 5 Calls -.ZN XMapWindow +.B XMapWindow with popup_shell specified. .LP The -.ZN XtPopupSpringLoaded +.B XtPopupSpringLoaded function performs exactly as -.ZN XtPopup +.B XtPopup except that it sets the shell \fIspring_loaded\fP field to -.ZN True +.B True and always calls -.ZN XtAddGrab +.B XtAddGrab with \fIexclusive\fP -.ZN True +.B True and \fIspring_loaded\fP -.ZN True . +.BR True . .LP The -.ZN XtCallbackNone , -.ZN XtCallbackNonexclusive , +.BR XtCallbackNone , +.BR XtCallbackNonexclusive , and -.ZN XtCallbackExclusive +.B XtCallbackExclusive functions call -.ZN XtPopup +.B XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. -.ZN XtCallbackNone , -.ZN XtCallbackNonexclusive , +.BR XtCallbackNone , +.BR XtCallbackNonexclusive , and -.ZN XtCallbackExclusive +.B XtCallbackExclusive specify -.ZN XtGrabNone , -.ZN XtGrabNonexclusive , +.BR XtGrabNone , +.BR XtGrabNonexclusive , and -.ZN XtGrabExclusive , +.BR XtGrabExclusive , respectively. Each function then sets the widget that executed the callback list to be insensitive by using -.ZN XtSetSensitive . +.BR XtSetSensitive . Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button. .LP -.ZN MenuPopup +.B XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to -.ZN MenuPopup +.B XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation. .LP If -.ZN MenuPopup +.B XtMenuPopup is invoked on -.ZN ButtonPress +.B ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to -.ZN XtGrabExclusive +.B XtGrabExclusive and spring_loaded set to -.ZN True . +.BR True . If -.ZN MenuPopup +.B XtMenuPopup is invoked on -.ZN EnterWindow +.B EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to -.ZN XtGrabNonexclusive +.B XtGrabNonexclusive and spring_loaded set to -.ZN False . +.BR False . Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur: .IP \(bu 5 Calls -.ZN XtCheckSubclass +.B XtCheckSubclass .\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass) to ensure popup_shell is a subclass of -.ZN Shell . +.BR Shell . .IP \(bu 5 Generates an error if the shell's popped_up field is already -.ZN True . +.BR True . .IP \(bu 5 Calls the callback procedures on the shell's popup_callback list. .IP \(bu 5 Sets the shell popped_up field to -.ZN True +.B True and the shell grab_kind and spring_loaded fields appropriately. .IP \(bu 5 If the shell's create_popup_child field is non-NULL, @@ -230,28 +209,32 @@ it is called with popup_shell as the parameter. .IP \(bu 5 Calls: .LP -.Ds +.RS +.ft CW +.nf XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded) -.De +.fi +.ft R +.RE .IP \(bu 5 Calls -.ZN XtRealizeWidget +.B XtRealizeWidget with popup_shell specified. .IP \(bu 5 Calls -.ZN XMapWindow +.B XMapWindow with popup_shell specified. .LP (Note that these actions are the same as those for -.ZN XtPopup .) -.ZN MenuPopup +.BR XtPopup .) +.B XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If -.ZN MenuPopup +.B XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtProcessLock.man b/lib/libXt/man/XtProcessLock.man index 17d47fbe4..9e79a97dc 100644 --- a/lib/libXt/man/XtProcessLock.man +++ b/lib/libXt/man/XtProcessLock.man @@ -33,47 +33,20 @@ .ds Vn 2.2 .hw XtProcess-Lock XtProcess-Unlock wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtProcessLock __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtProcessLock, XtProcessUnlock \- lock and unlock process .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtProcessLock(void); .HP void XtProcessUnlock(void); .SH DESCRIPTION -.ZN XtProcessLock +.B XtProcessLock is used to lock all process global data. .LP -.ZN XtProcessUnlock +.B XtProcessUnlock unlocks the process. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtQueryGeometry.man b/lib/libXt/man/XtQueryGeometry.man index 2d7a559b5..9c99e0f46 100644 --- a/lib/libXt/man/XtQueryGeometry.man +++ b/lib/libXt/man/XtQueryGeometry.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtQuery-Geometry wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtQueryGeometry __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtQueryGeometry \- query the preferred geometry of a child widget .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtGeometryResult XtQueryGeometry(Widget \fIw\fP\^, XtWidgetGeometry *\fIintended\fP, XtWidgetGeometry *\fIpreferred_return\fP\^); @@ -83,19 +56,19 @@ the child's parent sets any changes that it intends to make to the child's geometry in the corresponding fields of the intended structure, sets the corresponding bits in intended.request_mode, and calls -.ZN XtQueryGeometry . +.BR XtQueryGeometry . .LP -.ZN XtQueryGeometry +.B XtQueryGeometry clears all bits in the preferred_return->request_mode and checks the query_geometry field of the specified widget's class record. If query_geometry is not NULL, -.ZN XtQueryGeometry +.B XtQueryGeometry calls the query_geometry procedure and passes as arguments the specified widget, intended, and preferred_return structures. If the intended argument is NULL, -.ZN XtQueryGeometry +.B XtQueryGeometry replaces it with a pointer to an -.ZN XtWidgetGeometry +.B XtWidgetGeometry structure with request_mode=0 before calling query_geometry. .SH "SEE ALSO" XtConfigureWidget(__libmansuffix__), diff --git a/lib/libXt/man/XtRealizeWidget.man b/lib/libXt/man/XtRealizeWidget.man index 4b9341219..361b77227 100644 --- a/lib/libXt/man/XtRealizeWidget.man +++ b/lib/libXt/man/XtRealizeWidget.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtRealize-Widget XtIs-Realized XtUnrealize-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtRealizeWidget __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtRealizeWidget, XtIsRealized, XtUnrealizeWidget \- realize and unrealize widgets .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtRealizeWidget(Widget \fIw\fP); .HP @@ -77,7 +50,7 @@ void XtUnrealizeWidget(Widget \fIw\fP); Specifies the widget. .SH DESCRIPTION If the widget is already realized, -.ZN XtRealizeWidget +.B XtRealizeWidget simply returns. Otherwise, it performs the following: .IP \(bu 5 @@ -89,16 +62,16 @@ at the specified widget and calls the change_managed procedure of each composite widget that has one or more managed children. .IP \(bu 5 Constructs an -.ZN XSetWindowAttributes +.B XSetWindowAttributes structure filled in with information derived from the -.ZN Core +.B Core widget fields and calls the realize procedure for the widget, which adds any widget-specific attributes and creates the X window. .IP \(bu 5 If the widget is not a subclass of -.ZN compositeWidgetClass , -.ZN XtRealizeWidget +.BR compositeWidgetClass , +.B XtRealizeWidget returns; otherwise, it continues and performs the following: .RS .IP \- 5 @@ -108,23 +81,23 @@ Primitive widgets that instantiate children are responsible for realizing those children themselves. .IP \- 5 Maps all of the managed children windows that have mapped_when_managed -.ZN True . +.BR True . (If a widget is managed but mapped_when_managed is -.ZN False , +.BR False , the widget is allocated visual space but is not displayed. Some people seem to like this to indicate certain states.) .RE .LP If the widget is a top-level shell widget (that is, it has no parent), and mapped_when_managed is -.ZN True , -.ZN XtRealizeWidget +.BR True , +.B XtRealizeWidget maps the widget window. .LP The -.ZN XtIsRealized +.B XtIsRealized function returns -.ZN True +.B True if the widget has been realized, that is, if the widget has a nonzero X window ID. .LP @@ -133,12 +106,12 @@ operate differently after the widget has been realized. .LP The -.ZN XtUnrealizeWidget +.B XtUnrealizeWidget function destroys the windows of an existing widget and all of its children (recursively down the widget tree). To recreate the windows at a later time, call -.ZN XtRealizeWidget +.B XtRealizeWidget again. If the widget was managed, it will be unmanaged automatically before its window is freed. diff --git a/lib/libXt/man/XtRegisterDrawable.man b/lib/libXt/man/XtRegisterDrawable.man index 8d7e54a06..352d0a300 100644 --- a/lib/libXt/man/XtRegisterDrawable.man +++ b/lib/libXt/man/XtRegisterDrawable.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtRegister-Drawable XtUnregister-Drawable XtWindow-To-Widget wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtRegisterDrawable __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtRegisterDrawable \- register a drawable with the Intrinsics event dispatcher .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtRegisterDrawable(Display* \fIdisplay\fP, Drawable \fIdrawable\fP, Widget \fIwidget\fP); @@ -78,11 +51,12 @@ Specifies the drawable to register. .IP \fIwidget\fP 1i Specifies the widget to register the drawable for. .SH DESCRIPTION -.ZN XtRegisterDrawable +.B XtRegisterDrawable associates the specified drawable with the specified widget so that future calls to -.ZN XtWindowToWidget -with the drawable will return the widget. The default event dispatcher +.B XtWindowToWidget +with the drawable will return the widget. +The default event dispatcher will dispatch future core events that arrive with the drawable to the widget as though the event contained the widget's window, but the event itself will not be changed in any way when being passed to even handler @@ -91,15 +65,15 @@ or action procedures. If the drawable is already registered with another widget, or if the drawable is the window of a widget in the client's widget tree, the results of calling -.ZN XtRegisterDrawable +.B XtRegisterDrawable are undefined. .LP -.ZN XtUnregisterDrawable +.B XtUnregisterDrawable removes an association created with -.ZN XtRegisterDrawable . +.BR XtRegisterDrawable . If the drawable is the window of a widget in the client's widget tree the results of calling -.ZN XtUnregisterDrawable +.B XtUnregisterDrawable are undefined. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtRegisterGrabAction.man b/lib/libXt/man/XtRegisterGrabAction.man index 9a24661ad..c6d7765c7 100644 --- a/lib/libXt/man/XtRegisterGrabAction.man +++ b/lib/libXt/man/XtRegisterGrabAction.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtRegister-Grab-Action wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtRegisterGrabAction __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtRegisterGrabAction \- register button and key grabs .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtRegisterGrabAction(XtActionProc \fIaction_proc\fP, Boolean \fIowner_events\fP, unsigned int \fIevent_mask\fP, int \fIpointer_mode\fP, int @@ -77,11 +50,11 @@ Specifies the action procedure to search for in translation tables. .IP \fIparams\fP 1i .IP \fInum_params\fP 1i Specify arguments to -.ZN XtGrabButton +.B XtGrabButton or -.ZN XtGrabKey +.B XtGrabKey .SH DESCRIPTION -.ZN XtRegisterGrabAction +.B XtRegisterGrabAction adds the specified \fIaction_proc\fP to a list known to the translation manager. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtReservePropertyAtom.man b/lib/libXt/man/XtReservePropertyAtom.man index de82e2a49..46ad35f7d 100644 --- a/lib/libXt/man/XtReservePropertyAtom.man +++ b/lib/libXt/man/XtReservePropertyAtom.man @@ -33,40 +33,13 @@ .ds Vn 2.2 .hw XtReserve-Property-Atom XtRelease-Property-Atom wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtReservePropertyAtom __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtReservePropertyAtom, XtReleasePropertyAtom \- maintain a cache of property atoms .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtReservePropertyAtom(Widget \fIw\fP); +Atom XtReservePropertyAtom(Widget \fIw\fP); .HP void XtReleasePropertyAtom(Widget \fIw\fP, Atom \fIatom\fP); .SH ARGUMENTS @@ -75,7 +48,7 @@ Specifies the widget used to reserve the atom. .IP \fIatom\fP 1i Specifies the atom whose reservation is to be released. .SH DESCRIPTION -.ZN XtReservePropertyAtom +.B XtReservePropertyAtom returns an atom that may be used for properties in conjunction with conversion requests from widget \fIw\fP. The atom returned will be unique for the display of the widget specified. diff --git a/lib/libXt/man/XtResolvePathname.man b/lib/libXt/man/XtResolvePathname.man index 4778a135b..26cfba16b 100644 --- a/lib/libXt/man/XtResolvePathname.man +++ b/lib/libXt/man/XtResolvePathname.man @@ -31,45 +31,25 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtResolve-Pathname wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtResolvePathname __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtResolvePathname \- search for a file using standard substitution .SH SYNTAX +#include <X11/Intrinsic.h> .HP -String XtResolvePathname(Display *\fIdisplay\fP, String \fItype\fP, String -\fIfilename\fP, String \fIsuffix\fP, String \fIpath\fP, Substitution -\fIsubstitutions\fP, Cardinal \fInum_substitutions\fP, XtFilePredicate -\fIpredicate\fP); +char * XtResolvePathname(Display *\fIdisplay\fP, +const char *\fItype\fP, +const char *\fIfilename\fP, +const char *\fIsuffix\fP, +const char *\fIpath\fP, +Substitution \fIsubstitutions\fP, Cardinal \fInum_substitutions\fP, +XtFilePredicate \fIpredicate\fP); .SH ARGUMENTS .IP \fIdisplay\fP 1.2i Specifies the display to use to find the language for language substitutions. @@ -91,28 +71,30 @@ Specifies the number of entries in \fIsubstitutions\fP. Specifies a procedure called to judge each potential file name, or NULL. .SH DESCRIPTION The substitutions specified by -.ZN XtResolvePathname +.B XtResolvePathname are determined from the value of the language string retrieved by -.ZN XtDisplayInitialize +.B XtDisplayInitialize for the specified display. To set the -language for all applications specify ``*xnlLanguage: \fIlang\fP'' in the +language for all applications specify \*(``*xnlLanguage: \fIlang\fP\*('' in the resource database. -.IN "xnlLanguage" The format and content of the language string are -implementation-defined. One suggested syntax is to compose -the language string of three parts; a ``language part'', a -``territory part'' and a ``codeset part''. The manner in which +implementation-defined. +One suggested syntax is to compose +the language string of three parts: +a \*(``language part\*('', a +\*(``territory part\*('' and a \*(``codeset part\*(''. +The manner in which this composition is accomplished is implementation-defined and the \*(xI make no interpretation of the parts other than to use them in substitutions as described below. .LP -.ZN XtResolvePathname +.B XtResolvePathname calls -.ZN XtFindFile +.B XtFindFile with the following substitutions in addition to any passed by the caller and returns the value returned by -.ZN XtFindFile : +.BR XtFindFile : .IP %N 5 The value of the \fIfilename\fP parameter, or the application's class name if \fIfilename\fP is NULL. @@ -135,18 +117,18 @@ database associated with \fIdisplay\fP. The value of the implementation-specific default path. .LP If a path is passed to -.ZN XtResolvePathname , +.BR XtResolvePathname , it will be passed along to -.ZN XtFindFile . +.BR XtFindFile . If the \fIpath\fP argument is NULL, the value of the -.ZN \s-1XFILESEARCHPATH\s+1 -.IN "XFILESEARCHPATH" "" "@DEF@" +.B \s-1XFILESEARCHPATH\s+1 environment variable will be passed to -.ZN XtFindFile . +.BR XtFindFile . If -.ZN \s-1XFILESEARCHPATH\s+1 +.B \s-1XFILESEARCHPATH\s+1 is not defined, an implementation-specific default path will be used -which contains at least 6 entries. These entries +which contains at least 6 entries. +These entries must contain the following substitutions: .nf @@ -167,11 +149,12 @@ with a colon, it will be preceded by %N%S. If the path includes two adjacent colons, \fB%N%S\fP will be inserted between them. .LP The \fItype\fP parameter is intended to be a category of files, usually -being translated into a directory in the pathname. Possible values -might include ``app-defaults'', ``help'', and ``bitmap''. +being translated into a directory in the pathname. +Possible values +might include \*(``app-defaults\*('', \*(``help\*('', and \*(``bitmap\*(''. .LP The \fIsuffix\fP parameter is intended to be appended to the file name. -Possible values might include ``.txt'', ``.dat'', and ``.bm''. +Possible values might include \*(``.txt\*('', \*(``.dat\*('', and \*(``.bm\*(''. .LP A suggested value for the default path on POSIX-based systems is .IP @@ -183,35 +166,38 @@ __projectroot__/lib/X11/%l/%T/%N%S:__projectroot__/lib/X11/%T/%N%S .LP Using this example, if the user has specified a language, it will be used as a subdirectory of __projectroot__/lib/X11 that will be searched -for other files. If the desired file is not found there, the lookup +for other files. +If the desired file is not found there, the lookup will be tried again using just the language part of the specification. If the file is not there, it will be looked for in -__projectroot__/lib/X11. The \fItype\fP parameter is used as a +__projectroot__/lib/X11. +The \fItype\fP parameter is used as a subdirectory of the language directory or of __projectroot__/lib/X11, and \fIsuffix\fP is appended to the file name. .LP The %D substitution allows the addition of path elements to the implementation-specific default path, typically to allow additional directories to be searched without preventing -resources in the system directories from being found. For example, a -user installing resource files under a directory called ``ourdir'' +resources in the system directories from being found. +For example, a +user installing resource files under a directory called \*(``ourdir\*('' might set -.ZN \s-1XFILESEARCHPATH\s+1 +.B \s-1XFILESEARCHPATH\s+1 to .IP %D:ourdir/%T/%N%C:ourdir/%T/%N .LP The customization string is obtained by querying the resource database currently associated with the display (the database returned by -.ZN XrmGetDatabase ) +.BR XrmGetDatabase ) for the resource \fIapplication_name\fP.customization, class \fIapplication_class\fP.Customization where \fIapplication_name\fP and \fIapplication_class\fP are the values returned by -.ZN XtGetApplicationNameAndClass . +.BR XtGetApplicationNameAndClass . If no value is specified in the database, the empty string is used. .LP It is the responsibility of the caller to free the returned string using -.ZN XtFree +.B XtFree when it is no longer needed. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtSessionGetToken.man b/lib/libXt/man/XtSessionGetToken.man index 52c7c2f2c..f09a046c4 100644 --- a/lib/libXt/man/XtSessionGetToken.man +++ b/lib/libXt/man/XtSessionGetToken.man @@ -34,58 +34,29 @@ .ds Vn 2.2 .hw XtSession-Get-Token XtSession-Return-Token wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSessionGetToken __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSessionGetToken, XtSessionReturnToken \- token management for checkpointing .SH SYNTAX +#include <X11/Intrinsic.h> .HP -XtCheckpointToken XtSessionGetToken(Widget \fIw\fP, int \fItype\fP); +XtCheckpointToken XtSessionGetToken(Widget \fIw\fP); .HP void XtSessionReturnToken(XtCheckpointToken \fItoken\fP); .SH ARGUMENTS .IP \fIw\fP 1i Specifies the session widget. -.IP \fItype\fP 1i -Specifies the value in the type field of the token. .IP \fItoken\fP 1i Specifies the token to be returned. .SH DESCRIPTION The -.ZN XtSessionGetToken +.B XtSessionGetToken function will return NULL if the checkpoint operation instigated by the session manager is not currently under way. .LP To indicate the completion of a deferred save operation and to return the checkpoint token use -.ZN XtSessionReturnToken . +.BR XtSessionReturnToken . .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtSetArg.man b/lib/libXt/man/XtSetArg.man index cd80bd1df..77f31f308 100644 --- a/lib/libXt/man/XtSetArg.man +++ b/lib/libXt/man/XtSetArg.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtSet-Arg XtMerge-Arg-Lists wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetArg __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetArg, XtMergeArgLists \- set and merge ArgLists .SH SYNTAX +#include <X11/Intrinsic.h> .HP int XtSetArg(Arg \fIarg\fP, String \fIname\fP, XtArgVal \fIvalue\fP); .HP @@ -76,10 +49,10 @@ ArgList XtMergeArgLists(ArgList \fIargs1\fP, Cardinal \fInum_args1\fP, ArgList Specifies the name-value pair to set. .IP \fIargs1\fP 1i Specifies the first -.ZN ArgList . +.BR ArgList . .IP \fIargs2\fP 1i Specifies the second -.ZN ArgList . +.BR ArgList . .IP \fInum_args1\fP 1i Specifies the number of arguments in the first argument list. .IP \fInum_args2\fP 1i @@ -88,15 +61,17 @@ Specifies the number of arguments in the second argument list. Specifies the name of the resource. .IP \fIvalue\fP 1i Specifies the value of the resource if it will fit in an -.ZN XtArgVal +.B XtArgVal or the address. .SH DESCRIPTION The -.ZN XtSetArg +.B XtSetArg function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example: .LP -.Ds +.RS +.nf +.ft CW Arg args[20]; int n; @@ -104,35 +79,41 @@ n = 0; XtSetArg(args[n], XtNheight, 100); n++; XtSetArg(args[n], XtNwidth, 200); n++; XtSetValues(widget, args, n); -.De +.ft R +.fi +.RE .LP Alternatively, an application can statically declare the argument list and use -.ZN XtNumber : +.BR XtNumber : .LP -.Ds +.RS +.nf +.ft CW static Args args[] = { {XtNheight, (XtArgVal) 100}, {XtNwidth, (XtArgVal) 200}, }; XtSetValues(Widget, args, XtNumber(args)); -.De +.ft R +.fi +.RE .LP Note that you should not use auto-increment or auto-decrement within the first argument to -.ZN XtSetArg . -.ZN XtSetArg +.BR XtSetArg . +.B XtSetArg can be implemented as a macro that dereferences the first argument twice. .LP The -.ZN XtMergeArgLists +.B XtMergeArgLists function allocates enough storage to hold the combined -.ZN ArgList +.B ArgList structures and copies them into it. Note that it does not check for duplicate entries. When it is no longer needed, free the returned storage by using -.ZN XtFree . +.BR XtFree . .SH "SEE ALSO" XtOffset(__libmansuffix__) .br diff --git a/lib/libXt/man/XtSetKeyTranslator.man b/lib/libXt/man/XtSetKeyTranslator.man index 28d0572df..a1738c815 100644 --- a/lib/libXt/man/XtSetKeyTranslator.man +++ b/lib/libXt/man/XtSetKeyTranslator.man @@ -32,40 +32,14 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtSet-Key-Translator XtTranslate-Keycode XtRegister-Case-Converter XtConvert-Case wid-get +.hw XtSet-Key-Translator XtTranslate-Keycode XtRegister-Case-Converter +.hw XtConvert-Case wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetKeyTranslator __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetKeyTranslator, XtTranslateKeycode, XtRegisterCaseConverter, XtConvertCase \- convert KeySym to KeyCodes .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetKeyTranslator(Display *\fIdisplay\fP, XtKeyProc \fIproc\fP); .HP @@ -79,9 +53,8 @@ KeySym \fIstart\fP, KeySym \fIstop\fP); void XtConvertCase(Display *\fIdisplay\fP, KeySym \fIkeysym\fP, KeySym *\fIlower_return\fP, KeySym *\fIupper_return\fP); .SH ARGUMENTS -.ds Di .IP \fIdisplay\fP 1i -Specifies the display\*(Di. +Specifies the display. .IP \fIkeycode\fP 1i Specifies the KeyCode to translate. .IP \fIkeysym\fP 1i @@ -97,21 +70,20 @@ Specifies the modifiers to the KeyCode. .IP \fImodifiers_return\fP 1i Returns a mask that indicates the modifiers actually used to generate the KeySym. -.ds Pr \ to perform key translations or conversions .IP \fIproc\fP 1i -Specifies the procedure that is\*(Pr. +Specifies the procedure that is to perform key translations or conversions. .IP \fIstart\fP 1i Specifies the first KeySym for which this converter is valid. .IP \fIstop\fP 1i Specifies the last KeySym for which this converter is valid. .SH DESCRIPTION The -.ZN XtSetKeyTranslator +.B XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is -.ZN XtTranslateKey , +.BR XtTranslateKey , an -.ZN XtKeyProc +.B XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default @@ -119,12 +91,12 @@ KeyCode-to-KeySym translations and so that the default translator can be reinstalled. .LP The -.ZN XtTranslateKeycode +.B XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator. .LP The -.ZN XtRegisterCaseConverter +.B XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. @@ -132,15 +104,15 @@ The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, -the \*(xI refreshes the keyboard state if necessary. +the \*(xI refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol. .LP The -.ZN XtConvertCase +.B XtConvertCase function calls the appropriate converter and returns the results. A user-supplied -.ZN XtKeyProc +.B XtKeyProc may need to use this function. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtSetKeyboardFocus.man b/lib/libXt/man/XtSetKeyboardFocus.man index 65535acd2..408ba687d 100644 --- a/lib/libXt/man/XtSetKeyboardFocus.man +++ b/lib/libXt/man/XtSetKeyboardFocus.man @@ -34,60 +34,32 @@ .ds Vn 2.2 .hw XtSet-Keyboard-Focus wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetKeyboardFocus __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetKeyboardFocus \- focus events on a child widget .SH SYNTAX +#include <X11/Intrinsic.h> .HP -XtSetKeyboardFocus(Widget \fIsubtree\fP, Widget \fIdescendant\fP); +void XtSetKeyboardFocus(Widget \fIsubtree\fP, Widget \fIdescendant\fP); .SH ARGUMENTS .IP \fIsubtree\fP 1i Specifies either the widget in the subtree structure which is to receive the keyboard event, or -.ZN None . +.BR None . Note that it is not an error to specify -.ZN None +.B None when no input focus was previously set. -.ds Wi for which the keyboard focus is to be set .IP \fIdescendant\fP 1i -Specifies the widget \*(Wi. +Specifies the widget for which the keyboard focus is to be set. .SH DESCRIPTION If a future -.ZN KeyPress +.B KeyPress or -.ZN KeyRelease +.B KeyRelease event occurs within the specified subtree, -.ZN XtSetKeyboardFocus +.B XtSetKeyboardFocus causes -.ZN XtDispatchEvent +.B XtDispatchEvent to remap and send the event to the specified descendant widget. .LP When there is no modal cascade, @@ -104,20 +76,20 @@ and the pointer is within W. When there is a modal cascade, a widget W receives keyboard events if an ancestor of W is in the active subset of the modal cascade and one or more of the previous conditions is -.ZN True . +.BR True . .LP When subtree or one of its descendants acquires the X input focus or the pointer moves into the subtree such that keyboard events would now be delivered to subtree, a -.ZN FocusIn +.B FocusIn event is generated for the descendant if -.ZN FocusNotify +.B FocusNotify events have been selected by the descendant. Similarly, when W loses the X input focus or the keyboard focus for one of its ancestors, a -.ZN FocusOut +.B FocusOut event is generated for descendant if -.ZN FocusNotify +.B FocusNotify events have been selected by the descendant. .SH "SEE ALSO" XtCallAcceptFocus(__libmansuffix__) diff --git a/lib/libXt/man/XtSetLanguageProc.man b/lib/libXt/man/XtSetLanguageProc.man index c03b4c95b..fa2cb6f70 100644 --- a/lib/libXt/man/XtSetLanguageProc.man +++ b/lib/libXt/man/XtSetLanguageProc.man @@ -32,42 +32,19 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtSet-Language-Proc wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetLanguageProc __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetLanguageProc \- set the language procedure .SH SYNTAX +#include <X11/Intrinsic.h> .HP -Widget XtSetLanguageProc(XtAppContext \fIapp_context\fP, XtLanguageProc +XtLanguageProc XtSetLanguageProc(XtAppContext \fIapp_context\fP, XtLanguageProc \fIproc\fP, XtPointer \fIclient_data\fP); .SH ARGUMENTS .IP \fIapp_context\fP 1i @@ -81,52 +58,59 @@ Specifies the language procedure, or NULL. Specifies additional client data to be passed to the language procedure when it is called. .SH DESCRIPTION -.ZN XtSetLanguageProc +.B XtSetLanguageProc sets the language procedure that will be called from -.ZN XtDisplayInitialize +.B XtDisplayInitialize for all subsequent Displays initialized in the specified application -context. If \fIapp_context\fP is NULL, the specified language procedure +context. +If \fIapp_context\fP is NULL, the specified language procedure is registered in all application contexts created by the calling process, -including any future application contexts that may be created. If +including any future application contexts that may be created. +If \fIproc\fP is NULL a default language procedure is registered. -.ZN XtSetLanguageProc -returns the previously registered language procedure. If a language +.B XtSetLanguageProc +returns the previously registered language procedure. +If a language procedure has not yet been registered, the return value is unspecified but if this return value is used in a subsequent call to -.ZN XtSetLanguageProc , +.BR XtSetLanguageProc , it will cause the default language procedure to be registered. .LP The default language procedure does the following: .IP \(bu 5 -Sets the locale according to the environment. On ANSI C-based systems +Sets the locale according to the environment. +On ANSI C-based systems this is done by calling -.ZN setlocale ( -.ZN LC_ALL , -language ). If an error is encountered a warning message is issued with -.ZN XtWarning . +.BR setlocale ( +.BR LC_ALL , +language ). +If an error is encountered a warning message is issued with +.BR XtWarning . .IP \(bu 5 Calls -.ZN XSupportsLocale -to verify that the current locale is supported. If the locale is not +.B XSupportsLocale +to verify that the current locale is supported. +If the locale is not supported, a warning message is issued with -.ZN XtWarning -and the locale is set to ``C''. +.B XtWarning +and the locale is set to \*(``C\*(''. .IP \(bu 5 Calls -.ZN XSetLocaleModifiers +.B XSetLocaleModifiers specifying the empty string. .IP \(bu 5 -Returns the value of the current locale. On ANSI C-based systems this +Returns the value of the current locale. +On ANSI C-based systems this is the return value from a final call to -.ZN setlocale ( -.ZN LC_ALL , +.BR setlocale ( +.BR LC_ALL , NULL ). .LP A client wishing to use this mechanism to establish locale can do so by calling -.ZN XtSetLanguageProc +.B XtSetLanguageProc prior to -.ZN XtDisplayInitialize. +.B XtDisplayInitialize. .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtSetMultiClickTime.man b/lib/libXt/man/XtSetMultiClickTime.man index a57d8ade9..6fb5c7125 100644 --- a/lib/libXt/man/XtSetMultiClickTime.man +++ b/lib/libXt/man/XtSetMultiClickTime.man @@ -33,38 +33,11 @@ .ds Vn 2.2 .hw XtSet-Multi-Click-Time Xt-Get-Multi-Click-Time wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetMultiClickTime __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetMultiClickTime, XtGetMultiClickTime \- set and get multi-click times .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetMultiClickTime(Display* \fIdisplay\fP, int \fItime\fP); .HP @@ -75,11 +48,11 @@ Specifies the display connection. .IP \fItime\fP 1i Specifies the multi-click time in milliseconds. .SH DESCRIPTION -.ZN XtSetMultiClickTime +.B XtSetMultiClickTime sets the time interval used by the translation manager to determine when multiple events are interpreted as a repeated event. .LP -.ZN XtGetMultiClickTime +.B XtGetMultiClickTime returns the time in milliseconds that the translation manager uses to determine if multiple events are to be interpreted as a repeated event for purposes of matching a translation entry containing a repeat count. diff --git a/lib/libXt/man/XtSetSelectionParameters.man b/lib/libXt/man/XtSetSelectionParameters.man index bdec79e58..6a2365a8c 100644 --- a/lib/libXt/man/XtSetSelectionParameters.man +++ b/lib/libXt/man/XtSetSelectionParameters.man @@ -33,45 +33,19 @@ .ds Vn 2.2 .hw XtSet-Selection-Parameters XtGet-Selection-Parameters wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetSelectionParameters __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetSelectionParameters \- specify target parameters for a selection request with a single target .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetSelectionParameters(Widget \fIrequestor\fP, Atom \fIselection\fP, Atom \fItype\fP, XtPointer \fIvalue\fP, unsigned long \fIlength\fP, int \fIformat\fP); .SH ARGUMENTS .IP \fIrequestor\fP 1i -Specifies the widget making the request. Must be of class Core or any +Specifies the widget making the request. +Must be of class Core or any subclass thereof. .IP \fIselection\fP 1i Specifies the atom that names the selection. @@ -86,37 +60,40 @@ element of a sized indicated by \fIformat\fP. Specifies the size in bits of the data in the elements of \fIvalue\fP. .SH DESCRIPTION The specified parameters will be copied and stored in a new property of -the specified type and format on the requestor's window. To initiate a +the specified type and format on the requestor's window. +To initiate a selection request with a target and these parameters, a subsequent call to -.ZN XtGetSelectionValue +.B XtGetSelectionValue or to -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental specifying the same requestor widget and selection atom will generate a -.ZN ConvertSelection -request referring referring to the property containing the parameters. If -.ZN XtSetSelectionParameters +.B ConvertSelection +request referring referring to the property containing the parameters. +If +.B XtSetSelectionParameters is called more than once with the same widget and selection without a call to specify a request, the most recently specified parameters are used in the subsequent request. .LP -The possible values of \fIformat\fP may be 8, 16, or 32. If the \fIformat\fP +The possible values of \fIformat\fP may be 8, 16, or 32. +If the \fIformat\fP is 8, the elements of \fIvalue\fP are assumed to be sizeof(char); if 16, sizeof(short); if 32, sizeof(long). .LP To generate a MULTIPLE target request with parameters for any of the multiple targets of the selection request, precede individual calls to -.ZN XtGetSelectionValue +.B XtGetSelectionValue and -.ZN XtGetSelectionValueIncremental +.B XtGetSelectionValueIncremental with corresponding individual calls to -.ZN XtSetSelectionParameters , +.BR XtSetSelectionParameters , and enclose these all within -.ZN XtCreateSelectionRequest +.B XtCreateSelectionRequest and -.ZN XtSendSelectionRequest . -.ZN XtGetSelectionValues +.BR XtSendSelectionRequest . +.B XtGetSelectionValues and -.ZN XtGetSelectionValuesIncremental +.B XtGetSelectionValuesIncremental cannot be used to make selection requests with parameterized targets. .SH "SEE ALSO" XtGetSelectionParameters(__libmansuffix__) diff --git a/lib/libXt/man/XtSetSensitive.man b/lib/libXt/man/XtSetSensitive.man index 73bd5372a..1226f3ea5 100644 --- a/lib/libXt/man/XtSetSensitive.man +++ b/lib/libXt/man/XtSetSensitive.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtSet-Sensitive XtIs-Sensitive wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetSensitive __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetSensitive, XtIsSensitive \- set and check a widget's sensitivity state .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetSensitive(Widget \fIw\fP, Boolean \fIsensitive\fP); .HP @@ -78,47 +51,47 @@ keyboard and pointer events. Specifies the widget. .SH DESCRIPTION The -.ZN XtSetSensitive +.B XtSetSensitive function first calls -.ZN XtSetValues +.B XtSetValues on the current widget with an argument list specifying that the sensitive field should change to the new value. It then recursively propagates the new value down the managed children tree by calling -.ZN XtSetValues +.B XtSetValues on each child to set the ancestor_sensitive to the new value if the new values for sensitive and the child's ancestor_sensitive are not the same. .LP -.ZN XtSetSensitive +.B XtSetSensitive calls -.ZN XtSetValues +.B XtSetValues to change sensitive and ancestor_sensitive. Therefore, when one of these changes, the widget's set_values procedure should take whatever display actions are needed (for example, greying out or stippling the widget). .LP -.ZN XtSetSensitive +.B XtSetSensitive maintains the invariant that if parent has either sensitive or ancestor_sensitive -.ZN False , +.BR False , then all children have ancestor_sensitive -.ZN False . +.BR False . .LP The -.ZN XtIsSensitive +.B XtIsSensitive function returns -.ZN True +.B True or -.ZN False +.B False to indicate whether or not user input events are being dispatched. If both core.sensitive and core.ancestor_sensitive are -.ZN True , -.ZN XtIsSensitive +.BR True , +.B XtIsSensitive returns -.ZN True ; +.BR True ; otherwise, it returns -.ZN False . +.BR False . .SH "SEE ALSO" .br \fI\*(xT\fP diff --git a/lib/libXt/man/XtSetValues.man b/lib/libXt/man/XtSetValues.man index 008316cec..01e878acc 100644 --- a/lib/libXt/man/XtSetValues.man +++ b/lib/libXt/man/XtSetValues.man @@ -31,40 +31,15 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 -.hw XtSet-Values XtVa-Set-Values XtSet-Subvalues XtVa-Set-Subvalues XtGet-Values XtVa-Get-Values XtGet-Subvalues XtVa-Get-Subvalues constraint-Widget-Class wid-get +.hw XtSet-Values XtVa-Set-Values XtSet-Subvalues XtVa-Set-Subvalues +.hw XtGet-Values XtVa-Get-Values XtGet-Subvalues XtVa-Get-Subvalues +.hw constraint-Widget-Class wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetValues __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetValues, XtVaSetValues, XtSetSubvalues, XtVaSetSubvalues, XtGetValues, XtVaGetValues, XtGetSubvalues, XtVaGetSubvalues \- obtain and set widget resources .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetValues(Widget \fIw\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); .HP @@ -86,15 +61,14 @@ Cardinal \fInum_resources\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP); void XtVaGetSubvalues(XtPointer \fIbase\fP, XtResourceList \fIresources\fP, Cardinal \fInum_resources\fP, ...\^); .SH ARGUMENTS -.ds Al of name/address pairs that contain the resource name \ -and either the address into which the resource value is to be stored \ -or their new values .IP \fIargs\fP 1i -Specifies the argument list \*(Al. -.ds Ba retrieved or written +Specifies the argument list of name/address pairs that contain the resource +name +and either the address into which the resource value is to be stored +or their new values. .IP \fIbase\fP 1i Specifies the base address of the subpart data structure where the resources -should be \*(Ba. +should be retrieved or written. .IP \fInum_args\fP 1i Specifies the number of arguments in the argument list. .IP \fIresources\fP 1i @@ -104,83 +78,84 @@ Specifies the number of resources in the resource list. .IP \fIw\fP 1i Specifies the widget. .IP \fI...\fP 1i -Specifies the variable argument list \*(Al. +Specifies the variable argument list of name/address pairs that contain the resource name +and either the address into which the resource value is to be stored +or their new values. .SH DESCRIPTION The -.ZN XtSetValues +.B XtSetValues function starts with the resources specified for the -.ZN Core +.B Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. -.ZN XtSetValues +.B XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. -.IN "hook" If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for -.ZN XtSetValues . +.BR XtSetValues . .LP If the widget's parent is a subclass of -.ZN constraintWidgetClass , -.ZN XtSetValues +.BR constraintWidgetClass , +.B XtSetValues also updates the widget's constraints. It starts with the constraint resources specified for -.ZN constraintWidgetClass +.B constraintWidgetClass and proceeds down the subclass chain to the parent's class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from -.ZN constraintWidgetClass +.B constraintWidgetClass down to the parent's class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget. .LP -.ZN XtSetValues +.B XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns -.ZN XtGeometryYes , -.ZN XtGeometryAlmost , +.BR XtGeometryYes , +.BR XtGeometryAlmost , or -.ZN XtGeometryNo . +.BR XtGeometryNo . If -.ZN XtGeometryYes , -.ZN XtSetValues +.BR XtGeometryYes , +.B XtSetValues calls the widget's resize procedure. If -.ZN XtGeometryNo , -.ZN XtSetValues +.BR XtGeometryNo , +.B XtSetValues resets the geometry fields to their original values. If -.ZN XtGeometryAlmost , -.ZN XtSetValues +.BR XtGeometryAlmost , +.B XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. -.ZN XtSetValues +.B XtSetValues then repeats this process, deciding once more whether the geometry manager should be called. .LP Finally, if any of the set_values procedures returned -.ZN True , -.ZN XtSetValues +.BR True , +.B XtSetValues causes the widget's expose procedure to be invoked by calling the Xlib -.ZN XClearArea +.B XClearArea function on the widget's window. .LP The -.ZN XtSetSubvalues +.B XtSetSubvalues function stores resources into the structure identified by base. .LP The -.ZN XtGetValues +.B XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the @@ -190,25 +165,24 @@ to allocate and deallocate this storage according to the size of the resource representation type used within the widget. .LP If the widget's parent is a subclass of -.ZN constraintWidgetClass , -.ZN XtGetValues +.BR constraintWidgetClass , +.B XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for -.ZN constraintWidgetClass +.B constraintWidgetClass and proceeds down to the subclass chain to the parent's constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. -.IN "hook" Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by -.ZN XtGetValues . +.BR XtGetValues . This permits a subclass to provide nonwidget resource data to -.ZN XtGetValues . +.BR XtGetValues . .LP The -.ZN XtGetSubvalues +.B XtGetSubvalues function obtains resource values from the structure identified by base. .SH "SEE ALSO" .br diff --git a/lib/libXt/man/XtSetWMColormapWindows.man b/lib/libXt/man/XtSetWMColormapWindows.man index a0f89dfc0..9231cfbb3 100644 --- a/lib/libXt/man/XtSetWMColormapWindows.man +++ b/lib/libXt/man/XtSetWMColormapWindows.man @@ -33,55 +33,30 @@ .ds Vn 2.2 .hw XtSet-WMColormap-Windows wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtSetWMColormapWindows __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtSetWMColormapWindows \- Set the value of the WM_COLORMAP_WINDOWS property .SH SYNTAX +#include <X11/Intrinsic.h> .HP void XtSetWMColormapWindows(Widget \fIwidget\fP, Widget* \fIlist\fP, Cardinal \fIcount\fP); .SH ARGUMENTS .IP \fIwidget\fP 1i Specifies the widget on whose window the WM_COLORMAP_WINDOWS property -will be stored. Must be of class Core or any subclass thereof. +will be stored. +Must be of class Core or any subclass thereof. .IP \fIlist\fP 1i Specifies a list of widgets whose windows are are potentially to be listed in the WM_COLORMAP_WINDOWS property. .IP \fIcount\fP 1i Specifies the number of widgets in \fIlist\fP. .SH DESCRIPTION -.ZN XtSetWMColormapWindows +.B XtSetWMColormapWindows returns immediately if \fIwidget\fP is not realized or if \fIcount\fP -is zero. Otherwise, -.ZN XtSetWMColormapWindows +is zero. +Otherwise, +.B XtSetWMColormapWindows constructs an ordered list of windows by examining each widget in \fIlist\fP in turn and ignoring the widget if it is not realized, or adding the widget's window to the window list if the widget is @@ -90,7 +65,7 @@ resources of all widgets whose windows are already on the window list. .LP Finally, -.ZN XtSetWMColormapWindows +.B XtSetWMColormapWindows stores the resulting window list in the WM_COLORMAP_WINDOWS property on the specified widget's window. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtStringConversionWarning.man b/lib/libXt/man/XtStringConversionWarning.man index ace588160..b99e92ce6 100644 --- a/lib/libXt/man/XtStringConversionWarning.man +++ b/lib/libXt/man/XtStringConversionWarning.man @@ -32,42 +32,19 @@ .ds xC Inter-Client Communication Conventions Manual .ds Rn 3 .ds Vn 2.2 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' .hw XtString-Conversion-Warning wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtStringConversionWarning __libmansuffix__ __xorgversion__ "XT COMPATIBILITY FUNCTIONS" .SH NAME XtStringConversionWarning \- issue a conversion warning message .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtStringConversionWarning(String \fIsrc\fP, String \fIdst_type\fP); +void XtStringConversionWarning(const char *\fIsrc\fP, const char *\fIdst_type\fP); .SH ARGUMENTS .IP \fIsrc\fP 1i Specifies the string that could not be converted. @@ -75,14 +52,16 @@ Specifies the string that could not be converted. Specifies the name of the type to which the string could not be converted. .SH DESCRIPTION The -.ZN XtStringConversionWarning -function issues a warning message with name ``conversionError'', -type ``string'', class ``XtToolkitError, and the default message string -``Cannot convert "\fIsrc\fP" to type \fIdst_type\fP''. +.B XtStringConversionWarning +function issues a warning message with name \*(``conversionError\*('', +type \*(``string\*('', +class \*(``XtToolkitError\*('', +and the default message string +\*(``Cannot convert "\fIsrc\fP" to type \fIdst_type\fP\*(''. .LP -.ZN XtStringConversionWarning +.B XtStringConversionWarning has been replaced by -.ZN XtDisplayStringConversionWarning . +.BR XtDisplayStringConversionWarning . .SH "SEE ALSO" XtAppAddConverter(__libmansuffix__), XtAppErrorMsg(3t), diff --git a/lib/libXt/man/XtToolkitThreadInitialize.man b/lib/libXt/man/XtToolkitThreadInitialize.man index ce2b4dd7a..4eea19484 100644 --- a/lib/libXt/man/XtToolkitThreadInitialize.man +++ b/lib/libXt/man/XtToolkitThreadInitialize.man @@ -33,50 +33,24 @@ .ds Vn 2.2 .hw XtToolkit-Thread-Initialize wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtToolkitThreadInitialize __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtToolkitThreadInitialize \- initialize the toolkit for multiple threads .SH SYNTAX +#include <X11/Intrinsic.h> .HP Boolean XtToolkitThreadInitialize(void); .SH DESCRIPTION If -.ZN XtToolkitThreadInitialize -was previously called, it returns. The application programmer must ensure +.B XtToolkitThreadInitialize +was previously called, it returns. +The application programmer must ensure that two or more threads do not simultaneously attempt to call -.ZN XtToolkitThreadInitialize ; +.BR XtToolkitThreadInitialize ; the effect of this is undefined. -.ZN XtToolkitThreadInitialize +.B XtToolkitThreadInitialize returns -.ZN True +.B True if the host operating system has threads and the Intrinsics are thread safe. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtTranslateCoords.man b/lib/libXt/man/XtTranslateCoords.man index e1e017323..02733042f 100644 --- a/lib/libXt/man/XtTranslateCoords.man +++ b/lib/libXt/man/XtTranslateCoords.man @@ -34,60 +34,35 @@ .ds Vn 2.2 .hw XtTranslate-Coords wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtTranslateCoords __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtTranslateCoords \- translate widget coordinates .SH SYNTAX +#include <X11/Intrinsic.h> .HP -void XtTranslateCoords(Widget \fIw\fP, Position \fIx\fP, \fIy\fP, Position -*\fIrootx_return\fP, *\fIrooty_return\fP); +void XtTranslateCoords(Widget \fIw\fP, +Position \fIx\fP, +Position \fIy\fP, +Position *\fIrootx_return\fP, +Position *\fIrooty_return\fP); .SH ARGUMENTS .IP \fIrootx_return\fP 1i .br .ns .IP \fIrooty_return\fP 1i Returns the root-relative x and y coordinates. -.ds Nu widget-relative .IP \fIx\fP 1i .br .ns .IP \fIy\fP 1i -Specify the \*(Nu x and y coordinates. +Specify the widget-relative x and y coordinates. .IP \fIw\fP 1i Specifies the widget. .SH DESCRIPTION While -.ZN XtTranslateCoords +.B XtTranslateCoords is similar to the Xlib -.ZN XTranslateCoordinates +.B XTranslateCoordinates function, it does not generate a server request because all the required information already is in the widget's data structures. .SH "SEE ALSO" diff --git a/lib/libXt/man/XtVaCreateArgsList.man b/lib/libXt/man/XtVaCreateArgsList.man index 01f842618..3c0a2d402 100644 --- a/lib/libXt/man/XtVaCreateArgsList.man +++ b/lib/libXt/man/XtVaCreateArgsList.man @@ -34,38 +34,11 @@ .ds Vn 2.2 .hw XtVa-Create-Args-List wid-get .na -.de Ds -.nf -.\\$1D \\$2 \\$1 -.ft CW -.ps \\n(PS -.\".if \\n(VS>=40 .vs \\n(VSu -.\".if \\n(VS<=39 .vs \\n(VSp -.. -.de De -.ce 0 -.if \\n(BD .DF -.nr BD 0 -.in \\n(OIu -.if \\n(TM .ls 2 -.sp \\n(DDu -.fi -.. -.de IN \" send an index entry to the stderr -.. -.de Pn -.ie t \\$1\fB\^\\$2\^\fR\\$3 -.el \\$1\fI\^\\$2\^\fP\\$3 -.. -.de ZN -.ie t \fB\^\\$1\^\fR\\$2 -.el \fI\^\\$1\^\fP\\$2 -.. -.ny0 .TH XtVaCreateArgsList __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME XtVaCreateArgsList \- dynamically allocate a varargs list .SH SYNTAX +#include <X11/Intrinsic.h> .HP XtVarArgsList XtVaCreateArgsList(XtPointer \fIunused\fP, ...\^); .SH ARGUMENTS @@ -75,19 +48,21 @@ Must be specified as NULL. Specifies a variable parameter list of resource name and value pairs. .SH DESCRIPTION The -.ZN XtVaCreateArgsList +.B XtVaCreateArgsList function allocates memory and copies its arguments into a single list pointer, which may be used with -.ZN XtVaNestedList . +.BR XtVaNestedList . The end of both lists is identified by a \fIname\fP entry containing NULL. Any entries of type -.ZN XtVaTypedArg -are copied as specified without applying conversions. Data passed by +.B XtVaTypedArg +are copied as specified without applying conversions. +Data passed by reference (including Strings) are not copied, only the pointers themselves; the caller must ensure that the data remain valid for -the lifetime of the created varargs list. The list should be freed +the lifetime of the created varargs list. +The list should be freed using -.ZN XtFree +.B XtFree when no longer needed. .SH "SEE ALSO" .br diff --git a/lib/libXt/specs/CH01.xml b/lib/libXt/specs/CH01.xml index df2f96f81..579e1ff5b 100644 --- a/lib/libXt/specs/CH01.xml +++ b/lib/libXt/specs/CH01.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Intrinsics_and_Widgets'> <title>Intrinsics and Widgets</title> <para> @@ -45,7 +48,7 @@ for each Intrinsics procedure and <xref linkend='Nonwidget_Objects' /> describe which operations are defined for the nonwidget superclasses of Core. The reader may determine by context whether a specific reference to <emphasis remap='I'>widget</emphasis> -actually means ``widget'' or ``object.'' +actually means “widget” or “object.” </para> </sect1> @@ -74,30 +77,30 @@ any module, widget, or application that calls an Intrinsics procedure. <para> Applications that use the Intrinsics mechanisms must include the header files -<function><X11/Intrinsic.h></function> +<filename class="headerfile"><X11/Intrinsic.h></filename> and -<function><X11/StringDefs.h></function>, +<filename class="headerfile"><X11/StringDefs.h></filename>, or their equivalent, and they may also include -<function><X11/Xatoms.h></function> +<filename class="headerfile"><X11/Xatoms.h></filename> and -<function><X11/Shell.h></function>. +<filename class="headerfile"><X11/Shell.h></filename>. In addition, widget implementations should include -<function><X11/IntrinsicP.h></function> +<filename class="headerfile"><X11/IntrinsicP.h></filename> instead of -<function><X11/Intrinsic.h></function>. +<filename class="headerfile"><X11/Intrinsic.h></filename>. </para> <para> The applications must also include the additional header files for each widget class that they are to use (for example, -<function><X11/Xaw/Label.h></function> +<filename class="headerfile"><X11/Xaw/Label.h></filename> or -<function><X11/Xaw/Scrollbar.h>).</function> +<filename class="headerfile"><X11/Xaw/Scrollbar.h>).</filename> On a POSIX-based system, the Intrinsics object library file is named -<function>libXt.a</function> -and is usually referenced as \-lXt when linking the application. +<filename class="libraryfile">libXt.a</filename> +and is usually referenced as -lXt when linking the application. </para> </sect1> @@ -106,7 +109,7 @@ and is usually referenced as \-lXt when linking the application. <para> All functions defined in this specification except those specified below may be implemented as C macros with arguments. C applications may use -``#undef'' to remove a macro definition and ensure that the actual function +“#undef” to remove a macro definition and ensure that the actual function is referenced. Any such macro will expand to a single expression that has the same precedence as a function call and that evaluates each of its arguments exactly once, fully protected by parentheses, so that @@ -152,7 +155,7 @@ subclasses. Physically, a widget class is a pointer to a structure. The contents of this structure are constant for all widgets of the widget class but will vary from class to class. -(Here, ``constant'' means the class structure is initialized at compile time +(Here, “constant” means the class structure is initialized at compile time and never changed, except for a one-time class initialization and in-place compilation of resource lists, which takes place when the first widget of the class or subclass is created.) @@ -215,42 +218,42 @@ All widget classes contain the fields defined in the <function>CoreClassPart</function> structure. </para> -<literallayout> +<programlisting> typedef struct { - WidgetClass superclass; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - String class_name; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - Cardinal widget_size; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtProc class_initialize; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtWidgetClassProc class_part_initialize; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtEnum class_inited; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtInitProc initialize; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - XtArgsProc initialize_hook; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - XtRealizeProc realize; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - XtActionList actions; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - Cardinal num_actions; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtResourceList resources; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - Cardinal num_resources; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - XrmClass xrm_class; Private to resource manager - Boolean compress_motion; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - XtEnum compress_exposure; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - Boolean compress_enterleave; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - Boolean visible_interest; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - XtWidgetProc destroy; See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtWidgetProc resize; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - XtExposeProc expose; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - XtSetValuesFunc set_values; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtArgsFunc set_values_hook; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtAlmostProc set_values_almost; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtArgsProc get_values_hook; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtAcceptFocusProc accept_focus; See <xref linkend='Focusing_Events_on_a_Child' xrefstyle='select: label' /> - XtVersionType version; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtPointer callback_private; Private to callbacks - String tm_table; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtGeometryHandler query_geometry; See <xref linkend ='Geometry_Management' xrefstyle='select: label' /> - XtStringProc display_accelerator; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> + WidgetClass superclass; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + String class_name; <lineannotation>See <xref linkend="Resource_Management" xrefstyle='select: title' /></lineannotation> + Cardinal widget_size; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + XtProc class_initialize; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + XtWidgetClassProc class_part_initialize; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + XtEnum class_inited; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + XtInitProc initialize; <lineannotation>See <xref linkend='Creating_Widgets' xrefstyle='select: title' /></lineannotation> + XtArgsProc initialize_hook; <lineannotation>See <xref linkend='Creating_Widgets' xrefstyle='select: title' /></lineannotation> + XtRealizeProc realize; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + XtActionList actions; <lineannotation>See <xref linkend='Translation_Management' xrefstyle='select: title' /></lineannotation> + Cardinal num_actions; <lineannotation>See <xref linkend='Translation_Management' xrefstyle='select: title' /></lineannotation> + XtResourceList resources; <lineannotation>See <xref linkend="Resource_Management" xrefstyle='select: title' /></lineannotation> + Cardinal num_resources; <lineannotation>See <xref linkend="Resource_Management" xrefstyle='select: title' /></lineannotation> + XrmClass xrm_class; <lineannotation>Private to resource manager</lineannotation> + Boolean compress_motion; <lineannotation>See <xref linkend='X_Event_Filters' xrefstyle='select: title' /></lineannotation> + XtEnum compress_exposure; <lineannotation>See <xref linkend='X_Event_Filters' xrefstyle='select: title' /></lineannotation> + Boolean compress_enterleave; <lineannotation>See <xref linkend='X_Event_Filters' xrefstyle='select: title' /></lineannotation> + Boolean visible_interest; <lineannotation>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: title' /></lineannotation> + XtWidgetProc destroy; <lineannotation>See <xref linkend='Destroying_Widgets' xrefstyle='select: title' /></lineannotation> + XtWidgetProc resize; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + XtExposeProc expose; <lineannotation>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: title' /></lineannotation> + XtSetValuesFunc set_values; <lineannotation>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: title' /></lineannotation> + XtArgsFunc set_values_hook; <lineannotation>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: title' /></lineannotation> + XtAlmostProc set_values_almost; <lineannotation>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: title' /></lineannotation> + XtArgsProc get_values_hook; <lineannotation>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: title' /></lineannotation> + XtAcceptFocusProc accept_focus; <lineannotation>See <xref linkend='Focusing_Events_on_a_Child' xrefstyle='select: title' /></lineannotation> + XtVersionType version; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> + XtPointer callback_private; <lineannotation>Private to callbacks</lineannotation> + String tm_table; <lineannotation>See <xref linkend='Translation_Management' xrefstyle='select: title' /></lineannotation> + XtGeometryHandler query_geometry; <lineannotation>See <xref linkend ='Geometry_Management' xrefstyle='select: title' /></lineannotation> + XtStringProc display_accelerator; <lineannotation>See <xref linkend='Translation_Management' xrefstyle='select: title' /></lineannotation> + XtPointer extension; <lineannotation>See <xref linkend="Widget_Classing" xrefstyle='select: title' /></lineannotation> } CoreClassPart; -</literallayout> +</programlisting> <para> All widget classes have the Core class fields as their first component. The prototypical @@ -259,11 +262,11 @@ and <function>CoreWidgetClass</function> are defined with only this set of fields. </para> -<literallayout> +<programlisting> typedef struct { CoreClassPart core_class; } WidgetClassRec, *WidgetClass, CoreClassRec, *CoreWidgetClass; -</literallayout> +</programlisting> <para> Various routines can cast widget class pointers, as needed, to specific widget class types. @@ -276,19 +279,19 @@ creating instances of Core are <para> In -<function>IntrinsicP.h</function>: +<filename class="headerfile">IntrinsicP.h</filename>: </para> -<literallayout> +<programlisting> extern WidgetClassRec widgetClassRec; #define coreClassRec widgetClassRec -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout> +<programlisting> extern WidgetClass widgetClass, coreWidgetClass; -</literallayout> +</programlisting> <para> The opaque types <function>Widget</function> @@ -300,11 +303,11 @@ are defined for generic actions on widgets. In order to make these types opaque and ensure that the compiler does not allow applications to access private data, the Intrinsics use incomplete structure definitions in -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout> +<programlisting> typedef struct _WidgetClassRec *WidgetClass, *CoreWidgetClass; -</literallayout> +</programlisting> </sect3> <sect3 id="CorePart_Structure"> <title>CorePart Structure</title> @@ -313,49 +316,49 @@ All widget instances contain the fields defined in the <function>CorePart</function> structure. </para> -<literallayout> +<programlisting> typedef struct _CorePart { - Widget self; Described below - WidgetClass widget_class; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> - Widget parent; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - Boolean being_destroyed; See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtCallbackList destroy_callbacks; <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtPointer constraints; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - Position x; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Position y; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension width; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension height; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension border_width; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Boolean managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Boolean sensitive; See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> - Boolean ancestor_sensitive; See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> - XtTranslations accelerators; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - Pixel border_pixel; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixmap border_pixmap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - WidgetList popup_list; See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> - Cardinal num_popups; See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> - String name; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Screen *screen; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Colormap colormap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Window window; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Cardinal depth; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixel background_pixel; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixmap background_pixmap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Boolean visible; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - Boolean mapped_when_managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> + Widget self; <lineannotation>Described below</lineannotation> + WidgetClass widget_class; <lineannotation>See <xref linkend='Widget_Classing' xrefstyle='select: title' /></lineannotation> + Widget parent; <lineannotation>See <xref linkend='Creating_Widgets' xrefstyle='select: title' /></lineannotation> + Boolean being_destroyed; <lineannotation>See <xref linkend='Destroying_Widgets' xrefstyle='select: title' /></lineannotation> + XtCallbackList destroy_callbacks; <lineannotation>See <xref linkend='Destroying_Widgets' xrefstyle='select: title' /></lineannotation> + XtPointer constraints; <lineannotation>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: title' /></lineannotation> + Position x; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + Position y; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + Dimension width; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + Dimension height; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + Dimension border_width; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + Boolean managed; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + Boolean sensitive; <lineannotation>See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: title' /></lineannotation> + Boolean ancestor_sensitive; <lineannotation>See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: title' /></lineannotation> + XtTranslations accelerators; <lineannotation>See <xref linkend='Translation_Management' xrefstyle='select: title' /></lineannotation> + Pixel border_pixel; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Pixmap border_pixmap; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + WidgetList popup_list; <lineannotation>See <xref linkend='Pop_Up_Widgets' xrefstyle='select: title' /></lineannotation> + Cardinal num_popups; <lineannotation>See <xref linkend='Pop_Up_Widgets' xrefstyle='select: title' /></lineannotation> + String name; <lineannotation>See <xref linkend='Resource_Management' xrefstyle='select: title' /></lineannotation> + Screen *screen; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Colormap colormap; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Window window; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Cardinal depth; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Pixel background_pixel; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Pixmap background_pixmap; <lineannotation>See <xref linkend='Realizing_Widgets' xrefstyle='select: title' /></lineannotation> + Boolean visible; <lineannotation>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: title' /></lineannotation> + Boolean mapped_when_managed; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> } CorePart; -</literallayout> +</programlisting> <para> All widget instances have the Core fields as their first component. The prototypical type <function>Widget</function> is defined with only this set of fields. </para> -<literallayout> +<programlisting> typedef struct { CorePart core; } WidgetRec, *Widget, CoreRec, *CoreWidget; -</literallayout> +</programlisting> <para> Various routines can cast widget pointers, as needed, to specific widget types. @@ -365,11 +368,11 @@ to specific widget types. In order to make these types opaque and ensure that the compiler does not allow applications to access private data, the Intrinsics use incomplete structure definitions in -<function>Intrinsic.h</function>. +<filename class="headerfile">Intrinsic.h</filename>. </para> -<literallayout> +<programlisting> typedef struct _WidgetRec *Widget, *CoreWidget; -</literallayout> +</programlisting> </sect3> <sect3 id="Core_Resources"> <title>Core Resources</title> @@ -628,15 +631,15 @@ Core class fields, widgets of the Composite class have the following class fields. </para> -<literallayout> +<programlisting> typedef struct { - XtGeometryHandler geometry_manager; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - XtWidgetProc change_managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtWidgetProc insert_child; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtWidgetProc delete_child; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> + XtGeometryHandler geometry_manager; <lineannotation>See <xref linkend='Geometry_Management' xrefstyle='select: title' /></lineannotation> + XtWidgetProc change_managed; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + XtWidgetProc insert_child; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + XtWidgetProc delete_child; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + XtPointer extension; <lineannotation>See <xref linkend='Widget_Classing' xrefstyle='select: title' /></lineannotation> } CompositeClassPart; -</literallayout> +</programlisting> <para> The extension record defined for <function>CompositeClassPart</function> @@ -646,27 +649,27 @@ equal to is <function>CompositeClassExtensionRec</function>. </para> -<literallayout> +<programlisting> typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - long version; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Boolean accepts_objects; See <xref linkend='Creating_a_Widget_Instance' xrefstyle='select: label' /> - Boolean allows_change_managed_set; See <xref linkend='Bundling_Changes_to_the_Managed_Set' xrefstyle='select: label' /> + XtPointer next_extension; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + XrmQuark record_type; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + long version; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + Cardinal record_size; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + Boolean accepts_objects; <lineannotation>See <xref linkend='Creating_a_Widget_Instance' xrefstyle='select: title' /></lineannotation> + Boolean allows_change_managed_set; <lineannotation>See <xref linkend='Bundling_Changes_to_the_Managed_Set' xrefstyle='select: title' /></lineannotation> } CompositeClassExtensionRec, *CompositeClassExtension; -</literallayout> +</programlisting> <para> Composite classes have the Composite class fields immediately following the Core class fields. </para> -<literallayout> +<programlisting> typedef struct { CoreClassPart core_class; CompositeClassPart composite_class; } CompositeClassRec, *CompositeWidgetClass; -</literallayout> +</programlisting> <para> The single occurrences of the class record and pointer for creating instances of Composite are @@ -674,18 +677,18 @@ instances of Composite are <para> In -<function>IntrinsicP.h</function>: +<filename class="headerfile">IntrinsicP.h</filename>: </para> -<literallayout> +<programlisting> extern CompositeClassRec compositeClassRec; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout> +<programlisting> extern WidgetClass compositeWidgetClass; -</literallayout> +</programlisting> <para> The opaque types <function>CompositeWidget</function> @@ -700,14 +703,14 @@ The symbolic constant for the version identifier is <function>XtCompositeExtensionVersion</function> (see <xref linkend='Class_Extension_Records' />). -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> -<literallayout> +<programlisting> typedef struct _CompositeClassRec *CompositeWidgetClass; -</literallayout> +</programlisting> </sect3> <sect3 id="CompositePart_Structure"> <title>CompositePart Structure</title> @@ -720,33 +723,33 @@ instance fields defined in the <function>CompositePart</function> structure. </para> -<literallayout> +<programlisting> typedef struct { - WidgetList children; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Cardinal num_children; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Cardinal num_slots; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtOrderProc insert_position; See <xref linkend='Insertion_Order_of_Children_The_insert_position_Procedure' xrefstyle='select: label' /> + WidgetList children; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + Cardinal num_children; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + Cardinal num_slots; <lineannotation>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: title' /></lineannotation> + XtOrderProc insert_position; <lineannotation>See <xref linkend='Insertion_Order_of_Children_The_insert_position_Procedure' xrefstyle='select: title' /></lineannotation> } CompositePart; -</literallayout> +</programlisting> <para> Composite widgets have the Composite instance fields immediately following the Core instance fields. </para> -<literallayout> +<programlisting> typedef struct { CorePart core; CompositePart composite; } CompositeRec, *CompositeWidget; -</literallayout> +</programlisting> <para> -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> -<literallayout> +<programlisting> typedef struct _CompositeRec *CompositeWidget; -</literallayout> +</programlisting> </sect3> <sect3 id="Composite_Resources"> <title>Composite Resources</title> @@ -874,17 +877,17 @@ class fields, widgets of the Constraint class have the following class fields. </para> -<literallayout> +<programlisting> typedef struct { - XtResourceList resources; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Cardinal num_resources; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Cardinal constraint_size; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtInitProc initialize; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtWidgetProc destroy; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtSetValuesFunc set_values; See <xref linkend='Setting_Widget_State' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> + XtResourceList resources; <lineannotation>See <xref linkend='Resource_Management' xrefstyle='select: title' /></lineannotation> + Cardinal num_resources; <lineannotation>See <xref linkend='Resource_Management' xrefstyle='select: title' /></lineannotation> + Cardinal constraint_size; <lineannotation>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: title' /></lineannotation> + XtInitProc initialize; <lineannotation>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: title' /></lineannotation> + XtWidgetProc destroy; <lineannotation>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: title' /></lineannotation> + XtSetValuesFunc set_values; <lineannotation>See <xref linkend='Setting_Widget_State' xrefstyle='select: title' /></lineannotation> + XtPointer extension; <lineannotation>See <xref linkend='Widget_Classing' xrefstyle='select: title' /></lineannotation> } ConstraintClassPart; -</literallayout> +</programlisting> <para> The extension record defined for <function>ConstraintClassPart</function> @@ -893,27 +896,27 @@ with <emphasis remap='I'>record_type</emphasis> equal to is <function>ConstraintClassExtensionRec</function>. </para> -<literallayout> +<programlisting> typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - long version; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XtArgsProc get_values_hook; See <xref linkend='Obtaining_Widget_State' xrefstyle='select: label' /> + XtPointer next_extension; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + XrmQuark record_type; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + long version; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + Cardinal record_size; <lineannotation>See <xref linkend='Class_Extension_Records' xrefstyle='select: title' /></lineannotation> + XtArgsProc get_values_hook; <lineannotation>See <xref linkend='Obtaining_Widget_State' xrefstyle='select: title' /></lineannotation> } ConstraintClassExtensionRec, *ConstraintClassExtension; -</literallayout> +</programlisting> <para> Constraint classes have the Constraint class fields immediately following the Composite class fields. </para> -<literallayout> +<programlisting> typedef struct _ConstraintClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; } ConstraintClassRec, *ConstraintWidgetClass; -</literallayout> +</programlisting> <para> The single occurrences of the class record and pointer for creating instances of Constraint are @@ -921,18 +924,18 @@ instances of Constraint are <para> In -<function>IntrinsicP.h</function>: +<filename class="headerfile">IntrinsicP.h</filename>: </para> -<literallayout> +<programlisting> extern ConstraintClassRec constraintClassRec; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout> +<programlisting> extern WidgetClass constraintWidgetClass; -</literallayout> +</programlisting> <para> The opaque types <function>ConstraintWidget</function> @@ -948,13 +951,13 @@ The symbolic constant for the version identifier is <function>XtConstraintExtensionVersion</function> (see <xref linkend='Class_Extension_Records' />). -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> -<literallayout> +<programlisting> typedef struct _ConstraintClassRec *ConstraintWidgetClass; -</literallayout> +</programlisting> </sect3> <sect3 id="ConstraintPart_Structure"> <title>ConstraintPart Structure</title> @@ -969,31 +972,31 @@ instance fields defined in the <function>ConstraintPart</function> structure </para> -<literallayout> +<programlisting> typedef struct { int empty; } ConstraintPart; -</literallayout> +</programlisting> <para> Constraint widgets have the Constraint instance fields immediately following the Composite instance fields. </para> -<literallayout> +<programlisting> typedef struct { CorePart core; CompositePart composite; ConstraintPart constraint; } ConstraintRec, *ConstraintWidget; -</literallayout> +</programlisting> <para> -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> -<literallayout> +<programlisting> typedef struct _ConstraintRec *ConstraintWidget; -</literallayout> +</programlisting> </sect3> <sect3 id="Constraint_Resources"> <title>Constraint Resources</title> @@ -1045,7 +1048,7 @@ value </term> <listitem> <para> -An unsigned integer datum with a minimum range of [0..2^16-1]. +An unsigned integer datum with a minimum range of [0..2<superscript>16</superscript>-1]. </para> </listitem> </varlistentry> @@ -1056,7 +1059,7 @@ An unsigned integer datum with a minimum range of [0..2^16-1]. </term> <listitem> <para> -An unsigned integer datum with a minimum range of [0..2^16-1]. +An unsigned integer datum with a minimum range of [0..2<superscript>16</superscript>-1]. </para> </listitem> </varlistentry> @@ -1067,7 +1070,7 @@ An unsigned integer datum with a minimum range of [0..2^16-1]. </term> <listitem> <para> -A signed integer datum with a minimum range of [-2^15..2^15-1]. +A signed integer datum with a minimum range of [-2<superscript>15</superscript>..2<superscript>15</superscript>-1]. </para> </listitem> </varlistentry> @@ -1258,13 +1261,13 @@ A resource name is spelled identically to the field name except that compound names use capitalization rather than underscore. To let the compiler catch spelling errors, each resource name should have a symbolic identifier prefixed with -``XtN''. +“XtN”. For example, the <emphasis remap='I'>background_pixmap</emphasis> field has the corresponding identifier XtNbackgroundPixmap, -which is defined as the string ``backgroundPixmap''. +which is defined as the string “backgroundPixmap”. Many predefined names are listed in -<function><X11/StringDefs.h></function>. +<filename class="headerfile"><X11/StringDefs.h></filename>. Before you invent a new name, you should make sure there is not already a name that you can use. </para> @@ -1272,23 +1275,23 @@ you should make sure there is not already a name that you can use. <listitem> <para> A resource class string starts with a capital letter -and uses capitalization for compound names (for example,``BorderWidth''). +and uses capitalization for compound names (for example,“BorderWidth”). Each resource class string should have a symbolic identifier prefixed with -``XtC'' +“XtC” (for example, XtCBorderWidth). Many predefined classes are listed in -<function><X11/StringDefs.h></function>. +<filename class="headerfile"><X11/StringDefs.h></filename>. </para> </listitem> <listitem> <para> A resource representation string is spelled identically to the type name -(for example, ``TranslationTable''). +(for example, “TranslationTable”). Each representation string should have a symbolic identifier prefixed with -``XtR'' +“XtR” (for example, XtRTranslationTable). Many predefined representation types are listed in -<function><X11/StringDefs.h></function>. +<filename class="headerfile"><X11/StringDefs.h></filename>. </para> </listitem> <listitem> @@ -1297,8 +1300,6 @@ New widget classes start with a capital and use uppercase for compound words. Given a new class name AbcXyz, you should derive several names: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -1348,7 +1349,7 @@ Action procedures available to translation specifications should follow the same naming conventions as procedures. That is, they start with a capital letter, and compound names use uppercase -(for example, ``Highlight'' and ``NotifyClient''). +(for example, “Highlight” and “NotifyClient”). </para> </listitem> </itemizedlist> @@ -1417,28 +1418,30 @@ Entry points for new class methods. For example, the following is the public .h file for a possible implementation of a Label widget: </para> -<literallayout> +<programlisting> #ifndef LABEL_H #define LABEL_H + /* New resources */ -#define XtNjustify "justify" -#define XtNforeground "foreground" -#define XtNlabel "label" -#define XtNfont "font" -#define XtNinternalWidth "internalWidth" -#define XtNinternalHeight "internalHeight" +#define XtNjustify "justify" +#define XtNforeground "foreground" +#define XtNlabel "label" +#define XtNfont "font" +#define XtNinternalWidth "internalWidth" +#define XtNinternalHeight "internalHeight" + /* Class record pointer */ extern WidgetClass labelWidgetClass; + /* C Widget type definition */ -typedef struct _LabelRec *LabelWidget; +typedef struct _LabelRec *LabelWidget; + /* New class method entry points */ -extern void LabelSetText(); - /* Widget w */ - /* String text */ -extern String LabelGetText(); - /* Widget w */ +extern void LabelSetText(Widget w, String text); +extern String LabelGetText(Widget w); + #endif LABEL_H -</literallayout> +</programlisting> <para> The conditional inclusion of the text allows the application to include header files for different widgets without being concerned @@ -1453,7 +1456,7 @@ For example, the public .h file for the Constraint widget class is -<function>Constraint.h</function>. +<filename class="headerfile">Constraint.h</filename>. </para> </sect2> @@ -1554,62 +1557,67 @@ An inherit constant for each new procedure in the widget class part structure. <para> For example, the following is the private .h file for a possible Label widget: </para> -<literallayout> +<programlisting> #ifndef LABELP_H #define LABELP_H + #include <X11/Label.h> + /* New representation types used by the Label widget */ #define XtRJustify "Justify" + /* New fields for the Label widget record */ typedef struct { /* Settable resources */ - Pixel foreground; + Pixel foreground; XFontStruct *font; - String label; /* text to display */ - XtJustify justify; - Dimension internal_width; /* # pixels horizontal border */ - Dimension internal_height; /* # pixels vertical border */ + String label; /* text to display */ + XtJustify justify; + Dimension internal_width; /* # pixels horizontal border */ + Dimension internal_height; /* # pixels vertical border */ /* Data derived from resources */ - GC normal_GC; - GC gray_GC; - Pixmap gray_pixmap; - Position label_x; - Position label_y; - Dimension label_width; - Dimension label_height; - Cardinal label_len; - Boolean display_sensitive; + GC normal_GC; + GC gray_GC; + Pixmap gray_pixmap; + Position label_x; + Position label_y; + Dimension label_width; + Dimension label_height; + Cardinal label_len; + Boolean display_sensitive; } LabelPart; -</literallayout> -<literallayout> + /* Full instance record declaration */ typedef struct _LabelRec { - CorePart core; - LabelPart label; + CorePart core; + LabelPart label; } LabelRec; + /* Types for Label class methods */ -typedef void (*LabelSetTextProc)(); - /* Widget w */ - /* String text */ -typedef String (*LabelGetTextProc)(); - /* Widget w */ +typedef void (*LabelSetTextProc)(Widget w, String text); +typedef String (*LabelGetTextProc)(Widget w); + /* New fields for the Label widget class record */ typedef struct { LabelSetTextProc set_text; LabelGetTextProc get_text; XtPointer extension; } LabelClassPart; + /* Full class record declaration */ typedef struct _LabelClassRec { CoreClassPart core_class; LabelClassPart label_class; } LabelClassRec; + /* Class record variable */ extern LabelClassRec labelClassRec; + #define LabelInheritSetText((LabelSetTextProc)_XtInherit) #define LabelInheritGetText((LabelGetTextProc)_XtInherit) + #endif LABELP_H -</literallayout> +</programlisting> <para> To accommodate operating systems with file name length restrictions, the name of the private .h file is the first nine characters of the @@ -1618,7 +1626,7 @@ For example, the private .h file for the Constraint widget class is -<function>ConstrainP.h</function>. +<filename class="headerfile">ConstrainP.h</filename>. </para> </sect2> @@ -1665,7 +1673,7 @@ structure. The superclass is used for class chaining operations and for inheriting or enveloping a superclass's operations (see <xref linkend='Superclass_Chaining' />, -<xref linkend='Initializing_a_Widget_Class' />, and +<xref linkend='Initializing_a_Widget_Class' />, and <xref linkend='Inheritance_of_Superclass_Operations' />. </para> @@ -1673,7 +1681,7 @@ inheriting or enveloping a superclass's operations The <emphasis remap='I'>class_name</emphasis> field contains the text name for this class, which is used by the resource manager. -For example, the Label widget has the string ``Label''. +For example, the Label widget has the string “Label”. More than one widget class can share the same text class name. This string must be permanently allocated prior to or during the execution of the class initialization procedure and must not be @@ -1729,7 +1737,7 @@ The following is an abbreviated version of the .c file for a Label widget. The resources table is described in <xref linkend='Resource_Management' />. </para> -<literallayout> +<programlisting> /* Resources specific to Label */ static XtResource resources[] = { {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), @@ -1744,77 +1752,79 @@ static XtResource resources[] = { . . } + /* Forward declarations of procedures */ -static void ClassInitialize(); -static void Initialize(); -static void Realize(); -static void SetText(); -static void GetText(); +static void ClassInitialize(void); +static void Initialize(Widget, Widget, ArgList, Cardinal*); +static void Realize(Widget, XtValueMask*, XSetWindowAttributes*); +static void SetText(Widget, String); +static void GetText(Widget); . . . -</literallayout> -<literallayout> +</programlisting> +<programlisting> /* Class record constant */ LabelClassRec labelClassRec = { { /* core_class fields */ - /* superclass */ (WidgetClass)&coreClassRec, - /* class_name */ "Label", - /* widget_size */ sizeof(LabelRec), - /* class_initialize */ ClassInitialize, - /* class_part_initialize */ NULL, - /* class_inited */ False, - /* initialize */ Initialize, - /* initialize_hook */ NULL, - /* realize */ Realize, - /* actions */ NULL, - /* num_actions */ 0, - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ True, - /* compress_exposure */ True, - /* compress_enterleave */ True, - /* visible_interest */ False, - /* destroy */ NULL, - /* resize */ Resize, - /* expose */ Redisplay, - /* set_values */ SetValues, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, - /* callback_offsets */ NULL, - /* tm_table */ NULL, - /* query_geometry */ XtInheritQueryGeometry, - /* display_accelerator */ NULL, - /* extension */ NULL + /* superclass */ (WidgetClass)&coreClassRec, + /* class_name */ "Label", + /* widget_size */ sizeof(LabelRec), + /* class_initialize */ ClassInitialize, + /* class_part_initialize */ NULL, + /* class_inited */ False, + /* initialize */ Initialize, + /* initialize_hook */ NULL, + /* realize */ Realize, + /* actions */ NULL, + /* num_actions */ 0, + /* resources */ resources, + /* num_resources */ XtNumber(resources), + /* xrm_class */ NULLQUARK, + /* compress_motion */ True, + /* compress_exposure */ True, + /* compress_enterleave */ True, + /* visible_interest */ False, + /* destroy */ NULL, + /* resize */ Resize, + /* expose */ Redisplay, + /* set_values */ SetValues, + /* set_values_hook */ NULL, + /* set_values_almost */ XtInheritSetValuesAlmost, + /* get_values_hook */ NULL, + /* accept_focus */ NULL, + /* version */ XtVersion, + /* callback_offsets */ NULL, + /* tm_table */ NULL, + /* query_geometry */ XtInheritQueryGeometry, + /* display_accelerator */ NULL, + /* extension */ NULL }, { - /* Label_class fields */ - /* get_text */ GetText, - /* set_text */ SetText, - /* extension */ NULL + /* Label_class fields */ + /* get_text */ GetText, + /* set_text */ SetText, + /* extension */ NULL } }; + /* Class record pointer */ WidgetClass labelWidgetClass = (WidgetClass) &labelClassRec; + /* New method access routines */ -void LabelSetText(w, text) - Widget w; - String text; +void LabelSetText(Widget w, String text) { LabelWidgetClass lwc = (Label WidgetClass)XtClass(w); XtCheckSubclass(w, labelWidgetClass, NULL); *(lwc->label_class.set_text)(w, text) } + /* Private procedures */ . . . -</literallayout> +</programlisting> </sect2> <sect2 id="Widget_Class_and_Superclass_Look_Up"> @@ -1970,7 +1980,7 @@ All these macros and functions have the same argument description. <funcsynopsis id='XtIs'> <funcprototype> - <funcdef>Boolean <function>XtIs</function></funcdef> + <funcdef>Boolean <function>XtIs<subscript><class></subscript></function></funcdef> <paramdef>Widget<parameter> w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1999,7 +2009,7 @@ To check a widget's class and to generate a debugging error message, use <xref linkend='XtCheckSubclass' xrefstyle='select: title'/>, defined in -<function><X11/IntrinsicP.h></function>: +<filename class="headerfile"><X11/IntrinsicP.h></filename>: </para> <funcsynopsis id='XtCheckSubclass'> @@ -2080,35 +2090,35 @@ the Intrinsics access the field's value only after accessing its corresponding superclass value (called downward superclass chaining) or before accessing its corresponding superclass value (called upward superclass chaining). The self-contained fields are</para> -<literallayout> -In all widget classes: <emphasis remap='I'>class_name</emphasis> - <emphasis remap='I'>class_initialize</emphasis> - <emphasis remap='I'>widget_size</emphasis> - <emphasis remap='I'>realize</emphasis> - <emphasis remap='I'>visible_interest</emphasis> - <emphasis remap='I'>resize</emphasis> - <emphasis remap='I'>expose</emphasis> - <emphasis remap='I'>accept_focus</emphasis> - <emphasis remap='I'>compress_motion</emphasis> - <emphasis remap='I'>compress_exposure</emphasis> - <emphasis remap='I'>compress_enterleave</emphasis> - <emphasis remap='I'>set_values_almost</emphasis> - <emphasis remap='I'>tm_table</emphasis> - <emphasis remap='I'>version</emphasis> - <emphasis remap='I'>allocate</emphasis> - <emphasis remap='I'>deallocate</emphasis> - -In Composite widget classes: <emphasis remap='I'>geometry_manager</emphasis> - <emphasis remap='I'>change_managed</emphasis> - <emphasis remap='I'>insert_child</emphasis> - <emphasis remap='I'>delete_child</emphasis> - <emphasis remap='I'>accepts_objects</emphasis> - <emphasis remap='I'>allows_change_managed_set</emphasis> - -In Constraint widget classes: <emphasis remap='I'>constraint_size</emphasis> - -In Shell widget classes: <emphasis remap='I'>root_geometry_manager</emphasis> -</literallayout> +<programlisting> +In all widget classes: <emphasis remap='I'>class_name</emphasis> + <emphasis remap='I'>class_initialize</emphasis> + <emphasis remap='I'>widget_size</emphasis> + <emphasis remap='I'>realize</emphasis> + <emphasis remap='I'>visible_interest</emphasis> + <emphasis remap='I'>resize</emphasis> + <emphasis remap='I'>expose</emphasis> + <emphasis remap='I'>accept_focus</emphasis> + <emphasis remap='I'>compress_motion</emphasis> + <emphasis remap='I'>compress_exposure</emphasis> + <emphasis remap='I'>compress_enterleave</emphasis> + <emphasis remap='I'>set_values_almost</emphasis> + <emphasis remap='I'>tm_table</emphasis> + <emphasis remap='I'>version</emphasis> + <emphasis remap='I'>allocate</emphasis> + <emphasis remap='I'>deallocate</emphasis> + +In Composite widget classes: <emphasis remap='I'>geometry_manager</emphasis> + <emphasis remap='I'>change_managed</emphasis> + <emphasis remap='I'>insert_child</emphasis> + <emphasis remap='I'>delete_child</emphasis> + <emphasis remap='I'>accepts_objects</emphasis> + <emphasis remap='I'>allows_change_managed_set</emphasis> + +In Constraint widget classes: <emphasis remap='I'>constraint_size</emphasis> + +In Shell widget classes: <emphasis remap='I'>root_geometry_manager</emphasis> +</programlisting> <para> With downward superclass chaining, @@ -2120,15 +2130,15 @@ Core class structures, then from the subclass structure, and so on down the class chain to that widget's class structure. These superclass-to-subclass fields are </para> -<literallayout> - <emphasis remap='I'>class_part_initialize</emphasis> - <emphasis remap='I'>get_values_hook</emphasis> - <emphasis remap='I'>initialize</emphasis> - <emphasis remap='I'>initialize_hook</emphasis> - <emphasis remap='I'>set_values</emphasis> - <emphasis remap='I'>set_values_hook</emphasis> - <emphasis remap='I'>resources</emphasis> -</literallayout> +<programlisting> + <emphasis remap='I'>class_part_initialize</emphasis> + <emphasis remap='I'>get_values_hook</emphasis> + <emphasis remap='I'>initialize</emphasis> + <emphasis remap='I'>initialize_hook</emphasis> + <emphasis remap='I'>set_values</emphasis> + <emphasis remap='I'>set_values_hook</emphasis> + <emphasis remap='I'>resources</emphasis> +</programlisting> <para> In addition, for subclasses of @@ -2141,12 +2151,12 @@ structures are chained from the Constraint class down to the subclass: </para> -<literallayout> - <emphasis remap='I'>resources</emphasis> - <emphasis remap='I'>initialize</emphasis> - <emphasis remap='I'>set_values</emphasis> - <emphasis remap='I'>get_values_hook</emphasis> -</literallayout> +<programlisting> + <emphasis remap='I'>resources</emphasis> + <emphasis remap='I'>initialize</emphasis> + <emphasis remap='I'>set_values</emphasis> + <emphasis remap='I'>get_values_hook</emphasis> +</programlisting> <para> With upward superclass chaining, @@ -2160,10 +2170,10 @@ Object class structures. The subclass-to-superclass fields are </para> -<literallayout> - <emphasis remap='I'>destroy</emphasis> - <emphasis remap='I'>actions</emphasis> -</literallayout> +<programlisting> + <emphasis remap='I'>destroy</emphasis> + <emphasis remap='I'>actions</emphasis> +</programlisting> <para> For subclasses of @@ -2172,8 +2182,10 @@ the following field of <function>ConstraintClassPart</function> is chained from the subclass up to the Constraint class: - <emphasis remap='I'>destroy</emphasis> </para> +<programlisting> + <emphasis remap='I'>destroy</emphasis> +</programlisting> </sect2> <sect2 id="Class_Initialization_class_initialize_and_class_part_initialize_Procedures"> @@ -2216,7 +2228,7 @@ The class_part_initialize procedure pointer is of type <funcsynopsis> <funcprototype> - <funcdef>void <function>(*XtWidgetClassProc)(WidgetClass)</function></funcdef> + <funcdef>typedef void <function>(*XtWidgetClassProc)(WidgetClass)</function></funcdef> <paramdef>WidgetClass<parameter> widget_class</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -2286,13 +2298,13 @@ a class structure is constant. <para> The following example provides the class initialization procedure for a Label class. </para> -<literallayout> -static void ClassInitialize() +<programlisting> +static void ClassInitialize(void) { XtSetTypeConverter(XtRString, XtRJustify, CvtStringToJustify, NULL, 0, XtCacheNone, NULL); } -</literallayout> +</programlisting> </sect2> <sect2 id="Initializing_a_Widget_Class"> @@ -2415,21 +2427,20 @@ is a procedure that issues an error message if it is actually called. <para> For example, -<function>CompositeP.h</function> +<filename class="headerfile">CompositeP.h</filename> contains these definitions: </para> -<literallayout> +<programlisting> #define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit) -#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit) -#define XtInheritInsertChild ((XtArgsProc) _XtInherit) -#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit) -</literallayout> +#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit) +#define XtInheritInsertChild ((XtArgsProc) _XtInherit) +#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit) +</programlisting> <para> Composite's class_part_initialize procedure begins as follows: </para> -<literallayout> -static void CompositeClassPartInitialize(widgetClass) - WidgetClass widgetClass; +<programlisting> +static void CompositeClassPartInitialize(WidgetClass widgetClass) { CompositeWidgetClass wc = (CompositeWidgetClass)widgetClass; CompositeWidgetClass super = (CompositeWidgetClass)wc->core_class.superclass; @@ -2442,7 +2453,8 @@ static void CompositeClassPartInitialize(widgetClass) . . . -</literallayout> +} +</programlisting> <para> Nonprocedure fields may be inherited in the same manner as procedure fields. The class may declare any reserved value it wishes for @@ -2613,14 +2625,14 @@ declared as a linked list, and each extension record definition should contain the following four fields at the beginning of the structure declaration: </para> -<literallayout> +<programlisting> struct { XtPointer next_extension; - XrmQuark record_type; - long version; - Cardinal record_size; + XrmQuark record_type; + long version; + Cardinal record_size; }; -</literallayout> +</programlisting> <variablelist> <varlistentry> @@ -2677,7 +2689,7 @@ result of <function>XrmStringToQuark</function> for a registered string constant. The Intrinsics reserve all record type strings beginning with the two -characters ``XT'' for future standard uses. The value +characters “XT” for future standard uses. The value <emphasis role='strong'>NULLQUARK</emphasis> may also be used by the class part owner in extension records attached to its own class @@ -2693,7 +2705,7 @@ header file for a widget class should provide a symbolic constant for subclasses to use to initialize this field. The <emphasis remap='I'>record_size</emphasis> field value includes the four common header fields and should normally be initialized with -<function>sizeof ().</function> +<function>sizeof().</function> </para> <para> diff --git a/lib/libXt/specs/CH02.xml b/lib/libXt/specs/CH02.xml index 9cfd4479f..52df96b3c 100644 --- a/lib/libXt/specs/CH02.xml +++ b/lib/libXt/specs/CH02.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Widget_Instantiation'> <title>Widget Instantiation</title> <para> @@ -171,7 +174,7 @@ To initialize the Intrinsics internals, use <funcsynopsis id='XtToolkitInitialize'> <funcprototype> <funcdef>void <function>XtToolkitInitialize</function></funcdef> - <paramdef> <parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -195,7 +198,7 @@ To create an application context, use <funcsynopsis id='XtCreateApplicationContext'> <funcprototype> <funcdef>XtAppContext <function>XtCreateApplicationContext</function></funcdef> - <paramdef> <parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -284,12 +287,12 @@ To initialize a display and add it to an application context, use <funcdef>void <function>XtDisplayInitialize</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> <paramdef>Display * <parameter>display</parameter></paramdef> - <paramdef>String <parameter>application_name</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>application_name</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescRec * <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int * <parameter>argc</parameter></paramdef> - <paramdef>String * <parameter>argv</parameter></paramdef> + <paramdef>char ** <parameter>argv</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -346,7 +349,7 @@ Specifies how to parse the command line for any application-specific resources. The <emphasis remap='I'>options</emphasis> argument is passed as a parameter to <function>XrmParseCommand</function>. For further information, -see <olink targetdoc='libX11' targetptr='Parsing_Command_Line_Options'>Parsing Command Line Options</olink> in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink> and <xref linkend='Parsing_the_Command_Line' /> of this specification. +see <olink targetdoc='libX11' targetptr='Parsing_Command_Line_Options'>Parsing Command Line Options</olink> in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink> and <xref linkend='Parsing_the_Command_Line' /> of this specification. </para> </listitem> </varlistentry> @@ -432,15 +435,15 @@ add it to an application context, use <funcsynopsis id='XtOpenDisplay'> <funcprototype> - <funcdef>Display <function>*XtOpenDisplay</function></funcdef> + <funcdef>Display *<function>XtOpenDisplay</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>display_string</parameter></paramdef> - <paramdef>String <parameter>application_name</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>display_string</parameter></paramdef> + <paramdef>const char * <parameter>application_name</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescRec * <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int * <parameter>argc</parameter></paramdef> - <paramdef>String * <parameter>argv</parameter></paramdef> + <paramdef>char ** <parameter>argv</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -541,7 +544,7 @@ function calls with the specified <emphasis remap='I'>display_string</emphasis>. If <emphasis remap='I'>display_string</emphasis> is NULL, <xref linkend='XtOpenDisplay' xrefstyle='select: title'/> -uses the current value of the \-display option specified in <emphasis remap='I'>argv</emphasis>. +uses the current value of the -display option specified in <emphasis remap='I'>argv</emphasis>. If no display is specified in <emphasis remap='I'>argv</emphasis>, the user's default display is retrieved from the environment. On POSIX-based systems, @@ -556,8 +559,8 @@ If this succeeds, then calls <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/> and passes it the opened display and -the value of the \-name option specified in <emphasis remap='I'>argv</emphasis> as the application name. -If no \-name option is specified +the value of the -name option specified in <emphasis remap='I'>argv</emphasis> as the application name. +If no -name option is specified and <emphasis remap='I'>application_name</emphasis> is non-NULL, <emphasis remap='I'>application_name</emphasis> is passed to <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/>. @@ -570,7 +573,7 @@ name is the name used to invoke the program. On implementations that conform to ANSI C Hosted Environment support, the application name will be <emphasis remap='I'>argv</emphasis>[0] less any directory and file type components, that is, the final component of <emphasis remap='I'>argv</emphasis>[0], if specified. If <emphasis remap='I'>argv</emphasis>[0] does not exist or -is the empty string, the application name is ``main''. +is the empty string, the application name is “main”. <xref linkend='XtOpenDisplay' xrefstyle='select: title'/> returns the newly opened display or NULL if it failed. </para> @@ -792,7 +795,7 @@ Calls to verify that the current locale is supported. If the locale is not supported, a warning message is issued with <xref linkend='XtWarning' xrefstyle='select: title'/> -and the locale is set to ``C''. +and the locale is set to “C”. </para> </listitem> <listitem> @@ -820,12 +823,12 @@ prior to <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/>, as in the following example. </para> -<literallayout> +<programlisting> Widget top; XtSetLanguageProc(NULL, NULL, NULL); top = XtOpenApplication(...); ... -</literallayout> +</programlisting> </sect1> <sect1 id="Loading_the_Resource_Database"> @@ -883,7 +886,7 @@ above in the same order: <itemizedlist spacing='compact'> <listitem> <para> -A temporary database, the ``server resource database'', is +A temporary database, the “server resource database”, is created from the string returned by <function>XResourceManagerString</function> or, if @@ -897,7 +900,7 @@ preference resource file is $HOME/<function>.Xdefaults</function>. <para> If a language procedure has been set, <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/> -first searches the command line for the option ``-xnlLanguage'', or +first searches the command line for the option “-xnlLanguage”, or for a -xrm option that specifies the xnlLanguage/XnlLanguage resource, as specified by Section 2.4. If such a resource is found, the value is assumed to be @@ -999,8 +1002,6 @@ if this is defined. If is not defined, an implementation-dependent default value is used. This default value is constrained in the following manner: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -1011,14 +1012,14 @@ is not defined, the default must contain at least six entries. These entries must contain $HOME as the directory prefix, plus the following substitutions: </para> -<literallayout> - 1. %C, %N, %L or %C, %N, %l, %t, %c - 2. %C, %N, %l - 3. %C, %N - 4. %N, %L or %N, %l, %t, %c - 5. %N, %l - 6. %N -</literallayout> +<programlisting> +1. %C, %N, %L or %C, %N, %l, %t, %c +2. %C, %N, %l +3. %C, %N +4. %N, %L or %N, %l, %t, %c +5. %N, %l +6. %N +</programlisting> <para> The order of these six entries within the path must be as given above. The order and use of substitutions within a given entry are @@ -1033,15 +1034,15 @@ is defined, the default must contain at least seven entries. These entries must contain the following directory prefixes and substitutions: </para> -<literallayout> - 1. $XAPPLRESDIR with %C, %N, %L or %C, %N, %l, %t, %c - 2. $XAPPLRESDIR with %C, %N, %l - 3. $XAPPLRESDIR with %C, %N - 4. $XAPPLRESDIR with %N, %L or %N, %l, %t, %c - 5. $XAPPLRESDIR with %N, %l - 6. $XAPPLRESDIR with %N - 7. $HOME with %N -</literallayout> +<programlisting> +1. $XAPPLRESDIR with %C, %N, %L or %C, %N, %l, %t, %c +2. $XAPPLRESDIR with %C, %N, %l +3. $XAPPLRESDIR with %C, %N +4. $XAPPLRESDIR with %N, %L or %N, %l, %t, %c +5. $XAPPLRESDIR with %N, %l +6. $XAPPLRESDIR with %N +7. $HOME with %N +</programlisting> <para> The order of these seven entries within the path must be as given above. The order and use of substitutions within a given entry are @@ -1060,7 +1061,7 @@ It may contain sitewide customizations specified by the system manager. The name of the application class resource file is found by calling <xref linkend='XtResolvePathname' xrefstyle='select: title'/> with the parameters -(<emphasis remap='I'>display</emphasis>, ``app-defaults'', NULL, NULL, NULL, NULL, 0, NULL). +(<emphasis remap='I'>display</emphasis>, “app-defaults”, NULL, NULL, NULL, NULL, 0, NULL). This file is expected to be provided by the developer of the application and may be required for the application to function properly. A simple application that wants to be assured of having a minimal @@ -1165,7 +1166,7 @@ use <funcsynopsis id='XtAppSetFallbackResources'> <funcprototype> <funcdef>void <function>XtAppSetFallbackResources</function></funcdef> - <paramdef>XtAppContext * <parameter>app_context</parameter></paramdef> + <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> <paramdef>String * <parameter>specification_list</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1269,27 +1270,28 @@ has a table of standard command line options that are passed to for adding resources to the resource database, and it takes as a parameter additional application-specific resource abbreviations. -The format of this table is described in Section 15.9 in <emphasis remap='I'>Xlib — C Language X Interface</emphasis>. +The format of this table is described in Section 15.9 in <emphasis remap='I'>Xlib — C Language X Interface</emphasis>. </para> -<literallayout> +<programlisting> typedef enum { - XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ - XrmoptionIsArg, /* Value is the option string itself */ - XrmoptionStickyArg, /* Value is characters immediately following option */ - XrmoptionSepArg, /* Value is next argument in argv */ - XrmoptionResArg, /* Use the next argument as input to XrmPutLineResource*/ - XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ - XrmoptionSkipNArgs, /* Ignore this option and the next */ - /* OptionDescRec.value arguments in argv */ - XrmoptionSkipLine /* Ignore this option and the rest of argv */ + XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ + XrmoptionIsArg, /* Value is the option string itself */ + XrmoptionStickyArg, /* Value is characters immediately following option */ + XrmoptionSepArg, /* Value is next argument in argv */ + XrmoptionResArg, /* Use the next argument as input to XrmPutLineResource*/ + XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ + XrmoptionSkipNArgs, /* Ignore this option and the next */ + /* OptionDescRec.value arguments in argv */ + XrmoptionSkipLine /* Ignore this option and the rest of argv */ } XrmOptionKind; + typedef struct { - char *option; /* Option name in argv */ - char *specifier; /* Resource name (without application name) */ - XrmOptionKind argKind; /* Location of the resource value */ - XPointer value; /* Value to provide if XrmoptionNoArg */ + char *option; /* Option name in argv */ + char *specifier; /* Resource name (without application name) */ + XrmOptionKind argKind; /* Location of the resource value */ + XPointer value; /* Value to provide if XrmoptionNoArg */ } XrmOptionDescRec, *XrmOptionDescList; -</literallayout> +</programlisting> <para>The standard table contains the following entries:</para> <informaltable frame='topbot'> @@ -1309,97 +1311,97 @@ typedef struct { </thead> <tbody> <row> - <entry>−background</entry> + <entry>-background</entry> <entry>*background</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−bd</entry> + <entry>-bd</entry> <entry>*borderColor</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−bg</entry> + <entry>-bg</entry> <entry>*background</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−borderwidth</entry> + <entry>-borderwidth</entry> <entry>.borderWidth</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−bordercolor</entry> + <entry>-bordercolor</entry> <entry>*borderColor</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−bw</entry> + <entry>-bw</entry> <entry>.borderWidth</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−display</entry> + <entry>-display</entry> <entry>.display</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−fg</entry> + <entry>-fg</entry> <entry>*foreground</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−fn</entry> + <entry>-fn</entry> <entry>*font</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−font</entry> + <entry>-font</entry> <entry>*font</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−foreground</entry> + <entry>-foreground</entry> <entry>*foreground</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−geometry</entry> + <entry>-geometry</entry> <entry>.geometry</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−iconic</entry> + <entry>-iconic</entry> <entry>.iconic</entry> <entry>NoArg</entry> <entry>"true"</entry> </row> <row> - <entry>−name</entry> + <entry>-name</entry> <entry>.name</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−reverse</entry> + <entry>-reverse</entry> <entry>.reverseVideo</entry> <entry>NoArg</entry> <entry>"on"</entry> </row> <row> - <entry>−rv</entry> + <entry>-rv</entry> <entry>.reverseVideo</entry> <entry>NoArg</entry> <entry>"on"</entry> @@ -1411,13 +1413,13 @@ typedef struct { <entry>"off"</entry> </row> <row> - <entry>−selectionTimeout</entry> + <entry>-selectionTimeout</entry> <entry>.selectionTimeout</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−synchronous</entry> + <entry>-synchronous</entry> <entry>.synchronous</entry> <entry>NoArg</entry> <entry>"on"</entry> @@ -1429,25 +1431,25 @@ typedef struct { <entry>"off"</entry> </row> <row> - <entry>−title</entry> + <entry>-title</entry> <entry>.title</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−xnllanguage</entry> + <entry>-xnllanguage</entry> <entry>.xnlLanguage</entry> <entry>SepArg</entry> <entry>next argument</entry> </row> <row> - <entry>−xrm</entry> + <entry>-xrm</entry> <entry>next argument</entry> <entry>ResArg</entry> <entry>next argument</entry> </row> <row> - <entry>−xtsessionID</entry> + <entry>-xtsessionID</entry> <entry>.sessionID</entry> <entry>SepArg</entry> <entry>next argument</entry> @@ -1501,9 +1503,9 @@ to give a red background to all command buttons in an application named <function>xmh</function>, you can start it up as </para> -<literallayout> +<programlisting> xmh -xrm 'xmh*Command.background: red' -</literallayout> +</programlisting> <para> When it parses the command line, <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/> @@ -1516,7 +1518,7 @@ in the standard table overrides the standard table entry. If an option name is a prefix of another option name, both names are kept in the merged table. The Intrinsics reserve all option names -beginning with the characters ``-xt'' for future standard uses. +beginning with the characters “-xt” for future standard uses. </para> </sect1> @@ -1609,12 +1611,12 @@ These are passed as an arglist, a pointer to an array of <function>Arg</function> structures, which contains </para> -<literallayout> +<programlisting> typedef struct { String name; XtArgVal value; } Arg, *ArgList; -</literallayout> +</programlisting> <para> where <function>XtArgVal</function> @@ -1686,26 +1688,26 @@ The function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example: </para> -<literallayout> +<programlisting> Arg args[20]; int n; n = 0; -XtSetArg(args[n], XtNheight, 100); n++; -XtSetArg(args[n], XtNwidth, 200); n++; +XtSetArg(args[n], XtNheight, 100); n++; +XtSetArg(args[n], XtNwidth, 200); n++; XtSetValues(widget, args, n); -</literallayout> +</programlisting> <para> Alternatively, an application can statically declare the argument list and use <xref linkend='XtNumber' xrefstyle='select: title'/>: </para> -<literallayout> +<programlisting> static Args args[] = { {XtNheight, (XtArgVal) 100}, {XtNwidth, (XtArgVal) 200}, }; XtSetValues(Widget, args, XtNumber(args)); -</literallayout> +</programlisting> <para> Note that you should not use expressions with side effects such as auto-increment or auto-decrement @@ -1793,9 +1795,9 @@ All Intrinsics interfaces that require <function>ArgList</function> arguments have analogs conforming to the ANSI C variable argument list -(traditionally called ``varargs'') +(traditionally called “varargs”) calling convention. The name of the analog is formed by prefixing -``Va'' to the name of the corresponding +“Va” to the name of the corresponding <function>ArgList</function> procedure; e.g., <xref linkend='XtVaCreateWidget' xrefstyle='select: title'/>. @@ -1821,9 +1823,9 @@ Two special names are defined for use only in varargs lists: and <function>XtVaNestedList</function>. </para> -<literallayout> +<programlisting> #define XtVaTypedArg "XtVaTypedArg" -</literallayout> +</programlisting> <para> If the name <function>XtVaTypedArg</function> @@ -1850,9 +1852,9 @@ otherwise <emphasis remap='I'>value</emphasis> is a pointer to the data. If the conversion fails for any reason, a warning message is issued and the list entry is skipped. </para> -<literallayout> +<programlisting> #define XtVaNestedList "XtVaNestedList" -</literallayout> +</programlisting> <para> If the name <function>XtVaNestedList</function> @@ -1871,9 +1873,9 @@ To dynamically allocate a varargs list for use with in multiple calls, use <xref linkend='XtVaCreateArgsList' xrefstyle='select: title'/>. </para> -<literallayout> +<programlisting> typedef XtPointer XtVarArgsList; -</literallayout> +</programlisting> <funcsynopsis id='XtVaCreateArgsList'> <funcprototype> @@ -1943,7 +1945,7 @@ To create an instance of a widget, use <funcsynopsis id='XtCreateWidget'> <funcprototype> <funcdef>Widget <function>XtCreateWidget</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>object_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -2124,7 +2126,7 @@ To create an instance of a widget using varargs lists, use <funcsynopsis id='XtVaCreateWidget'> <funcprototype> <funcdef>Widget <function>XtVaCreateWidget</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>object_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> <paramdef> <parameter>...</parameter></paramdef> @@ -2201,8 +2203,8 @@ to create independent widget trees. <funcsynopsis id='XtAppCreateShell'> <funcprototype> <funcdef>Widget <function>XtAppCreateShell</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Display * <parameter>display</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -2298,7 +2300,7 @@ class <emphasis remap='I'>Class</emphasis>.Screen where <emphasis remap='I'>Clas <emphasis remap='I'>application_class</emphasis> if <emphasis remap='I'>widget_class</emphasis> is <function>applicationShellWidgetClass</function> or a subclass thereof. If <emphasis remap='I'>widget_class</emphasis> is not -<function>application\%Shell\%Widget\%Class</function> +<function>applicationShellWidgetClass</function> or a subclass, <emphasis remap='I'>Class</emphasis> is the <emphasis remap='I'>class_name</emphasis> field from the <function>CoreClassPart</function> @@ -2349,21 +2351,21 @@ The first method, which is best used when there is a clear choice for what is the main window, leads to resource specifications like the following: </para> -<literallayout> -xmail.geometry:... (the main window) -xmail.read.geometry:... (the read window) -xmail.compose.geometry:... (the compose window) -</literallayout> +<programlisting> +xmail.geometry:... (the main window) +xmail.read.geometry:... (the read window) +xmail.compose.geometry:... (the compose window) +</programlisting> <para> The second method, which is best if there is no main window, leads to resource specifications like the following: </para> -<literallayout> -xmail.headers.geometry:... (the headers window) -xmail.read.geometry:... (the read window) -xmail.compose.geometry:... (the compose window) -</literallayout> +<programlisting> +xmail.headers.geometry:... (the headers window) +xmail.read.geometry:... (the read window) +xmail.compose.geometry:... (the compose window) +</programlisting> <para> To create a top-level widget that is the root of a widget tree using varargs lists, use @@ -2373,10 +2375,11 @@ varargs lists, use <funcsynopsis id='XtVaAppCreateShell'> <funcprototype> <funcdef>Widget <function>XtVaAppCreateShell</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Display * <parameter>display</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -2469,11 +2472,11 @@ or <funcprototype> <funcdef>Widget <function>XtOpenApplication</function></funcdef> <paramdef>XtAppContext * <parameter>app_context_return</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescList <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int * <parameter>argc_in_out</parameter></paramdef> - <paramdef>String * <parameter>argv_in_out</parameter></paramdef> + <paramdef>char ** <parameter>argv_in_out</parameter></paramdef> <paramdef>String * <parameter>fallback_resources</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -2624,13 +2627,14 @@ is called with the value prior to calling <funcprototype> <funcdef>Widget <function>XtVaOpenApplication</function></funcdef> <paramdef>XtAppContext * <parameter>app_context_return</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescList <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int * <parameter>argc_in_out</parameter></paramdef> - <paramdef>String * <parameter>argv_in_out</parameter></paramdef> + <paramdef>char ** <parameter>argv_in_out</parameter></paramdef> <paramdef>String * <parameter>fallback_resources</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -2756,14 +2760,14 @@ When the call to create a widget includes a varargs list containing these arguments will be passed to the allocation procedure in an <function>XtTypedArgList</function>. </para> -<literallayout> +<programlisting> typedef struct { String name; String type; XtArgVal value; int size; } XtTypedArg, *XtTypedArgList; -</literallayout> +</programlisting> <para> The allocate procedure pointer in the <function>ObjectClassExtension</function> @@ -2773,7 +2777,7 @@ record is of type <funcsynopsis id='XtAllocateProc'> <funcprototype> - <funcdef>typedef void <function>(*AllocateProc)</function></funcdef> + <funcdef>typedef void <function>(*XtAllocateProc)</function></funcdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Cardinal* <parameter>constraint_size</parameter></paramdef> <paramdef>Cardinal* <parameter>more_bytes</parameter></paramdef> @@ -3185,7 +3189,7 @@ The initialize_hook procedure pointer is of type <funcsynopsis id='XtArgsProc'> <funcprototype> - <funcdef>typedef void<function>(*XtArgsProc)</function></funcdef> + <funcdef>typedef void <function>(*XtArgsProc)</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> <paramdef>Cardinal * <parameter>num_args</parameter></paramdef> @@ -3311,8 +3315,6 @@ not a subclass of <xref linkend='XtRealizeWidget' xrefstyle='select: title'/> returns; otherwise it continues and performs the following: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -3347,11 +3349,11 @@ maps the widget window. <xref linkend='XtVaCreateWidget' xrefstyle='select: title'/>, <xref linkend='XtRealizeWidget' xrefstyle='select: title'/>, <xref linkend='XtManageChildren' xrefstyle='select: title'/>, -<function>XtUnmanage\%Children</function>, +<function>XtUnmanageChildren</function>, <xref linkend='XtUnrealizeWidget' xrefstyle='select: title'/>, <xref linkend='XtSetMappedWhenManaged' xrefstyle='select: title'/>, and -<function>XtDestroy\%Widget</function> +<function>XtDestroyWidget</function> maintain the following invariants: </para> <itemizedlist spacing='compact'> @@ -3616,7 +3618,7 @@ which simplifies the creation of windows for widgets. <paramdef>unsigned int <parameter>window_class</parameter></paramdef> <paramdef>Visual * <parameter>visual</parameter></paramdef> <paramdef>XtValueMask <parameter>value_mask</parameter></paramdef> - <paramdef>XSetWindowAttributes <parameter>attributes</parameter></paramdef> + <paramdef>XSetWindowAttributes * <parameter>attributes</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3717,7 +3719,7 @@ and to the application writer by means of functions. <funcsynopsis> <funcprototype> - <funcdef>Display <function>XtDisplay</function></funcdef> + <funcdef>Display * <function>XtDisplay</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3768,7 +3770,7 @@ will be of class Object or a subclass. <funcsynopsis id='XtScreen'> <funcprototype> - <funcdef>Screen <function>*XtScreen</function></funcdef> + <funcdef>Screen *<function>XtScreen</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3828,7 +3830,7 @@ and <funcsynopsis id='XtDisplayOfObject'> <funcprototype> - <funcdef>Display <function>*XtDisplayOfObject</function></funcdef> + <funcdef>Display *<function>XtDisplayOfObject</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3859,7 +3861,7 @@ Widget or a subclass thereof. <funcsynopsis id='XtScreenOfObject'> <funcprototype> - <funcdef>Screen <function>*XtScreenOfObject</function></funcdef> + <funcdef>Screen *<function>XtScreenOfObject</function></funcdef> <paramdef>Widget <parameter>object</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4029,7 +4031,7 @@ Unmanages the widget if the widget is managed. <para> Makes a postorder (child-to-parent) traversal of the widget tree rooted at the specified widget and, for each widget that has -declared a callback list resource named ``unrealizeCallback'', executes the +declared a callback list resource named “unrealizeCallback”, executes the procedures on the XtNunrealizeCallback list. @@ -4179,7 +4181,7 @@ specified: <listitem> <para> If the widget is not a pop-up child and the widget's parent is a subclass of -<function>composite\%WidgetClass</function>, +<function>compositeWidgetClass</function>, and if the parent is not being destroyed, it calls <xref linkend='XtUnmanageChild' xrefstyle='select: title'/> @@ -4206,7 +4208,7 @@ widget in postorder: <listitem> <para> If the widget is not a pop-up child and the widget's parent is a subclass of -<function>constraint\%WidgetClass</function>, +<function>constraintWidgetClass</function>, it calls the <function>ConstraintClassPart</function> destroy procedure for the parent, @@ -4268,9 +4270,9 @@ procedure <emphasis remap='I'>ClientDestroy</emphasis> with client data to a wid <xref linkend='XtAddCallback' xrefstyle='select: title'/>. </para> -<literallayout> +<programlisting> XtAddCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>) -</literallayout> +</programlisting> <para> Similarly, the following removes the application-supplied destroy callback @@ -4278,9 +4280,9 @@ procedure <emphasis remap='I'>ClientDestroy</emphasis> by calling <xref linkend='XtRemoveCallback' xrefstyle='select: title'/>. </para> -<literallayout> +<programlisting> XtRemoveCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>) -</literallayout> +</programlisting> <para> The <emphasis remap='I'>ClientDestroy</emphasis> argument is of type <xref linkend='XtCallbackProc' xrefstyle='select: title'/>; @@ -4414,7 +4416,7 @@ This constraint destroy procedure pointer is of type <xref linkend='XtWidgetProc' xrefstyle='select: title'/>. The constraint destroy procedures are called in subclass-to-superclass order, starting at the class of the widget's parent and ending at -<function>constraint\%WidgetClass</function>. +<function>constraintWidgetClass</function>. Therefore, a parent's constraint destroy procedure should deallocate only storage that is specific to the constraint subclass and not storage allocated by any of its superclasses. diff --git a/lib/libXt/specs/CH03.xml b/lib/libXt/specs/CH03.xml index 2b2e1d730..610963eb1 100644 --- a/lib/libXt/specs/CH03.xml +++ b/lib/libXt/specs/CH03.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Composite_Widgets_and_Their_Children'> <title>Composite Widgets and Their Children</title> <para> @@ -402,8 +405,6 @@ and marks it if not. If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -506,7 +507,7 @@ or <funcsynopsis id='XtCreateManagedWidget'> <funcprototype> <funcdef>Widget <function>XtCreateManagedWidget</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -580,9 +581,10 @@ and <funcsynopsis id='XtVaCreateManagedWidget'> <funcprototype> <funcdef>Widget <function>XtVaCreateManagedWidget</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -703,8 +705,6 @@ For each unique child on the list, <xref linkend='XtUnmanageChildren' xrefstyle='select: title'/> ignores the child if it is unmanaged; otherwise it performs the following: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -909,8 +909,6 @@ then <xref linkend='XtChangeManagedSet' xrefstyle='select: title'/> performs the following: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -937,8 +935,6 @@ Calls <para> Otherwise, the following is performed: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -1005,7 +1001,7 @@ The <emphasis remap='I'>do_change_proc</emphasis> is of type <funcsynopsis id='XtDoChangeProc'> <funcprototype> -<funcdef>typedef void <function>*XtDoChangeProc</function></funcdef> +<funcdef>typedef void *<function>XtDoChangeProc</function></funcdef> <paramdef>Widget <parameter>composite_parent</parameter></paramdef> <paramdef>WidgetList <parameter>unmange_children</parameter></paramdef> @@ -1221,7 +1217,7 @@ To map a widget explicitly, use <funcsynopsis id='XtMapWidget'> <funcprototype> -<funcdef> <function>XtMapWidget</function></funcdef> +<funcdef>void <function>XtMapWidget</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1246,7 +1242,7 @@ To unmap a widget explicitly, use <funcsynopsis id='XtUnmapWidget'> <funcprototype> -<funcdef> <function>XtUnmapWidget</function></funcdef> +<funcdef>void <function>XtUnmapWidget</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1320,27 +1316,27 @@ For example, a widget class that needs to maintain a maximum width and height for each child might define its constraint record as follows: </para> -<literallayout > +<programlisting> typedef struct { - Dimension max_width, max_height; + Dimension max_width, max_height; } MaxConstraintPart; typedef struct { - MaxConstraintPart max; + MaxConstraintPart max; } MaxConstraintRecord, *MaxConstraint; -</literallayout> +</programlisting> <para> A subclass of this widget class that also needs to maintain a minimum size would define its constraint record as follows: </para> -<literallayout > +<programlisting> typedef struct { - Dimension min_width, min_height; + Dimension min_width, min_height; } MinConstraintPart; typedef struct { - MaxConstraintPart max; - MinConstraintPart min; + MaxConstraintPart max; + MinConstraintPart min; } MaxMinConstraintRecord, *MaxMinConstraint; -</literallayout> +</programlisting> <para> Constraints are allocated, initialized, deallocated, and otherwise maintained insofar as possible by the Intrinsics. diff --git a/lib/libXt/specs/CH04.xml b/lib/libXt/specs/CH04.xml index d01fe6eae..b891d7861 100644 --- a/lib/libXt/specs/CH04.xml +++ b/lib/libXt/specs/CH04.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Shell_Widgets'> <title>Shell Widgets</title> @@ -180,132 +183,132 @@ class has additional class fields, which are all contained in the None of the other Shell classes have any additional class fields: </para> -<literallayout > +<programlisting> typedef struct { XtPointer extension; } ShellClassPart, OverrideShellClassPart, WMShellClassPart, VendorShellClassPart, TransientShellClassPart, TopLevelShellClassPart, ApplicationShellClassPart, SessionShellClassPart; -</literallayout> +</programlisting> <para>The full Shell class record definitions are:</para> -<literallayout > +<programlisting> typedef struct _ShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; } ShellClassRec; -</literallayout> - -<literallayout > -typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' /> - long version; See <xref linkend='Class_Extension_Records' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' /> - XtGeometryHandler root_geometry_manager; See below +</programlisting> + +<programlisting> +typedef struct { <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation> + XtPointer next_extension; + XrmQuark record_type; + long version; + Cardinal record_size; + XtGeometryHandler root_geometry_manager; See below } ShellClassExtensionRec, *ShellClassExtension; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _OverrideShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - OverrideShellClassPart override_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + OverrideShellClassPart override_shell_class; } OverrideShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _WMShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; } WMShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _VendorShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; } VendorShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _TransientShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TransientShellClassPart transient_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TransientShellClassPart transient_shell_class; } TransientShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _TopLevelShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TopLevelShellClassPart top_level_shell_class; } TopLevelShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _ApplicationShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; - ApplicationShellClassPart application_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TopLevelShellClassPart top_level_shell_class; + ApplicationShellClassPart application_shell_class; } ApplicationShellClassRec; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct _SessionShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; - ApplicationShellClassPart application_shell_class; - SessionShellClassPart session_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TopLevelShellClassPart top_level_shell_class; + ApplicationShellClassPart application_shell_class; + SessionShellClassPart session_shell_class; } SessionShellClassRec; -</literallayout> +</programlisting> <para> The single occurrences of the class records and pointers for creating instances of shells are: </para> -<literallayout > -extern ShellClassRec shellClassRec; -extern OverrideShellClassRec overrideShellClassRec; -extern WMShellClassRec wmShellClassRec; -extern VendorShellClassRec vendorShellClassRec; -extern TransientShellClassRec transientShellClassRec; -extern TopLevelShellClassRec topLevelShellClassRec; +<programlisting> +extern ShellClassRec shellClassRec; +extern OverrideShellClassRec overrideShellClassRec; +extern WMShellClassRec wmShellClassRec; +extern VendorShellClassRec vendorShellClassRec; +extern TransientShellClassRec transientShellClassRec; +extern TopLevelShellClassRec topLevelShellClassRec; extern ApplicationShellClassRec applicationShellClassRec; -extern SessionShellClassRec sessionShellClassRec; -extern WidgetClass shellWidgetClass; -extern WidgetClass overrideShellWidgetClass; -extern WidgetClass wmShellWidgetClass; -extern WidgetClass vendorShellWidgetClass; -extern WidgetClass transientShellWidgetClass; -extern WidgetClass topLevelShellWidgetClass; -extern WidgetClass applicationShellWidgetClass; -extern WidgetClass sessionShellWidgetClass; -</literallayout> +extern SessionShellClassRec sessionShellClassRec; +extern WidgetClass shellWidgetClass; +extern WidgetClass overrideShellWidgetClass; +extern WidgetClass wmShellWidgetClass; +extern WidgetClass vendorShellWidgetClass; +extern WidgetClass transientShellWidgetClass; +extern WidgetClass topLevelShellWidgetClass; +extern WidgetClass applicationShellWidgetClass; +extern WidgetClass sessionShellWidgetClass; +</programlisting> <para> The following opaque types and opaque variables are defined @@ -396,17 +399,17 @@ Shell. <para> The declarations for all Intrinsics-defined shells except VendorShell appear in -<function>Shell.h</function> +<filename class="headerfile">Shell.h</filename> and -<function>ShellP.h</function>. +<filename class="headerfile">ShellP.h</filename>. VendorShell has separate public and private .h files which are included by -<function>Shell.h</function> +<filename class="headerfile">Shell.h</filename> and -<function>ShellP.h</function>. +<filename class="headerfile">ShellP.h</filename>. </para> <para> -<function>Shell.h</function> +<filename class="headerfile">Shell.h</filename> uses incomplete structure definitions to ensure that the compiler catches attempts to access private data in any of the Shell instance or class data structures. @@ -473,191 +476,191 @@ fields defined in their widget records: </para> -<literallayout > +<programlisting> typedef struct { - String geometry; - XtCreatePopupChildProc create_popup_child_proc; - XtGrabKind grab_kind; - Boolean spring_loaded; - Boolean popped_up; - Boolean allow_shell_resize; - Boolean client_specified; - Boolean save_under; - Boolean override_redirect; - XtCallbackList popup_callback; - XtCallbackList popdown_callback; - Visual * visual; + String geometry; + XtCreatePopupChildProc create_popup_child_proc; + XtGrabKind grab_kind; + Boolean spring_loaded; + Boolean popped_up; + Boolean allow_shell_resize; + Boolean client_specified; + Boolean save_under; + Boolean override_redirect; + XtCallbackList popup_callback; + XtCallbackList popdown_callback; + Visual * visual; } ShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - int empty; + int empty; } OverrideShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - String title; - int wm_timeout; - Boolean wait_for_wm; - Boolean transient; - Boolean urgency; - Widget client_leader; - String window_role; - struct _OldXSizeHints { - long flags; - int x, y; - int width, height; - int min_width, min_height; - int max_width, max_height; - int width_inc, height_inc; - struct { - int x; - int y; - } min_aspect, max_aspect; - } size_hints; - XWMHints wm_hints; - int base_width, base_height, win_gravity; - Atom title_encoding; + String title; + int wm_timeout; + Boolean wait_for_wm; + Boolean transient; + Boolean urgency; + Widget client_leader; + String window_role; + struct _OldXSizeHints { + long flags; + int x, y; + int width, height; + int min_width, min_height; + int max_width, max_height; + int width_inc, height_inc; + struct { + int x; + int y; + } min_aspect, max_aspect; + } size_hints; + XWMHints wm_hints; + int base_width, base_height, win_gravity; + Atom title_encoding; } WMShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - int vendor_specific; + int vendor_specific; } VendorShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - Widget transient_for; + Widget transient_for; } TransientShellPart; typedef struct { - String icon_name; - Boolean iconic; - Atom icon_name_encoding; + String icon_name; + Boolean iconic; + Atom icon_name_encoding; } TopLevelShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - char * class; - XrmClass xrm_class; - int argc; - char ** argv; + char * class; + XrmClass xrm_class; + int argc; + char ** argv; } ApplicationShellPart; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - SmcConn connection; - String session_id; - String * restart_command; - String * clone_command; - String * discard_command; - String * resign_command; - String * shutdown_command; - String * environment; - String current_dir; - String program_path; - unsigned char restart_style; - Boolean join_session; - XtCallbackList save_callbacks; - XtCallbackList interact_callbacks; - XtCallbackList cancel_callbacks; - XtCallbackList save_complete_callbacks; - XtCallbackList die_callbacks; - XtCallbackList error_callbacks; + SmcConn connection; + String session_id; + String * restart_command; + String * clone_command; + String * discard_command; + String * resign_command; + String * shutdown_command; + String * environment; + String current_dir; + String program_path; + unsigned char restart_style; + Boolean join_session; + XtCallbackList save_callbacks; + XtCallbackList interact_callbacks; + XtCallbackList cancel_callbacks; + XtCallbackList save_complete_callbacks; + XtCallbackList die_callbacks; + XtCallbackList error_callbacks; } SessionShellPart; -</literallayout> +</programlisting> <para> The full shell widget instance record definitions are: </para> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; + CorePart core; + CompositePart composite; + ShellPart shell; } ShellRec, *ShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - OverrideShellPart override; + CorePart core; + CompositePart composite; + ShellPart shell; + OverrideShellPart override; } OverrideShellRec, *OverrideShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; } WMShellRec, *WMShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; } VendorShellRec, *VendorShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TransientShellPart transient; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TransientShellPart transient; } TransientShellRec, *TransientShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; } TopLevelShellRec, *TopLevelShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; + ApplicationShellPart application; } ApplicationShellRec, *ApplicationShellWidget; -</literallayout> +</programlisting> -<literallayout > +<programlisting> typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; - SessionShellPart session; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; + ApplicationShellPart application; + SessionShellPart session; } SessionShellRec, *SessionShellWidget; -</literallayout> +</programlisting> </sect2> @@ -900,9 +903,6 @@ resource list are: <entry>XtCUrgency</entry> <entry>XtRBoolean</entry> </row> - <row> - <entry>_</entry> - </row> </tbody> </tgroup> </informaltable> @@ -915,7 +915,7 @@ is implementation-defined. <para> The resource names, classes, and representation types that are specified in the -<function>transient\%ShellClassRec</function> +<function>transientShellClassRec</function> resource list are: </para> @@ -983,7 +983,7 @@ resource list are: <para> The resource names, classes, and representation types that are specified in the -<function>application\%ShellClassRec</function> +<function>applicationShellClassRec</function> resource list are: </para> @@ -1243,8 +1243,8 @@ Shell classes; a client specifying the string in an arglist or varargs list must ensure that the value remains valid until the shell widget is realized. For further information on the geometry string, see -<olink targetdoc='libX11' targetptr='Parsing_the_Window_Geometry' /> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +<olink targetdoc='libX11' targetptr='Parsing_the_Window_Geometry' >Parsing the Window Geometry</olink> +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> <para> @@ -1278,11 +1278,11 @@ determines whether the window manager can intercede when the shell window is mapped. For further information on override_redirect, -see <olink targetdoc='libX11' targetptr='Window_Attributes' /> in -<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink> +see <olink targetdoc='libX11' targetptr='Window_Attributes' >Window Attributes</olink> in +<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink> and -<olink targetdoc='icccm' targetptr='Pop_up_Windows' /> and -<olink targetdoc='icccm' targetptr='Redirection_of_Operations' /> in the +<olink targetdoc='icccm' targetptr='Pop_up_Windows'>Pop-up Windows</olink> and +<olink targetdoc='icccm' targetptr='Redirection_of_Operations'>Redirection of Operations</olink> in the <olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>. The pop-up and pop-down callbacks are called during <xref linkend='XtPopup' xrefstyle='select: title'/> @@ -1883,10 +1883,10 @@ and <emphasis remap='I'>program_path</emphasis> resources. At that time, if <emphasis remap='I'>restart_command</emphasis> is NULL, the value of the <emphasis remap='I'>argv</emphasis> resource will be copied to <emphasis remap='I'>restart_command</emphasis>. Whether or not <emphasis remap='I'>restart_command</emphasis> was NULL, -if "<emphasis>-xtsessionID</emphasis>" "<emphasis><session id></emphasis>" does not +if “<emphasis>-xtsessionID</emphasis>” “<emphasis><session id></emphasis>” does not already appear in the <emphasis remap='I'>restart_command</emphasis>, it will be added by the initialize and set_values methods at the beginning of the command arguments; -if the "<emphasis>-xtsessionID</emphasis>" argument already appears with an incorrect +if the “<emphasis>-xtsessionID</emphasis>” argument already appears with an incorrect <emphasis>session id</emphasis> in the following argument, that argument will be replaced with the current <emphasis>session id</emphasis>. </para> @@ -1895,7 +1895,7 @@ will be replaced with the current <emphasis>session id</emphasis>. After this, the shell initialize and set_values procedures check the <emphasis remap='I'>clone_command</emphasis>. If <emphasis remap='I'>clone_command</emphasis> is NULL, <emphasis remap='I'>restart_command</emphasis> will be copied to <emphasis remap='I'>clone_command</emphasis>, -except the "<emphasis>-xtsessionID</emphasis>" and following argument will not be copied. +except the “<emphasis>-xtsessionID</emphasis>” and following argument will not be copied. </para> <para> @@ -1919,7 +1919,7 @@ see <xref linkend='Predefined_Resource_Converters' />. <para> The resource type EnvironmentArray is a NULL-terminated array of pointers to strings; -each string has the format "name=value". +each string has the format “name=value”. The `=' character may not appear in the name, and the string is terminated by a null character. </para> @@ -2062,20 +2062,20 @@ The checkpoint token in the <emphasis remap='I'>call_data</emphasis> parameter i <function>XtCheckpointToken</function>. </para> -<literallayout > +<programlisting> typedef struct { - int save_type; - int interact_style; - Boolean shutdown; - Boolean fast; - Boolean cancel_shutdown - int phase; - int interact_dialog_type; /* return */ - Boolean request_cancel; /* return */ - Boolean request_next_phase; /* return */ - Boolean save_success; /* return */ + int save_type; + int interact_style; + Boolean shutdown; + Boolean fast; + Boolean cancel_shutdown + int phase; + int interact_dialog_type; /* return */ + Boolean request_cancel; /* return */ + Boolean request_next_phase; /* return */ + Boolean save_success; /* return */ } XtCheckpointTokenRec, *XtCheckpointToken; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>save_type</emphasis>, <emphasis remap='I'>interact_style</emphasis>, <emphasis remap='I'>shutdown</emphasis>, and <emphasis remap='I'>fast</emphasis> @@ -2105,7 +2105,7 @@ If <emphasis remap='I'>cancel_shutdown</emphasis> is <function>True</function>, a <function>ShutdownCancelled</function> -message has been received for the current save operation. +message has been received for the current save operation. (See <xref linkend='Resigning_from_a_Session' />.) The <emphasis remap='I'>phase</emphasis> is used by manager clients, such as a window manager, to distinguish between the first and second phase of a save operation. @@ -2208,7 +2208,7 @@ function will return NULL if no checkpoint operation is currently under way. To indicate the completion of checkpoint processing including user interaction, the application must signal the Session shell by returning all tokens. -(See <xref linkend='Interacting_with_the_User_during_a_Checkpoint' /> and +(See <xref linkend='Interacting_with_the_User_during_a_Checkpoint' /> and <xref linkend='Completing_a_Save' />). To return a token, use <xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>. diff --git a/lib/libXt/specs/CH05.xml b/lib/libXt/specs/CH05.xml index 2c09455ed..1ced14396 100644 --- a/lib/libXt/specs/CH05.xml +++ b/lib/libXt/specs/CH05.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Pop_Up_Widgets'> <title>Pop-Up Widgets</title> <para> @@ -131,7 +134,7 @@ To create a pop-up shell, use <funcsynopsis id='XtCreatePopupShell'> <funcprototype> <funcdef>Widget <function>XtCreatePopupShell</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -240,7 +243,7 @@ To create a pop-up shell using varargs lists, use <funcsynopsis id='XtVaCreatePopupShell'> <funcprototype> <funcdef>Widget <function>XtVaCreatePopupShell</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>Widget <parameter>parent</parameter></paramdef> <paramdef><parameter>...</parameter></paramdef> @@ -391,9 +394,9 @@ Some of these routines take an argument of type <function>XtGrabKind</function>, which is defined as </para> -<literallayout > +<programlisting> typedef enum {XtGrabNone, XtGrabNonexclusive, XtGrabExclusive} XtGrabKind; -</literallayout> +</programlisting> <para> The create_popup_child_proc procedure pointer @@ -403,7 +406,7 @@ in the shell widget instance record is of type <funcsynopsis id='XtCreatePopupChildProc'> <funcprototype> -<funcdef>void <function>*XtCreatePopupChildProc</function></funcdef> +<funcdef>typedef void *<function>XtCreatePopupChildProc</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -509,9 +512,9 @@ or <function>XtGrabExclusive</function>, it calls </para> -<literallayout > +<programlisting> XtAddGrab(<emphasis remap='I'>popup_shell</emphasis>, (<emphasis remap='I'>grab_kind</emphasis> == XtGrabExclusive), False) -</literallayout> +</programlisting> </listitem> <listitem> <para> @@ -985,12 +988,12 @@ The function casts the <emphasis remap='I'>client_data</emphasis> parameter to a pointer of type <function>XtPopdownID</function>. </para> -<literallayout > +<programlisting> typedef struct { - Widget shell_widget; - Widget enable_widget; + Widget shell_widget; + Widget enable_widget; } XtPopdownIDRec, *XtPopdownID; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>shell_widget</emphasis> is the pop-up shell to pop down, and the <emphasis remap='I'>enable_widget</emphasis> is usually the widget that was used to pop it up diff --git a/lib/libXt/specs/CH06.xml b/lib/libXt/specs/CH06.xml index 7ff51bfb4..f80f2e2c2 100644 --- a/lib/libXt/specs/CH06.xml +++ b/lib/libXt/specs/CH06.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Geometry_Management'> <title>Geometry Management</title> @@ -29,7 +32,7 @@ their children will never make a geometry request. Parents, children, and clients each initiate geometry changes differently. Because a parent has absolute control of its children's geometry, it changes the geometry directly by calling -<function>XtMove\%Widget</function>, +<function>XtMoveWidget</function>, <xref linkend='XtResizeWidget' xrefstyle='select: title'/>, or <xref linkend='XtConfigureWidget' xrefstyle='select: title'/>. @@ -121,17 +124,17 @@ When making a geometry request, the child specifies an structure. </para> -<literallayout > +<programlisting> typedef unsigned long XtGeometryMask; typedef struct { - XtGeometryMask request_mode; - Position x, y; - Dimension width, height; - Dimension border_width; - Widget sibling; - int stack_mode; + XtGeometryMask request_mode; + Position x, y; + Dimension width, height; + Dimension border_width; + Widget sibling; + int stack_mode; } XtWidgetGeometry; -</literallayout> +</programlisting> <para> To make a general geometry manager request from a widget, use @@ -275,18 +278,18 @@ when called by a child of a primitive widget. The return codes from geometry managers are </para> -<literallayout > +<programlisting> typedef enum { - XtGeometryYes, - XtGeometryNo, - XtGeometryAlmost, - XtGeometryDone + XtGeometryYes, + XtGeometryNo, + XtGeometryAlmost, + XtGeometryDone } XtGeometryResult; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>request_mode</emphasis> definitions are from -<function><X11/X.h></function>. +<filename class="headerfile"><X11/X.h></filename>. </para> <informaltable frame='none'> @@ -373,7 +376,7 @@ structure the caller wants to specify. <para> The <emphasis remap='I'>stack_mode</emphasis> definitions are from -<function><X11/X.h></function>: +<filename class="headerfile"><X11/X.h></filename>: </para> <informaltable frame='none'> @@ -441,7 +444,7 @@ For definition and behavior of and <function>Opposite</function>, <olink targetdoc='libX11' targetptr='Configuring_Windows' >BLAH</olink> -in <olink targetptr='libX11' targetdoc='libX11'>Xlib — C Language X Interface.</olink>. +in <olink targetptr='libX11' targetdoc='libX11'>Xlib — C Language X Interface</olink>. <function>XtSMDontChange</function> indicates that the widget wants its current stacking order preserved. </para> @@ -610,7 +613,7 @@ The geometry_manager procedure pointer in a composite widget class is of type <funcsynopsis id='XtGeometryHandler'> <funcprototype> -<funcdef>XtGeometryResult <function>*XtGeometryHandler</function></funcdef> +<funcdef>typedef XtGeometryResult *<function>XtGeometryHandler</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>XtWidgetGeometry *<parameter>request</parameter></paramdef> <paramdef>XtWidgetGeometry *<parameter>geometry_return</parameter></paramdef> @@ -722,7 +725,7 @@ Although resizes the widget's window (if the geometry manager returns -<function>XtGeometryYes ),</function> +<function>XtGeometryYes</function>), it does not call the widget class's resize procedure. The requesting widget must perform whatever resizing calculations are needed explicitly. diff --git a/lib/libXt/specs/CH07.xml b/lib/libXt/specs/CH07.xml index 7ea72596e..448e3a87e 100644 --- a/lib/libXt/specs/CH07.xml +++ b/lib/libXt/specs/CH07.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Event_Management'> <title>Event Management</title> <para> @@ -239,7 +242,7 @@ type <listitem> <para> Passes the client data argument that was registered for this procedure in -<function>XtApp\%AddInput</function>. +<function>XtAppAddInput</function>. </para> </listitem> </varlistentry> @@ -388,7 +391,7 @@ are of type <funcsynopsis id='XtBlockHookProc'> <funcprototype> -<funcdef>void <function>*XtBlockHookProc</function></funcdef> +<funcdef>typedef void *<function>XtBlockHookProc</function></funcdef> <paramdef>XtPointer <parameter>client_data</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -401,7 +404,7 @@ are of type <listitem> <para> Passes the client data argument that was registered for this procedure in -<function>XtApp\%AddBlockHook</function>. +<function>XtAppAddBlockHook</function>. </para> </listitem> </varlistentry> @@ -529,7 +532,7 @@ type <funcsynopsis id='XtTimerCallbackProc'> <funcprototype> -<funcdef>void <function>*XtTimerCallbackProc</function></funcdef> +<funcdef>typedef void *<function>XtTimerCallbackProc</function></funcdef> <paramdef>XtPointer <parameter>client_data</parameter></paramdef> <paramdef>XtIntervalId *<parameter>timer</parameter></paramdef> </funcprototype> @@ -543,7 +546,7 @@ type <listitem> <para> Passes the client data argument that was registered for this procedure in -<function>XtApp\%AddTimeOut</function>. +<function>XtAppAddTimeOut</function>. </para> </listitem> </varlistentry> @@ -623,7 +626,7 @@ call and store the resulting identifier in a place accessible to the signal handler. When a signal arrives, the signal handler should call <xref linkend='XtNoticeSignal' xrefstyle='select: title'/> -to notify the Intrinsics that a signal has occured. To register a signal +to notify the Intrinsics that a signal has occurred. To register a signal callback use <xref linkend='XtAppAddSignal' xrefstyle='select: title'/>. </para> @@ -710,7 +713,7 @@ call. </variablelist> <para> -To notify the Intrinsics that a signal has occured, use +To notify the Intrinsics that a signal has occurred, use <xref linkend='XtNoticeSignal' xrefstyle='select: title'/>. </para> @@ -744,7 +747,7 @@ If <xref linkend='XtNoticeSignal' xrefstyle='select: title'/> is invoked multiple times before the Intrinsics are able to invoke the registered callback, the callback is only called once. -Logically, the Intrinsics maintain ``pending'' flag for each registered callback. +Logically, the Intrinsics maintain “pending” flag for each registered callback. This flag is initially <function>False</function> and is set to @@ -757,7 +760,7 @@ or <xref linkend='XtAppProcessEvent' xrefstyle='select: title'/> (with a mask including <function>XtIMSignal</function>) -is called, all registered callbacks with ``pending'' +is called, all registered callbacks with “pending” <function>True</function> are invoked and the flags are reset to <function>False</function>. @@ -1046,6 +1049,7 @@ To passively grab a single key of the keyboard, use <paramdef>Modifiers <parameter>modifiers</parameter></paramdef> <paramdef>Boolean <parameter>owner_events</parameter></paramdef> <paramdef>int <parameter>pointer_mode</parameter></paramdef> + <paramdef>int <parameter>keyboard_mode</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1081,7 +1085,7 @@ Specifies the widget in whose window the key is to be grabbed. Must be of class Specify arguments to <function>XGrabKey</function>; see <olink targetdoc='libX11' targetptr='Keyboard_Grabbing'>Section 12.2</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> @@ -1168,7 +1172,7 @@ Specifies the widget in whose window the key was grabbed. Specify arguments to <function>XUngrabKey</function>; see <olink targetdoc='libX11' targetptr='Keyboard_Grabbing'>Section 12.2</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1201,6 +1205,7 @@ To actively grab the keyboard, use <paramdef>Widget <parameter>widget</parameter></paramdef> <paramdef>Boolean <parameter>owner_events</parameter></paramdef> <paramdef>int <parameter>pointer_mode</parameter></paramdef> + <paramdef>int <parameter>keyboard_mode</parameter></paramdef> <paramdef>Time <parameter>time</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1235,7 +1240,7 @@ Must be of class Core or any subclass thereof. Specify arguments to <function>XGrabKeyboard</function>; see <olink targetdoc='libX11' targetptr='Keyboard_Grabbing'>Section 12.2</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1290,7 +1295,7 @@ Specifies the widget that has the active keyboard grab. Specifies the additional argument to <function>XUngrabKeyboard</function>; see <olink targetdoc='libX11' targetptr='Keyboard_Grabbing'>Section 12.2</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1317,6 +1322,7 @@ To passively grab a single pointer button, use <paramdef>Boolean <parameter>owner_events</parameter></paramdef> <paramdef>unsigned int <parameter>event_mask</parameter></paramdef> <paramdef>int <parameter>pointer_mode</parameter></paramdef> + <paramdef>int <parameter>keyboard_mode</parameter></paramdef> <paramdef>Window <parameter>confine_to</parameter></paramdef> <paramdef>Cursor <parameter>cursor</parameter></paramdef> </funcprototype> @@ -1363,7 +1369,7 @@ Specifies the widget in whose window the button is to be grabbed. Must be of cl Specify arguments to <function>XGrabButton</function>; see <olink targetdoc='libX11' targetptr='Pointer_Grabbing'>Section 12.1</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1449,7 +1455,7 @@ Specifies the widget in whose window the button was grabbed. Specify arguments to <function>XUngrabButton</function>; see <olink targetdoc='libX11' targetptr='Pointer_Grabbing'>Section 12.1</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1483,6 +1489,7 @@ To actively grab the pointer, use <paramdef>Boolean <parameter>owner_events</parameter></paramdef> <paramdef>unsigned int <parameter>event_mask</parameter></paramdef> <paramdef>int <parameter>pointer_mode</parameter></paramdef> + <paramdef>int <parameter>keyboard_mode</parameter></paramdef> <paramdef>Window <parameter>confine_to</parameter></paramdef> <paramdef>Cursor <parameter>cursor</parameter></paramdef> <paramdef>Time <parameter>time</parameter></paramdef> @@ -1527,7 +1534,7 @@ Specifies the widget for whose window the pointer is to be grabbed. Must be of Specify arguments to <function>XGrabPointer</function>; see <olink targetdoc='libX11' targetptr='Pointer_Grabbing'>Section 12.1</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1582,7 +1589,7 @@ Specifies the widget that has the active pointer grab. Specifies the time argument to <function>XUngrabPointer</function>; see <olink targetdoc='libX11' targetptr='Pointer_Grabbing'>Section 12.1</olink> -in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. +in <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> </listitem> </varlistentry> @@ -1611,6 +1618,7 @@ use <funcprototype> <funcdef>void <function>XtSetKeyboardFocus</function></funcdef> <paramdef>Widget <parameter>subtree</parameter></paramdef> + <paramdef>Widget <parameter>descendent</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1707,8 +1715,6 @@ is called. <para> If E is an ancestor of F, and the event is a key press, and either </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -1736,8 +1742,6 @@ then the event is dispatched to E. <para> Otherwise, define A as the closest common ancestor of E and F: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -1801,7 +1805,7 @@ The accept_focus procedure pointer is of type <funcsynopsis id='XtAcceptFocusProc'> <funcprototype> -<funcdef>Boolean <function>*XtAcceptFocusProc</function></funcdef> +<funcdef>typedef Boolean *<function>XtAcceptFocusProc</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>Time *<parameter>time</parameter></paramdef> @@ -1834,7 +1838,7 @@ Specifies the X time of the event causing the accept focus. <para> Widgets that need the input focus can call <function>XSetInputFocus</function> -explicitly, pursuant to the restrictions of the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>. +explicitly, pursuant to the restrictions of the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>. To allow outside agents, such as the parent, to cause a widget to take the input focus, every widget exports an accept_focus procedure. @@ -2255,7 +2259,7 @@ The mask is the bitwise inclusive OR of any combination of and <function>XtIMSignal</function>. As a convenience, -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> defines the symbolic name <function>XtIMAll</function> to be the bitwise inclusive OR of these four event types. @@ -2373,7 +2377,7 @@ if it found no handler to which to dispatch the event. <xref linkend='XtDispatchEvent' xrefstyle='select: title'/> records the last timestamp in any event that contains a timestamp (see -<function>XtLastTimestampProcessed ),</function> +<function>XtLastTimestampProcessed</function>), regardless of whether it was filtered or dispatched. If a modal cascade is active with <emphasis remap='I'>spring_loaded</emphasis> <function>True</function>, @@ -2422,21 +2426,17 @@ Specifies the application context that identifies the application. </variablelist> <para> -The -<xref linkend='XtAppMainLoop' xrefstyle='select: title'/> -function first reads the next incoming X event by calling -<xref linkend='XtAppNextEvent' xrefstyle='select: title'/> -and then dispatches the event to the appropriate registered procedure -by calling -<xref linkend='XtDispatchEvent' xrefstyle='select: title'/>. +The <xref linkend='XtAppMainLoop' xrefstyle='select: title'/> +function processes events using +<xref linkend='XtAppProcessEvent' xrefstyle='select: title'/>, +varying the <emphasis remap='I'>mask parameter</emphasis> +and using <xref linkend='XtAppPending' xrefstyle='select: title'/> +to ensure that it has a chance to handle events of all types, +i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications. There is nothing special about <xref linkend='XtAppMainLoop' xrefstyle='select: title'/>; -it simply calls -<xref linkend='XtAppNextEvent' xrefstyle='select: title'/> -and then -<xref linkend='XtDispatchEvent' xrefstyle='select: title'/> -in a conditional loop. +it simply processes events in a conditional loop. At the bottom of the loop, it checks to see if the specified application context's destroy flag is set. If the flag is set, the loop breaks. @@ -2449,8 +2449,21 @@ and <para> Applications can provide their own version of this loop, which tests some global termination flag or tests that the number -of top-level widgets is larger than zero before circling back to the call to -<xref linkend='XtAppNextEvent' xrefstyle='select: title'/>. +of top-level widgets is larger than zero before +circling back for the next event. +</para> + +<para> +The design of +<xref linkend='XtAppMainLoop' xrefstyle='select: title'/> +has changed since Release 6. +Originally it looped over calls to +<xref linkend='XtAppNextEvent' xrefstyle='select: title'/>, +and +<xref linkend='XtDispatchEvent' xrefstyle='select: title'/>, +but because the latter returns only after an X event +(not for timers, signals, inputs), +it was modified to allow any type of event to break out of the loop. </para> </sect1> @@ -2500,7 +2513,7 @@ was created. Since on the parent will not modify the resource of the pop-up child, clients are advised to include a resource specification of the form -``*TransientShell.ancestorSensitive: True'' +“*TransientShell.ancestorSensitive: True” in the application defaults resource file or to otherwise ensure that the parent is sensitive when creating pop-up shells. @@ -2846,12 +2859,12 @@ dispatched to the widget's expose procedure. This field must be initialized to one of the following values: </para> -<literallayout > -#define XtExposeNoCompress ((XtEnum)False) -#define XtExposeCompressSeries ((XtEnum)True) -#define XtExposeCompressMultiple <implementation-defined> -#define XtExposeCompressMaximal <implementation-defined> -</literallayout> +<programlisting> +#define XtExposeNoCompress ((XtEnum)False) +#define XtExposeCompressSeries ((XtEnum)True) +#define XtExposeCompressMultiple <implementation-defined> +#define XtExposeCompressMaximal <implementation-defined> +</programlisting> <para> optionally ORed with any combination of the following flags (all with @@ -2883,7 +2896,7 @@ passing the modified exposure event and (unless is specified) the region. For more information on regions, see <olink targetdoc='libX11' targetptr='Manipulating_Regions'>Section 16.5</olink> in -<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface.</olink>.) +<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> <para> @@ -3136,11 +3149,11 @@ the widgets Label, Pushbutton, and Toggle, you could write a single display routine in Label that uses display state fields like </para> -<literallayout > -Boolean invert; -Boolean highlight; -Dimension highlight_width; -</literallayout> +<programlisting> +Boolean invert; +Boolean highlight; +Dimension highlight_width; +</programlisting> <para> Label would have <emphasis remap='I'>invert</emphasis> and <emphasis remap='I'>highlight</emphasis> always <function>False</function> @@ -3517,9 +3530,9 @@ To register an event handler procedure that receives events before or after all previously registered event handlers, use <xref linkend='XtInsertEventHandler' xrefstyle='select: title'/>. </para> -<literallayout > +<programlisting> typedef enum {XtListHead, XtListTail} XtListPosition; -</literallayout> +</programlisting> <funcsynopsis id='XtInsertEventHandler'> <funcprototype> @@ -4251,7 +4264,7 @@ To register a procedure to select extension events for a widget, use <funcsynopsis id='XtRegisterExtensionSelector'> <funcprototype> <funcdef>void <function>XtRegisterExtensionSelector</function></funcdef> - <paramdef>Display <parameter>*display</parameter></paramdef> + <paramdef>Display *<parameter>display</parameter></paramdef> <paramdef>int <parameter>min_event_type</parameter></paramdef> <paramdef>int <parameter>max_event_type</parameter></paramdef> <paramdef>XtExtensionSelectProc <parameter>proc</parameter></paramdef> @@ -4686,7 +4699,7 @@ access, call <funcsynopsis id='XtToolkitThreadInitialize'> <funcprototype> <funcdef>Boolean <function>XtToolkitThreadInitialize</function></funcdef> - <paramdef><parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4730,13 +4743,13 @@ Resource converters are an exception. They require the application context or process to be locked before the application can safely call them directly, for example: </para> -<literallayout > - ... - XtAppLock(app_context); - XtCvtStringToPixel(dpy, args, num_args, fromVal, toVal, closure_ret); - XtAppUnlock(app_context); - ... -</literallayout> +<programlisting> + ... + XtAppLock(app_context); + XtCvtStringToPixel(dpy, args, num_args, fromVal, toVal, closure_ret); + XtAppUnlock(app_context); + ... +</programlisting> <para> When the application relies upon <xref linkend='XtConvertAndStore' xrefstyle='select: title'/> @@ -4751,30 +4764,29 @@ utility functions, such as one which retrieves the being_destroyed field from a widget instance, must lock the application context before accessing widget internal data. For example: </para> -<literallayout > +<programlisting> #include <X11/CoreP.h> -Boolean BeingDestroyed (widget) - Widget widget; +Boolean BeingDestroyed (Widget widget) { - Boolean ret; - XtAppLock(XtWidgetToApplicationContext(widget)); - ret = widget->core.being_destroyed; - XtAppUnlock(XtWidgetToApplicationContext(widget)); - return ret; + Boolean ret; + XtAppLock(XtWidgetToApplicationContext(widget)); + ret = widget->core.being_destroyed; + XtAppUnlock(XtWidgetToApplicationContext(widget)); + return ret; } -</literallayout> +</programlisting> <para> A client that wishes to atomically call two or more Intrinsics functions must lock the application context. For example: </para> -<literallayout > - ... - XtAppLock(XtWidgetToApplicationContext(widget)); - XtUnmanageChild (widget1); - XtManageChild (widget2); - XtAppUnlock(XtWidgetToApplicationContext(widget)); - ... -</literallayout> +<programlisting> + ... + XtAppLock(XtWidgetToApplicationContext(widget)); + XtUnmanageChild (widget1); + XtManageChild (widget2); + XtAppUnlock(XtWidgetToApplicationContext(widget)); + ... +</programlisting> <sect3 id="Locking_the_Application_Context"> <title>Locking the Application Context</title> <para> @@ -4849,7 +4861,7 @@ widget writer must use <funcsynopsis id='XtProcessLock'> <funcprototype> <funcdef>void <function>XtProcessLock</function></funcdef> - <paramdef><parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4867,7 +4879,7 @@ To unlock a locked process, use <funcsynopsis id='XtProcessUnlock'> <funcprototype> <funcdef>void <function>XtProcessUnlock</function></funcdef> - <paramdef><parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4970,8 +4982,8 @@ or <xref linkend='XtAppProcessEvent' xrefstyle='select: title'/> and another thread in the same application context opens a new display, adds an alternate input, or a timeout, any new source(s) will not -normally be "noticed" by the blocked thread. Any new sources are -"noticed" the next time one of these functions is called. +normally be “noticed” by the blocked thread. Any new sources are +“noticed” the next time one of these functions is called. </para> <para> diff --git a/lib/libXt/specs/CH08.xml b/lib/libXt/specs/CH08.xml index 2f24e6555..950e9bcdb 100644 --- a/lib/libXt/specs/CH08.xml +++ b/lib/libXt/specs/CH08.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Callbacks'> <title>Callbacks</title> <para> @@ -99,23 +102,23 @@ call, it should specify the address of a NULL-terminated array of type <function>XtCallbackList</function>. </para> -<literallayout > +<programlisting> typedef struct { - XtCallbackProc callback; - XtPointer closure; + XtCallbackProc callback; + XtPointer closure; } XtCallbackRec, *XtCallbackList; -</literallayout> +</programlisting> <para> For example, the callback list for procedures A and B with client data clientDataA and clientDataB, respectively, is </para> -<literallayout > +<programlisting> static XtCallbackRec callbacks[] = { - {A, (XtPointer) clientDataA}, - {B, (XtPointer) clientDataB}, - {(XtCallbackProc) NULL, (XtPointer) NULL} + {A, (XtPointer) clientDataA}, + {B, (XtPointer) clientDataB}, + {(XtCallbackProc) NULL, (XtPointer) NULL} }; -</literallayout> +</programlisting> <para> Although callback lists are passed by address in arglists and varargs lists, @@ -154,7 +157,7 @@ implementation-dependent; widgets may make no assumptions about the value stored in this resource if it is non-NULL. Except to compare the value to NULL (which is equivalent to <function>XtCallbackStatus</function> -<function>XtCallbackHasNone ),</function> +<function>XtCallbackHasNone</function>), access to callback list resources must be made through other Intrinsics procedures. </para> @@ -171,7 +174,7 @@ To add a callback procedure to a widget's callback list, use <funcprototype> <funcdef>void <function>XtAddCallback</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> <paramdef>XtCallbackProc <parameter>callback</parameter></paramdef> <paramdef>XtPointer <parameter>client_data</parameter></paramdef> </funcprototype> @@ -235,7 +238,7 @@ To add a list of callback procedures to a given widget's callback list, use <funcprototype> <funcdef>void <function>XtAddCallbacks</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> <paramdef>XtCallbackList <parameter>callbacks</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -288,7 +291,7 @@ To delete a callback procedure from a widget's callback list, use <funcprototype> <funcdef>void <function>XtRemoveCallback</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> <paramdef>XtCallbackProc <parameter>callback</parameter></paramdef> <paramdef>XtPointer <parameter>client_data</parameter></paramdef> </funcprototype> @@ -353,7 +356,7 @@ To delete a list of callback procedures from a given widget's callback list, use <funcprototype> <funcdef>void <function>XtRemoveCallbacks</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> <paramdef>XtCallbackList <parameter>callbacks</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -402,7 +405,7 @@ and free all storage associated with the callback list, use <funcprototype> <funcdef>void <function>XtRemoveAllCallbacks</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -444,7 +447,7 @@ specifying the callback list by resource name, use <funcprototype> <funcdef>void <function>XtCallCallbacks</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> <paramdef>XtPointer <parameter>call_data</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -566,7 +569,7 @@ typedef enum {XtCallbackNoList, XtCallbackHasNone, XtCallbackHasSome} XtCallback <funcprototype> <funcdef>XtCallbackStatus <function>XtHasCallbacks</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>callback_name</parameter></paramdef> + <paramdef>const char * <parameter>callback_name</parameter></paramdef> </funcprototype> </funcsynopsis> diff --git a/lib/libXt/specs/CH09.xml b/lib/libXt/specs/CH09.xml index 1f64de593..16be36b24 100644 --- a/lib/libXt/specs/CH09.xml +++ b/lib/libXt/specs/CH09.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Resource_Management'> <title>Resource Management</title> <para> @@ -43,17 +46,17 @@ The declaration for the <function>XtResource</function> structure is </para> -<literallayout > +<programlisting> typedef struct { - String resource_name; - String resource_class; - String resource_type; - Cardinal resource_size; - Cardinal resource_offset; - String default_type; - XtPointer default_addr; + String resource_name; + String resource_class; + String resource_type; + Cardinal resource_size; + Cardinal resource_offset; + String default_type; + XtPointer default_addr; } XtResource, *XtResourceList; -</literallayout> +</programlisting> <para> When the resource list is specified as the <function>CoreClassPart</function>, @@ -76,14 +79,14 @@ except all underscores (_) are deleted and the next letter is replaced by its uppercase counterpart. For example, the resource name for background_pixel becomes backgroundPixel. Resource names beginning with the two-character -sequence ``xt'', and resource classes beginning with the two-character -sequence ``Xt'' are reserved to the Intrinsics for future standard and +sequence “xt”, and resource classes beginning with the two-character +sequence “Xt” are reserved to the Intrinsics for future standard and implementation-dependent uses. Widget header files typically contain a symbolic name for each resource name. All resource names, classes, and types used by the Intrinsics are named in -<function><X11/StringDefs.h></function>. +<filename class="headerfile"><X11/StringDefs.h></filename>. The Intrinsics's symbolic resource names begin with -``XtN'' +“XtN” and are followed by the string name (for example, XtNbackgroundPixel for backgroundPixel). </para> @@ -121,31 +124,31 @@ and everything else darkblue. <para> In this case, the background pixel should have a resource class of -``Background'' +“Background” and all the other pixel entries a resource class of -``Foreground''. +“Foreground”. Then, the resource file needs only two lines to change all pixels to ivory or darkblue: </para> -<literallayout > -*Background: ivory -*Foreground: darkblue -</literallayout> +<programlisting> +*Background: ivory +*Foreground: darkblue +</programlisting> <para> Similarly, a widget may have several font resources (such as normal and bold), but all fonts should have the class Font. Thus, changing all fonts simply requires only a single line in the default resource file: </para> -<literallayout > -*Font: 6x13 -</literallayout> +<programlisting> +*Font: 6x13 +</programlisting> <para> By convention, resource classes are always spelled starting with a capital letter to distinguish them from resource names. Their symbolic names are preceded with -``XtC'' +“XtC” (for example, XtCBackground). </para> @@ -263,7 +266,7 @@ The Intrinsics define the following resource types: </row> <row> <entry><function>XtRFunction</function></entry> - <entry>(*)()</entry> + <entry>(*)(Widget)</entry> </row> <row> <entry><function>XtRGeometry</function></entry> @@ -367,7 +370,7 @@ The Intrinsics define the following resource types: </informaltable> <para> -<function><X11/StringDefs.h></function> +<filename class="headerfile"><X11/StringDefs.h></filename> also defines the following resource types as a convenience for widgets, although they do not have any corresponding data type assigned: @@ -638,7 +641,7 @@ see <xref linkend='Obtaining_Widget_State' /> and <para> Here is an abbreviated version of a possible resource list for a Label widget: </para> -<literallayout > +<programlisting> /* Resources specific to Label */ static XtResource resources[] = { {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), @@ -647,15 +650,15 @@ static XtResource resources[] = { XtOffsetOf(LabelRec, label.font), XtRString, XtDefaultFont}, {XtNlabel, XtCLabel, XtRString, sizeof(String), XtOffsetOf(LabelRec, label.label), XtRString, NULL}, - . - . - . + . + . + . } -</literallayout> +</programlisting> <para> The complete resource name for a field of a widget instance is the concatenation of the application shell name (from -<function>XtAppCreateShell ),</function> +<function>XtAppCreateShell</function>), the instance names of all the widget's parents up to the top of the widget tree, the instance name of the widget itself, @@ -663,7 +666,7 @@ and the resource name of the specified field of the widget. Similarly, the full resource class of a field of a widget instance is the concatenation of the application class (from -<function>XtAppCreateShell ),</function> +<function>XtAppCreateShell</function>), the widget class names of all the widget's parents up to the top of the widget tree, the widget class name of the widget itself, @@ -844,8 +847,8 @@ to accomplish this. <funcdef>void <function>XtGetSubresources</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>XtPointer <parameter>base</parameter></paramdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> <paramdef>XtResourceList <parameter>resources</parameter></paramdef> <paramdef>Cardinal <parameter>num_resources</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> @@ -978,10 +981,11 @@ To fetch resources for widget subparts using varargs lists, use <funcdef>void <function>XtVaGetSubresources</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>XtPointer <parameter>base</parameter></paramdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> <paramdef>XtResourceList <parameter>resources</parameter></paramdef> <paramdef>Cardinal <parameter>num_resources</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -1203,6 +1207,7 @@ To retrieve resources for the overall application using varargs lists, use <paramdef>XtPointer <parameter>base</parameter></paramdef> <paramdef>XtResourceList <parameter>resources</parameter></paramdef> <paramdef>Cardinal <parameter>num_resources</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -1462,7 +1467,7 @@ and evaluate this in the following manner: <listitem> <para> Query the resource database for the resource whose full name -is ``xtDefaultFont'', class ``XtDefaultFont'' (that is, no widget +is “xtDefaultFont”, class “XtDefaultFont” (that is, no widget name/class prefixes), and use a type <function>XtRString</function> value returned as the font name or a type @@ -1483,7 +1488,7 @@ perform an using a wildcard font name and use the first font in the list. This wildcard font name should be as broad as possible to maximize the probability of locating a useable font; -for example, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1".) +for example, “<code>-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1</code>”.) </para> </listitem> <listitem> @@ -1503,7 +1508,7 @@ and evaluate this in the following manner: <listitem> <para> Query the resource database for the resource whose full name -is ``xtDefaultFontSet'', class ``XtDefaultFontSet'' (that is, no widget +is “xtDefaultFontSet”, class “XtDefaultFontSet” (that is, no widget name/class prefixes), and use a type <function>XtRString</function> value returned as the base font name list or a type @@ -1523,7 +1528,7 @@ perform an using a wildcard base font name. This wildcard base font name should be as broad as possible to maximize the probability of locating a useable font; -for example, "-*-*-*-R-*-*-*-120-*-*-*-*".) +for example, “<code>-*-*-*-R-*-*-*-120-*-*-*-*</code>”.) </para> </listitem> <listitem> @@ -1547,7 +1552,7 @@ is required in a different locale. <para> The String-to-Gravity conversion accepts string values that are the names of window and bit gravities and their numerical equivalents, -as defined in <emphasis remap='I'>Xlib — C Language X Interface.</emphasis>: +as defined in <emphasis remap='I'>Xlib — C Language X Interface</emphasis>: <function>ForgetGravity</function>, <function>UnmapGravity</function>, <function>NorthWestGravity</function>, @@ -1568,14 +1573,14 @@ Alphabetic case is not significant in the conversion. The String-to-CommandArgArray conversion parses a String into an array of strings. White space characters separate elements of the command line. -The converter recognizes the backslash character ``\\'' as an escape +The converter recognizes the backslash character “\” as an escape character to allow the following white space character to be part of the array element. </para> <para> The String-to-DirectoryString conversion recognizes the -string ``XtCurrentDirectory'' and returns the result of a call +string “XtCurrentDirectory” and returns the result of a call to the operating system to get the current directory. </para> @@ -1594,7 +1599,7 @@ The String-to-InitialState conversion accepts the values <function>NormalState</function> or <function>IconicState</function> -as defined by the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>. +as defined by the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>. </para> <para> @@ -1749,17 +1754,17 @@ an input value of representation type Type converters use pointers to <function>XrmValue</function> structures (defined in -<function><X11/Xresource.h>;</function> +<filename class="headerfile"><X11/Xresource.h>;</filename> see <olink targetdoc='libX11' targetptr='Creating_and_Storing_Databases'>Section 15.4</olink> in -<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface.</olink>) +<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>) for input and output values. </para> -<literallayout > +<programlisting> typedef struct { unsigned int size; XPointer addr; } XrmValue, *XrmValuePtr; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>addr</emphasis> field specifies the address of the data, and the <emphasis remap='I'>size</emphasis> field gives the total number of significant bytes in the data. @@ -1937,70 +1942,75 @@ still required to inform the Intrinsics that the converted value is a function of the particular display (and colormap). </para> -<literallayout > -#define done(type, value) \\ - { \\ - if (toVal->addr != NULL) { \\ - if (toVal->size < sizeof(type)) { \\ - toVal->size = sizeof(type); \\ - return False; \\ - } \\ - *(type*)(toVal->addr) = (value); \\ - } \\ - else { \\ - static type static_val; \\ - static_val = (value); \\ - toVal->addr = (XPointer)&static_val; \\ - } \\ - toVal->size = sizeof(type); \\ - return True; \\ - } -static Boolean CvtStringToPixel(dpy, args, num_args, fromVal, toVal, converter_data) - Display *dpy; - XrmValue *args; - Cardinal *num_args; - XrmValue *fromVal; - XrmValue *toVal; - XtPointer *converter_data; +<programlisting> +#define done(type, value) \ + { \ + if (toVal->addr != NULL) { \ + if (toVal->size < sizeof(type)) { \ + toVal->size = sizeof(type); \ + return False; \ + } \ + *(type*)(toVal->addr) = (value); \ + } \ + else { \ + static type static_val; \ + static_val = (value); \ + toVal->addr = (XPointer)&static_val; \ + } \ + toVal->size = sizeof(type); \ + return True; \ + } + +static Boolean CvtStringToPixel( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValue *fromVal, + XrmValue *toVal, + XtPointer *converter_data) { - static XColor screenColor; - XColor exactColor; - Screen *screen; - Colormap colormap; - Status status; - if (*num_args != 2) - XtAppWarningMsg(XtDisplayToApplicationContext(dpy), - "wrongParameters", "cvtStringToPixel", "XtToolkitError", - "String to pixel conversion needs screen and colormap arguments", - (String *)NULL, (Cardinal *)NULL); - screen = *((Screen**) args[0].addr); - colormap = *((Colormap *) args[1].addr); - if (CompareISOLatin1(str, XtDefaultBackground) == 0) { - *closure_ret = False; - done(Pixel, WhitePixelOfScreen(screen)); - } - if (CompareISOLatin1(str, XtDefaultForeground) == 0) { - *closure_ret = False; - done(Pixel, BlackPixelOfScreen(screen)); - } - status = XAllocNamedColor(DisplayOfScreen(screen), colormap, (char*)fromVal->addr, - &screenColor, &exactColor); - if (status == 0) { - String params[1]; - Cardinal num_params = 1; - params[0] = (String)fromVal->addr; - XtAppWarningMsg(XtDisplayToApplicationContext(dpy), - "noColormap", "cvtStringToPixel", "XtToolkitError", - "Cannot allocate colormap entry for \\"%s\\"", params,\ - &num_params); - *converter_data = (char *) False; - return False; - } else { - *converter_data = (char *) True; - done(Pixel, &screenColor.pixel); - } + static XColor screenColor; + XColor exactColor; + Screen *screen; + Colormap colormap; + Status status; + + if (*num_args != 2) + XtAppWarningMsg(XtDisplayToApplicationContext(dpy), + "wrongParameters", "cvtStringToPixel", "XtToolkitError", + "String to pixel conversion needs screen and colormap arguments", + (String *)NULL, (Cardinal *)NULL); + screen = *((Screen**) args[0].addr); + colormap = *((Colormap *) args[1].addr); + if (CompareISOLatin1(str, XtDefaultBackground) == 0) { + *closure_ret = False; + done(Pixel, WhitePixelOfScreen(screen)); + } + if (CompareISOLatin1(str, XtDefaultForeground) == 0) { + *closure_ret = False; + done(Pixel, BlackPixelOfScreen(screen)); + } + status = XAllocNamedColor(DisplayOfScreen(screen), + colormap, (char*)fromVal->addr, + &screenColor, &exactColor); + if (status == 0) { + String params[1]; + Cardinal num_params = 1; + params[0] = (String)fromVal->addr; + XtAppWarningMsg(XtDisplayToApplicationContext(dpy), + "noColormap", + "cvtStringToPixel", + "XtToolkitError", + "Cannot allocate colormap entry for \"%s\"", + params, &num_params); + *converter_data = (char *) False; + return False; + } else { + *converter_data = (char *) True; + done(Pixel, &screenColor.pixel); + } } -</literallayout> +</programlisting> <para> All type converters should define some set of conversion values for which they @@ -2114,7 +2124,8 @@ that convert from string values. <funcprototype> <funcdef>void <function>XtDisplayStringConversionWarning</function></funcdef> <paramdef>Display *<parameter>display</parameter></paramdef> - <paramdef>String <parameter>from_value</parameter></paramdef> + <paramdef>const char * <parameter>from_value</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -2156,9 +2167,9 @@ The <xref linkend='XtDisplayStringConversionWarning' xrefstyle='select: title'/> procedure issues a warning message using <xref linkend='XtAppWarningMsg' xrefstyle='select: title'/> -with <emphasis remap='I'>name</emphasis> ``conversionError'', -<emphasis remap='I'>type</emphasis> ``string'', <emphasis remap='I'>class</emphasis> ``XtToolkitError'', and the default message -``Cannot convert "<emphasis remap='I'>from_value</emphasis>" to type <emphasis remap='I'>to_type</emphasis>''. +with <emphasis remap='I'>name</emphasis> “conversionError”, +<emphasis remap='I'>type</emphasis> “string”, <emphasis remap='I'>class</emphasis> “XtToolkitError”, and the default message +“Cannot convert "<emphasis remap='I'>from_value</emphasis>" to type <emphasis remap='I'>to_type</emphasis>”. </para> <para> @@ -2213,9 +2224,9 @@ calls to the converter. Conversion cache control is specified via an <function>XtCacheType</function> argument. </para> -<literallayout > +<programlisting> typedef int XtCacheType; -</literallayout> +</programlisting> <para> An <function>XtCacheType</function> @@ -2292,8 +2303,8 @@ and to register a type converter in a single application context, use <funcsynopsis id='XtSetTypeConverter'> <funcprototype> <funcdef>void <function>XtSetTypeConverter</function></funcdef> - <paramdef>String <parameter>from_type</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XtTypeConverter <parameter>converter</parameter></paramdef> <paramdef>XtConvertArgList <parameter>convert_args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> @@ -2382,10 +2393,10 @@ required to deallocate resources produced by the converter. <funcsynopsis id='XtAppSetTypeConverter'> <funcprototype> -<funcdef> <function>XtAppSetTypeConverter</function></funcdef> +<funcdef>void <function>XtAppSetTypeConverter</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>from_type</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XtTypeConverter <parameter>converter</parameter></paramdef> <paramdef>XtConvertArgList <parameter>convert_args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> @@ -2503,26 +2514,26 @@ and the structure <function>XtConvertArgRec</function> specify how each argument is derived. These are defined in -<function><X11/Intrinsic.h></function>. +<filename class="headerfile"><X11/Intrinsic.h></filename>. </para> -<literallayout > +<programlisting> typedef enum { - /* address mode parameter representation */ - XtAddress, /* address */ - XtBaseOffset, /* offset */ - XtImmediate, /* constant */ - XtResourceString, /* resource name string */ - XtResourceQuark, /* resource name quark */ - XtWidgetBaseOffset, /* offset */ - XtProcedureArg /* procedure to call */ + /* address mode parameter representation */ + XtAddress, /* address */ + XtBaseOffset, /* offset */ + XtImmediate, /* constant */ + XtResourceString, /* resource name string */ + XtResourceQuark, /* resource name quark */ + XtWidgetBaseOffset, /* offset */ + XtProcedureArg /* procedure to call */ } XtAddressMode; typedef struct { - XtAddressMode address_mode; - XtPointer address_id; - Cardinal size; + XtAddressMode address_mode; + XtPointer address_id; + Cardinal size; } XtConvertArgRec, *XtConvertArgList; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>size</emphasis> field specifies the length of the data in bytes. The <emphasis remap='I'>address_mode</emphasis> field specifies how the <emphasis remap='I'>address_id</emphasis> field should be @@ -2561,74 +2572,133 @@ the address of a function of type <funcsynopsis id='XtConvertArgProc'> <funcprototype> <funcdef>typedef void <function>(*XtConvertArgProc)</function></funcdef> - <paramdef>XtAppContext <parameter>app</parameter></paramdef> - <paramdef>XrmValue *<parameter>to</parameter></paramdef> - <paramdef>XtPointer <parameter>converter_data</parameter></paramdef> - <paramdef>XrmValue *<parameter>args</parameter></paramdef> - <paramdef>Cardinal *<parameter>num_args</parameter></paramdef> + <paramdef>Widget <parameter>object</parameter></paramdef> + <paramdef>Cardinal *<parameter>size</parameter></paramdef> + <paramdef>XrmValue *<parameter>value</parameter></paramdef> </funcprototype> </funcsynopsis> <variablelist> <varlistentry> <term> - <emphasis remap='I'>app</emphasis> - </term> - <listitem> - <para> -Specifies an application context in which the resource is being freed. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <emphasis remap='I'>to</emphasis> + <emphasis remap='I'>object</emphasis> </term> <listitem> <para> -Specifies a descriptor for the resource produced by the type converter. +Passes the object for which the resource is being +converted, or NULL if the converter was invoked by +<xref linkend='XtCallConverter' xrefstyle='select: title'/> or +<xref linkend='XtDirectConvert' xrefstyle='select: title'/>. </para> </listitem> </varlistentry> <varlistentry> <term> - <emphasis remap='I'>converter_data</emphasis> + <emphasis remap='I'>size</emphasis> </term> <listitem> <para> -Specifies the converter-specific data returned by the type converter. +Passes a pointer to the size field from the XtConvertArgRec. </para> </listitem> </varlistentry> <varlistentry> <term> - <emphasis remap='I'>args</emphasis> + <emphasis remap='I'>value</emphasis> </term> <listitem> <para> -Specifies the additional converter arguments as passed -to the type converter when the conversion was performed. +Passes a pointer to a descriptor into which the procedure must store the +conversion argument. </para> </listitem> </varlistentry> - <varlistentry> - <term> - <emphasis remap='I'>num_args</emphasis> - </term> - <listitem> - <para> -Specifies the number of entries in <emphasis remap='I'>args</emphasis>. - </para> - </listitem> - </varlistentry> </variablelist> - <para> -The destructor procedure is responsible for freeing the resource -specified by the <emphasis remap='I'>to</emphasis> argument, including any auxiliary storage -associated with that resource, but not the memory directly addressed -by the size and location in the <emphasis remap='I'>to</emphasis> argument or the memory specified -by <emphasis remap='I'>args</emphasis>. +When invoked, the <function>XtConvertArgProc</function> procedure must derive a +conversion argument and store the address and size of the +argument in the location pointed to by value. +</para> +<para> +In order to permit reentrancy, the <function>XtConvertArgProc</function> should +return the address of storage whose lifetime is no shorter +than the lifetime of object. +If object is NULL, +the lifetime of the conversion argument must be no shorter than the +lifetime of the resource with which the conversion argument +is associated. The Intrinsics do not guarantee to copy this +storage but do guarantee not to reference it if the resource +is removed from the conversion cache. +</para> +<para> +The following example illustrates how to register the +<function>CvtStringToPixel</function> +routine given earlier: +</para> +<programlisting> +static XtConvertArgRec colorConvertArgs[] = { + {XtWidgetBaseOffset, + (XtPointer)XtOffset(Widget, core.screen), + sizeof(Screen*)}, + {XtWidgetBaseOffset, + (XtPointer)XtOffset(Widget, core.colormap), + sizeof(Colormap)} +}; + +XtSetTypeConverter(XtRString, + XtRPixel, + CvtStringToPixel, + colorConvertArgs, + XtNumber(colorConvertArgs), + XtCacheByDisplay, NULL); +</programlisting> +<para> +The conversion argument descriptors colorConvertArgs and +screenConvertArg are predefined by the Intrinsics. Both +take the values from the closest windowed ancestor if the +object is not of a subclass of Core. The screenConvertArg +descriptor puts the widget’s screen field into args[0]. The +colorConvertArgs descriptor puts the widget’s screen field +into args[0], and the widget’s colormap field into args[1]. +</para> +<para> +Conversion routines should not just put a descriptor for the +address of the base of the widget into args[0], and use that +in the routine. They should pass in the actual values on +which the conversion depends. By keeping the dependencies +of the conversion procedure specific, it is more likely that +subsequent conversions will find what they need in the conversion cache. +This way the cache is smaller and has fewer +and more widely applicable entries. +</para> +<para> +If any conversion arguments of type +<type>XtBaseOffset</type>, +<type>XtResourceString</type>, +<type>XtResourceQuark</type>, +and +<type>XtWidgetBaseOffset</type> +are +specified for conversions performed by +<type>XtGetApplicationResources</type>, +<type>XtGetSubresources</type>, +<type>XtVaGetApplicationResources</type>, +or +<type>XtVaGetSubresources</type>, +the arguments are computed with respect +to the specified widget, not the base address or resource +list specified in the call. +</para> +<para> +If the <function>XtConvertArgProc</function> modifies the resource database, the +changes affect any in-progress widget creation, +<xref linkend='XtGetApplicationResources' xrefstyle='select: title'/>, +or +<xref linkend='XtGetSubresources' xrefstyle='select: title'/> +in an implementation-defined manner; +however, insertion of new entries or changes +to existing entries are allowed and will not directly cause +an error. </para> </sect2> @@ -2651,9 +2721,9 @@ To invoke explicit resource conversions, use or <xref linkend='XtCallConverter' xrefstyle='select: title'/>. </para> -<literallayout > +<programlisting> typedef XtPointer XtCacheRef; -</literallayout> +</programlisting> <funcsynopsis id='XtCallConverter'> <funcprototype> @@ -2971,9 +3041,9 @@ and free a cached resource when a widget is destroyed, use <funcprototype> <funcdef>Boolean <function>XtConvertAndStore</function></funcdef> <paramdef>Widget <parameter>object</parameter></paramdef> - <paramdef>String <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> <paramdef>XrmValuePtr <parameter>from</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XrmValuePtr <parameter>to_in_out</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3202,8 +3272,6 @@ Intrinsics-defined resources, the following lifetimes apply: <para> Not valid following any operation that modifies the resource: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -3221,8 +3289,6 @@ All resources of representation type XtRCallback. <para> Remain valid at least until the widget is destroyed: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -3235,8 +3301,6 @@ XtNaccelerators, XtNtranslations. <para> Remain valid until the Display is closed: </para> - </listitem> - <listitem> <itemizedlist spacing='compact'> <listitem> <para> @@ -4188,6 +4252,7 @@ a widget instance using varargs lists, use <paramdef>XtPointer <parameter>base</parameter></paramdef> <paramdef>XtResourceList <parameter>resources</parameter></paramdef> <paramdef>Cardinal <parameter>num_resources</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> diff --git a/lib/libXt/specs/CH10.xml b/lib/libXt/specs/CH10.xml index a96d2c427..e45ec5a50 100644 --- a/lib/libXt/specs/CH10.xml +++ b/lib/libXt/specs/CH10.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Translation_Management'> <title>Translation Management</title> <para> @@ -111,12 +114,12 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. </varlistentry> </variablelist> -<literallayout > +<programlisting> typedef struct _XtActionsRec { - String string; - XtActionProc proc; + String string; + XtActionProc proc; } XtActionsRec, *XtActionList; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>string</emphasis> field is the name used in translation tables to access the procedure. @@ -178,18 +181,18 @@ The string entry is the name used in translation tables. The procedure entry (usually spelled identically to the string) is the name of the C procedure that implements that function: </para> -<literallayout > +<programlisting> XtActionsRec actionTable[] = { - {"Set", Set}, - {"Unset", Unset}, - {"Highlight", Highlight}, - {"Unhighlight", Unhighlight} - {"Notify", Notify}, + {"Set", Set}, + {"Unset", Unset}, + {"Highlight", Highlight}, + {"Unhighlight", Unhighlight} + {"Notify", Notify}, }; -</literallayout> +</programlisting> <para> The Intrinsics reserve all action names and parameters starting with -the characters ``Xt'' for future standard enhancements. Users, +the characters “Xt” for future standard enhancements. Users, applications, and widgets should not declare action names or pass parameters starting with these characters except to invoke specified built-in Intrinsics functions. @@ -547,13 +550,13 @@ Call callbacks and reinvert on left button up. <para> The following illustrates Pushbutton's default translation table: </para> -<literallayout > +<programlisting> static String defaultTranslations = - "<EnterWindow>: Highlight()\\n\\ - <LeaveWindow>: Unhighlight()\\n\\ - <Btn1Down>: Set()\\n\\ - <Btn1Up>: Notify() Unset()"; -</literallayout> + "<EnterWindow>: Highlight()\n\ + <LeaveWindow>: Unhighlight()\n\ + <Btn1Down>: Set()\n\ + <Btn1Up>: Notify() Unset()"; +</programlisting> <para> The <emphasis remap='I'>tm_table</emphasis> field of the <function>CoreClassPart</function> @@ -625,8 +628,8 @@ action sequence. Translation table entries may specify actions that are taken when two or more identical events occur consecutively within a short time interval, called the multi-click time. The multi-click time value may -be specified as an application resource with name ``multiClickTime'' and -class ``MultiClickTime'' and may also be modified dynamically by the +be specified as an application resource with name “multiClickTime” and +class “MultiClickTime” and may also be modified dynamically by the application. The multi-click time is unique for each Display value and is retrieved from the resource database by <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/>. @@ -784,7 +787,7 @@ To compile a translation table, use <funcsynopsis id='XtParseTranslationTable'> <funcprototype> <funcdef>XtTranslations <function>XtParseTranslationTable</function></funcdef> - <paramdef>String <parameter>table</parameter></paramdef> + <paramdef>const char * <parameter>table</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -946,8 +949,8 @@ augment, or override any existing translation table in the widget. To specify this, a pound sign (#) is given as the first character of the table -followed by one of the keywords ``replace'', ``augment'', or -``override'' to indicate +followed by one of the keywords “replace”, “augment”, or +“override” to indicate whether to replace, augment, or override the existing table. The replace or merge operation is performed during the @@ -956,20 +959,20 @@ instance initialization. Each merge operation produces a new translation resource value; if the original tables were shared by other widgets, they are unaffected. If no directive is -specified, ``#replace'' is assumed. +specified, “#replace” is assumed. </para> <para> At instance initialization the XtNtranslations resource is first fetched. Then, if it was -not specified or did not contain ``#replace'', the +not specified or did not contain “#replace”, the resource database is searched for the resource XtNbaseTranslations. If XtNbaseTranslations is found, it is merged into the widget class translation table. Then the widget <emphasis remap='I'>translations</emphasis> field is merged into the result or into the class translation table if XtNbaseTranslations was not found. This final table is then stored into the widget <emphasis remap='I'>translations</emphasis> field. If the XtNtranslations -resource specified ``#replace'', no merge is done. +resource specified “#replace”, no merge is done. If neither XtNbaseTranslations or XtNtranslations are specified, the class translation table is copied into the widget instance. </para> @@ -1101,7 +1104,7 @@ To parse an accelerator table, use <funcsynopsis id='XtParseAcceleratorTable'> <funcprototype> <funcdef>XtAccelerators <function>XtParseAcceleratorTable</function></funcdef> - <paramdef>String <parameter>source</parameter></paramdef> + <paramdef>const char * <parameter>source</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1385,9 +1388,9 @@ server's KeyCode-to-KeySym table. This table must not be modified. There are <emphasis remap='I'>keysyms_per_keycode_return</emphasis> KeySyms associated with each KeyCode, located in the table with indices starting at index </para> -<literallayout> +<programlisting> (test_keycode - min_keycode_return) * keysyms_per_keycode_return -</literallayout> +</programlisting> <para> for KeyCode <emphasis remap='I'>test_keycode</emphasis>. Any entries that have no KeySyms associated with them contain the value @@ -1401,7 +1404,7 @@ needed, as the table may change prior to dispatching each event. <para> For more information on this table, see <olink targetdoc='libX11' targetptr='Manipulating_the_Keyboard_Encoding'>Section 12.7</olink> in -<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface.</olink>. +<olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface</olink>. </para> <para> @@ -1931,6 +1934,7 @@ event bindings in the widget's translation table, use <paramdef>Boolean <parameter>owner_events</parameter></paramdef> <paramdef>unsigned int <parameter>event_mask</parameter></paramdef> <paramdef>int <parameter>pointer_mode</parameter></paramdef> + <paramdef>int <parameter>keyboard_mode</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1951,7 +1955,7 @@ Specifies the action procedure to search for in translation tables. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> @@ -1960,7 +1964,7 @@ Specifies the action procedure to search for in translation tables. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> @@ -2026,7 +2030,7 @@ translation table entry only. For both and <function>KeyPress</function> events, don't-care modifiers are ignored unless the translation entry -explicitly specifies ``Any'' in the <emphasis remap='I'>modifiers</emphasis> field. +explicitly specifies “Any” in the <emphasis remap='I'>modifiers</emphasis> field. </para> <para> @@ -2061,9 +2065,9 @@ invoke an action procedure directly, without generating <funcprototype> <funcdef>void <function>XtCallActionProc</function></funcdef> <paramdef>Widget <parameter>widget</parameter></paramdef> - <paramdef>String <parameter>action</parameter></paramdef> - <paramdef>XEvent *<parameter>event</parameter></paramdef> - <paramdef>String *<parameter>params</parameter></paramdef> + <paramdef>const char * <parameter>action</parameter></paramdef> + <paramdef>XEvent * <parameter>event</parameter></paramdef> + <paramdef>String * <parameter>params</parameter></paramdef> <paramdef>Cardinal <parameter>num_params</parameter></paramdef> </funcprototype> </funcsynopsis> diff --git a/lib/libXt/specs/CH11.xml b/lib/libXt/specs/CH11.xml index 92e46dc57..8dc230129 100644 --- a/lib/libXt/specs/CH11.xml +++ b/lib/libXt/specs/CH11.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Utility_Functions'> <title>Utility Functions</title> <para> @@ -116,7 +119,7 @@ To translate a widget name to a widget instance, use <funcprototype> <funcdef>Widget <function>XtNameToWidget</function></funcdef> <paramdef>Widget <parameter>reference</parameter></paramdef> - <paramdef>String <parameter>names</parameter></paramdef> + <paramdef>const char * <parameter>names</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -463,9 +466,9 @@ is a convenience macro that calls <xref linkend='XtMalloc' xrefstyle='select: title'/> with the following arguments specified: </para> -<literallayout > +<programlisting> ((type *) XtMalloc((unsigned) sizeof(type))) -</literallayout> +</programlisting> <para> The storage allocated by <xref linkend='XtNew' xrefstyle='select: title'/> @@ -510,9 +513,9 @@ is a convenience macro that calls <xref linkend='XtMalloc' xrefstyle='select: title'/> with the following arguments specified: </para> -<literallayout > +<programlisting> (strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) -</literallayout> +</programlisting> <para> The storage allocated by <xref linkend='XtNewString' xrefstyle='select: title'/> @@ -779,7 +782,7 @@ server when the last user of a given GC releases it. <para> Arbitrary widgets in multiple applications can communicate with each other by means of the Intrinsics global selection mechanism, -which conforms to the specifications in the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>. +which conforms to the specifications in the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>. The Intrinsics supply functions for providing and receiving selection data in one logical piece (atomic transfers) or in smaller logical segments (incremental transfers). @@ -1043,7 +1046,7 @@ byte-swap the data if necessary. This procedure does not need to worry about responding to the MULTIPLE or the TIMESTAMP target values (see <xref linkend='Window_Creation_Convenience_Routine' /> -in the <olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink>). +in the <olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>). A selection request with the MULTIPLE target type is transparently transformed into a series of calls to this procedure, one for each target type, and a @@ -1242,7 +1245,7 @@ selection data from the Intrinsics is of type <funcsynopsis id='XtSelectionCallbackProc'> <funcprototype> -<funcdef>typedef void <function>(*XtSelectionCallbackPro)</function></funcdef> +<funcdef>typedef void <function>(*XtSelectionCallbackProc)</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>XtPointer <parameter>client_data</parameter></paramdef> <paramdef>Atom *<parameter>selection</parameter></paramdef> @@ -1462,7 +1465,7 @@ For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and <emphasis remap='I'>time</emphasis>, see <olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms'>Section 2.6</olink> in the -<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink>. +<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>. </para> <funcsynopsis id='XtGetSelectionValues'> @@ -1572,7 +1575,7 @@ target value with the corresponding client data. For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and <emphasis remap='I'>time</emphasis>, see <olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms'>section 2.6</olink> -in the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>. +in the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>. </para> </sect3> <sect3 id="Setting_the_Selection_Owner"> @@ -1831,9 +1834,9 @@ The procedure pointer specified by the incremental owner to supply the selection data to the Intrinsics is of type <xref linkend='XtConvertSelectionIncrProc' xrefstyle='select: title'/>. </para> -<literallayout > +<programlisting> typedef XtPointer XtRequestId; -</literallayout> +</programlisting> <funcsynopsis id='XtConvertSelectionIncrProc'> <funcprototype> @@ -2324,9 +2327,9 @@ the requesting client must determine for itself whether or not a partially completed data transfer is meaningful. For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and -<emphasis remap='I'>time</emphasis>, see -<olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms' /> in the -<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink> +<emphasis remap='I'>time</emphasis>, see +<olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms'>Use of Selection Atoms</olink> in the +<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>. </para> <funcsynopsis id='XtGetSelectionValuesIncremental'> @@ -2443,7 +2446,7 @@ repeatedly. For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and <emphasis remap='I'>time</emphasis>, see <olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms'>Section 2.6</olink> in the -<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink> +<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>. </para> </sect3> <sect3 id="Setting_the_Selection_Owner_for_Incremental_Transfers"> @@ -2575,7 +2578,7 @@ otherwise. For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and <emphasis remap='I'>time</emphasis>, see <olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms'>Section 2.6</olink> in the -<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink> +<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>. </para> <para> @@ -3230,9 +3233,9 @@ and events into a region for clients to process at once rather than processing individual rectangles. For further information about regions, -see <olink targetdoc='libX11' targetptr='Manipulating_Regions' /> +see <olink targetdoc='libX11' targetptr='Manipulating_Regions'>Manipulating Regions</olink> in <olink targetdoc='libX11' targetptr='libX11'> -Xlib — C Language X Interface.</olink>. +Xlib — C Language X Interface</olink>. </para> <para> @@ -3274,7 +3277,7 @@ event. <listitem> <para> Specifies the region object (as defined in -<function><X11/Xutil.h></function>). +<filename class="headerfile"><X11/Xutil.h></filename>). </para> </listitem> </varlistentry> @@ -3314,7 +3317,9 @@ window absolute coordinates, use <funcdef>void <function>XtTranslateCoords</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> <paramdef>Position <parameter>x</parameter></paramdef> + <paramdef>Position <parameter>y</parameter></paramdef> <paramdef>Position *<parameter>rootx_return</parameter></paramdef> + <paramdef>Position *<parameter>rooty_return</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3459,7 +3464,7 @@ The high-level functions construct a string to pass to the lower-level interface. The strings may be specified in application code and are overridden by the contents of an external systemwide file, -the "error database file". The location and name of this file are +the “error database file”. The location and name of this file are implementation-dependent. </para> <note> @@ -3597,7 +3602,7 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. <para> The specified name can be a general kind of error, -like "invalidParameters" or "invalidWindow", +like “invalidParameters” or “invalidWindow”, and the specified type gives extra information such as the name of the routine in which the error was detected. Standard @@ -3615,9 +3620,11 @@ error or a warning by calling <funcprototype> <funcdef>void <function>XtAppGetErrorDatabaseText</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> - <paramdef>String <parameter>buffer_return</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> + <paramdef>char * <parameter>buffer_return</parameter></paramdef> <paramdef>int <parameter>nbytes</parameter></paramdef> <paramdef>XrmDatabase <parameter>database</parameter></paramdef> </funcprototype> @@ -3708,9 +3715,9 @@ returns the appropriate message from the error database or returns the specified default message if one is not found in the error database. To form the full resource name and class when querying the database, -the <emphasis remap='I'>name</emphasis> and <emphasis remap='I'>type</emphasis> are concatenated with a single "." +the <emphasis remap='I'>name</emphasis> and <emphasis remap='I'>type</emphasis> are concatenated with a single “.” between them and the <emphasis remap='I'>class</emphasis> is concatenated with itself with a -single "." if it does not already contain a ".". +single “.” if it does not already contain a “.”. </para> <para> @@ -3831,12 +3838,12 @@ To call the high-level error handler, use <funcprototype> <funcdef>void <function>XtAppErrorMsg</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>type</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> - <paramdef>String *<parameter>params</parameter></paramdef> - <paramdef>Cardinal *<parameter>num_params</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> + <paramdef>String * <parameter>params</parameter></paramdef> + <paramdef>Cardinal * <parameter>num_params</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -3915,7 +3922,7 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. <para> The Intrinsics internal errors all have class -"XtToolkitError". +“XtToolkitError”. </para> <para> @@ -3974,12 +3981,12 @@ To call the installed high-level warning handler, use <funcprototype> <funcdef>void <function>XtAppWarningMsg</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>type</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> - <paramdef>String *<parameter>params</parameter></paramdef> - <paramdef>Cardinal *<parameter>num_params</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> + <paramdef>String * <parameter>params</parameter></paramdef> + <paramdef>Cardinal * <parameter>num_params</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4058,7 +4065,7 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. <para> The Intrinsics internal warnings all have class -"XtToolkitError". +“XtToolkitError”. </para> <para> @@ -4148,7 +4155,7 @@ To call the installed fatal error procedure, use <funcprototype> <funcdef>void <function>XtAppError</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>message</parameter></paramdef> + <paramdef>const char * <parameter>message</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4238,7 +4245,7 @@ To call the installed nonfatal error procedure, use <funcprototype> <funcdef>void <function>XtAppWarning</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>message</parameter></paramdef> + <paramdef>const char * <parameter>message</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -4344,7 +4351,7 @@ Finally, <xref linkend='XtSetWMColormapWindows' xrefstyle='select: title'/> stores the resulting window list in the <emphasis role='strong'>WM_COLORMAP_WINDOWS</emphasis> property on the specified widget's window. -Refer to Section 4.1.8 in the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis> for details of +Refer to Section 4.1.8 in the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis> for details of the semantics of the <emphasis role='strong'>WM_COLORMAP_WINDOWS</emphasis> property. </para> </sect1> @@ -4372,12 +4379,12 @@ A string substitution is defined by a list of <function>Substitution</function> entries. </para> -<literallayout > +<programlisting> typedef struct { - char match; - String substitution; + char match; + String substitution; } SubstitutionRec, *Substitution; -</literallayout> +</programlisting> <para> File name evaluation is handled in an operating-system-dependent fashion by an @@ -4421,8 +4428,8 @@ To search for a file using substitutions in a path list, use <funcsynopsis id='XtFindFile'> <funcprototype> -<funcdef>String <function>XtFindFile</function></funcdef> - <paramdef>String <parameter>path</parameter></paramdef> +<funcdef>char * <function>XtFindFile</function></funcdef> + <paramdef>const char * <parameter>path</parameter></paramdef> <paramdef>Substitution <parameter>substitutions</parameter></paramdef> <paramdef>Cardinal <parameter>num_substitutions</parameter></paramdef> <paramdef>XtFilePredicate <parameter>predicate</parameter></paramdef> @@ -4476,9 +4483,9 @@ Specifies a procedure called to judge each potential file name, or NULL. The <emphasis remap='I'>path</emphasis> parameter specifies a string that consists of a series of potential file names delimited by colons. Within each name, the percent character specifies a string substitution selected by the -following character. The character sequence "%:" specifies an +following character. The character sequence “%:” specifies an embedded colon that is not a delimiter; the sequence is replaced by a -single colon. The character sequence "%%" specifies a percent +single colon. The character sequence “%%” specifies a percent character that does not introduce a substitution; the sequence is replaced by a single percent character. If a percent character is followed by any other character, @@ -4490,7 +4497,7 @@ replaces the percent and match characters with the string in the corresponding <emphasis remap='I'>substitution</emphasis> field. A <emphasis remap='I'>substitution</emphasis> field entry of NULL is equivalent to a pointer to an empty string. If the operating system does not interpret multiple embedded name separators in the -path (i.e., "/" in POSIX) the same way as a single separator, +path (i.e., “/” in POSIX) the same way as a single separator, <xref linkend='XtFindFile' xrefstyle='select: title'/> will collapse multiple separators into a single one after performing all string substitutions. Except for collapsing embedded separators, @@ -4528,9 +4535,12 @@ To search for a file using standard substitutions in a path list, use <funcsynopsis id='XtResolvePathname'> <funcprototype> -<funcdef>String <function>XtResolvePathname</function></funcdef> +<funcdef>char * <function>XtResolvePathname</function></funcdef> <paramdef>Display *<parameter>display</parameter></paramdef> - <paramdef>String <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>filename</parameter></paramdef> + <paramdef>const char * <parameter>suffix</parameter></paramdef> + <paramdef>const char * <parameter>path</parameter></paramdef> <paramdef>Substitution <parameter>substitutions</parameter></paramdef> <paramdef>Cardinal <parameter>num_substitutions</parameter></paramdef> <paramdef>XtFilePredicate <parameter>predicate</parameter></paramdef> @@ -4554,7 +4564,7 @@ Specifies the display to use to find the language for language substitutions. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> @@ -4624,12 +4634,12 @@ are determined from the value of the language string retrieved by <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/> for the specified display. To set the -language for all applications specify "*xnlLanguage: <emphasis remap='I'>lang</emphasis>" in the +language for all applications specify “*xnlLanguage: <emphasis remap='I'>lang</emphasis>” in the resource database. The format and content of the language string are implementation-defined. One suggested syntax is to compose -the language string of three parts; a "language part", a -"territory part" and a "codeset part". The manner in which +the language string of three parts; a “language part”, a +“territory part” and a “codeset part”. The manner in which this composition is accomplished is implementation-defined, and the Intrinsics make no interpretation of the parts other than to use them in substitutions as described below. @@ -4762,14 +4772,14 @@ must contain the following substitutions: <!-- OK PAST HERE --> -<literallayout> +<programlisting> 1. %C, %N, %S, %T, %L or %C, %N, %S, %T, %l, %t, %c 2. %C, %N, %S, %T, %l 3. %C, %N, %S, %T 4. %N, %S, %T, %L or %N, %S, %T, %l, %t, %c 5. %N, %S, %T, %l 6. %N, %S, %T -</literallayout> +</programlisting> <para> The order of these six entries within the path must be as given above. @@ -4783,22 +4793,22 @@ adjacent colons, <function>%N%S</function> is inserted between them. <para> The <emphasis remap='I'>type</emphasis> parameter is intended to be a category of files, usually being translated into a directory in the pathname. Possible values -might include "app-defaults", "help", and "bitmap". +might include “app-defaults”, “help”, and “bitmap”. </para> <para> The <emphasis remap='I'>suffix</emphasis> parameter is intended to be appended to the file name. -Possible values might include ".txt", ".dat", and ".bm". +Possible values might include “.txt”, “.dat”, and “.bm”. </para> <para> A suggested value for the default path on POSIX-based systems is </para> -<literallayout> +<programlisting> /usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:\ /usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:\ /usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S -</literallayout> +</programlisting> <para> @@ -4816,14 +4826,14 @@ The %D substitution allows the addition of path elements to the implementation-specific default path, typically to allow additional directories to be searched without preventing resources in the system directories from being found. For example, a -user installing resource files under a directory called "ourdir" +user installing resource files under a directory called “ourdir” might set <emphasis role='strong'>XFILESEARCHPATH</emphasis> to </para> -<literallayout> +<programlisting> %D:ourdir/%T/%N%C:ourdir/%T/%N -</literallayout> +</programlisting> <para> The customization string is obtained by querying the resource database @@ -4851,11 +4861,11 @@ when it is no longer needed. Applications may register functions that are called at a particular control points in the Intrinsics. These functions are intended to be used to provide notification -of an "X Toolkit event", such as widget creation, to an external agent, +of an “X Toolkit event”, such as widget creation, to an external agent, such as an interactive resource editor, drag-and-drop server, or an aid for physically challenged users. The control points containing such registration hooks are identified -in a "hook registration" object. +in a “hook registration” object. </para> <para> @@ -4927,7 +4937,7 @@ as an argument: <function>XtIsWMShell</function>, <function>XtIsVendorShell</function>, <function>XtIsTransientShell</function>, -<function>XtIsToplevelShell</function>, +<function>XtIsTopLevelShell</function>, <function>XtIsApplicationShell</function>, <function>XtIsSessionShell</function> </para> @@ -5032,14 +5042,14 @@ The <emphasis remap='I'>call_data</emphasis> parameter in a createHook callback cast to type <function>XtCreateHookData</function>. </para> -<literallayout > +<programlisting> typedef struct { - String type; - Widget widget; - ArgList args; - Cardinal num_args; + String type; + Widget widget; + ArgList args; + Cardinal num_args; } XtCreateHookDataRec, *XtCreateHookData; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>type</emphasis> is set to <function>XtHcreate</function>, @@ -5115,14 +5125,14 @@ The <emphasis remap='I'>call_data</emphasis> parameter in a changeHook callback be cast to type <function>XtChangeHookData</function>. </para> -<literallayout > +<programlisting> typedef struct { - String type; - Widget widget; - XtPointer event_data; - Cardinal num_event_data; + String type; + Widget widget; + XtPointer event_data; + Cardinal num_event_data; } XtChangeHookDataRec, *XtChangeHookData; -</literallayout> +</programlisting> <para> When the changeHook callbacks are called as a result of a call to <xref linkend='XtSetValues' xrefstyle='select: title'/> @@ -5134,13 +5144,13 @@ or <emphasis remap='I'>event_data</emphasis> may be cast to type <function>XtChangeHookSetValuesData</function>. </para> -<literallayout > +<programlisting> typedef struct { - Widget old, req; - ArgList args; - Cardinal num_args; + Widget old, req; + ArgList args; + Cardinal num_args; } XtChangeHookSetValuesDataRec, *XtChangeHookSetValuesData; -</literallayout> +</programlisting> <para> The <emphasis remap='I'>old</emphasis>, <emphasis remap='I'>req</emphasis>, <emphasis remap='I'>args</emphasis>, and <emphasis remap='I'>num_args</emphasis> are the parameters passed to the set_values procedure. The callbacks are called @@ -5378,9 +5388,9 @@ without employing the Intrinsics library should invoke the change hook itself. This is done by: </para> -<literallayout > +<programlisting> XtCallCallbacks(XtHooksOfDisplay(dpy), XtNchangeHook, call_data); -</literallayout> +</programlisting> <para> The XtNconfigureHook callback list is called any time the Intrinsics move, resize, or configure a widget and when @@ -5392,14 +5402,14 @@ is called. The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <function>XtConfigureHookData.</function> </para> -<literallayout > +<programlisting> typedef struct { - String type; - Widget widget; - XtGeometryMask changeMask; - XWindowChanges changes; + String type; + Widget widget; + XtGeometryMask changeMask; + XWindowChanges changes; } XtConfigureHookDataRec, *XtConfigureHookData; -</literallayout> +</programlisting> <para> When the configureHook callbacks are called, the <emphasis remap='I'>type</emphasis> is <function>XtHconfigure</function>, @@ -5421,15 +5431,15 @@ The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <function>XtGeometryHookData</function>. </para> -<literallayout > +<programlisting> typedef struct { - String type; - Widget widget; - XtWidgetGeometry* request; - XtWidgetGeometry* reply; - XtGeometryResult result; + String type; + Widget widget; + XtWidgetGeometry* request; + XtWidgetGeometry* reply; + XtGeometryResult result; } XtGeometryHookDataRec, *XtGeometryHookData; -</literallayout> +</programlisting> <para> When the geometryHook callbacks are called prior to geometry negotiation, the <emphasis remap='I'>type</emphasis> is @@ -5449,12 +5459,12 @@ The XtNdestroyHook callback list is called when a widget is destroyed. The <emphasis remap='I'>call_data parameter</emphasis> may be cast to type <function>XtDestroyHookData</function>. </para> -<literallayout > +<programlisting> typedef struct { - String type; - Widget widget; + String type; + Widget widget; } XtDestroyHookDataRec, *XtDestroyHookData; -</literallayout> +</programlisting> <para> When the destroyHook callbacks are called as a result of a call to <xref linkend='XtDestroyWidget' xrefstyle='select: title'/>, @@ -5465,7 +5475,7 @@ called upon completion of phase one destroy for a widget. </para> <para> -The XtNshells and XtnumShells are read-only resources that report a +The XtNshells and XtNnumShells are read-only resources that report a list of all parentless shell widgets associated with a display. </para> diff --git a/lib/libXt/specs/CH12.xml b/lib/libXt/specs/CH12.xml index 3ae6542ab..011a98bfc 100644 --- a/lib/libXt/specs/CH12.xml +++ b/lib/libXt/specs/CH12.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Nonwidget_Objects'> <title>Nonwidget Objects</title> @@ -65,42 +68,42 @@ but exist to pad the data structure so that it matches Core's class record. The class record initialization must fill all obj<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to the type. </para> -<literallayout > +<programlisting> typedef struct _ObjectClassPart { - WidgetClass superclass; - String class_name; - Cardinal widget_size; - XtProc class_initialize; - XtWidgetClassProc class_part_initialize; - XtEnum class_inited; - XtInitProc initialize; - XtArgsProc initialize_hook; - XtProc obj1; - XtPointer obj2; - Cardinal obj3; - XtResourceList resources; - Cardinal num_resources; - XrmClass xrm_class; - Boolean obj4; - XtEnum obj5; - Boolean obj6; - Boolean obj7; - XtWidgetProc destroy; - XtProc obj8; - XtProc obj9; - XtSetValuesFunc set_values; - XtArgsFunc set_values_hook; - XtProc obj10; - XtArgsProc get_values_hook; - XtProc obj11; - XtVersionType version; - XtPointer callback_private; - String obj12; - XtProc obj13; - XtProc obj14; - XtPointer extension; + WidgetClass superclass; + String class_name; + Cardinal widget_size; + XtProc class_initialize; + XtWidgetClassProc class_part_initialize; + XtEnum class_inited; + XtInitProc initialize; + XtArgsProc initialize_hook; + XtProc obj1; + XtPointer obj2; + Cardinal obj3; + XtResourceList resources; + Cardinal num_resources; + XrmClass xrm_class; + Boolean obj4; + XtEnum obj5; + Boolean obj6; + Boolean obj7; + XtWidgetProc destroy; + XtProc obj8; + XtProc obj9; + XtSetValuesFunc set_values; + XtArgsFunc set_values_hook; + XtProc obj10; + XtArgsProc get_values_hook; + XtProc obj11; + XtVersionType version; + XtPointer callback_private; + String obj12; + XtProc obj13; + XtProc obj14; + XtPointer extension; } ObjectClassPart; -</literallayout> +</programlisting> <para> The extension record defined for <function>ObjectClassPart</function> @@ -109,27 +112,27 @@ with a <emphasis remap='I'>record_type</emphasis> equal to is <function>ObjectClassExtensionRec</function>. </para> -<literallayout > +<programlisting> typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' /> - long version; See <xref linkend='Class_Extension_Records' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' /> - XtAllocateProc allocate; See <xref linkend='Widget_Instance_Allocation_The_allocate_Procedure' />. - XtDeallocateProc deallocate; See <xref linkend='Widget_Instance_Deallocation_The_deallocate_Procedure' />. + XtPointer next_extension; <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation> + XrmQuark record_type; <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation> + long version; <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation> + Cardinal record_size; <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation> + XtAllocateProc allocate; <lineannotation>See <xref linkend='Widget_Instance_Allocation_The_allocate_Procedure' /></lineannotation> + XtDeallocateProc deallocate; <lineannotation>See <xref linkend='Widget_Instance_Deallocation_The_deallocate_Procedure' /></lineannotation> } ObjectClassExtensionRec, *ObjectClassExtension; -</literallayout> +</programlisting> <para> The prototypical <function>ObjectClass</function> consists of just the <function>ObjectClassPart</function>. </para> -<literallayout > +<programlisting> typedef struct _ObjectClassRec { - ObjectClassPart object_class; + ObjectClassPart object_class; } ObjectClassRec, *ObjectClass; -</literallayout> +</programlisting> <para> The predefined class record and pointer for <function>ObjectClassRec</function> @@ -138,18 +141,18 @@ are <para> In -<function>IntrinsicP.h</function>: +<filename class="headerfile">IntrinsicP.h</filename>: </para> -<literallayout > +<programlisting> extern ObjectClassRec objectClassRec; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout > +<programlisting> extern WidgetClass objectClass; -</literallayout> +</programlisting> <para> The opaque types <function>Object</function> @@ -163,13 +166,13 @@ The symbolic constant for the version identifier is <function>XtObjectExtensionVersion</function> (see <xref linkend='Class_Extension_Records' />). -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data: </para> -<literallayout > +<programlisting> typedef struct _ObjectClassRec* ObjectClass; -</literallayout> +</programlisting> </sect2> @@ -182,16 +185,16 @@ structure. All fields have the same meaning as the corresponding fields in <function>CorePart</function>. </para> -<literallayout > +<programlisting> typedef struct _ObjectPart { - Widget self; - WidgetClass widget_class; - Widget parent; - Boolean being_destroyed; - XtCallbackList destroy_callbacks; - XtPointer constraints; + Widget self; + WidgetClass widget_class; + Widget parent; + Boolean being_destroyed; + XtCallbackList destroy_callbacks; + XtPointer constraints; } ObjectPart; -</literallayout> +</programlisting> <para> All object instances have the Object @@ -204,20 +207,20 @@ object types. <para> In -<function>IntrinsicP.h</function>: +<filename class="headerfile">IntrinsicP.h</filename>: </para> -<literallayout > +<programlisting> typedef struct _ObjectRec { - ObjectPart object; + ObjectPart object; } ObjectRec, *Object; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout > +<programlisting> typedef struct _ObjectRec *Object; -</literallayout> +</programlisting> </sect2> @@ -271,15 +274,27 @@ The WidgetClass arguments to the following procedures may be or any subclass: </para> +<itemizedlist spacing='compact'> +<listitem> +<para> +<xref linkend='XtInitializeWidgetClass' xrefstyle='select: title'/>, +<xref linkend='XtCreateWidget' xrefstyle='select: title'/>, +<xref linkend='XtVaCreateWidget' xrefstyle='select: title'/> +</para> +</listitem> +<listitem> <para> -<emphasis role='strong'>XtInitializeWidgetClass</emphasis>, -<emphasis role='strong'>XtCreateWidget</emphasis>, -<emphasis role='strong'>XtVaCreateWidget</emphasis> -<emphasis role='strong'>XtIsSubclass</emphasis>, -<emphasis role='strong'>XtCheckSubclass</emphasis> -<emphasis role='strong'>XtGetResourceList</emphasis>, -<emphasis role='strong'>XtGetConstraintResourceList</emphasis> +<xref linkend='XtIsSubclass' xrefstyle='select: title'/>, +<xref linkend='XtCheckSubclass' xrefstyle='select: title'/> </para> +</listitem> +<listitem> +<para> +<xref linkend='XtGetResourceList' xrefstyle='select: title'/>, +<xref linkend='XtGetConstraintResourceList' xrefstyle='select: title'/> +</para> +</listitem> +</itemizedlist> <para> The Widget arguments to the following procedures may be of class @@ -321,7 +336,7 @@ or any subclass: <function>XtIsWMShell</function>, <function>XtIsVendorShell</function>, <function>XtIsTransientShell</function>, -<function>XtIsToplevelShell</function>, +<function>XtIsTopLevelShell</function>, <function>XtIsApplicationShell</function>, <function>XtIsSessionShell</function> </para> @@ -513,53 +528,53 @@ Core's class record. The class record initialization must fill all rect<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to the type. </para> -<literallayout > +<programlisting> typedef struct _RectObjClassPart { - WidgetClass superclass; - String class_name; - Cardinal widget_size; - XtProc class_initialize; - XtWidgetClassProc class_part_initialize; - XtEnum class_inited; - XtInitProc initialize; - XtArgsProc initialize_hook; - XtProc rect1; - XtPointer rect2; - Cardinal rect3; - XtResourceList resources; - Cardinal num_resources; - XrmClass xrm_class; - Boolean rect4; - XtEnum rect5; - Boolean rect6; - Boolean rect7; - XtWidgetProc destroy; - XtWidgetProc resize; - XtExposeProc expose; - XtSetValuesFunc set_values; - XtArgsFunc set_values_hook; - XtAlmostProc set_values_almost; - XtArgsProc get_values_hook; - XtProc rect9; - XtVersionType version; - XtPointer callback_private; - String rect10; - XtGeometryHandler query_geometry; - XtProc rect11; - XtPointer extension ; + WidgetClass superclass; + String class_name; + Cardinal widget_size; + XtProc class_initialize; + XtWidgetClassProc class_part_initialize; + XtEnum class_inited; + XtInitProc initialize; + XtArgsProc initialize_hook; + XtProc rect1; + XtPointer rect2; + Cardinal rect3; + XtResourceList resources; + Cardinal num_resources; + XrmClass xrm_class; + Boolean rect4; + XtEnum rect5; + Boolean rect6; + Boolean rect7; + XtWidgetProc destroy; + XtWidgetProc resize; + XtExposeProc expose; + XtSetValuesFunc set_values; + XtArgsFunc set_values_hook; + XtAlmostProc set_values_almost; + XtArgsProc get_values_hook; + XtProc rect9; + XtVersionType version; + XtPointer callback_private; + String rect10; + XtGeometryHandler query_geometry; + XtProc rect11; + XtPointer extension; } RectObjClassPart; -</literallayout> +</programlisting> <para> The RectObj class record consists of just the <function>RectObjClassPart</function>. </para> -<literallayout > +<programlisting> typedef struct _RectObjClassRec { - RectObjClassPart rect_class; + RectObjClassPart rect_class; } RectObjClassRec, *RectObjClass; -</literallayout> +</programlisting> <para> The predefined class record and pointer for <function>RectObjClassRec</function> @@ -568,18 +583,18 @@ are <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout > +<programlisting> extern RectObjClassRec rectObjClassRec; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout > +<programlisting> extern WidgetClass rectObjClass; -</literallayout> +</programlisting> <para> The opaque types <function>RectObj</function> @@ -590,13 +605,13 @@ and the opaque variable are defined for generic actions on objects whose class is RectObj or a subclass of RectObj. -<function>Intrinsic.h</function> +<filename class="headerfile">Intrinsic.h</filename> uses an incomplete structure definition to ensure that the compiler catches attempts to access private data: </para> -<literallayout > +<programlisting> typedef struct _RectObjClassRec* RectObjClass; -</literallayout> +</programlisting> </sect2> @@ -612,33 +627,33 @@ objects have the following fields defined in the structure. All fields have the same meaning as the corresponding field in <function>CorePart</function>. </para> -<literallayout > +<programlisting> typedef struct _RectObjPart { - Position x, y; - Dimension width, height; - Dimension border_width; - Boolean managed; - Boolean sensitive; - Boolean ancestor_sensitive; + Position x, y; + Dimension width, height; + Dimension border_width; + Boolean managed; + Boolean sensitive; + Boolean ancestor_sensitive; } RectObjPart; -</literallayout> +</programlisting> <para> RectObj objects have the RectObj fields immediately following the Object fields. </para> -<literallayout > +<programlisting> typedef struct _RectObjRec { - ObjectPart object; - RectObjPart rectangle; + ObjectPart object; + RectObjPart rectangle; } RectObjRec, *RectObj; -</literallayout> +</programlisting> <para> In -<function>Intrinsic.h</function>: +<filename class="headerfile">Intrinsic.h</filename>: </para> -<literallayout > +<programlisting> typedef struct _RectObjRec* RectObj; -</literallayout> +</programlisting> </sect2> diff --git a/lib/libXt/specs/CH13.xml b/lib/libXt/specs/CH13.xml index 0216b3434..dc9a06449 100644 --- a/lib/libXt/specs/CH13.xml +++ b/lib/libXt/specs/CH13.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <chapter id='Evolution_of_the_Intrinsics'> <title>Evolution of the Intrinsics</title> @@ -34,9 +37,9 @@ advantage of newer features added in later revisions may use the symbolic macro <function>XtSpecificationRelease</function>. </para> -<literallayout > -#define XtSpecificationRelease 6 -</literallayout> +<programlisting> +#define XtSpecificationRelease 7 +</programlisting> <para> As the symbol <function>XtSpecificationRelease</function> @@ -126,8 +129,8 @@ specification change is small. A composite widget layout routine that calls <xref linkend='XtQueryGeometry' xrefstyle='select: title'/> is now expected to store the complete new geometry in the intended structure; -previously the specification said ``store the changes it intends to -make''. Only by storing the complete geometry does the child have +previously the specification said “store the changes it intends to +make”. Only by storing the complete geometry does the child have any way to know what other parts of the geometry may still be flexible. Existing widgets should not be affected by this, except to take advantage of the new information. @@ -141,7 +144,7 @@ In order to provide a mechanism for widgets to be notified when they become unrealized through a call to <xref linkend='XtUnrealizeWidget' xrefstyle='select: title'/>, the callback -list name ``unrealizeCallback'' has been defined by the Intrinsics. A +list name “unrealizeCallback” has been defined by the Intrinsics. A widget class that requires notification on unrealize may declare a callback list resource by this name. No class is required to declare this resource, but any class that did so in a prior revision may find @@ -153,7 +156,7 @@ semantics. <sect2 id="Subclasses_of_WMShell"> <title>Subclasses of WMShell</title> <para> -The formal adoption of the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis> as +The formal adoption of the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis> as an X Consortium standard has meant the addition of four fields to <function>WMShellPart</function> and one field to @@ -290,22 +293,22 @@ defaults files while still giving end users the ability to augment or override individual event sequences. This change will affect only those applications that wish to take advantage of the new functionality or those widgets that may have previously defined -a resource named ``baseTranslations''. +a resource named “baseTranslations”. </para> <para> Applications wishing to take advantage of the new functionality would change their application defaults file, e.g., from -<literallayout > - app.widget.translations: <emphasis remap='I'>value</emphasis> +<programlisting> + app.widget.translations: <emphasis remap='I'>value</emphasis> to - app.widget.baseTranslations: <emphasis remap='I'>value</emphasis> -</literallayout> + app.widget.baseTranslations: <emphasis remap='I'>value</emphasis> +</programlisting> If it is important to the application to preserve complete compatibility of the defaults file between different versions of the application running under Release 4 and Release 5, -the full translations can be replicated in both the ``translations'' -and the ``baseTranslations'' resource. +the full translations can be replicated in both the “translations” +and the “baseTranslations” resource. </para> </sect2> @@ -339,8 +342,8 @@ application class resource files according to arbitrary user-specified categories. The primary motivation for this addition was separate monochrome and color application class defaults files. The substitution value is obtained by querying the current resource -database for the application resource name ``customization'', class -``Customization''. Any application that previously used this +database for the application resource name “customization”, class +“Customization”. Any application that previously used this resource name and class will need to be aware of the possibly conflicting semantics. </para> @@ -553,7 +556,7 @@ has been added. <sect2 id="Communication_with_Window_and_Session_Managers"> <title>Communication with Window and Session Managers</title> <para> -The revision of the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis> as an X Consortium standard has resulted +The revision of the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis> as an X Consortium standard has resulted in the addition of three fields to the specification of <function>WMShellPart</function>. These are <emphasis remap='I'>urgency</emphasis>, <emphasis remap='I'>client_leader</emphasis>, and <emphasis remap='I'>window_role</emphasis>. @@ -588,7 +591,7 @@ the session manager in restarting applications based on the Intrinsics. <para> The resource name and class strings defined by the Intrinsics shell widgets in -<function><X11/Shell.h></function> +<filename class="headerfile"><X11/Shell.h></filename> are now listed in Appendix E. The addition of a new symbol for the <function>WMShell</function> @@ -714,7 +717,7 @@ database construction, by using the new substitution string, %D. <para> The default key translator now recognizes the NumLock modifier. If NumLock is on and the second keysym is a keypad keysym -(a standard keysym named with a ``KP'' prefix or a +(a standard keysym named with a “KP” prefix or a vendor-specific keysym in the hexadecimal range 0x11000000 to 0x1100FFFF), then the default key translator will use the first keysym if Shift and/or ShiftLock is on and will @@ -727,7 +730,7 @@ ignore NumLock and apply the normal protocol semantics. <title>Selections</title> <para> The targets of selection requests may be parameterized, as described -by the revised <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>. +by the revised <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>. When such requests are made, <xref linkend='XtSetSelectionParameters' xrefstyle='select: title'/> is used by the requestor to specify the target parameters and @@ -767,4 +770,413 @@ which returns a list of the X displays associated with an application context. </para> </sect2> </sect1> + +<sect1 id="Release_to_Release_Compatibility_4"> +<title>Release 6 to Release 7 Compatibility</title> + +<sect2 id="Changes_During_X11R6"> +<title>Changes During X11R6</title> +<para> +The Toolkit was proposed in X10R4, released at the end of 1986. +The X11R6 documentation was completed in mid–1994. +Over most of the eleven years through X11R6.9, +only minor changes were made to the specification. +Some changes are documented only in the release notes: +</para> + +<itemizedlist> +<listitem> +<para> +The X11R6.3 release notes (1997) mention one new feature (section 3.15) +<emphasis remap='I'>Xt Geometry Management Debugger</emphasis>, saying +</para> +<blockquote> +<para> +Daniel Dardailler's “GeoTattler” code has been merged into the Xt +Intrinsics library implementation. +This is not a standard. +If libXt is compiled with the <code>XT_GEO_TATTLER</code> symbol defined +(currently there is no build configuration support to do this) +then a “geoTattler” resource +may be specified for any widget in an application. +If the <code>geoTattler</code> +resource for a widget instance is <code>True</code> +then libXt will generate debugging information to +<emphasis remap='I'>stdout</emphasis> when the widget makes geometry change requests. +</para> +<para> +For example, if the resources specify: +</para> +<programlisting> +myapp*draw.XmScale.geoTattler: ON +*XmScrollBar.geoTattler:ON +*XmRowColumn.exit_button.geoTattler:ON +</programlisting> +<para> +then geometry management debugging information will be generated for all +the <code>XmScale</code> children +of the widget named <emphasis remap='I'>draw</emphasis>, +all the XmScrollBars, +and the widget named <emphasis remap='I'>exit_button</emphasis> +in any <code>XmRowColumn</code>. +</para> +</blockquote> +</listitem> +<listitem> +<para> +X11R6.4 (1998) added +<xref linkend='Resource_Configuration_Management' />. +The release notes explain that by saying +<blockquote> +<para> +The X Toolkit Intrinsics library (libXt) now has IBM's Easy Resource +Configuration support included. +</para> +</blockquote> +</para> +<para> +but goes on to say (section 14) that +<blockquote> +<para> +Easy Resource Configuration +is not a standard part of the X Toolkit Intrinsics (libXt). +It is neither an X Consortium standard nor an X Project Team specification. +</para> +</blockquote> +</para> +</listitem> +<listitem> +<para> +X11R6.5 (2000) documented a bug-fix for XtAppPeekEvent in the release notes, +stating that it now worked as described in the specification. +It also modified the description of XtAppPeekEvent in the specification. +Previously the specification stated that no known implementations behaved +as specified. +</para> +</listitem> +<listitem> +<para> +Subsequent releases X11R6.6 (2001) through X11R6.9 (2005) +did not document any new or improved features. +</para> +</listitem> +</itemizedlist> +<para> +Throughout this interval, +there were undocumented fixes and improvements made to the X Toolkit Intrinsics library. +The documentation was modified to fix minor errors, +improve the formatting, and +update version numbers. +</para> +</sect2> +<sect2 id="Changes_During_X11R7"> +<title>Changes During X11R7</title> +<para> +X11R7 releases starting in 2005 continued this trend, +converting the documentation from nroff to sgml. +X11R7.7 (2012) provides the same Intrinsics specification +(aside from details of formatting and version numbers) as X11R6 (1995). +</para> +<para> +The updates for this specification are a continuation of X11R7.7, +because (as of April 2019) there are no plans for an X11R7.8 release. +</para> +</sect2> +<sect2 id="Converting_to_Standard_C"> +<title>Converting to Standard C</title> +<para> +The Intrinsics specification was first released with X11R3 in 1989. +That was too early to take Standard C (i.e., ANSI C) into account. +Because vendors generally did not provide a no-cost Standard C compiler, +the X Toolkit Intrinsics library initially supported both K&R and ANSI C. +The X11R5 release notes mention using gcc, with some caveats. +As a result, the specification and implementation gave equal attention +to both K&R and ANSI C. +</para> +<para> +This example shows how a function prototype was used in the C header files: +</para> +<programlisting> +extern Display *XtOpenDisplay( +#if NeedFunctionPrototypes + XtAppContext /* app_context */, + _Xconst _XtString /* display_string */, + _Xconst _XtString /* application_name */, + _Xconst _XtString /* application_class */, + XrmOptionDescRec* /* options */, + Cardinal /* num_options */, + int* /* argc */, + char** /* argv */ +#endif +); +</programlisting> +<para> +The parameters for the ANSI C prototype were conditionally compiled. +Used with a K&R compiler, those parameters were ignored. +</para> +<itemizedlist> +<listitem> +<para> +The X Toolkit Intrinsics library used <type>const</type> in just a few cases. +The specification did not mention it at all. +</para> +<para> +Over time, that was seen as a problem, +partly because of gcc's warning options +such as <emphasis remap='I'>write-strings</emphasis>, +introduced in early 1988 (released with gcc 1.27 in late 1988). +Quoting from gcc 2.58's documentation (late 1993): +<programlisting> +`-Wwrite-strings' + Give string constants the type `const char[LENGTH]' so that + copying the address of one into a non-`const' `char *' pointer + will get a warning. These warnings will help you find at compile + time code that can try to write into a string constant, but only + if you have been very careful about using `const' in declarations + and prototypes. <emphasis remap='I'>Otherwise, it will just be a nuisance; this is + why we did not make `-Wall' request these warnings.</emphasis> +</programlisting> +</para> +<para> +Others did not agree that it was a nuisance. Besides the obvious advantage +of improving program correctness, making a symbol “const” +gave the compiler and linker a hint that the symbol could be put into +the text (read-only) section, eliminating some steps needed by the linker +to adjust addresses and thereby reducing the time it took to load a +program into memory. +</para> +<para> +Other gcc warning options (such as +such as <emphasis remap='I'>cast-qual</emphasis>) +are useful for improving programs. +They give similar information, because unless told otherwise, +gcc would treat string values as nonwritable. +Quoting from gcc 1.27: +<programlisting> + * GNU CC normally makes string constants read-only. If several + identical-looking string constants are used, GNU CC stores only + one copy of the string. + ... + The best solution to these problems is to change the program to + use `char'-array variables with initialization strings for these + purposes instead of string constants. But if this is not + possible, you can use the `-fwritable-strings' flag, which + directs GNU CC to handle string constants the same way most C + compilers do. +</programlisting> +and +<programlisting> + `-fwritable-strings' + Store string constants in the writable data segment and + don't uniquize them. This is for compatibility with old + programs which assume they can write into string constants. + Writing into string constants is a very bad idea; + ``constants'' should be constant. +</programlisting> +</para> +</listitem> +<listitem> +<para> +Several prototypes in the implementation +use the private type <type>_XtString</type>. +The specification and implementation also used a <type>String</type> +type without explaining when it is appropriate. +<programlisting> +typedef char *String; + +/* We do this in order to get "const" declarations to work right. We + * use _XtString instead of String so that C++ applications can + * #define String to something else if they choose, to avoid conflicts + * with other C++ libraries. + */ +#define _XtString char* +</programlisting> +That is, the developers were providing for some workaround to allow +C++ applications to use the stricter compiler checking +associated with <type>const</type>. +</para> +</listitem> +<listitem> +<para> +The <type>String</type> type is not the only type used in the +prototypes for the X Toolkit Intrinsics library. +Its developers were also concerned with porting the library +to platforms with different size-constraints. +They defined different types (used in the function prototypes) +depending on whether a “wide” parameter type was appropriate: +<programlisting> +/* _Xt names are private to Xt implementation, do not use in client code */ +#if NeedWidePrototypes +#define _XtBoolean int +#define _XtDimension unsigned int +#define _XtKeyCode unsigned int +#define _XtPosition int +#define _XtXtEnum unsigned int +#else +#define _XtBoolean Boolean +#define _XtDimension Dimension +#define _XtKeyCode KeyCode +#define _XtPosition Position +#define _XtXtEnum XtEnum +#endif /* NeedWidePrototypes */ +</programlisting> +and +<programlisting> +#ifdef CRAY +typedef long Boolean; +typedef char* XtArgVal; +typedef long XtEnum; +#else +typedef char Boolean; +typedef long XtArgVal; +typedef unsigned char XtEnum; +#endif +</programlisting> +In practice, wide-prototypes are rarely used, not well supported. +The specification did not clarify the distinction +between <type>Bool</type> (mentioned as a resource type) +and <type>Boolean</type> (used in all of the data structures). +The implementation used both, predominantly the latter. +</para> +</listitem> +</itemizedlist> +<para> +Other features of Standard C were neglected in the specification because +it was accommodating K&R C: +</para> +<itemizedlist> +<listitem> +<para> +K&R C has no <type>void</type> keyword. +The specification used it for return-types, +but not to indicate an empty parameter list. +The specification also stated that +<type>void*</type> would be used for the <type>XtPointer</type> type. +</para> +<para> +The conversion to sgml lost the <type>void</type> return-type. +</para> +</listitem> +<listitem> +<para> +Standard C uses an ellipsis for variable-length argument lists, e.g., for +<xref linkend='XtVaAppCreateShell' />. +Again, there was a conditional-compilation symbol +(<code>NeedVarargsPrototypes</code>) +to handle the different forms used. +Here is an example: +<programlisting> +#if NeedVarargsPrototypes +void +XtVaGetApplicationResources(Widget widget, XtPointer base, XtResourceList resources, Cardinal num_resources, ...) +#else +/*VARARGS4*/ +void XtVaGetApplicationResources(widget, base, resources, num_resources, va_alist) + Widget widget; + XtPointer base; + XtResourceList resources; + Cardinal num_resources; + va_dcl +#endif +</programlisting> +</para> +<para> +One problem with the conditional-compilation was +that it was easy to make a mistake with the order +of parameters between the two forms. +Developers would frequently group together parameters +which used the same type, whether or not they were adjacent in +the Standard C prototype. +</para> +<para> +A comment in the X11R4 header file said that this was temporary, +until function prototypes worked everywhere. +That was finally removed in X11R6.7 (fourteen years later). +However, the subsequent conversion to sgml +lost the ellipsis from the prototypes shown in the specification. +</para> +</listitem> +</itemizedlist> +<para> +Support for K&R C was removed from the header files in 2003 +(released in X11R6.7), +and from the library source in 2004 +(released in X11R6.9). +The wide-prototype feature is still present in 2019, but generally unused. +</para> +<para> +Removing support for K&R C did not address the issues of <type>const</type>. +That was done in 2019: +</para> +<itemizedlist> +<listitem> +<para> +The <type>String</type> is conditionally defined, +to provide compatibility with existing applications. +</para> +</listitem> +<listitem> +<para> +If the symbol <symbol>_CONST_X_STRING</symbol> is defined, +<type>String</type> is read-only as shown here. +<programlisting> +/* + * As used in its function interface, the String type of libXt can be readonly. + * But compiling libXt with this feature may require some internal changes, + * e.g., casts and occasionally using a plain "char*". + */ +#ifdef _CONST_X_STRING +typedef const char *String; +#else +typedef char *String; +#endif +</programlisting> +</para> +</listitem> +<listitem> +<para> +Applications which use the newer <type>const</type> feature must define +<symbol>_CONST_X_STRING</symbol> to enable this feature. +</para> +</listitem> +<listitem> +<para> +By default, the X Toolkit Intrinsics library +uses the <type>const</type> feature. +It has been updated to make use of the <type>const</type> feature +for improved type-checking. +</para> +</listitem> +<listitem> +<para> +Because the X Toolkit Intrinsics library uses <type>const</type>, +some prototypes have been modified. +For example: +<itemizedlist> +<listitem> +<para> +Most of the parameters which used <type>String</type> are unmodified; +a few (such as the <emphasis remap='I'>argv</emphasis>–parameters) +are actually read/write. +They are now <type>char*</type> parameters. +</para> +<para> +Many of the strings passed to the library are stored in widgets +without reallocating a copy. +Those are treated as read-only, and use the <type>String</type> type. +</para> +</listitem> +<listitem> +<para> +Each change to the documentation was verified using scripts that +extracted the function prototypes and used the C compiler to check +for compatibility. +</para> +</listitem> +</itemizedlist> +</para> +</listitem> +</itemizedlist> +</sect2> +</sect1> </chapter> diff --git a/lib/libXt/specs/Makefile.in b/lib/libXt/specs/Makefile.in index 977f3c222..d77e619ca 100644 --- a/lib/libXt/specs/Makefile.in +++ b/lib/libXt/specs/Makefile.in @@ -67,7 +67,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/docbook.am + $(srcdir)/Makefile.in $(srcdir)/libXt.ent.in \ + $(top_srcdir)/docbook.am @ENABLE_SPECS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(docbook:.xml=.html) @ENABLE_SPECS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(docbook:.xml=.txt) @ENABLE_SPECS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(docbook:.xml=.pdf) \ @@ -84,7 +85,7 @@ 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_FILES = libXt.ent CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -425,6 +426,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +libXt.ent: $(top_builddir)/config.status $(srcdir)/libXt.ent.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo diff --git a/lib/libXt/specs/acknowledgement.xml b/lib/libXt/specs/acknowledgement.xml index ea25a5a49..cabfa691a 100644 --- a/lib/libXt/specs/acknowledgement.xml +++ b/lib/libXt/specs/acknowledgement.xml @@ -1,7 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <!-- <acknowledgements> --> <dedication> <title>Acknowledgments</title> + +<note> +<title>Acknowledgments for X11R7</title> +<para> +This update to the X11 Intrinsics drops support for K&R C, +as well as improving its use of Standard C features, +notably <type>const</type>. +</para> +<itemizedlist> +<listitem> +<para> +Matt Dew did the initial conversion of this specification from nroff to DocBook. +</para> +<para> +Later, I expanded on that, improving the formatting, as +well as updating the function prototypes in the specification +as well as the related manual pages. +</para> +</listitem> +<listitem> +<para> +Matthieu Herrb modified the Intrinsics header files to drop support +for K&R C, leaving the Standard C prototypes. +</para> +<para> +Later, he applied my changes to complete the conversion of the +library source from a mixture of K&R C and Standard C to +just use the standard language features. +</para> +</listitem> +<listitem> +<para> +Others (including +Alan Coopersmith, +Gaetan Nadon, +Walter Harms, +and Kevin E. Martin) have worked to +maintain the library's build-scripts and documentation. +</para> +</listitem> +</itemizedlist> +<literallayout> +Thomas E. Dickey +invisible-island.net +April 2019 +</literallayout> +</note> + +<note> +<title>Acknowledgments for X11R6</title> + <para> The design of the X11 Intrinsics was done primarily by Joel McCormack of Digital WSL. Major contributions to the design and implementation @@ -86,7 +140,7 @@ The design and implementation of the X10 Intrinsics were done by: <!-- </sidebar> --> <para> -The design and implementation of the X10 toolkit’s sample widgets were by +The design and implementation of the X10 toolkit’s sample widgets were by the above, as well as by: </para> @@ -119,7 +173,7 @@ the above, as well as by: These widgets provided a checklist of requirements that we had to address in the X11 Intrinsics. </para> <para> -Thanks go to Al Mento of Digital’s UEG Documentation Group for formatting and generally +Thanks go to Al Mento of Digital’s UEG Documentation Group for formatting and generally improving this document and to John Ousterhout of Berkeley for extensively reviewing early drafts of it. </para> @@ -154,7 +208,7 @@ to the Intrinsics: <tbody> <row> <entry>Steve Pitschke (Stellar)</entry> - <entry>C.Doug Blewett (AT&T)</entry> + <entry>C. Doug Blewett (AT&T)</entry> </row> <row> <entry>Bob Miller (HP)</entry> @@ -166,7 +220,7 @@ to the Intrinsics: </row> <row> <entry>Marcel Meth (AT&T)</entry> - <entry>JimFulton (MIT)</entry> + <entry>Jim Fulton (MIT)</entry> </row> <row> <entry>Mike Collins (Digital)</entry> @@ -182,7 +236,7 @@ to the Intrinsics: </row> <row> <entry>Gabriel Beged-Dov (HP)</entry> - <entry>GlennWidener (Tektronix)</entry> + <entry>Glenn Widener (Tektronix)</entry> </row> </tbody> </tgroup> @@ -219,7 +273,7 @@ code contributed by each of the following: <tbody> <row> <entry>Don Alecci (AT&T)</entry> - <entry>EllisCohen (OSF)</entry> + <entry>Ellis Cohen (OSF)</entry> </row> <row> <entry>Donna Converse (MIT)</entry> @@ -246,7 +300,7 @@ code contributed by each of the following: <para> In Release 5, the effort to define the internationalization additions was headed by Bill McMahon of Hewlett Packard and Frank Rojas of IBM. This has been an educational process for many of -us, and Bill and Frank’s tutelage has carried us through. Vania Joloboff of the OSF also contributed +us, and Bill and Frank’s tutelage has carried us through. Vania Joloboff of the OSF also contributed to the internationalization additions. The implementation efforts of Bill, Gabe Beged-Dov, and especially Donna Converse for this release are also gratefully acknowledged. </para> @@ -259,7 +313,7 @@ July 1991 </literallayout> <para> -The Release 6 Intrinsics is a result of the collaborative efforts of participants in the X Consortium’s +The Release 6 Intrinsics is a result of the collaborative efforts of participants in the X Consortium’s intrinsics working group. A few individuals contributed substantial design proposals, participated in lengthy discussions, reviewed final specifications, and in most cases, were also responsible for sections of the implementation. They deserve recognition and thanks for their @@ -284,7 +338,7 @@ major contributions: </row> <row> <entry>Vania Joloboff (OSF)</entry> - <entry>KalebKeithley (X Consortium)</entry> + <entry>Kaleb Keithley (X Consortium)</entry> </row> <row> <entry>Courtney Loomis (HP)</entry> @@ -319,5 +373,6 @@ Donna Converse X Consortium April 1994 </literallayout> +</note> </dedication> <!-- </acknowledgements> --> diff --git a/lib/libXt/specs/appA.xml b/lib/libXt/specs/appA.xml index daf40eb3c..76454dea0 100644 --- a/lib/libXt/specs/appA.xml +++ b/lib/libXt/specs/appA.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Resource_File_Format'> <title>Resource File Format</title> <para> @@ -7,7 +10,7 @@ application or set of applications. <para> The format of resource files is defined by -<emphasis remap='I'>Xlib — C Language X Interface.</emphasis> and is reproduced here +<emphasis remap='I'>Xlib — C Language X Interface.</emphasis> and is reproduced here for convenience only. </para> @@ -24,11 +27,11 @@ for convenience only. </row> <row> <entry>Comment</entry> - <entry>="!" {<any character except null or newline>}</entry> + <entry>=“!” {<any character except null or newline>}</entry> </row> <row> <entry>IncludeFile</entry> - <entry>= "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace</entry> + <entry>= “#” WhiteSpace “include” WhiteSpace FileName WhiteSpace</entry> </row> <row> <entry>FileName</entry> @@ -36,7 +39,7 @@ for convenience only. </row> <row> <entry>ResourceSpec</entry> - <entry>= WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value</entry> + <entry>= WhiteSpace ResourceName WhiteSpace “:” WhiteSpace Value</entry> </row> <row> <entry>ResourceName</entry> @@ -44,7 +47,7 @@ for convenience only. </row> <row> <entry>Binding</entry> - <entry>="." | "*"</entry> + <entry>=“.” | “*”</entry> </row> <row> <entry>WhiteSpace</entry> @@ -52,7 +55,7 @@ for convenience only. </row> <row> <entry>Component</entry> - <entry>= "?" | ComponentName</entry> + <entry>= “?” | ComponentName</entry> </row> <row> <entry>ComponentName</entry> @@ -60,7 +63,7 @@ for convenience only. </row> <row> <entry>NameChar</entry> - <entry>= "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-"</entry> + <entry>= “a”–“z” | “A”–“Z” | “0”–“9” | “_” | “-”</entry> </row> <row> <entry>Value</entry> @@ -75,7 +78,7 @@ Elements separated by vertical bar (|) are alternatives. Curly braces ({...}) indicate zero or more repetitions of the enclosed elements. Square brackets ([...]) indicate that the enclosed element is optional. -Quotes ("...") are used around literal characters. +Quotes (“...”) are used around literal characters. </para> <para> @@ -85,28 +88,28 @@ that line is assumed to continue on the next line. <para> To allow a Value to begin with whitespace, -the two-character sequence "\<emphasis remap='I'>space</emphasis>" (backslash followed by space) +the two-character sequence “\<emphasis remap='I'>space</emphasis>” (backslash followed by space) is recognized and replaced by a space character, -and the two-character sequence "\<emphasis remap='I'>tab</emphasis>" +and the two-character sequence “\<emphasis remap='I'>tab</emphasis>” (backslash followed by horizontal tab) is recognized and replaced by a horizontal tab character. </para> <para> To allow a Value to contain embedded newline characters, -the two-character sequence "\n" is recognized and replaced by a +the two-character sequence “\n” is recognized and replaced by a newline character. To allow a Value to be broken across multiple lines in a text file, -the two-character sequence "\<emphasis remap='I'>newline</emphasis>" +the two-character sequence “\<emphasis remap='I'>newline</emphasis>” (backslash followed by newline) is recognized and removed from the value. </para> <para> To allow a Value to contain arbitrary character codes, -the four-character sequence "\<emphasis remap='I'>nnn</emphasis>", -where each <emphasis remap='I'>n</emphasis> is a digit character in the range of "0"-"7", +the four-character sequence “\<emphasis remap='I'>nnn</emphasis>”, +where each <emphasis remap='I'>n</emphasis> is a digit character in the range of “0”–“7”, is recognized and replaced with a single byte that contains the octal value specified by the sequence. -Finally, the two-character sequence "\\" is recognized +Finally, the two-character sequence “\\” is recognized and replaced with a single backslash. </para> </appendix> diff --git a/lib/libXt/specs/appB.xml b/lib/libXt/specs/appB.xml index 0afac11e0..059374668 100644 --- a/lib/libXt/specs/appB.xml +++ b/lib/libXt/specs/appB.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Translation_Table_Syntax'> <title>Translation Table Syntax</title> <para><emphasis role='strong'>Notation</emphasis></para> @@ -14,15 +17,15 @@ Syntax is specified in EBNF notation with the following conventions: <tbody> <row> <entry>[ a ]</entry> - <entry>Means either nothing or "a"</entry> + <entry>Means either nothing or “a”</entry> </row> <row> <entry>{ a }</entry> - <entry>Means zero or more occurrences of "a"</entry> + <entry>Means zero or more occurrences of “a”</entry> </row> <row> <entry>( a | b )</entry> - <entry>Means either "a" or "b"</entry> + <entry>Means either “a” or “b”</entry> </row> <row> <entry>\\n</entry> @@ -33,7 +36,7 @@ Syntax is specified in EBNF notation with the following conventions: </informaltable> <para> -All terminals are enclosed in double quotation marks (" "). +All terminals are enclosed in double quotation marks (" "). Informal descriptions are enclosed in angle brackets (< >). Syntax </para> @@ -51,43 +54,43 @@ Syntax </row> <row> <entry>directive</entry> - <entry>= ( "#replace" | "#override" | "#augment" ) "\\\\n"</entry> + <entry>= ( “#replace” | “#override” | “#augment” ) “\\n”</entry> </row> <row> <entry>production</entry> - <entry>= lhs ":" rhs "\\\\n"</entry> + <entry>= lhs “:” rhs “\\n”</entry> </row> <row> <entry>lhs</entry> - <entry>= ( event | keyseq ) { "," (event | keyseq) }</entry> + <entry>= ( event | keyseq ) { “,” (event | keyseq) }</entry> </row> <row> <entry>keyseq</entry> - <entry>= """ keychar {keychar} """</entry> + <entry>= “"” keychar {keychar} “"”</entry> </row> <row> <entry>keychar</entry> - <entry>= [ "^" | "$" | "\\\\" ] <ISO Latin 1 character></entry> + <entry>= [ “^” | “$” | “\\” ] <ISO Latin 1 character></entry> </row> <row> <entry>event</entry> - <entry>= [modifier_list] "<"event_type">" [ "(" count["+"] ")" ] {detail}</entry> + <entry>= [modifier_list] “<”event_type“>” [ “(” count[“+”] “)” ] {detail}</entry> </row> <row> <entry>modifier_list</entry> - <entry>= ( ["!"] [":"] {modifier} ) | "None"</entry> + <entry>= ( [“!”] [“:”] {modifier} ) | “None”</entry> </row> <row> <entry>modifier</entry> - <entry>= ["~"] modifier_name</entry> + <entry>= [“~”] modifier_name</entry> </row> <row> <entry>count</entry> - <entry>= ("1" | "2" | "3" | "4" | ...)</entry> + <entry>= (“1” | “2” | “3” | “4” | ...)</entry> </row> <row> <entry>modifier_name</entry> - <entry>= "@" <keysym> | <see ModifierNames table below></entry> + <entry>= “@” <keysym> | <see ModifierNames table below></entry> </row> <row> <entry>event_type</entry> @@ -99,7 +102,7 @@ Syntax </row> <row> <entry>rhs</entry> - <entry>= { name "(" [params] ")" }</entry> + <entry>= { name “(” [params] “)” }</entry> </row> <row> <entry>name</entry> @@ -107,11 +110,11 @@ Syntax </row> <row> <entry>namechar</entry> - <entry>= { "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-" }</entry> + <entry>= { “a”–“z” | “A”–“Z” | “0”–“9” | “_” | “–” }</entry> </row> <row> <entry>params</entry> - <entry>= string {"," string}</entry> + <entry>= string {“,” string}</entry> </row> <row> <entry>string</entry> @@ -119,15 +122,15 @@ Syntax </row> <row> <entry>quoted_string</entry> - <entry>= <quote>"</quote> {<Latin 1 character> | escape_char} ["\\\\" ] <quote>"</quote></entry> + <entry>= <quote>"</quote> {<Latin 1 character> | escape_char} [“\\"” ] <quote>"</quote></entry> </row> <row> <entry>escape_char</entry> - <entry>= "\\""</entry> + <entry>= “\\"”</entry> </row> <row> <entry>unquoted_string</entry> - <entry>= {<Latin 1 character except space, tab, ",", "\\n", ")">}</entry> + <entry>= {<Latin 1 character except space, tab, “,”, “\\n”, “)”>}</entry> </row> </tbody> </tgroup> @@ -139,8 +142,8 @@ The <emphasis remap='I'>params</emphasis> field is parsed into a list of values that will be passed to the named action procedure. A <emphasis remap='I'>quoted string</emphasis> may contain an embedded quotation mark if the quotation mark is preceded by a single backslash (\). The -three-character sequence "\\\"" is interpreted as "single backslash -followed by end-of-string". +three-character sequence “\\"” is interpreted as “single backslash +followed by end-of-string”. </para> <para><emphasis role='strong'>Modifier Names</emphasis></para> @@ -163,8 +166,8 @@ that contains modifiers for any other events is parsed. <itemizedlist spacing='compact'> <listitem> <para> -If the modifier list has no entries and is not "None", -it means "don't care" on all modifiers. +If the modifier list has no entries and is not “None”, +it means “don't care” on all modifiers. </para> </listitem> <listitem> @@ -180,7 +183,7 @@ and no other modifiers can be asserted. If any modifiers are specified and an exclamation point (!) is not specified, it means that the listed modifiers must be in the -correct state and "don't care" about any other modifiers. +correct state and “don't care” about any other modifiers. </para> </listitem> <listitem> @@ -191,7 +194,7 @@ it means that that modifier must not be asserted. </listitem> <listitem> <para> -If "None" is specified, it means no modifiers can be asserted. +If “None” is specified, it means no modifiers can be asserted. </para> </listitem> <listitem> @@ -205,8 +208,8 @@ System Protocol</emphasis>, Section 5. The resulting KeySym must exactly match the specified KeySym, and the nonstandard modifiers in the event must match the modifier list. -For example, ":<Key>a" is distinct from ":<Key>A", -and ":Shift<Key>A" is distinct from ":<Key>A". +For example, “:<Key>a” is distinct from “:<Key>A”, +and “:Shift<Key>A” is distinct from “:<Key>A”. </para> </listitem> <listitem> @@ -222,7 +225,7 @@ modifiers in the event are applied as for colon (:) above. <para> If a colon (:) is not specified, no standard modifiers are applied. -Then, for example, "<Key>A" and "<Key>a" are equivalent. +Then, for example, “<Key>A” and “<Key>a” are equivalent. </para> </listitem> </itemizedlist> @@ -237,15 +240,15 @@ a dollar sign ($), and another backslash (\). Briefly: </para> -<literallayout > -No modifiers: None <event> detail -Any modifiers: <event> detail -Only these modifiers: ! mod1 mod2 <event> detail -These modifiers and any others: mod1 mod2 <event> detail -</literallayout> +<programlisting> +No modifiers: None <event> detail +Any modifiers: <event> detail +Only these modifiers: ! mod1 mod2 <event> detail +These modifiers and any others: mod1 mod2 <event> detail +</programlisting> <para> -The use of "None" for a modifier list is identical to the use +The use of “None” for a modifier list is identical to the use of an exclamation point with no modifers. </para> @@ -366,7 +369,7 @@ of an exclamation point with no modifers. A key modifier is any modifier bit one of whose corresponding KeyCodes contains the corresponding left or right KeySym. For example, -"m" or "Meta" means any modifier bit mapping to a KeyCode +“m” or “Meta” means any modifier bit mapping to a KeyCode whose KeySym list contains XK_Meta_L or XK_Meta_R. Note that this interpretation is for each display, not global or even for each application context. @@ -377,7 +380,7 @@ there is no additional interpretation of KeySyms for these modifiers. <para> Because it is possible to associate arbitrary KeySyms with modifiers, the set of -key modifiers is extensible. The "@" <keysym> syntax means any +key modifiers is extensible. The “@” <keysym> syntax means any modifier bit whose corresponding KeyCode contains the specified KeySym name. </para> @@ -820,15 +823,15 @@ accepted as a match. <para> A KeySym can be specified as any of the standard KeySym names, -a hexadecimal number prefixed with "0x" or "0X", -an octal number prefixed with "0", or a decimal number. +a hexadecimal number prefixed with “0x” or “0X”, +an octal number prefixed with “0”, or a decimal number. A KeySym expressed as a single digit is interpreted as the -corresponding Latin 1 KeySym, for example, "0" is the KeySym XK_0. +corresponding Latin 1 KeySym, for example, “0” is the KeySym XK_0. Other single character KeySyms are treated as literal constants from Latin 1, -for example, "!" is treated as 0x21. +for example, “!” is treated as 0x21. Standard KeySym names are as defined in -<function><X11/keysymdef.h></function> -with the "XK_" prefix removed. +<filename><X11/keysymdef.h></filename> +with the “XK_” prefix removed. </para> <para><emphasis role='strong'>Canonical Representation</emphasis></para> @@ -839,7 +842,7 @@ representation is passed to a widget's <function>display_accelerator</function> procedure to describe the accelerators installed on that widget. The canonical representation of a translation table is (see also -"Syntax") +“Syntax”) </para> <informaltable frame='none'> @@ -855,37 +858,37 @@ The canonical representation of a translation table is (see also </row> <row> <entry>production</entry> - <entry>= lhs ":" rhs "\\n" + <entry>= lhs “:” rhs “\\n” </entry> </row> <row> <entry>lhs</entry> - <entry>=event { "," event } + <entry>=event { “,” event } </entry> </row> <row> <entry>event</entry> - <entry>=[modifier_list] "<"event_type">" [ "(" count["+"] ")" ] {detail} + <entry>=[modifier_list] “<”event_type“>” [ “(” count[“+”] “)” ] {detail} </entry> </row> <row> <entry>modifier_list</entry> - <entry>= ["!"] [":"] {modifier} + <entry>= [“!”] [“:”] {modifier} </entry> </row> <row> <entry>modifier</entry> - <entry>= ["Ëœ"] modifier_name + <entry>= [“~”] modifier_name </entry> </row> <row> <entry>count</entry> - <entry>=("1" | "2" | "3" | "4" | ...) + <entry>=(“1” | “2” | “3” | “4” | ...) </entry> </row> <row> <entry>modifier_name</entry> - <entry>= "@" <keysym> | <see canonical modifier names below> + <entry>= “@” <keysym> | <see canonical modifier names below> </entry> </row> <row> @@ -900,7 +903,7 @@ The canonical representation of a translation table is (see also </row> <row> <entry>rhs</entry> - <entry>={ name "(" [params] ")" } + <entry>={ name “(” [params] “)” } </entry> </row> <row> @@ -910,12 +913,12 @@ The canonical representation of a translation table is (see also </row> <row> <entry>namechar</entry> - <entry>= { "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-" } + <entry>= { “a”–“z” | “A”–“Z” | “0”–“9” | “_” | “-” } </entry> </row> <row> <entry>params</entry> - <entry>=string {"," string} + <entry>=string {“,” string} </entry> </row> <row> @@ -925,12 +928,12 @@ The canonical representation of a translation table is (see also </row> <row> <entry>quoted_string</entry> - <entry>= <quote>"</quote> {<Latin 1 character> | escape_char} ["\\\\" ] <quote>"</quote> + <entry>= <quote>"</quote> {<Latin 1 character> | escape_char} [“\\"” ] <quote>"</quote> </entry> </row> <row> <entry>escape_char</entry> - <entry>= "\\"" + <entry>= “\\"” </entry> </row> </tbody> @@ -939,13 +942,13 @@ The canonical representation of a translation table is (see also <para>The canonical modifier names are</para> -<literallayout > +<programlisting> Ctrl Mod1 Button1 Shift Mod2 Button2 Lock Mod3 Button3 Mod4 Button4 Mod5 Button5 -</literallayout> +</programlisting> <para>The canonical event types are</para> @@ -1030,53 +1033,53 @@ The canonical representation of a translation table is (see also <para> Always put more specific events in the table before more general ones: </para> -<literallayout > +<programlisting> Shift <Btn1Down> : twas()\n\ <Btn1Down> : brillig() -</literallayout> +</programlisting> </listitem> <listitem> <para> For double-click on Button1 Up with Shift, use this specification: </para> - <literallayout > +<programlisting> Shift<Btn1Up>(2) : and() -</literallayout> +</programlisting> </listitem> <listitem> <para> This is equivalent to the following line with appropriate timers set between events: </para> - <literallayout > +<programlisting> Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>,Shift<Btn1Up> : and() -</literallayout> +</programlisting> </listitem> <listitem> <para> For double-click on Button1 Down with Shift, use this specification: </para> - <literallayout > +<programlisting> Shift<Btn1Down>(2) : the() -</literallayout> +</programlisting> </listitem> <listitem> <para> This is equivalent to the following line with appropriate timers set between events: </para> - <literallayout > +<programlisting> Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the() -</literallayout> +</programlisting> </listitem> <listitem> <para> Mouse motion is always discarded when it occurs between events in a table where no motion event is specified: </para> - <literallayout > +<programlisting> <Btn1Down>,<Btn1Up> : slithy() -</literallayout> +</programlisting> <para> This is taken, even if the pointer moves a bit between the down and up events. @@ -1093,10 +1096,10 @@ noninitial subsequence of another translation, it is not taken if it occurs in the context of the longer sequence. This occurs mostly in sequences like the following: </para> - <literallayout > +<programlisting> <Btn1Down>,<Btn1Up> : toves()\n\ <Btn1Up> : did() -</literallayout> +</programlisting> <para> The second translation is taken only if the button release is not preceded by a button press or if there are intervening events between the @@ -1117,9 +1120,9 @@ For single click on Button1 Up with Shift and Meta, use this specification: </para> </listitem> <listitem> - <literallayout > +<programlisting> Shift Meta <Btn1Down>, Shift Meta<Btn1Up>: gyre() -</literallayout> +</programlisting> </listitem> <listitem> <para> @@ -1129,9 +1132,9 @@ count in an event sequence. The actions will be invoked on the <emphasis remap='I'>count</emphasis>-th click and each subsequent one arriving within the multi-click time interval. For example: </para> - <literallayout > +<programlisting> Shift <Btn1Up>(2+) : and() -</literallayout> +</programlisting> </listitem> <listitem> <para> @@ -1139,9 +1142,9 @@ To indicate <function>EnterNotify</function> with any modifiers, use this specification: </para> - <literallayout > +<programlisting> <Enter> : gimble() -</literallayout> +</programlisting> </listitem> <listitem> <para> @@ -1149,20 +1152,20 @@ To indicate <function>EnterNotify</function> with no modifiers, use this specification: </para> - <literallayout > +<programlisting> None <Enter> : in() -</literallayout> +</programlisting> </listitem> <listitem> <para> To indicate <function>EnterNotify</function> -with Button1 Down and Button2 Up and "don't care" about +with Button1 Down and Button2 Up and “don't care” about the other modifiers, use this specification: </para> - <literallayout > +<programlisting> Button1 ~Button2 <Enter> : the() -</literallayout> +</programlisting> </listitem> <listitem> <para> @@ -1170,9 +1173,9 @@ To indicate <function>EnterNotify</function> with Button1 down and Button2 down exclusively, use this specification: </para> - <literallayout > +<programlisting> ! Button1 Button2 <Enter> : wabe() -</literallayout> +</programlisting> <para> You do not need to use a tilde (~) with an exclamation point (!). </para> diff --git a/lib/libXt/specs/appC.xml b/lib/libXt/specs/appC.xml index 4598ac99e..048258d77 100644 --- a/lib/libXt/specs/appC.xml +++ b/lib/libXt/specs/appC.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Compability_Functions'> <title>Compatibility Functions <footnote> @@ -43,10 +46,10 @@ you could define the macro as: </para> -<literallayout> +<programlisting> #define XtLabelCreate(name, parent, args, num_args) \ ((LabelWidget) XtCreateWidget(name, labelWidgetClass, parent, args, num_args)) -</literallayout> +</programlisting> <para> Pop-up shells in some of the prototypes automatically performed an @@ -80,12 +83,12 @@ or <funcprototype> <funcdef>Widget <function>XtAppInitialize</function></funcdef> <paramdef>XtAppContext *<parameter>app_context_return</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescList <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int *<parameter>argc_in_out</parameter></paramdef> - <paramdef>String *<parameter>argv_in_out</parameter></paramdef> - <paramdef>String *<parameter>fallback_resources</parameter></paramdef> + <paramdef>char ** <parameter>argv_in_out</parameter></paramdef> + <paramdef>String * <parameter>fallback_resources</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> </funcprototype> @@ -199,7 +202,7 @@ with <emphasis remap='I'>display_string</emphasis> NULL and <emphasis remap='I'>application_name</emphasis> NULL, and finally calls <xref linkend='XtAppCreateShell' xrefstyle='select: title'/> with <emphasis remap='I'>application_name</emphasis> NULL, <emphasis remap='I'>widget_class</emphasis> -<function>application\%Shell\%Widget\%Class</function>, +<function>applicationShellWidgetClass</function>, and the specified <emphasis remap='I'>args</emphasis> and <emphasis remap='I'>num_args</emphasis> and returns the created shell. The modified <emphasis remap='I'>argc</emphasis> and <emphasis remap='I'>argv</emphasis> returned by <xref linkend='XtDisplayInitialize' xrefstyle='select: title'/> @@ -218,12 +221,13 @@ is called with the value prior to calling <funcprototype> <funcdef>Widget <function>XtVaAppInitialize</function></funcdef> <paramdef>XtAppContext *<parameter>app_context_return</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> <paramdef>XrmOptionDescList <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> <paramdef>int *<parameter>argc_in_out</parameter></paramdef> - <paramdef>String *<parameter>argv_in_out</parameter></paramdef> - <paramdef>String *<parameter>fallback_resources</parameter></paramdef> + <paramdef>char ** <parameter>argv_in_out</parameter></paramdef> + <paramdef>String * <parameter>fallback_resources</parameter></paramdef> + <paramdef>...</paramdef> </funcprototype> </funcsynopsis> @@ -344,12 +348,12 @@ and <funcsynopsis id='XtInitialize'> <funcprototype> <funcdef>Widget <function>XtInitialize</function></funcdef> - <paramdef>String <parameter>shell_name</parameter></paramdef> - <paramdef>String <parameter>application_class</parameter></paramdef> - <paramdef>XrmOptionDescRec <parameter>options</parameter></paramdef> + <paramdef>const char * <parameter>shell_name</parameter></paramdef> + <paramdef>const char * <parameter>application_class</parameter></paramdef> + <paramdef>XrmOptionDescRec * <parameter>options</parameter></paramdef> <paramdef>Cardinal <parameter>num_options</parameter></paramdef> - <paramdef>int *<parameter>argc</parameter></paramdef> - <paramdef>String <parameter>argv</parameter></paramdef> + <paramdef>int * <parameter>argc</parameter></paramdef> + <paramdef>char ** <parameter>argv</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -560,7 +564,7 @@ must be called before using this routine. <funcsynopsis id='XtPending'> <funcprototype> <funcdef>Boolean <function>XtPending</function></funcdef> - <paramdef><parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -748,7 +752,7 @@ must be called before using this routine. <funcsynopsis id='XtCreateApplicationShell'> <funcprototype> <funcdef>Widget <function>XtCreateApplicationShell</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> <paramdef>WidgetClass <parameter>widget_class</parameter></paramdef> <paramdef>ArgList <parameter>args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> @@ -932,7 +936,8 @@ that convert from strings. <funcsynopsis id='XtStringConversionWarning'> <funcprototype> <funcdef>void <function>XtStringConversionWarning</function></funcdef> - <paramdef>String <parameter>src</parameter></paramdef> + <paramdef>const char * <parameter>src</parameter></paramdef> + <paramdef>const char * <parameter>dst_type</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -962,9 +967,9 @@ Specifies the name of the type to which the string could not be converted. <para> The <xref linkend='XtStringConversionWarning' xrefstyle='select: title'/> -function issues a warning message with name "conversionError", -type "string", class "XtToolkitError, and the default message string -"Cannot convert "<emphasis remap='I'>src</emphasis>" to type <emphasis remap='I'>dst_type</emphasis>". This routine +function issues a warning message with name “conversionError”, +type “string”, class “XtToolkitError”, and the default message string +“Cannot convert "<emphasis remap='I'>src</emphasis>" to type <emphasis remap='I'>dst_type</emphasis>”. This routine has been superseded by <xref linkend='XtDisplayStringConversionWarning' xrefstyle='select: title'/>. </para> @@ -979,8 +984,8 @@ or <funcsynopsis id='XtAddConverter'> <funcprototype> <funcdef>void <function>XtAddConverter</function></funcdef> - <paramdef>String <parameter>from_type</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XtConverter <parameter>converter</parameter></paramdef> <paramdef>XtConvertArgList <parameter>convert_args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> @@ -1054,8 +1059,8 @@ for old-format type converters. It has been superseded by <funcprototype> <funcdef>void <function>XtAppAddConverter</function></funcdef> <paramdef>XtAppContext <parameter>app_context</parameter></paramdef> - <paramdef>String <parameter>from_type</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XtConverter <parameter>converter</parameter></paramdef> <paramdef>XtConvertArgList <parameter>convert_args</parameter></paramdef> <paramdef>Cardinal <parameter>num_args</parameter></paramdef> @@ -1146,9 +1151,9 @@ or, for old-format converters only, <funcprototype> <funcdef>void <function>XtConvert</function></funcdef> <paramdef>Widget <parameter>w</parameter></paramdef> - <paramdef>String <parameter>from_type</parameter></paramdef> + <paramdef>const char * <parameter>from_type</parameter></paramdef> <paramdef>XrmValuePtr <parameter>from</parameter></paramdef> - <paramdef>String <parameter>to_type</parameter></paramdef> + <paramdef>const char * <parameter>to_type</parameter></paramdef> <paramdef>XrmValuePtr <parameter>to_return</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1453,7 +1458,7 @@ context, use <funcsynopsis id='XtGetSelectionTimeout'> <funcprototype> <funcdef>unsigned long <function>XtGetSelectionTimeout</function></funcdef> - <paramdef><parameter></parameter></paramdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1479,18 +1484,18 @@ an application- or widget-specific database), use <funcsynopsis id='XtGetErrorDatabase'> <funcprototype> -<funcdef>XrmDatabase <function>*XtGetErrorDatabase</function></funcdef> - <paramdef><parameter></parameter></paramdef> +<funcdef>XrmDatabase *<function>XtGetErrorDatabase</function></funcdef> + <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> - + <para> The <xref linkend='XtGetErrorDatabase' xrefstyle='select: title'/> function returns the address of the error database. The Intrinsics do a lazy binding of the error database and do not merge in the database file until the first call to -<function>XtGetErrorDatbaseText</function>. +<function>XtGetErrorDatabaseText</function>. This routine has been replaced by <xref linkend='XtAppGetErrorDatabase' xrefstyle='select: title'/>. </para> @@ -1504,9 +1509,11 @@ error or a warning by calling <funcsynopsis id='XtGetErrorDatabaseText'> <funcprototype> <funcdef>void <function>XtGetErrorDatabaseText</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> - <paramdef>String <parameter>buffer_return</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> + <paramdef>char * <parameter>buffer_return</parameter></paramdef> <paramdef>int <parameter>nbytes</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1581,9 +1588,9 @@ associated with the default application context or returns the specified default message if one is not found in the error database. To form the full resource name and class when querying the database, -the <emphasis remap='I'>name</emphasis> and <emphasis remap='I'>type</emphasis> are concatenated with a single "." +the <emphasis remap='I'>name</emphasis> and <emphasis remap='I'>type</emphasis> are concatenated with a single “.” between them and the <emphasis remap='I'>class</emphasis> is concatenated with itself with a -single "." if it does not already contain a ".". +single “.” if it does not already contain a “.”. This routine has been superseded by <xref linkend='XtAppGetErrorDatabaseText' xrefstyle='select: title'/>. </para> @@ -1632,10 +1639,10 @@ To call the high-level error handler, use <funcsynopsis id='XtErrorMsg'> <funcprototype> <funcdef>void <function>XtErrorMsg</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>type</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> <paramdef>String *<parameter>params</parameter></paramdef> <paramdef>Cardinal *<parameter>num_params</parameter></paramdef> </funcprototype> @@ -1750,10 +1757,10 @@ To call the installed high-level warning handler, use <funcsynopsis id='XtWarningMsg'> <funcprototype> <funcdef>void <function>XtWarningMsg</function></funcdef> - <paramdef>String <parameter>name</parameter></paramdef> - <paramdef>String <parameter>type</parameter></paramdef> - <paramdef>String <parameter>class</parameter></paramdef> - <paramdef>String <parameter>default</parameter></paramdef> + <paramdef>const char * <parameter>name</parameter></paramdef> + <paramdef>const char * <parameter>type</parameter></paramdef> + <paramdef>const char * <parameter>class</parameter></paramdef> + <paramdef>const char * <parameter>default</parameter></paramdef> <paramdef>String *<parameter>params</parameter></paramdef> <paramdef>Cardinal *<parameter>num_params</parameter></paramdef> </funcprototype> @@ -1872,7 +1879,7 @@ To call the installed fatal error procedure, use <funcsynopsis id='XtError'> <funcprototype> <funcdef>void <function>XtError</function></funcdef> - <paramdef>String <parameter>message</parameter></paramdef> + <paramdef>const char * <parameter>message</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1941,7 +1948,7 @@ To call the installed nonfatal error procedure, use <funcsynopsis id='XtWarning'> <funcprototype> <funcdef>void <function>XtWarning</function></funcdef> - <paramdef>String <parameter>message</parameter></paramdef> + <paramdef>const char * <parameter>message</parameter></paramdef> </funcprototype> </funcsynopsis> diff --git a/lib/libXt/specs/appD.xml b/lib/libXt/specs/appD.xml index 00acbe79e..a7ac68180 100644 --- a/lib/libXt/specs/appD.xml +++ b/lib/libXt/specs/appD.xml @@ -1,9 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Intrinsics_Error_Messages'> <title>Intrinsics Error Messages</title> <para> All Intrinsics errors and warnings have class -``XtToolkitError''. +“XtToolkitError”. The following two tables summarize the common errors and warnings that can be generated by the Intrinsics. Additional implementation-dependent messages are permitted. diff --git a/lib/libXt/specs/appE.xml b/lib/libXt/specs/appE.xml index 574cf1534..6c309646f 100644 --- a/lib/libXt/specs/appE.xml +++ b/lib/libXt/specs/appE.xml @@ -1,8 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Defined_Strings'> <title>Defined Strings</title> <para> -The <function>StringDefs.h</function> +The <filename class="headerfile">StringDefs.h</filename> header file contains definitions for the following resource name, class, and representation type symbolic constants. </para> @@ -309,10 +312,6 @@ class, and representation type symbolic constants. <entry>"sensitive"</entry> </row> <row> - <entry>XtNsession</entry> - <entry>"session"</entry> - </row> - <row> <entry>XtNshells</entry> <entry>"shells"</entry> </row> @@ -626,10 +625,6 @@ class, and representation type symbolic constants. <entry>"Sensitive"</entry> </row> <row> - <entry>XtCSession</entry> - <entry>"Session"</entry> - </row> - <row> <entry>XtCSpace</entry> <entry>"Space"</entry> </row> @@ -1076,7 +1071,7 @@ class, and representation type symbolic constants. </row> <row> <entry>XtHsetValues</entry> - <entry>"Xtsetvalues"</entry> + <entry>"XtsetValues"</entry> </row> <row> <entry>XtHmanageChildren</entry> @@ -1184,7 +1179,7 @@ class, and representation type symbolic constants. <para> The -<function>Shell.h</function> +<filename class="headerfile">Shell.h</filename> header file contains definitions for the following resource name, class, and representation type symbolic constants. </para> diff --git a/lib/libXt/specs/appF.xml b/lib/libXt/specs/appF.xml index 49f054bb7..438d096f4 100644 --- a/lib/libXt/specs/appF.xml +++ b/lib/libXt/specs/appF.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <appendix id='Resource_Configuration_Management'> <title>Resource Configuration Management</title> <para> diff --git a/lib/libXt/specs/intrinsics.xml b/lib/libXt/specs/intrinsics.xml index 4c4169530..c99f5d6af 100644 --- a/lib/libXt/specs/intrinsics.xml +++ b/lib/libXt/specs/intrinsics.xml @@ -1,15 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" -[ <!ENTITY % defs SYSTEM "defs.ent"> %defs; +[ + <!ENTITY % defs SYSTEM "defs.ent"> %defs; + <!ENTITY % xt_defs SYSTEM "libXt.ent"> %xt_defs; ]> <book id="intrinsics" lang="en"> <bookinfo> - <title>X Toolkit Intrinsics - C Language Interface</title> + <title>X Toolkit Intrinsics – C Language Interface</title> <subtitle>X Window System</subtitle> <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo> - <printhistory><para>First Revision - April, 1994</para></printhistory> + <releaseinfo>X Toolkit Intrinsics Version &package_version;</releaseinfo> + <printhistory><para>First Revision – April, 1994</para></printhistory> <authorgroup> <author> <firstname>Joel</firstname><surname>McCormack</surname> @@ -35,18 +38,19 @@ </author> </authorgroup> <printhistory><para>version 6 edited by Donna Converse X Consortium, Inc.</para></printhistory> + <printhistory><para>version 7 edited by Thomas E. Dickey <ulink url="https://invisible-island.net"/></para></printhistory> <legalnotice> <para>XWindow System is a trademark of X Consortium, Inc.</para> <para role="multiLicensing"> -Copyright © 1985, 1986, 1987, 1988, 1991, 1994 X Consortium +Copyright © 1985, 1986, 1987, 1988, 1991, 1994 X Consortium </para> <para> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including +“Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to @@ -58,7 +62,7 @@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. </para> -<para> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +<para> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR @@ -77,7 +81,7 @@ from the X Consortium. <legalnotice> <para role="multiLicensing"> -Copyright © 1985, 1986, 1987, 1988, 1991, 1994 +Copyright © 1985, 1986, 1987, 1988, 1991, 1994 Digital Equipment Corporation, Maynard, Massachusetts. </para> @@ -90,7 +94,7 @@ Digital not be used in in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Digital makes no representations about the suitability of the software described herein for any purpose. -It is provided "as is" without express or implied warranty. +It is provided “as is” without express or implied warranty. </para> </legalnotice> diff --git a/lib/libXt/specs/libXt.ent.in b/lib/libXt/specs/libXt.ent.in new file mode 100644 index 000000000..0b8e14cea --- /dev/null +++ b/lib/libXt/specs/libXt.ent.in @@ -0,0 +1,2 @@ +<!-- define version entity for libXt documentation via configure.ac --> +<!ENTITY package_version "@PACKAGE_VERSION@"> diff --git a/lib/libXt/specs/preface.xml b/lib/libXt/specs/preface.xml index c5ac3cde6..8b9217e16 100644 --- a/lib/libXt/specs/preface.xml +++ b/lib/libXt/specs/preface.xml @@ -1,8 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + <preface id='About_This_Manual'> <title>About This Manual</title> <para> -X Toolkit Intrinsics — C Language Interface is intended to be read by both application programmers +X Toolkit Intrinsics — C Language Interface is intended to be read by both application programmers who will use one or more of the many widget sets built with the Intrinsics and by widget programmers who will use the Intrinsics to build widgets for one of the widget sets. Not all the information in this manual, however, applies to both audiences. That is, because the application diff --git a/lib/libXt/src/ActionHook.c b/lib/libXt/src/ActionHook.c index b03a116ff..ade4e70d1 100644 --- a/lib/libXt/src/ActionHook.c +++ b/lib/libXt/src/ActionHook.c @@ -136,7 +136,7 @@ void XtRemoveActionHook( else { XtAppWarningMsg(app, "badId", "xtRemoveActionHook", XtCXtToolkitError, "XtRemoveActionHook called with bad or old hook id", - (String*)NULL, (Cardinal*)NULL); + NULL, NULL); } #endif /*DEBUG*/ UNLOCK_APP(app); diff --git a/lib/libXt/src/Alloc.c b/lib/libXt/src/Alloc.c index c9ffce8d8..dd2f61647 100644 --- a/lib/libXt/src/Alloc.c +++ b/lib/libXt/src/Alloc.c @@ -128,7 +128,7 @@ void _XtHeapInit( * require varargs macros everywhere, which are only standard in C99 & later. */ Cardinal XtAsprintf( - String *new_string, + _XtString *new_string, _Xconst char * _X_RESTRICT_KYWD format, ...) { @@ -143,20 +143,20 @@ Cardinal XtAsprintf( if (len < 0) _XtAllocError("vsnprintf"); - *new_string = XtMalloc(len + 1); /* snprintf doesn't count trailing '\0' */ + *new_string = XtMalloc((Cardinal) len + 1); /* snprintf doesn't count trailing '\0' */ if (len < sizeof(buf)) { - strncpy(*new_string, buf, len); + strncpy(*new_string, buf, (size_t) len); (*new_string)[len] = '\0'; } else { va_start(ap, format); - if (vsnprintf(*new_string, len + 1, format, ap) < 0) + if (vsnprintf(*new_string, (size_t) (len + 1), format, ap) < 0) _XtAllocError("vsnprintf"); va_end(ap); } - return len; + return (Cardinal) len; } @@ -214,7 +214,7 @@ char *XtCalloc( void XtFree( char *ptr) { - if (ptr != NULL) Xfree(ptr); + free(ptr); } char* __XtMalloc( @@ -249,10 +249,10 @@ char* _XtHeapAlloc( if ((bytes + sizeof(char*)) >= (HEAP_SEGMENT_SIZE>>1)) { /* preserve current segment; insert this one in front */ #ifdef _TRACE_HEAP - printf( "allocating large segment (%d bytes) on heap %#x\n", + printf( "allocating large segment (%d bytes) on heap %p\n", bytes, heap ); #endif - heap_loc = XtMalloc(bytes + sizeof(char*)); + heap_loc = XtMalloc(bytes + (Cardinal) sizeof(char*)); if (heap->start) { *(char**)heap_loc = *(char**)heap->start; *(char**)heap->start = heap_loc; @@ -265,7 +265,7 @@ char* _XtHeapAlloc( } /* else discard remainder of this segment */ #ifdef _TRACE_HEAP - printf( "allocating new segment on heap %#x\n", heap ); + printf( "allocating new segment on heap %p\n", heap ); #endif heap_loc = XtMalloc((unsigned)HEAP_SEGMENT_SIZE); *(char**)heap_loc = heap->start; @@ -273,10 +273,10 @@ char* _XtHeapAlloc( heap->current = heap_loc + sizeof(char*); heap->bytes_remaining = HEAP_SEGMENT_SIZE - sizeof(char*); } - bytes = (bytes + (sizeof(long) - 1)) & (~(sizeof(long) - 1)); + bytes = (Cardinal) ((bytes + (sizeof(long) - 1)) & (~(sizeof(long) - 1))); heap_loc = heap->current; heap->current += bytes; - heap->bytes_remaining -= bytes; /* can be negative, if rounded */ + heap->bytes_remaining = (heap->bytes_remaining - (int) bytes); /* can be negative, if rounded */ return heap_loc; } @@ -307,7 +307,7 @@ void _XtHeapFree( typedef struct _Stats *StatsPtr; typedef struct _Stats { StatsPtr prev, next; - char *file; + const char *file; int line; unsigned size; unsigned long seq; @@ -317,9 +317,9 @@ typedef struct _Stats { static StatsPtr XtMemory = (StatsPtr)NULL; static unsigned long ActiveXtMemory = 0; static unsigned long XtSeqId = 0; -static unsigned long XtSeqBreakpoint = ~0; +static unsigned long XtSeqBreakpoint = (unsigned long)(~0UL); -#define StatsSize(n) ((((n) + (sizeof(long) - 1)) & ~(sizeof(long) - 1)) + sizeof(Stats)) +#define StatsSize(n) (unsigned)((((n) + (sizeof(long) - 1)) & ~(sizeof(long) - 1)) + sizeof(Stats)) #define ToStats(ptr) ((StatsPtr)(ptr - sizeof(Stats))) #define ToMem(ptr) (((char *)ptr) + sizeof(Stats)) @@ -349,7 +349,7 @@ static void _XtBreakpoint( char *_XtMalloc( unsigned size, - char *file, + const char *file, int line) { StatsPtr ptr; @@ -375,7 +375,7 @@ char *XtMalloc( char *_XtRealloc( char *ptr, unsigned size, - char *file, + const char *file, int line) { char *newptr; @@ -401,7 +401,7 @@ char *XtRealloc( char *_XtCalloc( unsigned num, unsigned size, - char *file, + const char *file, int line) { StatsPtr ptr; @@ -475,7 +475,7 @@ void XtFree(char *ptr) char *_XtHeapMalloc( Heap *heap, Cardinal size, - char *file, + const char *file, int line) { StatsPtr ptr; @@ -493,7 +493,7 @@ char *_XtHeapMalloc( return retval; } -void _XtHeapFree(register XtPointer heap) +void _XtHeapFree(Heap* heap) { register StatsPtr mem, next; @@ -517,7 +517,7 @@ void _XtHeapFree(register XtPointer heap) #include <stdio.h> -void _XtPrintMemory(char * filename) +void _XtPrintMemory(const char * filename) { register StatsPtr mem; FILE *f; @@ -527,10 +527,10 @@ void _XtPrintMemory(char * filename) else f = fopen(filename, "w"); LOCK_PROCESS; - fprintf(f, "total size: %d\n", ActiveXtMemory); + fprintf(f, "total size: %lu\n", ActiveXtMemory); for (mem = XtMemory; mem; mem = mem->next) { if (mem->file) - fprintf(f, "size: %6d seq: %5d %12s(%4d) %s\n", + fprintf(f, "size: %6d seq: %5lu %12s(%4d) %s\n", mem->size, mem->seq, mem->file, mem->line, mem->heap ? "heap" : ""); } diff --git a/lib/libXt/src/Callback.c b/lib/libXt/src/Callback.c index a1231ecae..ad2c5343e 100644 --- a/lib/libXt/src/Callback.c +++ b/lib/libXt/src/Callback.c @@ -73,11 +73,11 @@ in this Software without prior written authorization from The Open Group. #endif #include "IntrinsicI.h" -static String XtNinvalidCallbackList = "invalidCallbackList"; -static String XtNxtAddCallback = "xtAddCallback"; -static String XtNxtRemoveCallback = "xtRemoveCallback"; -static String XtNxtRemoveAllCallback = "xtRemoveAllCallback"; -static String XtNxtCallCallback = "xtCallCallback"; +static _Xconst _XtString XtNinvalidCallbackList = "invalidCallbackList"; +static _Xconst _XtString XtNxtAddCallback = "xtAddCallback"; +static _Xconst _XtString XtNxtRemoveCallback = "xtRemoveCallback"; +static _Xconst _XtString XtNxtRemoveAllCallback = "xtRemoveAllCallback"; +static _Xconst _XtString XtNxtCallCallback = "xtCallCallback"; /* However it doesn't contain a final NULL record */ #define ToList(p) ((XtCallbackList) ((p)+1)) @@ -122,17 +122,17 @@ void _XtAddCallback( if (icl && icl->call_state) { icl->call_state |= _XtCBFreeAfterCalling; icl = (InternalCallbackList) - __XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (count + 1)); + __XtMalloc((Cardinal) (sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (count + 1))); (void) memmove((char *)ToList(icl), (char *)ToList(*callbacks), - sizeof(XtCallbackRec) * count); + sizeof(XtCallbackRec) * (size_t) count); } else { icl = (InternalCallbackList) - XtRealloc((char *) icl, sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (count + 1)); + XtRealloc((char *) icl, (Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (count + 1))); } *callbacks = icl; - icl->count = count + 1; + icl->count = (unsigned short) (count + 1); icl->is_padded = 0; icl->call_state = 0; cl = ToList(icl) + count; @@ -163,7 +163,6 @@ void XtAddCallback( ) { InternalCallbackList *callbacks; - Widget hookobj; XtAppContext app = XtWidgetToApplicationContext(widget); LOCK_APP(app); @@ -172,13 +171,13 @@ void XtAddCallback( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtAddCallback,XtCXtToolkitError, "Cannot find callback list in XtAddCallback", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } _XtAddCallback(callbacks, callback, closure); if (!_XtIsHookObject(widget)) { - hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget)); + Widget hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { XtChangeHookDataRec call_data; @@ -208,17 +207,17 @@ static void AddCallbacks( for (j=0, cl = newcallbacks; cl->callback; cl++, j++); if (icl && icl->call_state) { icl->call_state |= _XtCBFreeAfterCalling; - icl = (InternalCallbackList) __XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (i+j)); + icl = (InternalCallbackList) __XtMalloc((Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (i+j))); (void) memmove((char *)ToList(*callbacks), (char *)ToList(icl), - sizeof(XtCallbackRec) * i); + sizeof(XtCallbackRec) * (size_t) i); } else { icl = (InternalCallbackList) XtRealloc((char *) icl, - sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (i+j)); + (Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (i+j))); } *callbacks = icl; - icl->count = i+j; + icl->count = (unsigned short) (i+j); icl->is_padded = 0; icl->call_state = 0; for (cl = ToList(icl) + i; --j >= 0; ) @@ -241,7 +240,7 @@ void XtAddCallbacks( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtAddCallback,XtCXtToolkitError, "Cannot find callback list in XtAddCallbacks", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -283,9 +282,9 @@ void _XtRemoveCallback ( j = icl->count - i - 1; ocl = ToList(icl); icl = (InternalCallbackList) - __XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (i + j)); - icl->count = i + j; + __XtMalloc((Cardinal) (sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (i + j))); + icl->count = (unsigned short) (i + j); icl->is_padded = 0; icl->call_state = 0; ncl = ToList(icl); @@ -301,8 +300,8 @@ void _XtRemoveCallback ( while (--i >= 0) *cl++ = *ncl++; icl = (InternalCallbackList) - XtRealloc((char *) icl, sizeof(InternalCallbackRec) - + sizeof(XtCallbackRec) * icl->count); + XtRealloc((char *) icl, (Cardinal) (sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * icl->count)); icl->is_padded = 0; *callbacks = icl; } else { @@ -332,7 +331,7 @@ void XtRemoveCallback ( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtRemoveCallback,XtCXtToolkitError, "Cannot find callback list in XtRemoveCallback", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -370,7 +369,7 @@ void XtRemoveCallbacks ( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtRemoveCallback,XtCXtToolkitError, "Cannot find callback list in XtRemoveCallbacks", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -385,9 +384,9 @@ void XtRemoveCallbacks ( cl = ToList(icl); if (icl->call_state) { icl->call_state |= _XtCBFreeAfterCalling; - icl = (InternalCallbackList)__XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * i); - icl->count = i; + icl = (InternalCallbackList)__XtMalloc((Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) i)); + icl->count = (unsigned short) i; icl->call_state = 0; } ccl = ToList(icl); @@ -404,7 +403,7 @@ void XtRemoveCallbacks ( } if (icl->count) { icl = (InternalCallbackList) - XtRealloc((char *)icl, (sizeof(InternalCallbackRec) + + XtRealloc((char *)icl, (Cardinal) (sizeof(InternalCallbackRec) + sizeof(XtCallbackRec) * icl->count)); icl->is_padded = 0; *callbacks = icl; @@ -455,7 +454,7 @@ void XtRemoveAllCallbacks( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtRemoveAllCallback,XtCXtToolkitError, "Cannot find callback list in XtRemoveAllCallbacks", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -484,9 +483,9 @@ InternalCallbackList _XtCompileCallbackList( for (n=0, xtcl=xtcallbacks; xtcl->callback; n++, xtcl++) {}; if (n == 0) return (InternalCallbackList) NULL; - callbacks = (InternalCallbackList) __XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * n); - callbacks->count = n; + callbacks = (InternalCallbackList) __XtMalloc((Cardinal) (sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) n)); + callbacks->count = (unsigned short) n; callbacks->is_padded = 0; callbacks->call_state = 0; cl = ToList(callbacks); @@ -499,9 +498,9 @@ InternalCallbackList _XtCompileCallbackList( XtCallbackList _XtGetCallbackList( InternalCallbackList *callbacks) { - register int i; - register InternalCallbackList icl; - register XtCallbackList cl, ocl; + int i; + InternalCallbackList icl; + XtCallbackList cl; icl = *callbacks; if (!icl) { @@ -512,19 +511,20 @@ XtCallbackList _XtGetCallbackList( return ToList(icl); i = icl->count; if (icl->call_state) { + XtCallbackList ocl; icl->call_state |= _XtCBFreeAfterCalling; ocl = ToList(icl); - icl = (InternalCallbackList) __XtMalloc(sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (i+1)); - icl->count = i; + icl = (InternalCallbackList) __XtMalloc((Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t) (i+1))); + icl->count = (unsigned short) i; icl->call_state = 0; cl = ToList(icl); while (--i >= 0) *cl++ = *ocl++; } else { icl = (InternalCallbackList) XtRealloc((char *)icl, - sizeof(InternalCallbackRec) + - sizeof(XtCallbackRec) * (i+1)); + (Cardinal)(sizeof(InternalCallbackRec) + + sizeof(XtCallbackRec) * (size_t)(i+1))); cl = ToList(icl) + i; } icl->is_padded = 1; @@ -553,7 +553,7 @@ void XtCallCallbacks( XtAppWarningMsg(app, XtNinvalidCallbackList,XtNxtCallCallback,XtCXtToolkitError, "Cannot find callback list in XtCallCallbacks", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } diff --git a/lib/libXt/src/Composite.c b/lib/libXt/src/Composite.c index 29893d820..108645d55 100644 --- a/lib/libXt/src/Composite.c +++ b/lib/libXt/src/Composite.c @@ -139,7 +139,7 @@ static void InheritAllowsChangeManagedSet( WidgetClass widget_class) { CompositeWidgetClass cc = (CompositeWidgetClass) widget_class; - CompositeClassExtension ext, super_ext, new_ext; + CompositeClassExtension ext, super_ext; ext = (CompositeClassExtension) XtGetClassExtension(widget_class, @@ -158,6 +158,7 @@ static void InheritAllowsChangeManagedSet( if (super_ext && super_ext->version == XtCompositeExtensionVersion && super_ext->record_size == sizeof(CompositeClassExtensionRec) && super_ext->allows_change_managed_set) { + CompositeClassExtension new_ext; new_ext = (CompositeClassExtension) __XtCalloc(1, sizeof(CompositeClassExtensionRec)); @@ -175,42 +176,40 @@ static void InheritAllowsChangeManagedSet( } static void CompositeClassPartInitialize( - WidgetClass widgetClass) + WidgetClass myWidgetClass) { register CompositePartPtr wcPtr; register CompositePartPtr superPtr = NULL; wcPtr = (CompositePartPtr) - &(((CompositeWidgetClass)widgetClass)->composite_class); + &(((CompositeWidgetClass)myWidgetClass)->composite_class); - if (widgetClass != compositeWidgetClass) + if (myWidgetClass != compositeWidgetClass) { /* don't compute possible bogus pointer */ - superPtr = (CompositePartPtr)&(((CompositeWidgetClass)widgetClass + superPtr = (CompositePartPtr)&(((CompositeWidgetClass)myWidgetClass ->core_class.superclass)->composite_class); - /* We don't need to check for null super since we'll get to composite - eventually, and it had better define them! */ - - LOCK_PROCESS; - if (wcPtr->geometry_manager == XtInheritGeometryManager) { - wcPtr->geometry_manager = - superPtr->geometry_manager; - } + LOCK_PROCESS; + if (wcPtr->geometry_manager == XtInheritGeometryManager) { + wcPtr->geometry_manager = + superPtr->geometry_manager; + } - if (wcPtr->change_managed == XtInheritChangeManaged) { - wcPtr->change_managed = - superPtr->change_managed; - InheritAllowsChangeManagedSet(widgetClass); - } + if (wcPtr->change_managed == XtInheritChangeManaged) { + wcPtr->change_managed = + superPtr->change_managed; + InheritAllowsChangeManagedSet(myWidgetClass); + } - if (wcPtr->insert_child == XtInheritInsertChild) { - wcPtr->insert_child = superPtr->insert_child; - } + if (wcPtr->insert_child == XtInheritInsertChild) { + wcPtr->insert_child = superPtr->insert_child; + } - if (wcPtr->delete_child == XtInheritDeleteChild) { - wcPtr->delete_child = superPtr->delete_child; + if (wcPtr->delete_child == XtInheritDeleteChild) { + wcPtr->delete_child = superPtr->delete_child; + } + UNLOCK_PROCESS; } - UNLOCK_PROCESS; } static void CompositeDestroy( @@ -242,7 +241,7 @@ static void CompositeInsertChild( cw->composite.num_slots += (cw->composite.num_slots / 2) + 2; cw->composite.children = children = (WidgetList) XtRealloc((XtPointer) children, - (unsigned) (cw->composite.num_slots) * sizeof(Widget)); + (Cardinal)((unsigned) (cw->composite.num_slots) * sizeof(Widget))); } /* Ripple children up one space from "position" */ for (i = cw->composite.num_children; i > position; i--) { diff --git a/lib/libXt/src/Convert.c b/lib/libXt/src/Convert.c index cea8fd3ed..f9f241e0e 100644 --- a/lib/libXt/src/Convert.c +++ b/lib/libXt/src/Convert.c @@ -80,6 +80,7 @@ in this Software without prior written authorization from The Open Group. #define CONVERTHASHSIZE ((unsigned)256) #define CONVERTHASHMASK 255 #define ProcHash(from_type, to_type) (2 * (from_type) + to_type) +#define HashCode(converter, from) (int)(((long)(converter) >> 2) + from->size + *((char *) from->addr)) typedef struct _ConverterRec *ConverterPtr; typedef struct _ConverterRec { @@ -207,23 +208,23 @@ void _XtTableAddConverter( XtFree((char *)p); } - p = (ConverterPtr) __XtMalloc(sizeof(ConverterRec) + - sizeof(XtConvertArgRec) * num_args); + p = (ConverterPtr) __XtMalloc((Cardinal)(sizeof(ConverterRec) + + sizeof(XtConvertArgRec) * num_args)); p->next = *pp; *pp = p; p->from = from_type; p->to = to_type; p->converter = converter; p->destructor = destructor; - p->num_args = num_args; - p->global = global; + p->num_args = (unsigned short) num_args; + XtSetBit(p->global, global); args = ConvertArgs(p); while (num_args--) *args++ = *convert_args++; - p->new_style = new_style; + XtSetBit(p->new_style, new_style); p->do_ref_count = False; if (destructor || (cache_type & 0xff)) { - p->cache_type = cache_type & 0xff; + p->cache_type = (char) (cache_type & 0xff); if (cache_type & XtCacheRefCount) p->do_ref_count = True; } else { @@ -361,13 +362,12 @@ CacheEnter( { register CachePtr *pHashEntry; register CachePtr p; - register Cardinal i; LOCK_PROCESS; pHashEntry = &cacheHashTable[hash & CACHEHASHMASK]; if ((succeeded && destructor) || do_ref) { - p = (CachePtr) _XtHeapAlloc(heap, (sizeof(CacheRec) + + p = (CachePtr) _XtHeapAlloc(heap, (Cardinal) (sizeof(CacheRec) + sizeof(CacheRecExt) + num_args * sizeof(XrmValue))); CEXT(p)->prev = pHashEntry; @@ -377,15 +377,15 @@ CacheEnter( p->has_ext = True; } else { - p = (CachePtr)_XtHeapAlloc(heap, (sizeof(CacheRec) + + p = (CachePtr)_XtHeapAlloc(heap, (Cardinal) (sizeof(CacheRec) + num_args * sizeof(XrmValue))); p->has_ext = False; } if (!to->addr) succeeded = False; - p->conversion_succeeded = succeeded; - p->is_refcounted = do_ref; - p->must_be_freed = do_free; + XtSetBit(p->conversion_succeeded, succeeded); + XtSetBit(p->is_refcounted, do_ref); + XtSetBit(p->must_be_freed, do_free); p->next = *pHashEntry; if (p->next && p->next->has_ext) CEXT(p->next)->prev = &p->next; @@ -403,9 +403,10 @@ CacheEnter( p->from.addr = (XPointer)_XtHeapAlloc(heap, from->size); (void) memmove((char *)p->from.addr, (char *)from->addr, from->size); } - p->num_args = num_args; - if (num_args) { + p->num_args = (unsigned short) num_args; + if (num_args && args) { XrmValue *pargs = CARGS(p); + register Cardinal i; for (i = 0; i < num_args; i++) { pargs[i].size = args[i].size; pargs[i].addr = (XPointer)_XtHeapAlloc(heap, args[i].size); @@ -452,7 +453,7 @@ static void FreeCacheRec( *(CEXT(p)->prev) = p->next; if (p->next && p->next->has_ext) CEXT(p->next)->prev = CEXT(p)->prev; - } else { + } else if (prev) { *prev = p->next; if (p->next && p->next->has_ext) CEXT(p->next)->prev = prev; @@ -480,12 +481,11 @@ void _XtCacheFlushTag( XtPointer tag) { int i; - register CachePtr *prev; register CachePtr rec; LOCK_PROCESS; for (i = CACHEHASHSIZE; --i >= 0;) { - prev = &cacheHashTable[i]; + register CachePtr *prev = &cacheHashTable[i]; while ((rec = *prev)) { if (rec->tag == tag) FreeCacheRec(app, rec, prev); @@ -514,7 +514,7 @@ void _XtConverterCacheStats(void) } (void) fprintf(stdout, "Index: %4d Entries: %d\n", i, entries); for (p = cacheHashTable[i]; p; p = p->next) { - (void) fprintf(stdout, " Size: %3d Refs: %3d '", + (void) fprintf(stdout, " Size: %3d Refs: %3ld '", p->from.size, p->has_ext ? CEXT(p)->ref_count : 0); (void) fprintf(stdout, "'\n"); @@ -531,16 +531,16 @@ static Boolean ResourceQuarkToOffset( XrmName name, Cardinal *offset) { - register WidgetClass wc; - register Cardinal i; - register XrmResourceList res, *resources; + WidgetClass wc; + Cardinal i; + XrmResourceList res; for (wc = widget_class; wc; wc = wc->core_class.superclass) { - resources = (XrmResourceList*) wc->core_class.resources; + XrmResourceList *resources = (XrmResourceList*) wc->core_class.resources; for (i = 0; i < wc->core_class.num_resources; i++, resources++) { res = *resources; if (res->xrm_name == name) { - *offset = -res->xrm_offset - 1; + *offset = (Cardinal) (-res->xrm_offset - 1); return True; } } /* for i in resources */ @@ -640,7 +640,7 @@ void XtDirectConvert( LOCK_PROCESS; /* Try to find cache entry for conversion */ - hash = ((long) converter >> 2) + from->size + *((char *) from->addr); + hash = HashCode(converter, from); if (from->size > 1) hash += ((char *) from->addr)[1]; for (p = cacheHashTable[hash & CACHEHASHMASK]; p; p = p->next) { @@ -649,7 +649,7 @@ void XtDirectConvert( && (p->from.size == from->size) && !(p->from_is_value ? XtMemcmp(&p->from.addr, from->addr, from->size) : - memcmp((char *)p->from.addr, (char *)from->addr, from->size)) + memcmp((const void *)p->from.addr, (const void *)from->addr, from->size)) && (p->num_args == num_args)) { if ((i = num_args)) { XrmValue *pargs = CARGS(p); @@ -724,7 +724,6 @@ CallConverter( { CachePtr p; int hash; - Cardinal i; Boolean retval; if (!cP || ((cP->cache_type == XtCacheNone) && !cP->destructor)) { @@ -737,7 +736,7 @@ CallConverter( LOCK_PROCESS; /* Try to find cache entry for conversion */ - hash = ((long)(converter) >> 2) + from->size + *((char *) from->addr); + hash = HashCode(converter, from); if (from->size > 1) hash += ((char *) from->addr)[1]; if (cP->cache_type != XtCacheNone) { @@ -747,8 +746,9 @@ CallConverter( && (p->from.size == from->size) && !(p->from_is_value ? XtMemcmp(&p->from.addr, from->addr, from->size) : - memcmp((char *)p->from.addr, (char *)from->addr, from->size)) + memcmp((const void *)p->from.addr, (const void *)from->addr, from->size)) && (p->num_args == num_args)) { + Cardinal i; if ((i = num_args)) { XrmValue *pargs = CARGS(p); /* Are all args the same data ? */ @@ -812,7 +812,7 @@ CallConverter( unsigned int supplied_size = to->size; Boolean do_ref = cP->do_ref_count && cache_ref_return; Boolean do_free = False; - Boolean retval = + retval = (*(XtTypeConverter)converter)(dpy, args, &num_args, from, to, &closure); if (retval == False && supplied_size < to->size) { diff --git a/lib/libXt/src/Converters.c b/lib/libXt/src/Converters.c index 8c8d8be1d..fbfa0769d 100644 --- a/lib/libXt/src/Converters.c +++ b/lib/libXt/src/Converters.c @@ -86,9 +86,9 @@ in this Software without prior written authorization from The Open Group. #define IsNewline(str) ((str) == '\n') #define IsWhitespace(str) ((str)== ' ' || (str) == '\t') -static const String XtNwrongParameters = "wrongParameters"; -static const String XtNconversionError = "conversionError"; -static const String XtNmissingCharsetList = "missingCharsetList"; +static _Xconst _XtString XtNwrongParameters = "wrongParameters"; +static _Xconst _XtString XtNconversionError = "conversionError"; +static _Xconst _XtString XtNmissingCharsetList = "missingCharsetList"; /* Representation types */ @@ -144,11 +144,11 @@ void _XtConvertInitialize(void) (char*) fromVal->addr, tstr); \ return False; \ } \ - *(type*)(toVal->addr) = (value); \ + *(type*)(toVal->addr) = (type) (value); \ } \ else { \ static type static_val; \ - static_val = (value); \ + static_val = (type) (value); \ toVal->addr = (XPointer)&static_val; \ } \ toVal->size = sizeof(type); \ @@ -162,11 +162,11 @@ void _XtConvertInitialize(void) toVal->size = sizeof(type); \ return False; \ } \ - *(type*)(toVal->addr) = (value); \ + *(type*)(toVal->addr) = (type) (value); \ } \ else { \ static type static_val; \ - static_val = (value); \ + static_val = (type) (value); \ toVal->addr = (XPointer)&static_val; \ } \ toVal->size = sizeof(type); \ @@ -312,7 +312,7 @@ Boolean XtCvtIntToBoolean( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToBoolean",XtCXtToolkitError, "Integer to Boolean conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); done(Boolean, (*(int *)fromVal->addr != 0)); } @@ -330,7 +330,7 @@ Boolean XtCvtIntToShort( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToShort",XtCXtToolkitError, "Integer to Short conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); done(short, (*(int *)fromVal->addr)); } @@ -349,7 +349,7 @@ Boolean XtCvtStringToBoolean( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToBoolean",XtCXtToolkitError, "String to Boolean conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if ( (CompareISOLatin1(str, "true") == 0) || (CompareISOLatin1(str, "yes") == 0) @@ -379,7 +379,7 @@ Boolean XtCvtIntToBool( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToBool",XtCXtToolkitError, "Integer to Bool conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); done(Bool, (*(int *)fromVal->addr != 0)); } @@ -399,7 +399,7 @@ Boolean XtCvtStringToBool( XtNwrongParameters,"cvtStringToBool", XtCXtToolkitError, "String to Bool conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if ( (CompareISOLatin1(str, "true") == 0) || (CompareISOLatin1(str, "yes") == 0) @@ -440,12 +440,12 @@ Boolean XtCvtIntToColor( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntOrPixelToXColor",XtCXtToolkitError, "Pixel to color conversion needs screen and colormap arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return False; } screen = *((Screen **) args[0].addr); colormap = *((Colormap *) args[1].addr); - c.pixel = *(int *)fromVal->addr; + c.pixel = (unsigned long) (*(int *)fromVal->addr); XQueryColor(DisplayOfScreen(screen), colormap, &c); done(XColor, c); @@ -467,14 +467,13 @@ Boolean XtCvtStringToPixel( XtPerDisplay pd = _XtGetPerDisplay(dpy); Colormap colormap; Status status; - String params[1]; Cardinal num_params=1; if (*num_args != 2) { XtAppWarningMsg(pd->appContext, XtNwrongParameters, "cvtStringToPixel", XtCXtToolkitError, "String to pixel conversion needs screen and colormap arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -495,7 +494,10 @@ Boolean XtCvtStringToPixel( status = XAllocNamedColor(DisplayOfScreen(screen), colormap, (char*)str, &screenColor, &exactColor); if (status == 0) { - String msg, type; + _Xconst _XtString msg; + _Xconst _XtString type; + String params[1]; + params[0] = str; /* Server returns a specific error code but Xlib discards it. Ugh */ if (XLookupColor(DisplayOfScreen(screen), colormap, (char*)str, @@ -532,7 +534,7 @@ static void FreePixel( if (*num_args != 2) { XtAppWarningMsg(app, XtNwrongParameters,"freePixel",XtCXtToolkitError, "Freeing a pixel requires screen and colormap arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -559,15 +561,16 @@ static void FetchDisplayArg( Cardinal *size, XrmValue* value) { - if (widget == NULL) + if (widget == NULL) { XtErrorMsg("missingWidget", "fetchDisplayArg", XtCXtToolkitError, "FetchDisplayArg called without a widget to reference", - (String*)NULL, (Cardinal*)NULL); + NULL, NULL); /* can't return any useful Display and caller will de-ref NULL, so aborting is the only useful option */ - - value->size = sizeof(Display*); - value->addr = (XPointer)&DisplayOfScreen(XtScreenOfObject(widget)); + } else { + value->size = sizeof(Display*); + value->addr = (XPointer)&DisplayOfScreen(XtScreenOfObject(widget)); + } } static XtConvertArgRec const displayConvertArg[] = { @@ -673,7 +676,7 @@ Boolean XtCvtStringToCursor( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToCursor",XtCXtToolkitError, "String to cursor conversion needs display argument", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -702,7 +705,7 @@ static void FreeCursor( XtAppWarningMsg(app, XtNwrongParameters,"freeCursor",XtCXtToolkitError, "Free Cursor requires display argument", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -725,7 +728,7 @@ Boolean XtCvtStringToDisplay( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToDisplay",XtCXtToolkitError, "String to Display conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); d = XOpenDisplay((char *)fromVal->addr); if (d != NULL) @@ -751,7 +754,7 @@ Boolean XtCvtStringToFile( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToFile",XtCXtToolkitError, "String to File conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); f = fopen((char *)fromVal->addr, "r"); if (f != NULL) @@ -773,7 +776,7 @@ static void FreeFile( XtAppWarningMsg(app, XtNwrongParameters,"freeFile",XtCXtToolkitError, "Free File requires no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); fclose( *(FILE**)toVal->addr ); } @@ -791,7 +794,7 @@ Boolean XtCvtIntToFloat( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToFloat",XtCXtToolkitError, "Integer to Float conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); done(float, (*(int *)fromVal->addr)); } @@ -807,17 +810,14 @@ Boolean XtCvtStringToFloat( int ret; float f, nan; -#ifndef ISC /* On ISC this generates a core dump :-( at least with gs */ - /* depending on the system this may or may not do anything useful */ - (void) sscanf ("NaNS", "%g", + (void) sscanf ("NaN", "%g", toVal->addr != NULL ? (float*) toVal->addr : &nan); -#endif if (*num_args != 0) XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToFloat",XtCXtToolkitError, "String to Float conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); ret = sscanf (fromVal->addr, "%g", &f); if (ret == 0) { @@ -845,7 +845,7 @@ Boolean XtCvtStringToFont( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToFont",XtCXtToolkitError, "String to font conversion needs display argument", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -896,7 +896,7 @@ Boolean XtCvtStringToFont( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "noFont","cvtStringToFont",XtCXtToolkitError, "Unable to load any usable ISO8859 font", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -914,7 +914,7 @@ static void FreeFont( XtAppWarningMsg(app, XtNwrongParameters,"freeFont",XtCXtToolkitError, "Free Font needs display argument", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -935,7 +935,7 @@ Boolean XtCvtIntToFont( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToFont",XtCXtToolkitError, "Integer to Font conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); done(Font, *(int*)fromVal->addr); } @@ -958,7 +958,7 @@ Boolean XtCvtStringToFontSet( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToFontSet",XtCXtToolkitError, "String to FontSet conversion needs display and locale arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -972,7 +972,7 @@ Boolean XtCvtStringToFontSet( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNmissingCharsetList,"cvtStringToFontSet",XtCXtToolkitError, "Missing charsets in String to FontSet conversion", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); XFreeStringList(missing_charset_list); } if (f != NULL) { @@ -1005,7 +1005,7 @@ Boolean XtCvtStringToFontSet( XtNmissingCharsetList,"cvtStringToFontSet", XtCXtToolkitError, "Missing charsets in String to FontSet conversion", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); XFreeStringList(missing_charset_list); } if (f != NULL) @@ -1029,7 +1029,7 @@ Boolean XtCvtStringToFontSet( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNmissingCharsetList,"cvtStringToFontSet",XtCXtToolkitError, "Missing charsets in String to FontSet conversion", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); XFreeStringList(missing_charset_list); } if (f != NULL) @@ -1038,7 +1038,7 @@ Boolean XtCvtStringToFontSet( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "noFont","cvtStringToFontSet",XtCXtToolkitError, "Unable to load any usable fontset", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -1056,7 +1056,7 @@ static void FreeFontSet( XtAppWarningMsg(app, XtNwrongParameters,"freeFontSet",XtCXtToolkitError, "FreeFontSet needs display and locale arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -1101,7 +1101,7 @@ XtCvtStringToFontStruct( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToFontStruct",XtCXtToolkitError, "String to font conversion needs display argument", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -1155,7 +1155,7 @@ XtCvtStringToFontStruct( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "noFont","cvtStringToFontStruct",XtCXtToolkitError, "Unable to load any usable ISO8859 font", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -1173,7 +1173,7 @@ static void FreeFontStruct( XtAppWarningMsg(app, XtNwrongParameters,"freeFontStruct",XtCXtToolkitError, "Free FontStruct requires display argument", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -1196,7 +1196,7 @@ Boolean XtCvtStringToInt( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToInt",XtCXtToolkitError, "String to Integer conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); if (IsInteger((String)fromVal->addr, &i)) donestr(int, i, XtRInt); @@ -1219,7 +1219,7 @@ Boolean XtCvtStringToShort( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToShort",XtCXtToolkitError, "String to Integer conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); if (IsInteger((String)fromVal->addr, &i)) donestr(short, (short)i, XtRShort); @@ -1242,7 +1242,7 @@ Boolean XtCvtStringToDimension( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToDimension",XtCXtToolkitError, "String to Dimension conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); if (IsInteger((String)fromVal->addr, &i)) { if ( i < 0 ) XtDisplayStringConversionWarning(dpy, (char*)fromVal->addr, @@ -1266,7 +1266,7 @@ Boolean XtCvtIntToUnsignedChar( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToUnsignedChar",XtCXtToolkitError, "Integer to UnsignedChar conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); done(unsigned char, (*(int *)fromVal->addr)); } @@ -1286,7 +1286,7 @@ Boolean XtCvtStringToUnsignedChar( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToUnsignedChar",XtCXtToolkitError, "String to Integer conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); if (IsInteger((String)fromVal->addr, &i)) { if ( i < 0 || i > 255 ) XtDisplayStringConversionWarning(dpy, (char*)fromVal->addr, @@ -1312,7 +1312,7 @@ Boolean XtCvtColorToPixel( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtXColorToPixel",XtCXtToolkitError, "Color to Pixel conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); done(Pixel, ((XColor *)fromVal->addr)->pixel); } @@ -1329,7 +1329,7 @@ Boolean XtCvtIntToPixel( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToPixel",XtCXtToolkitError, "Integer to Pixel conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); done(Pixel, *(int*)fromVal->addr); } @@ -1346,7 +1346,7 @@ Boolean XtCvtIntToPixmap( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtIntToPixmap",XtCXtToolkitError, "Integer to Pixmap conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); done(Pixmap, *(int*)fromVal->addr); } @@ -1379,18 +1379,18 @@ static int CompareISOLatin1 (const char *first, const char *second) /* try lowercasing and try again */ if ((a >= XK_A) && (a <= XK_Z)) - a += (XK_a - XK_A); + a = (unsigned char) (a + (XK_a - XK_A)); else if ((a >= XK_Agrave) && (a <= XK_Odiaeresis)) - a += (XK_agrave - XK_Agrave); + a = (unsigned char) (a + (XK_agrave - XK_Agrave)); else if ((a >= XK_Ooblique) && (a <= XK_Thorn)) - a += (XK_oslash - XK_Ooblique); + a = (unsigned char) (a + (XK_oslash - XK_Ooblique)); if ((b >= XK_A) && (b <= XK_Z)) - b += (XK_a - XK_A); + b = (unsigned char) (b + (XK_a - XK_A)); else if ((b >= XK_Agrave) && (b <= XK_Odiaeresis)) - b += (XK_agrave - XK_Agrave); + b = (unsigned char) (b + (XK_agrave - XK_Agrave)); else if ((b >= XK_Ooblique) && (b <= XK_Thorn)) - b += (XK_oslash - XK_Ooblique); + b = (unsigned char) (b + (XK_oslash - XK_Ooblique)); if (a != b) break; } @@ -1405,11 +1405,11 @@ static void CopyISOLatin1Lowered(char *dst, const char *src) for ( ; *source; source++, dest++) { if (*source >= XK_A && *source <= XK_Z) - *dest = *source + (XK_a - XK_A); + *dest = (unsigned char) (*source + (XK_a - XK_A)); else if (*source >= XK_Agrave && *source <= XK_Odiaeresis) - *dest = *source + (XK_agrave - XK_Agrave); + *dest = (unsigned char) (*source + (XK_agrave - XK_Agrave)); else if (*source >= XK_Ooblique && *source <= XK_Thorn) - *dest = *source + (XK_oslash - XK_Ooblique); + *dest = (unsigned char) (*source + (XK_oslash - XK_Ooblique)); else *dest = *source; } @@ -1431,7 +1431,7 @@ XtCvtStringToInitialState( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToInitialState",XtCXtToolkitError, "String to InitialState conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); if (CompareISOLatin1(str, "NormalState") == 0) donestr(int, NormalState, XtRInitialState); if (CompareISOLatin1(str, "IconicState") == 0) donestr(int, IconicState, XtRInitialState); @@ -1466,7 +1466,7 @@ Boolean XtCvtStringToVisual( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToVisual",XtCXtToolkitError, "String to Visual conversion needs screen and depth arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -1517,7 +1517,7 @@ Boolean XtCvtStringToAtom( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToAtom",XtCXtToolkitError, "String to Atom conversion needs Display argument", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -1541,7 +1541,7 @@ Boolean XtCvtStringToDirectoryString( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToDirectoryString",XtCXtToolkitError, "String to DirectoryString conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); str = (String)fromVal->addr; if (CompareISOLatin1(str, "XtCurrentDirectory") == 0) { @@ -1582,7 +1582,7 @@ static void FreeDirectoryString( XtAppWarningMsg(app, XtNwrongParameters,"freeDirectoryString",XtCXtToolkitError, "Free Directory String requires no extra arguments", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); XtFree((char *) toVal->addr); } @@ -1601,7 +1601,7 @@ Boolean XtCvtStringToRestartStyle( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToRestartStyle",XtCXtToolkitError, "String to RestartStyle conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if (CompareISOLatin1(str, "RestartIfRunning") == 0) donestr(unsigned char, SmRestartIfRunning, XtRRestartStyle); @@ -1627,20 +1627,21 @@ Boolean XtCvtStringToCommandArgArray( String *strarray, *ptr; char *src; char *dst, *dst_str; - char *start; int tokens, len; if (*num_args != 0) XtAppWarningMsg(XtDisplayToApplicationContext(dpy), XtNwrongParameters,"cvtStringToCommandArgArray",XtCXtToolkitError, "String to CommandArgArray conversion needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); src = fromVal->addr; dst = dst_str = __XtMalloc((unsigned) strlen(src) + 1); tokens = 0; while (*src != '\0') { + char *start; + /* skip whitespace */ while (IsWhitespace(*src) || IsNewline(*src)) src++; @@ -1654,10 +1655,10 @@ Boolean XtCvtStringToCommandArgArray( while (*src != '\0' && !IsWhitespace(*src) && !IsNewline(*src)) { if (*src == '\\' && (IsWhitespace(*(src+1)) || IsNewline(*(src+1)))) { - len = src - start; + len = (int) (src - start); if (len) { /* copy preceeding part of token */ - memcpy(dst, start, len); + memcpy(dst, start, (size_t) len); dst += len; } /* skip backslash */ @@ -1667,10 +1668,10 @@ Boolean XtCvtStringToCommandArgArray( } src++; } - len = src - start; + len = (int) (src - start); if (len) { /* copy last part of token */ - memcpy(dst, start, len); + memcpy(dst, start, (size_t) len); dst += len; } *dst = '\0'; @@ -1678,13 +1679,13 @@ Boolean XtCvtStringToCommandArgArray( dst++; } - ptr = strarray = (String*) __XtMalloc((Cardinal)(tokens+1) * sizeof(String)); + ptr = strarray = (String*) __XtMalloc((Cardinal)((size_t)(tokens+1) * sizeof(String))); src = dst_str; while (--tokens >= 0) { *ptr = src; ptr++; if (tokens) { - len = strlen(src); + len = (int) strlen(src); src = src + len + 1; } } @@ -1702,10 +1703,8 @@ static void ArgArrayDestructor( XrmValuePtr args, Cardinal *num_args) { - String *strarray; - if (closure) { - strarray = (String*) closure; + _XtString *strarray = (_XtString*) closure; XtFree(*strarray); XtFree((char *) strarray); } @@ -1760,7 +1759,7 @@ Boolean XtCvtStringToGravity ( XtAppWarningMsg(XtDisplayToApplicationContext (dpy), "wrongParameters","cvtStringToGravity","XtToolkitError", "String to Gravity conversion needs no extra arguments", - (String *) NULL, (Cardinal *)NULL); + NULL, NULL); return False; } if (!haveQuarks) { diff --git a/lib/libXt/src/Core.c b/lib/libXt/src/Core.c index d61f43e02..0f89ef306 100644 --- a/lib/libXt/src/Core.c +++ b/lib/libXt/src/Core.c @@ -323,11 +323,10 @@ static Boolean CoreSetValues( Boolean redisplay; Mask window_mask; XSetWindowAttributes attributes; - XtTranslations save; redisplay = FALSE; if (old->core.tm.translations != new->core.tm.translations) { - save = new->core.tm.translations; + XtTranslations save = new->core.tm.translations; new->core.tm.translations = old->core.tm.translations; _XtMergeTranslations(new, save, XtTableReplace); } @@ -349,7 +348,7 @@ static Boolean CoreSetValues( } else { attributes.background_pixmap = new->core.background_pixmap; - window_mask &= ~CWBackPixel; + window_mask &= (unsigned long) (~CWBackPixel); window_mask |= CWBackPixmap; } redisplay = TRUE; @@ -366,14 +365,14 @@ static Boolean CoreSetValues( } else { attributes.border_pixmap = new->core.border_pixmap; - window_mask &= ~CWBorderPixel; + window_mask &= (unsigned long) (~CWBorderPixel); window_mask |= CWBorderPixmap; } } if (old->core.depth != new->core.depth) { XtAppWarningMsg(XtWidgetToApplicationContext(old), "invalidDepth","setValues",XtCXtToolkitError, - "Can't change widget depth", (String *)NULL, (Cardinal *)NULL); + "Can't change widget depth", NULL, NULL); new->core.depth = old->core.depth; } if (old->core.colormap != new->core.colormap) { diff --git a/lib/libXt/src/Create.c b/lib/libXt/src/Create.c index da0019231..1d18590fe 100644 --- a/lib/libXt/src/Create.c +++ b/lib/libXt/src/Create.c @@ -80,8 +80,8 @@ in this Software without prior written authorization from The Open Group. #endif #include <stdio.h> -static String XtNxtCreateWidget = "xtCreateWidget"; -static String XtNxtCreatePopupShell = "xtCreatePopupShell"; +static _Xconst _XtString XtNxtCreateWidget = "xtCreateWidget"; +static _Xconst _XtString XtNxtCreatePopupShell = "xtCreatePopupShell"; static void CallClassPartInit(WidgetClass ancestor, WidgetClass wc) @@ -146,8 +146,8 @@ XtInitializeWidgetClass(WidgetClass wc) if (wc->core_class.version != XtVersion && wc->core_class.version != XtVersionDontCheck) { String param[3]; - String mismatch = "Widget class %s version mismatch (recompilation needed):\n widget %d vs. intrinsics %d."; - String recompile = "Widget class %s must be re-compiled."; + _Xconst _XtString mismatch = "Widget class %s version mismatch (recompilation needed):\n widget %d vs. intrinsics %d."; + _Xconst _XtString recompile = "Widget class %s must be re-compiled."; Cardinal num_params; param[0] = wc->core_class.class_name; @@ -260,16 +260,19 @@ xtWidgetAlloc( WidgetClass widget_class, ConstraintWidgetClass parent_constraint_class, Widget parent, - String name, + _Xconst _XtString name, ArgList args, /* must be NULL if typed_args is non-NULL */ Cardinal num_args, XtTypedArgList typed_args, /* must be NULL if args is non-NULL */ Cardinal num_typed_args) { Widget widget; - Cardinal wsize, csize = 0; + Cardinal csize = 0; ObjectClassExtension ext; + if (widget_class == NULL) + return 0; + LOCK_PROCESS; if (! (widget_class->core_class.class_inited)) XtInitializeWidgetClass(widget_class); @@ -290,18 +293,17 @@ xtWidgetAlloc( (*allocate)(widget_class, &csize, &extra, args, &nargs, typed_args, &ntyped, &widget, NULL); } else { - wsize = widget_class->core_class.widget_size; + Cardinal wsize = widget_class->core_class.widget_size; UNLOCK_PROCESS; if (csize) { if (sizeof(struct {char a; double b;}) != (sizeof(struct {char a; unsigned long b;}) - sizeof(unsigned long) + sizeof(double))) { if (csize && !(csize & (sizeof(double) - 1))) - wsize = (wsize + sizeof(double) - 1) & ~(sizeof(double)-1); + wsize = (Cardinal) ((wsize + sizeof(double) - 1) & ~(sizeof(double)-1)); } } - widget = (Widget) __XtMalloc((unsigned)(wsize + csize)); - bzero(widget, wsize + csize); + widget = (Widget) __XtCalloc(1,(unsigned)(wsize + csize)); widget->core.constraints = (csize ? (XtPointer)((char *)widget + wsize) : NULL); } @@ -319,7 +321,6 @@ CompileCallbacks( Widget widget) { CallbackTable offsets; - InternalCallbackList* cl; int i; LOCK_PROCESS; @@ -327,7 +328,7 @@ CompileCallbacks( widget->core.widget_class->core_class.callback_private; for (i = (int)(long) *(offsets++); --i >= 0; offsets++) { - cl = (InternalCallbackList *) + InternalCallbackList* cl = (InternalCallbackList *) ((char *) widget - (*offsets)->xrm_offset - 1); if (*cl) *cl = _XtCompileCallbackList((XtCallbackList) *cl); @@ -337,8 +338,8 @@ CompileCallbacks( static Widget xtCreate( - char *name, - char *class, + String name, + String class, WidgetClass widget_class, Widget parent, Screen* default_screen, /* undefined when creating a nonwidget */ @@ -352,13 +353,11 @@ xtCreate( { /* need to use strictest alignment rules possible in next two decls. */ double widget_cache[100]; - double constraint_cache[20]; Widget req_widget; XtPointer req_constraints = NULL; Cardinal wsize, csize; Widget widget; XtCacheRef *cache_refs; - Cardinal i; XtCreateHookDataRec call_data; widget = xtWidgetAlloc(widget_class, parent_constraint_class, parent, @@ -393,6 +392,7 @@ xtCreate( /* Convert typed arg list to arg list */ if (typed_args != NULL && num_typed_args > 0) { + Cardinal i; args = (ArgList)ALLOCATE_LOCAL(sizeof(Arg) * num_typed_args); if (args == NULL) _XtAllocError(NULL); for (i = 0; i < num_typed_args; i++) { @@ -410,16 +410,16 @@ xtCreate( } wsize = widget_class->core_class.widget_size; - csize = 0; req_widget = (Widget) XtStackAlloc(wsize, widget_cache); - (void) memmove ((char *) req_widget, (char *) widget, (int) wsize); + (void) memmove ((char *) req_widget, (char *) widget, (size_t) wsize); CallInitialize (XtClass(widget), req_widget, widget, args, num_args); if (parent_constraint_class != NULL) { + double constraint_cache[20]; csize = parent_constraint_class->constraint_class.constraint_size; if (csize) { req_constraints = XtStackAlloc(csize, constraint_cache); (void) memmove((char*)req_constraints, widget->core.constraints, - (int)csize); + (size_t)csize); req_widget->core.constraints = req_constraints; } else req_widget->core.constraints = NULL; CallConstraintInitialize(parent_constraint_class, req_widget, widget, @@ -621,7 +621,7 @@ popupPostProc(Widget w) parent->core.popup_list = (WidgetList) XtRealloc((char*) parent->core.popup_list, - (unsigned) (parent->core.num_popups+1) * sizeof(Widget)); + (Cardinal)((unsigned) (parent->core.num_popups+1) * sizeof(Widget))); parent->core.popup_list[parent->core.num_popups++] = w; } @@ -641,12 +641,12 @@ _XtCreatePopupShell( if (parent == NULL) { XtErrorMsg("invalidParent",XtNxtCreatePopupShell,XtCXtToolkitError, "XtCreatePopupShell requires non-NULL parent", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } else if (widget_class == NULL) { XtAppErrorMsg(XtWidgetToApplicationContext(parent), "invalidClass",XtNxtCreatePopupShell,XtCXtToolkitError, "XtCreatePopupShell requires non-NULL widget class", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } XtCheckSubclass(parent, coreWidgetClass, "in XtCreatePopupShell"); default_screen = parent->core.screen; @@ -698,7 +698,7 @@ _XtAppCreateShell( XtAppErrorMsg(XtDisplayToApplicationContext(display), "invalidClass","xtAppCreateShell",XtCXtToolkitError, "XtAppCreateShell requires non-NULL widget class", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } if (name == NULL) name = XrmNameToString(_XtGetPerDisplay(display)->name); @@ -778,7 +778,7 @@ _XtCreateHookObj(Screen* screen) CompileCallbacks(hookobj); wsize = hookObjectClass->core_class.widget_size; req_widget = (Widget) XtStackAlloc(wsize, widget_cache); - (void) memmove ((char *) req_widget, (char *) hookobj, (int) wsize); + (void) memmove ((char *) req_widget, (char *) hookobj, (size_t) wsize); CallInitialize (hookObjectClass, req_widget, hookobj, (ArgList)NULL, (Cardinal) 0); XtStackFree((XtPointer)req_widget, widget_cache); diff --git a/lib/libXt/src/Destroy.c b/lib/libXt/src/Destroy.c index e952bccc5..37e918aa7 100644 --- a/lib/libXt/src/Destroy.c +++ b/lib/libXt/src/Destroy.c @@ -81,11 +81,10 @@ struct _DestroyRec { static void Recursive(Widget widget, XtWidgetProc proc) { register Cardinal i; - CompositePart *cwp; /* Recurse down normal children */ if (XtIsComposite(widget)) { - cwp = &(((CompositeWidget) widget)->composite); + CompositePart *cwp = &(((CompositeWidget) widget)->composite); for (i = 0; i < cwp->num_children; i++) { Recursive(cwp->children[i], proc); } @@ -329,7 +328,7 @@ void _XtDoPhase2Destroy(XtAppContext app, int dispatch_level) void XtDestroyWidget (Widget widget) { XtAppContext app; - DestroyRec *dr, *dr2; + DestroyRec *dr; app = XtWidgetToApplicationContext(widget); LOCK_APP(app); @@ -351,7 +350,7 @@ void XtDestroyWidget (Widget widget) app->destroy_list_size += 10; app->destroy_list = (DestroyRec*) XtRealloc( (char*)app->destroy_list, - (unsigned)sizeof(DestroyRec)*app->destroy_list_size + (Cardinal)(sizeof(DestroyRec) * (size_t)app->destroy_list_size) ); } dr = app->destroy_list + app->destroy_count++; @@ -365,7 +364,7 @@ void XtDestroyWidget (Widget widget) dr = app->destroy_list + (--i); if (dr->dispatch_level < app->dispatch_level && IsDescendant(dr->widget, widget)) { - dr2 = app->destroy_list + (app->destroy_count-1); + DestroyRec *dr2 = app->destroy_list + (app->destroy_count-1); dr2->dispatch_level = dr->dispatch_level; break; } diff --git a/lib/libXt/src/Display.c b/lib/libXt/src/Display.c index 097173540..9f52576d3 100644 --- a/lib/libXt/src/Display.c +++ b/lib/libXt/src/Display.c @@ -84,7 +84,7 @@ void (*_XtProcessUnlock)(void) = NULL; void (*_XtInitAppLock)(XtAppContext) = NULL; #endif -static String XtNnoPerDisplay = "noPerDisplay"; +static _Xconst _XtString XtNnoPerDisplay = "noPerDisplay"; ProcessContext _XtGetProcessContext(void) { @@ -120,19 +120,19 @@ static void AddToAppContext( #define DISPLAYS_TO_ADD 4 if (app->count >= app->max) { - app->max += DISPLAYS_TO_ADD; + app->max = (short) (app->max + DISPLAYS_TO_ADD); app->list = (Display **) XtRealloc((char *)app->list, - (unsigned) app->max * sizeof(Display *)); + (Cardinal) (((size_t) app->max) * sizeof(Display *))); } app->list[app->count++] = d; app->rebuild_fdlist = TRUE; -#ifndef USE_POLL +#ifdef USE_POLL + app->fds.nfds++; +#else if (ConnectionNumber(d) + 1 > app->fds.nfds) { app->fds.nfds = ConnectionNumber(d) + 1; } -#else - app->fds.nfds++; #endif #undef DISPLAYS_TO_ADD } @@ -151,13 +151,13 @@ static void XtDeleteFromAppContext( app->count--; } app->rebuild_fdlist = TRUE; -#ifndef USE_POLL +#ifdef USE_POLL + app->fds.nfds--; +#else if ((ConnectionNumber(d) + 1) == app->fds.nfds) app->fds.nfds--; else /* Unnecessary, just to be fool-proof */ FD_CLR(ConnectionNumber(d), &app->fds.rmask); -#else - app->fds.nfds--; #endif } @@ -218,8 +218,8 @@ static XtPerDisplay InitPerDisplay( pd->pdi.keyboard.grabType = XtNoServerGrab; pd->pdi.pointer.grabType = XtNoServerGrab; _XtAllocWWTable(pd); - pd->per_screen_db = (XrmDatabase *)__XtCalloc(ScreenCount(dpy), - sizeof(XrmDatabase)); + pd->per_screen_db = (XrmDatabase *)__XtCalloc((Cardinal)ScreenCount(dpy), + (Cardinal)sizeof(XrmDatabase)); pd->cmd_db = (XrmDatabase)NULL; pd->server_db = (XrmDatabase)NULL; pd->dispatcher_list = NULL; @@ -243,17 +243,16 @@ static XtPerDisplay InitPerDisplay( Display *XtOpenDisplay( XtAppContext app, - _Xconst char* displayName, - _Xconst char* applName, - _Xconst char* className, + _Xconst _XtString displayName, + _Xconst _XtString applName, + _Xconst _XtString className, XrmOptionDescRec *urlist, Cardinal num_urs, int *argc, - String *argv) + _XtString *argv) { Display *d; XrmDatabase db = NULL; - XtPerDisplay pd; String language = NULL; LOCK_APP(app); @@ -282,15 +281,16 @@ Display *XtOpenDisplay( } if (d) { + XtPerDisplay pd; pd = InitPerDisplay(d, app, applName, className); pd->language = language; _XtDisplayInitialize(d, pd, applName, urlist, num_urs, argc, argv); } else { int len; displayName = XDisplayName(displayName); - len = strlen (displayName); - app->display_name_tried = (String) __XtMalloc (len + 1); - strncpy ((char*) app->display_name_tried, displayName, len + 1); + len = (int) strlen (displayName); + app->display_name_tried = (_XtString) __XtMalloc ((Cardinal)(len + 1)); + strncpy ((char*) app->display_name_tried, displayName, (size_t) (len + 1)); app->display_name_tried[len] = '\0'; } if (db) XrmDestroyDatabase(db); @@ -305,10 +305,10 @@ _XtAppInit( XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, - String **argv_in_out, + _XtString **argv_in_out, String * fallback_resources) { - String *saved_argv; + _XtString *saved_argv; int i; Display *dpy; @@ -316,8 +316,8 @@ _XtAppInit( * Save away argv and argc so we can set the properties later */ - saved_argv = (String *) - __XtMalloc( (Cardinal)((*argc_in_out + 1) * sizeof(String)) ); + saved_argv = (_XtString *) + __XtMalloc( (Cardinal)((size_t)(*argc_in_out + 1) * sizeof(_XtString)) ); for (i = 0 ; i < *argc_in_out ; i++) saved_argv[i] = (*argv_in_out)[i]; saved_argv[i] = NULL; /* NULL terminate that sucker. */ @@ -329,7 +329,7 @@ _XtAppInit( if (fallback_resources) /* save a procedure call */ XtAppSetFallbackResources(*app_context_return, fallback_resources); - dpy = XtOpenDisplay(*app_context_return, (String) NULL, NULL, + dpy = XtOpenDisplay(*app_context_return, NULL, NULL, application_class, options, num_options, argc_in_out, *argv_in_out); @@ -349,12 +349,12 @@ void XtDisplayInitialize( XtAppContext app, Display *dpy, - _Xconst char* name, - _Xconst char* classname, + _Xconst _XtString name, + _Xconst _XtString classname, XrmOptionDescRec *urlist, Cardinal num_urs, int *argc, - String *argv + _XtString *argv ) { XtPerDisplay pd; @@ -507,7 +507,7 @@ void XtDestroyApplicationContext(XtAppContext app) _XtAppDestroyCount++; appDestroyList = (XtAppContext *) XtRealloc((char *) appDestroyList, - (unsigned) (_XtAppDestroyCount * sizeof(XtAppContext))); + (unsigned) ((size_t)_XtAppDestroyCount * sizeof(XtAppContext))); appDestroyList[_XtAppDestroyCount-1] = app; UNLOCK_PROCESS; UNLOCK_APP(app); @@ -520,7 +520,7 @@ void _XtDestroyAppContexts(void) XtAppContext apps[8]; XtAppContext* pApps; - pApps = XtStackAlloc (sizeof (XtAppContext) * _XtAppDestroyCount, apps); + pApps = XtStackAlloc (sizeof (XtAppContext) * (size_t)_XtAppDestroyCount, apps); for (i = ii = 0; i < _XtAppDestroyCount; i++) { if (_XtSafeToDestroy(appDestroyList[i])) @@ -555,6 +555,7 @@ PerDisplayTablePtr _XtperDisplayList = NULL; XtPerDisplay _XtSortPerDisplayList(Display *dpy) { register PerDisplayTablePtr pd, opd = NULL; + XtPerDisplay result = NULL; LOCK_PROCESS; for (pd = _XtperDisplayList; @@ -566,18 +567,19 @@ XtPerDisplay _XtSortPerDisplayList(Display *dpy) if (pd == NULL) { XtErrorMsg(XtNnoPerDisplay, "getPerDisplay", XtCXtToolkitError, "Couldn't find per display information", - (String *) NULL, (Cardinal *)NULL); - } - - if (pd != _XtperDisplayList) { /* move it to the front */ - /* opd points to the previous one... */ + NULL, NULL); + } else { + if (pd != _XtperDisplayList) { /* move it to the front */ + /* opd points to the previous one... */ - opd->next = pd->next; - pd->next = _XtperDisplayList; - _XtperDisplayList = pd; + opd->next = pd->next; + pd->next = _XtperDisplayList; + _XtperDisplayList = pd; + } + result = &(pd->perDpy); } UNLOCK_PROCESS; - return &(pd->perDpy); + return result; } XtAppContext XtDisplayToApplicationContext(Display *dpy) @@ -590,10 +592,9 @@ XtAppContext XtDisplayToApplicationContext(Display *dpy) static void CloseDisplay(Display *dpy) { - register XtPerDisplay xtpd; + register XtPerDisplay xtpd = NULL; register PerDisplayTablePtr pd, opd = NULL; XrmDatabase db; - int i; XtDestroyWidget(XtHooksOfDisplay(dpy)); @@ -607,15 +608,18 @@ static void CloseDisplay(Display *dpy) if (pd == NULL) { XtErrorMsg(XtNnoPerDisplay, "closeDisplay", XtCXtToolkitError, "Couldn't find per display information", - (String *) NULL, (Cardinal *)NULL); - } + NULL, NULL); + } else { - if (pd == _XtperDisplayList) _XtperDisplayList = pd->next; - else opd->next = pd->next; + if (pd == _XtperDisplayList) _XtperDisplayList = pd->next; + else opd->next = pd->next; - xtpd = &(pd->perDpy); + xtpd = &(pd->perDpy); + } if (xtpd != NULL) { + int i; + if (xtpd->destroy_callbacks != NULL) { XtCallCallbackList((Widget) NULL, (XtCallbackList)xtpd->destroy_callbacks, @@ -653,7 +657,7 @@ static void CloseDisplay(Display *dpy) XrmDestroyDatabase(xtpd->cmd_db); if (xtpd->server_db) XrmDestroyDatabase(xtpd->server_db); - XtFree(xtpd->language); + XtFree((_XtString)xtpd->language); if (xtpd->dispatcher_list != NULL) XtFree((char *) xtpd->dispatcher_list); if (xtpd->ext_select_list != NULL) @@ -683,7 +687,7 @@ void XtCloseDisplay(Display *dpy) app->dpy_destroy_count++; app->dpy_destroy_list = (Display **) XtRealloc((char *) app->dpy_destroy_list, - (unsigned) (app->dpy_destroy_count * sizeof(Display *))); + (Cardinal) ((size_t)app->dpy_destroy_count * sizeof(Display *))); app->dpy_destroy_list[app->dpy_destroy_count-1] = dpy; } UNLOCK_APP(app); @@ -756,8 +760,8 @@ void XtGetDisplays( { int ii; LOCK_APP(app_context); - *num_dpy_return = app_context->count; - *dpy_return = (Display**)__XtMalloc(app_context->count * sizeof(Display*)); + *num_dpy_return = (Cardinal)app_context->count; + *dpy_return = (Display**)__XtMalloc((Cardinal)((size_t)app_context->count * sizeof(Display*))); for (ii = 0; ii < app_context->count; ii++) (*dpy_return)[ii] = app_context->list[ii]; UNLOCK_APP(app_context); diff --git a/lib/libXt/src/Error.c b/lib/libXt/src/Error.c index 50f6c3ca1..a302dbd24 100644 --- a/lib/libXt/src/Error.c +++ b/lib/libXt/src/Error.c @@ -93,7 +93,7 @@ void _XtDefaultError(String) _X_NORETURN; void _XtDefaultWarning(String); static XtErrorMsgHandler errorMsgHandler = _XtDefaultErrorMsg; static XtErrorMsgHandler warningMsgHandler = _XtDefaultWarningMsg; -static XtErrorHandler errorHandler = _XtDefaultError; +static XtErrorHandler errorHandler _X_NORETURN = _XtDefaultError; static XtErrorHandler warningHandler = _XtDefaultWarning; #endif /* GLOBALERRORS */ @@ -131,7 +131,7 @@ void XtGetErrorDatabaseText( register _Xconst char* type, register _Xconst char* class, _Xconst char* defaultp, - String buffer, + _XtString buffer, int nbytes) { #if GLOBALERRORS @@ -149,12 +149,12 @@ void XtAppGetErrorDatabaseText( register _Xconst char* type, register _Xconst char* class, _Xconst char* defaultp, - String buffer, + _XtString buffer, int nbytes, XrmDatabase db) { String str_class; - String type_str; + _XtString type_str; XrmValue result; char *str_name = NULL; char *temp = NULL; @@ -194,12 +194,12 @@ void XtAppGetErrorDatabaseText( #endif /* GLOBALERRORS */ } else (void) XrmGetResource(db, str_name, str_class, &type_str, &result); if (result.addr) { - (void) strncpy (buffer, result.addr, nbytes); + (void) strncpy (buffer, result.addr, (size_t) nbytes); if (result.size > (unsigned) nbytes) buffer[nbytes-1] = 0; } else { - int len = strlen(defaultp); + int len = (int) strlen(defaultp); if (len >= nbytes) len = nbytes-1; - (void) memmove(buffer, defaultp, len); + (void) memmove(buffer, defaultp, (size_t) len); buffer[len] = '\0'; } if (str_name) @@ -251,7 +251,7 @@ static void DefaultMsg ( String par[10]; if (i > 10) i = 10; (void) memmove((char*)par, (char*)params, i * sizeof(String) ); - bzero( &par[i], (10-i) * sizeof(String) ); + memset( &par[i], 0, (10-i) * sizeof(String) ); (void) fprintf (stderr, "%s%s", error ? XTERROR_PREFIX : XTWARNING_PREFIX, error ? "Error: " : "Warning: "); @@ -286,7 +286,7 @@ program as a non-root user or by removing the suid bit on the executable."); String par[10]; if (i > 10) i = 10; (void) memmove((char*)par, (char*)params, i * sizeof(String) ); - bzero( &par[i], (10-i) * sizeof(String) ); + memset( &par[i], 0, (10-i) * sizeof(String) ); if (i != *num_params) XtWarning( "Some arguments in following message were lost" ); /* @@ -344,6 +344,7 @@ void XtErrorMsg( (*errorMsgHandler)((String)name,(String)type,(String)class, (String)defaultp,params,num_params); UNLOCK_PROCESS; + exit(1); #else XtAppErrorMsg(_XtDefaultAppContext(),name,type,class, defaultp,params,num_params); @@ -364,6 +365,7 @@ void XtAppErrorMsg( (*errorMsgHandler)((String)name,(String)type,(String)class, (String)defaultp,params,num_params); UNLOCK_PROCESS; + exit(1); #else LOCK_APP(app); (*app->errorMsgHandler)(name,type,class,defaultp,params,num_params); @@ -412,7 +414,7 @@ void XtAppWarningMsg( } void XtSetErrorMsgHandler( - XtErrorMsgHandler handler) + XtErrorMsgHandler handler _X_NORETURN) { #if GLOBALERRORS LOCK_PROCESS; @@ -426,7 +428,7 @@ void XtSetErrorMsgHandler( XtErrorMsgHandler XtAppSetErrorMsgHandler( XtAppContext app, - XtErrorMsgHandler handler) + XtErrorMsgHandler handler _X_NORETURN) { XtErrorMsgHandler old; #if GLOBALERRORS @@ -547,7 +549,7 @@ void XtAppWarning( #endif /* GLOBALERRORS */ } -void XtSetErrorHandler(XtErrorHandler handler) +void XtSetErrorHandler(XtErrorHandler handler _X_NORETURN) { #if GLOBALERRORS LOCK_PROCESS; @@ -561,7 +563,7 @@ void XtSetErrorHandler(XtErrorHandler handler) XtErrorHandler XtAppSetErrorHandler( XtAppContext app, - XtErrorHandler handler) + XtErrorHandler handler _X_NORETURN) { XtErrorHandler old; #if GLOBALERRORS diff --git a/lib/libXt/src/Event.c b/lib/libXt/src/Event.c index 11823d6e2..a682d2478 100644 --- a/lib/libXt/src/Event.c +++ b/lib/libXt/src/Event.c @@ -110,16 +110,17 @@ EventMask XtBuildEventMask( WIDGET_TO_APPCON(widget); LOCK_APP(app); - for (ev = widget->core.event_table; ev != NULL; ev = ev->next) - if (ev->select) { - if (!ev->has_type_specifier) - mask |= ev->mask; - else { - if (EXT_TYPE(ev) < LASTEvent) { - Cardinal i; - for (i = 0; i < ev->mask; i++) - if (EXT_SELECT_DATA(ev, i)) - mask |= *(EventMask*)EXT_SELECT_DATA(ev, i); + for (ev = widget->core.event_table; ev != NULL; ev = ev->next) { + if (! ev->select) continue; + + if (!ev->has_type_specifier) + mask |= ev->mask; + else { + if (EXT_TYPE(ev) < LASTEvent) { + Cardinal i; + for (i = 0; i < ev->mask; i++) + if (EXT_SELECT_DATA(ev, i)) + mask |= *(EventMask*)EXT_SELECT_DATA(ev, i); } } } @@ -150,7 +151,7 @@ static void CallExtensionSelector( for (p = widget->core.event_table; p != NULL; p = p->next) if (p->has_type_specifier && EXT_TYPE(p) >= rec->min && EXT_TYPE(p) <= rec->max) - count += p->mask; + count = (Cardinal) (count + p->mask); if (count == 0 && !forceCall) return; @@ -166,7 +167,7 @@ static void CallExtensionSelector( data[count++] = EXT_SELECT_DATA(p, i); } - (*rec->proc)(widget, types, data, count, rec->client_data); + (*rec->proc)(widget, types, data, (int) count, rec->client_data); DEALLOCATE_LOCAL((char*) types); DEALLOCATE_LOCAL((char*) data); } @@ -183,7 +184,7 @@ RemoveEventHandler( Boolean raw) { XtEventRec *p, **pp; - EventMask eventMask, oldMask = XtBuildEventMask(widget); + EventMask oldMask = XtBuildEventMask(widget); if (raw) raw = 1; pp = &widget->core.event_table; @@ -196,7 +197,7 @@ RemoveEventHandler( /* un-register it */ if (!has_type_specifier) { - eventMask = *(EventMask*)select_data; + EventMask eventMask = *(EventMask*)select_data; eventMask &= ~NonMaskableMask; if (other) eventMask |= NonMaskableMask; @@ -230,7 +231,7 @@ RemoveEventHandler( Display* dpy = XtDisplay (widget); if (oldMask != mask) - XSelectInput(dpy, XtWindow(widget), mask); + XSelectInput(dpy, XtWindow(widget), (long) mask); if (has_type_specifier) { XtPerDisplay pd = _XtGetPerDisplay(dpy); @@ -315,7 +316,6 @@ AddEventHandler( if (position == XtListHead) { p->next = widget->core.event_table; widget->core.event_table = p; - pp = &widget->core.event_table; } else { *pp = p; p->next = NULL; @@ -348,9 +348,9 @@ AddEventHandler( i++; if (i == p->mask) { p = (XtEventRec*) XtRealloc((char*)p, - sizeof(XtEventRec) + + (Cardinal)(sizeof(XtEventRec) + sizeof(XtEventRecExt) + - p->mask * sizeof(XtPointer)); + p->mask * sizeof(XtPointer))); EXT_SELECT_DATA(p,i) = select_data; p->mask++; *pp = p; @@ -363,7 +363,7 @@ AddEventHandler( Display* dpy = XtDisplay (widget); if (oldMask != mask) - XSelectInput(dpy, XtWindow(widget), mask); + XSelectInput(dpy, XtWindow(widget), (long) mask); if (has_type_specifier) { XtPerDisplay pd = _XtGetPerDisplay (dpy); @@ -390,7 +390,7 @@ void XtRemoveEventHandler( WIDGET_TO_APPCON(widget); LOCK_APP(app); RemoveEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, - other, proc, closure, FALSE); + (Boolean) other, proc, closure, FALSE); UNLOCK_APP(app); } @@ -403,7 +403,7 @@ void XtAddEventHandler( { WIDGET_TO_APPCON(widget); LOCK_APP(app); - AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other, + AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other, proc, closure, XtListTail, FALSE, FALSE); UNLOCK_APP(app); } @@ -418,7 +418,7 @@ void XtInsertEventHandler( { WIDGET_TO_APPCON(widget); LOCK_APP(app); - AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other, + AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other, proc, closure, position, TRUE, FALSE); UNLOCK_APP(app); } @@ -433,7 +433,7 @@ void XtRemoveRawEventHandler( WIDGET_TO_APPCON(widget); LOCK_APP(app); RemoveEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, - other, proc, closure, TRUE); + (Boolean) other, proc, closure, TRUE); UNLOCK_APP(app); } @@ -447,7 +447,7 @@ void XtInsertRawEventHandler( { WIDGET_TO_APPCON(widget); LOCK_APP(app); - AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other, + AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other, proc, closure, position, TRUE, TRUE); UNLOCK_APP(app); } @@ -461,7 +461,7 @@ void XtAddRawEventHandler( { WIDGET_TO_APPCON(widget); LOCK_APP(app); - AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, other, + AddEventHandler(widget, (XtPointer) &eventMask, 0, FALSE, (Boolean) other, proc, closure, XtListTail, FALSE, TRUE); UNLOCK_APP(app); } @@ -514,7 +514,7 @@ static const WidgetRec WWfake; /* placeholder for deletions */ #define WWHASH(tab,win) ((win) & tab->mask) #define WWREHASHVAL(tab,win) ((((win) % tab->rehash) + 2) | 1) -#define WWREHASH(tab,idx,rehash) ((idx + rehash) & tab->mask) +#define WWREHASH(tab,idx,rehash) ((unsigned)(idx + rehash) & (tab->mask)) #define WWTABLE(display) (_XtGetPerDisplay(display)->WWtable) static void ExpandWWTable(WWTable); @@ -525,7 +525,7 @@ void XtRegisterDrawable( Widget widget) { WWTable tab; - int idx, rehash; + int idx; Widget entry; Window window = (Window) drawable; WIDGET_TO_APPCON(widget); @@ -547,11 +547,11 @@ void XtRegisterDrawable( if ((tab->occupied + (tab->occupied >> 2)) > tab->mask) ExpandWWTable(tab); - idx = WWHASH(tab, window); + idx = (int) WWHASH(tab, window); if ((entry = tab->entries[idx]) && entry != &WWfake) { - rehash = WWREHASHVAL(tab, window); + int rehash = (int) WWREHASHVAL(tab, window); do { - idx = WWREHASH(tab, idx, rehash); + idx = (int) WWREHASH(tab, idx, rehash); } while ((entry = tab->entries[idx]) && entry != &WWfake); } if (!entry) @@ -568,7 +568,7 @@ void XtUnregisterDrawable( Drawable drawable) { WWTable tab; - int idx, rehash; + int idx; Widget entry; Window window = (Window) drawable; Widget widget = XtWindowToWidget (display, window); @@ -593,12 +593,12 @@ void XtUnregisterDrawable( UNLOCK_APP(app); return; } - idx = WWHASH(tab, window); + idx = (int) WWHASH(tab, window); if ((entry = tab->entries[idx])) { if (entry != widget) { - rehash = WWREHASHVAL(tab, window); + int rehash = (int) WWREHASHVAL(tab, window); do { - idx = WWREHASH(tab, idx, rehash); + idx = (int) WWREHASH(tab, idx, rehash); if (!(entry = tab->entries[idx])) { UNLOCK_PROCESS; UNLOCK_APP(app); @@ -633,11 +633,11 @@ static void ExpandWWTable( entries = tab->entries = (Widget *) __XtCalloc(tab->mask+1, sizeof(Widget)); for (oldidx = 0; oldidx <= oldmask; oldidx++) { if ((entry = oldentries[oldidx]) && entry != &WWfake) { - newidx = WWHASH(tab, XtWindow(entry)); + newidx = (Cardinal) WWHASH(tab, XtWindow(entry)); if (entries[newidx]) { - rehash = WWREHASHVAL(tab, XtWindow(entry)); + rehash = (Cardinal) WWREHASHVAL(tab, XtWindow(entry)); do { - newidx = WWREHASH(tab, newidx, rehash); + newidx = (Cardinal) WWREHASH(tab, newidx, rehash); } while (entries[newidx]); } entries[newidx] = entry; @@ -651,9 +651,9 @@ Widget XtWindowToWidget( register Display *display, register Window window) { - register WWTable tab; - register int idx, rehash; - register Widget entry; + WWTable tab; + int idx; + Widget entry; WWPair pair; DPY_TO_APPCON(display); @@ -662,11 +662,11 @@ Widget XtWindowToWidget( LOCK_APP(app); LOCK_PROCESS; tab = WWTABLE(display); - idx = WWHASH(tab, window); + idx = (int) WWHASH(tab, window); if ((entry = tab->entries[idx]) && XtWindow(entry) != window) { - rehash = WWREHASHVAL(tab, window); + int rehash = (int) WWREHASHVAL(tab, window); do { - idx = WWREHASH(tab, idx, rehash); + idx = (int) WWREHASH(tab, idx, rehash); } while ((entry = tab->entries[idx]) && XtWindow(entry) != window); } if (entry) { @@ -725,8 +725,6 @@ static Boolean CallEventHandlers( register XtEventRec *p; XtEventHandler *proc; XtPointer *closure; - XtEventHandler procs[EHMAXSIZE]; - XtPointer closures[EHMAXSIZE]; Boolean cont_to_disp = True; int i, numprocs; @@ -739,14 +737,10 @@ static Boolean CallEventHandlers( (p->has_type_specifier && event->type == EXT_TYPE(p))) numprocs++; } - if (numprocs > EHMAXSIZE) { - proc = (XtEventHandler *)__XtMalloc(numprocs * (sizeof(XtEventHandler) + - sizeof(XtPointer))); - closure = (XtPointer *)(proc + numprocs); - } else { - proc = procs; - closure = closures; - } + proc = (XtEventHandler *)__XtMalloc((Cardinal)((size_t)numprocs * (sizeof(XtEventHandler) + + sizeof(XtPointer)))); + closure = (XtPointer *)(proc + numprocs); + numprocs = 0; for (p=widget->core.event_table; p; p = p->next) { if ((!p->has_type_specifier && (mask & p->mask)) || @@ -771,8 +765,7 @@ static Boolean CallEventHandlers( */ for (i = 0; i < numprocs && cont_to_disp; i++) (*(proc[i]))(widget, closure[i], event, &cont_to_disp); - if (numprocs > EHMAXSIZE) - XtFree((char *)proc); + XtFree((char *)proc); return cont_to_disp; } @@ -1037,10 +1030,10 @@ void XtAddExposureToRegion( /* These Expose and GraphicsExpose fields are at identical offsets */ if (event->type == Expose || event->type == GraphicsExpose) { - rect.x = ev->x; - rect.y = ev->y; - rect.width = ev->width; - rect.height = ev->height; + rect.x = (Position) ev->x; + rect.y = (Position) ev->y; + rect.width = (Dimension) ev->width; + rect.height = (Dimension) ev->height; XUnionRectWithRegion(&rect, region, region); } } @@ -1061,10 +1054,10 @@ static void AddExposureToRectangularRegion( XExposeEvent *ev = (XExposeEvent *) event; /* These Expose and GraphicsExpose fields are at identical offsets */ - rect.x = ev->x; - rect.y = ev->y; - rect.width = ev->width; - rect.height = ev->height; + rect.x = (Position) ev->x; + rect.y = (Position) ev->y; + rect.width = (Dimension) ev->width; + rect.height = (Dimension) ev->height; if (XEmptyRegion(region)) { XUnionRectWithRegion(&rect, region, region); @@ -1074,10 +1067,10 @@ static void AddExposureToRectangularRegion( XClipBox(region, &bbox); merged.x = MIN(rect.x, bbox.x); merged.y = MIN(rect.y, bbox.y); - merged.width = MAX(rect.x + rect.width, - bbox.x + bbox.width) - merged.x; - merged.height = MAX(rect.y + rect.height, - bbox.y + bbox.height) - merged.y; + merged.width = (unsigned short)(MAX(rect.x + rect.width, + bbox.x + bbox.width) - merged.x); + merged.height = (unsigned short)(MAX(rect.y + rect.height, + bbox.y + bbox.height) - merged.y); XUnionRectWithRegion(&merged, region, region); } } @@ -1331,7 +1324,7 @@ Boolean _XtDefaultDispatcher( was_dispatched = (XFilterEvent(event, XtWindow(widget)) || XtDispatchEventToWidget(widget, event)); } - else was_dispatched = XFilterEvent(event, None); + else was_dispatched = (Boolean) XFilterEvent(event, None); } else if (grabType == pass) { if (event->type == LeaveNotify || @@ -1359,7 +1352,7 @@ Boolean _XtDefaultDispatcher( if ((grabList == NULL ||_XtOnGrabList(dspWidget, grabList)) && XtIsSensitive(dspWidget)) { - if ((was_filtered = XFilterEvent(event, XtWindow(dspWidget)))) { + if ((was_filtered = (Boolean) XFilterEvent(event, XtWindow(dspWidget)))) { /* If this event activated a device grab, release it. */ _XtUngrabBadGrabs(event, widget, mask, pdi); was_dispatched = True; @@ -1464,8 +1457,8 @@ static XtGrabRec *NewGrabRec( gl = XtNew(XtGrabRec); gl->next = NULL; gl->widget = widget; - gl->exclusive = exclusive; - gl->spring_loaded = spring_loaded; + XtSetBit(gl->exclusive, exclusive); + XtSetBit(gl->spring_loaded, spring_loaded); return gl; } @@ -1487,11 +1480,11 @@ void XtAddGrab( XtAppWarningMsg(app, "grabError", "xtAddGrab", XtCXtToolkitError, "XtAddGrab requires exclusive grab if spring_loaded is TRUE", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); exclusive = TRUE; } - gl = NewGrabRec(widget, exclusive, spring_loaded); + gl = NewGrabRec(widget, (Boolean) exclusive, (Boolean) spring_loaded); gl->next = *grabListPtr; *grabListPtr = gl; @@ -1522,7 +1515,7 @@ void XtRemoveGrab( XtAppWarningMsg(app, "grabError","xtRemoveGrab",XtCXtToolkitError, "XtRemoveGrab asked to remove a widget not on the list", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_PROCESS; UNLOCK_APP(app); return; @@ -1549,9 +1542,19 @@ void XtMainLoop(void) void XtAppMainLoop( XtAppContext app) { + XtInputMask m = XtIMAll; + XtInputMask t; LOCK_APP(app); do { - XtAppProcessEvent(app, XtIMAll); + if (m == 0) { + m = XtIMAll; + /* wait for any event, blocking */ + XtAppProcessEvent(app, m); + } else if (((t = XtAppPending(app)) & m)) { + /* wait for certain events, stepping through choices */ + XtAppProcessEvent(app, t & m); + } + m >>= 1; } while(app->exit_flag == FALSE); UNLOCK_APP(app); } @@ -1664,7 +1667,6 @@ void XtRegisterExtensionSelector( XtExtensionSelectProc proc, XtPointer client_data) { - ExtSelectRec *e; XtPerDisplay pd; int i; DPY_TO_APPCON(dpy); @@ -1672,14 +1674,14 @@ void XtRegisterExtensionSelector( if (dpy == NULL) XtErrorMsg("nullDisplay", "xtRegisterExtensionSelector", XtCXtToolkitError, "XtRegisterExtensionSelector requires a non-NULL display", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); LOCK_APP(app); LOCK_PROCESS; pd = _XtGetPerDisplay(dpy); for (i = 0; i < pd->ext_select_count; i++) { - e = &pd->ext_select_list[i]; + ExtSelectRec *e = &pd->ext_select_list[i]; if (e->min == min_event_type && e->max == max_event_type) { e->proc = proc; e->client_data = client_data; @@ -1690,7 +1692,7 @@ void XtRegisterExtensionSelector( XtErrorMsg("rangeError", "xtRegisterExtensionSelector", XtCXtToolkitError, "Attempt to register multiple selectors for one extension event type", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); UNLOCK_PROCESS; UNLOCK_APP(app); return; @@ -1699,7 +1701,7 @@ void XtRegisterExtensionSelector( pd->ext_select_count++; pd->ext_select_list = (ExtSelectRec *) XtRealloc((char *) pd->ext_select_list, - pd->ext_select_count * sizeof(ExtSelectRec)); + (Cardinal) ((size_t)pd->ext_select_count * sizeof(ExtSelectRec))); for (i = pd->ext_select_count - 1; i > 0; i--) { if (pd->ext_select_list[i-1].min > min_event_type) { pd->ext_select_list[i] = pd->ext_select_list[i-1]; diff --git a/lib/libXt/src/EventUtil.c b/lib/libXt/src/EventUtil.c index 91ad31fae..4dcbbc6f3 100644 --- a/lib/libXt/src/EventUtil.c +++ b/lib/libXt/src/EventUtil.c @@ -173,12 +173,12 @@ void _XtFillAncestorList( happen again, so grow the ancestor list */ *maxElemsPtr += CACHESIZE; trace = (Widget *) XtRealloc((char*)trace, - sizeof(Widget) * (*maxElemsPtr)); + (Cardinal)(sizeof(Widget) * (size_t)(*maxElemsPtr))); } trace[i] = w; } *listPtr = trace; - *numElemsPtr = i; + *numElemsPtr = (int) i; #undef CACHESIZE } diff --git a/lib/libXt/src/Functions.c b/lib/libXt/src/Functions.c index 9937a50ab..f70553b55 100644 --- a/lib/libXt/src/Functions.c +++ b/lib/libXt/src/Functions.c @@ -211,6 +211,6 @@ String XtNewString(String str) { if (str == NULL) return NULL; - else - return strcpy(__XtMalloc((unsigned)strlen(str) + 1), str); + + return strdup(str); } diff --git a/lib/libXt/src/GCManager.c b/lib/libXt/src/GCManager.c index ba3d9c492..52e32aec1 100644 --- a/lib/libXt/src/GCManager.c +++ b/lib/libXt/src/GCManager.c @@ -162,8 +162,7 @@ void _XtGClistFree( Display *dpy, register XtPerDisplay pd) { - register GCptr GClist, next; - register int i; + GCptr GClist, next; GClist = pd->GClist; while (GClist) { @@ -172,6 +171,7 @@ void _XtGClistFree( GClist = next; } if (pd->pixmap_tab) { + int i; for (i = ScreenCount(dpy); --i >= 0; ) { if (pd->pixmap_tab[i]) XtFree((char *)pd->pixmap_tab[i]); @@ -235,8 +235,8 @@ GC XtAllocateGC( /* No matches, have to create a new one */ cur = XtNew(GCrec); - cur->screen = XScreenNumberOfScreen(screen); - cur->depth = depth; + cur->screen = (unsigned char) XScreenNumberOfScreen(screen); + cur->depth = (unsigned char) depth; cur->ref_count = 1; cur->dynamic_mask = dynamicMask; cur->unused_mask = (unusedMask & ~dynamicMask); @@ -250,8 +250,8 @@ GC XtAllocateGC( if (!drawable) { if (!pd->pixmap_tab) { int n; - pd->pixmap_tab = (Drawable **)__XtMalloc((unsigned)ScreenCount(dpy) * - sizeof(Drawable *)); + pd->pixmap_tab = (Drawable **)__XtMalloc((Cardinal)((unsigned)ScreenCount(dpy) * + sizeof(Drawable *))); for (n = 0; n < ScreenCount(dpy); n++) pd->pixmap_tab[n] = NULL; } diff --git a/lib/libXt/src/Geometry.c b/lib/libXt/src/Geometry.c index d64c8e292..992141ea7 100644 --- a/lib/libXt/src/Geometry.c +++ b/lib/libXt/src/Geometry.c @@ -85,7 +85,7 @@ static void ClearRectObjAreas( bw2 = old->border_width << 1; XClearArea( XtDisplay(pw), XtWindow(pw), old->x, old->y, - old->width + bw2, old->height + bw2, + (unsigned)(old->width + bw2), (unsigned)(old->height + bw2), TRUE ); bw2 = r->rectangle.border_width << 1; @@ -116,7 +116,9 @@ _XtMakeGeometryRequest ( XtGeometryHandler manager = (XtGeometryHandler) NULL; XtGeometryResult returnCode; Widget parent = widget->core.parent; - Boolean managed, parentRealized, rgm = False; + Boolean managed; + Boolean parentRealized = False; + Boolean rgm = False; XtConfigureHookDataRec req; Widget hookobj; @@ -163,21 +165,22 @@ _XtMakeGeometryRequest ( parentRealized = TRUE; UNLOCK_PROCESS; } else /* not shell */ { - if (parent == NULL) + if (parent == NULL) { XtAppErrorMsg(XtWidgetToApplicationContext(widget), "invalidParent","xtMakeGeometryRequest", XtCXtToolkitError, "non-shell has no parent in XtMakeGeometryRequest", - (String *)NULL, (Cardinal *)NULL); - - managed = XtIsManaged(widget); - parentRealized = XtIsRealized(parent); - if (XtIsComposite(parent)) - { - LOCK_PROCESS; - manager = ((CompositeWidgetClass) (parent->core.widget_class)) - ->composite_class.geometry_manager; - UNLOCK_PROCESS; + NULL, NULL); + } else { + managed = XtIsManaged(widget); + parentRealized = XtIsRealized(parent); + if (XtIsComposite(parent)) + { + LOCK_PROCESS; + manager = ((CompositeWidgetClass) (parent->core.widget_class)) + ->composite_class.geometry_manager; + UNLOCK_PROCESS; + } } } @@ -201,7 +204,7 @@ _XtMakeGeometryRequest ( "invalidParent", "xtMakeGeometryRequest", XtCXtToolkitError, "XtMakeGeometryRequest - parent not composite", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } else if (manager == (XtGeometryHandler) NULL) { @@ -209,7 +212,7 @@ _XtMakeGeometryRequest ( "invalidGeometryManager","xtMakeGeometryRequest", XtCXtToolkitError, "XtMakeGeometryRequest - parent has no geometry manager", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } } #else @@ -430,7 +433,7 @@ _XtMakeGeometryRequest ( if (XtIsWidget(request->sibling)) req.changes.sibling = XtWindow(request->sibling); else - req.changeMask &= ~(CWStackMode | CWSibling); + req.changeMask = (XtGeometryMask) (req.changeMask & (unsigned long) (~(CWStackMode | CWSibling))); } } @@ -456,7 +459,7 @@ _XtMakeGeometryRequest ( ClearRectObjAreas((RectObj)widget, &req.changes); } - hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget));; + hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget)); if (XtHasCallbacks(hookobj, XtNconfigureHook) == XtCallbackHasSome) { req.type = XtHconfigure; req.widget = widget; @@ -522,8 +525,8 @@ XtMakeResizeRequest( LOCK_APP(app); request.request_mode = CWWidth | CWHeight; - request.width = width; - request.height = height; + request.width = (Dimension) width; + request.height = (Dimension) height; if (XtHasCallbacks(hookobj, XtNgeometryHook) == XtCallbackHasSome) { call_data.type = XtHpreGeometry; @@ -546,13 +549,13 @@ XtMakeResizeRequest( if (r == XtGeometryAlmost && reply.request_mode & CWWidth) *replyWidth = reply.width; else - *replyWidth = width; + *replyWidth = (Dimension) width; } if (replyHeight != NULL) { if (r == XtGeometryAlmost && reply.request_mode & CWHeight) *replyHeight = reply.height; else - *replyHeight = height; + *replyHeight = (Dimension) height; } UNLOCK_APP(app); return ((r == XtGeometryDone) ? XtGeometryYes : r); @@ -562,18 +565,19 @@ void XtResizeWindow( Widget w) { XtConfigureHookDataRec req; - Widget hookobj; WIDGET_TO_APPCON(w); LOCK_APP(app); if (XtIsRealized(w)) { + Widget hookobj; + req.changes.width = w->core.width; req.changes.height = w->core.height; req.changes.border_width = w->core.border_width; req.changeMask = CWWidth | CWHeight | CWBorderWidth; XConfigureWindow(XtDisplay(w), XtWindow(w), (unsigned) req.changeMask, &req.changes); - hookobj = XtHooksOfDisplay(XtDisplayOfObject(w));; + hookobj = XtHooksOfDisplay(XtDisplayOfObject(w)); if (XtHasCallbacks(hookobj, XtNconfigureHook) == XtCallbackHasSome) { req.type = XtHconfigure; req.widget = w; @@ -603,7 +607,6 @@ void XtConfigureWidget( _XtDimension borderWidth) { XtConfigureHookDataRec req; - Widget hookobj; XWindowChanges old; WIDGET_TO_APPCON(w); @@ -617,38 +620,40 @@ void XtConfigureWidget( req.changeMask = 0; if ((old.x = w->core.x) != x) { CALLGEOTAT(_XtGeoTrace(w,"x move from %d to %d\n",w->core.x, x)); - req.changes.x = w->core.x = x; + req.changes.x = w->core.x = (Position) x; req.changeMask |= CWX; } if ((old.y = w->core.y) != y) { CALLGEOTAT(_XtGeoTrace(w,"y move from %d to %d\n",w->core.y, y)); - req.changes.y = w->core.y = y; + req.changes.y = w->core.y = (Position) y; req.changeMask |= CWY; } if ((old.width = w->core.width) != width) { CALLGEOTAT(_XtGeoTrace(w, "width move from %d to %d\n",w->core.width, width)); - req.changes.width = w->core.width = width; + req.changes.width = w->core.width = (Dimension) width; req.changeMask |= CWWidth; } if ((old.height = w->core.height) != height) { CALLGEOTAT(_XtGeoTrace(w, "height move from %d to %d\n",w->core.height, height)); - req.changes.height = w->core.height = height; + req.changes.height = w->core.height = (Dimension) height; req.changeMask |= CWHeight; } if ((old.border_width = w->core.border_width) != borderWidth) { CALLGEOTAT(_XtGeoTrace(w,"border_width move from %d to %d\n", w->core.border_width,borderWidth )); - req.changes.border_width = w->core.border_width = borderWidth; + req.changes.border_width = w->core.border_width = (Dimension) borderWidth; req.changeMask |= CWBorderWidth; } if (req.changeMask != 0) { + Widget hookobj; + if (XtIsRealized(w)) { if (XtIsWidget(w)) { CALLGEOTAT(_XtGeoTrace(w, @@ -661,7 +666,7 @@ void XtConfigureWidget( ClearRectObjAreas((RectObj)w, &old); } } - hookobj = XtHooksOfDisplay(XtDisplayOfObject(w));; + hookobj = XtHooksOfDisplay(XtDisplayOfObject(w)); if (XtHasCallbacks(hookobj, XtNconfigureHook) == XtCallbackHasSome) { req.type = XtHconfigure; req.widget = w; @@ -712,24 +717,24 @@ void XtTranslateCoords( if (rootx == NULL) rootx = &garbagex; if (rooty == NULL) rooty = &garbagey; - *rootx = x; - *rooty = y; + *rootx = (Position) x; + *rooty = (Position) y; for (; w != NULL && ! XtIsShell(w); w = w->core.parent) { - *rootx += w->core.x + w->core.border_width; - *rooty += w->core.y + w->core.border_width; + *rootx = (Position) (*rootx + w->core.x + w->core.border_width); + *rooty = (Position) (*rooty + w->core.y + w->core.border_width); } if (w == NULL) XtAppWarningMsg(app, "invalidShell","xtTranslateCoords",XtCXtToolkitError, "Widget has no shell ancestor", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); else { - Position x, y; - _XtShellGetCoordinates( w, &x, &y ); - *rootx += x + w->core.border_width; - *rooty += y + w->core.border_width; + Position x2, y2; + _XtShellGetCoordinates( w, &x2, &y2 ); + *rootx = (Position) (*rootx + x2 + w->core.border_width); + *rooty = (Position) (*rooty + y2 + w->core.border_width); } UNLOCK_APP(app); } diff --git a/lib/libXt/src/GetResList.c b/lib/libXt/src/GetResList.c index c22725c11..4c8fe0d04 100644 --- a/lib/libXt/src/GetResList.c +++ b/lib/libXt/src/GetResList.c @@ -90,14 +90,14 @@ void XtGetResourceList( register XtResourceList *list, dlist; LOCK_PROCESS; - size = widget_class->core_class.num_resources * sizeof(XtResource); + size = (int) (widget_class->core_class.num_resources * sizeof(XtResource)); *resources = (XtResourceList) __XtMalloc((unsigned) size); if (!widget_class->core_class.class_inited) { /* Easy case */ (void) memmove((char *) *resources, - (char *)widget_class->core_class.resources, size); + (char *)widget_class->core_class.resources, (size_t) size); *num_resources = widget_class->core_class.num_resources; UNLOCK_PROCESS; return; @@ -161,14 +161,14 @@ void XtGetConstraintResourceList( return; } - size = class->constraint_class.num_resources * sizeof(XtResource); + size = (int) (class->constraint_class.num_resources * sizeof(XtResource)); *resources = (XtResourceList) __XtMalloc((unsigned) size); if (!class->core_class.class_inited) { /* Easy case */ (void) memmove((char *) *resources, - (char *)class->constraint_class.resources, size); + (char *)class->constraint_class.resources, (size_t) size); *num_resources = class->constraint_class.num_resources; UNLOCK_PROCESS; return; diff --git a/lib/libXt/src/GetValues.c b/lib/libXt/src/GetValues.c index 511b8d807..c836366ba 100644 --- a/lib/libXt/src/GetValues.c +++ b/lib/libXt/src/GetValues.c @@ -209,7 +209,7 @@ void XtGetValues( XtAppErrorMsg(app, "invalidArgCount","xtGetValues",XtCXtToolkitError, "Argument count > 0 on NULL argument list in XtGetValues", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } LOCK_APP(app); diff --git a/lib/libXt/src/Hooks.c b/lib/libXt/src/Hooks.c index bf26a13e0..64e835558 100644 --- a/lib/libXt/src/Hooks.c +++ b/lib/libXt/src/Hooks.c @@ -80,7 +80,7 @@ void XtRemoveBlockHook( #ifdef DEBUG XtAppWarningMsg(app, "badId", "xtRemoveBlockHook", XtCXtToolkitError, "XtRemoveBlockHook called with bad or old hook id", - (String*)NULL, (Cardinal*)NULL); + NULL, NULL); #endif /*DEBUG*/ UNLOCK_APP(app); return; @@ -123,7 +123,7 @@ void _XtAddShellToHookObj( ho->hooks.max_shells += SHELL_INCR; ho->hooks.shells = (WidgetList)XtRealloc((char*)ho->hooks.shells, - ho->hooks.max_shells * sizeof (Widget)); + (Cardinal) (ho->hooks.max_shells * sizeof (Widget))); } ho->hooks.shells[ho->hooks.num_shells++] = shell; diff --git a/lib/libXt/src/Initialize.c b/lib/libXt/src/Initialize.c index 61c857550..2adf1fd24 100644 --- a/lib/libXt/src/Initialize.c +++ b/lib/libXt/src/Initialize.c @@ -180,7 +180,7 @@ static void GetHostname ( return; buf[0] = '\0'; - (void) gethostname (buf, maxlen); + (void) gethostname (buf, (size_t) maxlen); buf [maxlen - 1] = '\0'; #endif } @@ -268,7 +268,7 @@ void _XtInherit(void) { XtErrorMsg("invalidProcedure","inheritanceProc",XtCXtToolkitError, "Unresolved inheritance operation", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } @@ -301,7 +301,7 @@ void XtToolkitInitialize(void) String _XtGetUserName( - String dest, + _XtString dest, int len) { #ifdef WIN32 @@ -320,11 +320,11 @@ String _XtGetUserName( char* ptr; if ((ptr = getenv("USER"))) { - (void) strncpy (dest, ptr, len-1); + (void) strncpy (dest, ptr, (size_t) (len-1)); dest[len-1] = '\0'; } else { if ((pw = _XGetpwuid(getuid(),pwparams)) != NULL) { - (void) strncpy (dest, pw->pw_name, len-1); + (void) strncpy (dest, pw->pw_name, (size_t)(len-1)); dest[len-1] = '\0'; } else *dest = '\0'; @@ -335,7 +335,7 @@ String _XtGetUserName( static String GetRootDirName( - String dest, + _XtString dest, int len) { #ifdef WIN32 @@ -360,22 +360,22 @@ static String GetRootDirName( #ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; #endif - struct passwd *pw; static char *ptr; if (len <= 0 || dest == NULL) return NULL; if ((ptr = getenv("HOME"))) { - (void) strncpy (dest, ptr, len-1); + (void) strncpy (dest, ptr, (size_t)(len-1)); dest[len-1] = '\0'; } else { + struct passwd *pw; if ((ptr = getenv("USER"))) pw = _XGetpwnam(ptr,pwparams); else pw = _XGetpwuid(getuid(),pwparams); if (pw != NULL) { - (void) strncpy (dest, pw->pw_dir, len-1); + (void) strncpy (dest, pw->pw_dir, (size_t)(len-1)); dest[len-1] = '\0'; } else *dest = '\0'; @@ -425,19 +425,19 @@ static void CombineUserDefaults( Display *dpy, XrmDatabase *pdb) { -#ifdef __MINGW32__ - const char *slashDotXdefaults = "/Xdefaults"; -#else - const char *slashDotXdefaults = "/.Xdefaults"; -#endif char *dpy_defaults = XResourceManagerString(dpy); if (dpy_defaults) { XrmCombineDatabase(XrmGetStringDatabase(dpy_defaults), pdb, False); } else { +#ifdef __MINGW32__ + const char *slashDotXdefaults = "/Xdefaults"; +#else + const char *slashDotXdefaults = "/.Xdefaults"; +#endif char filename[PATH_MAX]; (void) GetRootDirName(filename, - PATH_MAX - strlen (slashDotXdefaults) - 1); + PATH_MAX - (int)strlen (slashDotXdefaults) - 1); (void) strcat(filename, slashDotXdefaults); (void)XrmCombineFileDatabase(filename, pdb, False); } @@ -574,9 +574,9 @@ XrmDatabase XtScreenDatabase( #endif (void) GetRootDirName(filename = filenamebuf, - PATH_MAX - strlen (slashDotXdefaultsDash) - 1); + PATH_MAX - (int)strlen (slashDotXdefaultsDash) - 1); (void) strcat(filename, slashDotXdefaultsDash); - len = strlen(filename); + len = (int)strlen(filename); GetHostname (filename+len, PATH_MAX-len); } (void)XrmCombineFileDatabase(filename, &db, False); @@ -648,24 +648,26 @@ static void _MergeOptionTables( Cardinal *num_dst) { XrmOptionDescRec *table, *endP; - register XrmOptionDescRec *opt1, *whereP, *dstP; - register const XrmOptionDescRec *opt2; + XrmOptionDescRec *opt1, *dstP; + const XrmOptionDescRec *opt2; int i1; Cardinal i2; int dst_len, order; - Boolean found; enum {Check, NotSorted, IsSorted} sort_order = Check; *dst = table = (XrmOptionDescRec*) - __XtMalloc( sizeof(XrmOptionDescRec) * (num_src1 + num_src2) ); + __XtMalloc( (Cardinal)(sizeof(XrmOptionDescRec) * (num_src1 + num_src2) )); (void) memmove(table, src1, sizeof(XrmOptionDescRec) * num_src1 ); if (num_src2 == 0) { *num_dst = num_src1; return; } - endP = &table[dst_len = num_src1]; + endP = &table[dst_len = (int)num_src1]; for (opt2 = src2, i2= 0; i2 < num_src2; opt2++, i2++) { + XrmOptionDescRec *whereP; + Boolean found; + found = False; whereP = endP-1; /* assume new option goes at the end */ for (opt1 = table, i1 = 0; i1 < dst_len; opt1++, i1++) { @@ -709,7 +711,7 @@ static void _MergeOptionTables( dst_len++; } } - *num_dst = dst_len; + *num_dst = (Cardinal)dst_len; } @@ -737,7 +739,7 @@ static Boolean _GetResource( return True; } else { WidgetRec widget; /* hack, hack */ - bzero( &widget, sizeof(widget) ); + memset( &widget, 0, sizeof(widget) ); widget.core.self = &widget; widget.core.widget_class = coreWidgetClass; widget.core.screen = (Screen*)DefaultScreenOfDisplay(dpy); @@ -754,7 +756,7 @@ XrmDatabase _XtPreparseCommandLine( XrmOptionDescRec *urlist, Cardinal num_urs, int argc, - String *argv, + _XtString *argv, /* return */ String *applName, String *displayName, @@ -767,16 +769,16 @@ XrmDatabase _XtPreparseCommandLine( XrmName class_list[3]; XrmRepresentation type; XrmValue val; - String *targv; + _XtString *targv; int targc = argc; - targv = (String *) __XtMalloc(sizeof(char *) * argc); - (void) memmove(targv, argv, sizeof(char *) * argc); + targv = (_XtString *) __XtMalloc((Cardinal)(sizeof(_XtString*) * (size_t)argc)); + (void) memmove(targv, argv, sizeof(char *) * (size_t) argc); _MergeOptionTables(opTable, XtNumber(opTable), urlist, num_urs, &options, &num_options); name_list[0] = class_list[0] = XrmPermStringToQuark("."); name_list[2] = class_list[2] = NULLQUARK; - XrmParseCommand(&db, options, num_options, ".", &targc, targv); + XrmParseCommand(&db, options, (int) num_options, ".", &targc, targv); if (applName) { name_list[1] = XrmPermStringToQuark("name"); if (XrmQGetResource(db, name_list, name_list, &type, &val) && @@ -893,7 +895,7 @@ void _XtDisplayInitialize( /* Parse the command line and remove Xt arguments from argv */ _MergeOptionTables( opTable, XtNumber(opTable), urlist, num_urs, &options, &num_options ); - XrmParseCommand(&pd->cmd_db, options, num_options, name, argc, argv); + XrmParseCommand(&pd->cmd_db, options, (int) num_options, name, argc, argv); db = XtScreenDatabase(DefaultScreenOfDisplay(dpy)); @@ -908,7 +910,7 @@ void _XtDisplayInitialize( while (!XrmQGetSearchList(db, name_list, class_list, search_list, search_list_size)) { XrmHashTable* old = search_list; - Cardinal size = (search_list_size*=2)*sizeof(XrmHashTable); + Cardinal size = (Cardinal) ((size_t)(search_list_size *= 2)*sizeof(XrmHashTable)); if (!(search_list = (XrmHashTable*)ALLOCATE_LOCAL(size))) _XtAllocError(NULL); (void) memmove((char*)search_list, (char*)old, (size>>1) ); @@ -985,7 +987,7 @@ XtAppSetFallbackResources( Widget XtOpenApplication(XtAppContext *app_context_return, _Xconst char *application_class, XrmOptionDescRec *options, Cardinal num_options, - int *argc_in_out, String *argv_in_out, + int *argc_in_out, _XtString *argv_in_out, String *fallback_resources, WidgetClass widget_class, ArgList args_in, Cardinal num_args_in) { @@ -1029,7 +1031,7 @@ XtAppInitialize( XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, - String *argv_in_out, + _XtString *argv_in_out, String *fallback_resources, ArgList args_in, Cardinal num_args_in) @@ -1045,12 +1047,12 @@ XtAppInitialize( /*ARGSUSED*/ Widget XtInitialize( - _Xconst char* name, - _Xconst char* classname, + _Xconst _XtString name, + _Xconst _XtString classname, XrmOptionDescRec *options, Cardinal num_options, int *argc, - String *argv) + _XtString *argv) { Widget root; XtAppContext app_con; diff --git a/lib/libXt/src/Intrinsic.c b/lib/libXt/src/Intrinsic.c index 7119b0956..c9624ec64 100644 --- a/lib/libXt/src/Intrinsic.c +++ b/lib/libXt/src/Intrinsic.c @@ -85,13 +85,14 @@ in this Software without prior written authorization from The Open Group. #include <direct.h> /* for _getdrives() */ #endif +#include <stdio.h> #include <stdlib.h> String XtCXtToolkitError = "XtToolkitError"; Boolean XtIsSubclass( Widget widget, - WidgetClass widgetClass) + WidgetClass myWidgetClass) { register WidgetClass w; Boolean retval = FALSE; @@ -100,7 +101,7 @@ Boolean XtIsSubclass( LOCK_APP(app); LOCK_PROCESS; for (w = widget->core.widget_class; w != NULL; w = w->core_class.superclass) - if (w == widgetClass) { + if (w == myWidgetClass) { retval = TRUE; break; } @@ -128,7 +129,7 @@ Boolean _XtCheckSubclassFlag( Boolean _XtIsSubclassOf( Widget object, - WidgetClass widgetClass, + WidgetClass myWidgetClass, WidgetClass superClass, _XtXtEnum flag) { @@ -139,7 +140,7 @@ Boolean _XtIsSubclassOf( } else { register WidgetClass c = object->core.widget_class; while (c != superClass) { - if (c == widgetClass) { + if (c == myWidgetClass) { UNLOCK_PROCESS; return True; } @@ -180,7 +181,7 @@ static void ComputeWindowAttributes( XtExposeProc expose; *value_mask = CWEventMask | CWColormap; - (*values).event_mask = XtBuildEventMask(widget); + (*values).event_mask = (long) XtBuildEventMask(widget); (*values).colormap = widget->core.colormap; if (widget->core.background_pixmap != XtUnspecifiedPixmap) { *value_mask |= CWBackPixmap; @@ -249,11 +250,10 @@ static void MapChildren( { Cardinal i; WidgetList children; - register Widget child; children = cwp->children; for (i = 0; i < cwp->num_children; i++) { - child = children[i]; + Widget child = children[i]; if (XtIsWidget (child)){ if (child->core.managed && child->core.mapped_when_managed) { XtMapWidget (children[i]); @@ -268,11 +268,10 @@ static Boolean ShouldMapAllChildren( { Cardinal i; WidgetList children; - register Widget child; children = cwp->children; for (i = 0; i < cwp->num_children; i++) { - child = children[i]; + Widget child = children[i]; if (XtIsWidget(child)) { if (XtIsRealized(child) && (! (child->core.managed && child->core.mapped_when_managed))){ @@ -309,7 +308,7 @@ static void RealizeWidget( XtAppErrorMsg(XtWidgetToApplicationContext(widget), "invalidProcedure","realizeProc",XtCXtToolkitError, "No realize class procedure defined", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); else { CALLGEOTAT(_XtGeoTrace(widget,"Call \"%s\"[%d,%d]'s realize proc\n", XtName(widget), @@ -332,8 +331,8 @@ static void RealizeWidget( int len_nm, len_cl; char *s; - len_nm = widget->core.name ? strlen(widget->core.name) : 0; - len_cl = strlen(class_name); + len_nm = widget->core.name ? (int) strlen(widget->core.name) : 0; + len_cl = (int) strlen(class_name); s = __XtMalloc((unsigned) (len_nm + len_cl + 2)); s[0] = '\0'; if (len_nm) @@ -402,8 +401,6 @@ static void UnrealizeWidget( Widget widget) { CompositeWidget cw; - Cardinal i; - WidgetList children; if (!XtIsWidget(widget) || !XtIsRealized(widget)) return; @@ -412,6 +409,9 @@ static void UnrealizeWidget( /* Recurse on children */ if (XtIsComposite (widget)) { + Cardinal i; + WidgetList children; + cw = (CompositeWidget) widget; children = cw->composite.children; /* Unrealize all children */ @@ -591,7 +591,6 @@ static Widget NameListToWidget( XrmBindingList bindings, int in_depth, int *out_depth, int *found_depth) { - Widget w1, w2; int d1, d2; if (in_depth >= *found_depth) { @@ -614,6 +613,8 @@ static Widget NameListToWidget( in_depth, out_depth, found_depth); } else { /* XrmBindLoosely */ + Widget w1, w2; + w1 = SearchChildren(root, names, bindings, MatchExactChildren, in_depth, &d1, found_depth); w2 = SearchChildren(root, names, bindings, MatchWildChildren, @@ -633,7 +634,7 @@ Widget XtNameToWidget( Widget result; WIDGET_TO_APPCON(root); - len = strlen(name); + len = (int) strlen(name); if (len == 0) return NULL; LOCK_APP(app); @@ -962,7 +963,7 @@ static Boolean TestFile( #else (status.st_mode & S_IFMT) != S_IFDIR); /* not a directory */ #endif /* X_NOT_POSIX else */ - return ret; + return (Boolean) ret; #else /* VMS */ return TRUE; /* Who knows what to do here? */ #endif /* VMS */ @@ -1059,23 +1060,25 @@ static Boolean Resolve( } -String XtFindFile( - _Xconst char* path, +_XtString XtFindFile( + _Xconst _XtString path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate) { - char *buf, *buf1, *buf2, *colon; + char *buf, *buf1, *buf2; + _Xconst _XtString colon; int len; Boolean firstTime = TRUE; - buf = buf1 = __XtMalloc((unsigned)PATH_MAX); + buf1 = __XtMalloc((unsigned)PATH_MAX); buf2 = __XtMalloc((unsigned)PATH_MAX); + buf = buf1; if (predicate == NULL) predicate = TestFile; while (1) { - colon = (String)path; + colon = path; /* skip leading colons */ while (*colon) { if (*colon != ':') break; @@ -1091,7 +1094,7 @@ String XtFindFile( if (*colon == ':') break; } - len = colon - path; + len = (int) (colon - path); if (Resolve(path, len, substitutions, num_substitutions, buf, '/')) { if (firstTime || strcmp(buf1,buf2) != 0) { @@ -1104,9 +1107,12 @@ String XtFindFile( #ifdef XNL_DEBUG printf("File found.\n"); #endif /* XNL_DEBUG */ - if (buf == buf1) XtFree(buf2); - else XtFree(buf1); - return buf; + if (buf == buf1) { + XtFree(buf2); + return buf1; + } + XtFree(buf1); + return buf2; } if (buf == buf1) buf = buf2; @@ -1133,7 +1139,7 @@ String XtFindFile( /* The implementation of this routine is operating system dependent */ /* Should match the code in Xlib _XlcMapOSLocaleName */ -static char *ExtractLocaleName( +static String ExtractLocaleName( String lang) { @@ -1183,13 +1189,16 @@ static char *ExtractLocaleName( # endif # endif - char *start; - char *end; + String start; + String end; int len; # ifdef SKIPCOUNT int n; # endif static char* buf = NULL; +# ifdef WHITEFILL + char *temp; +# endif start = lang; # ifdef SKIPCOUNT @@ -1213,15 +1222,15 @@ static char *ExtractLocaleName( # endif if ((end = strchr (start, ENDCHAR))) { - len = end - start; - if (buf != NULL) XtFree (buf); - buf = XtMalloc (len + 1); + len = (int) (end - start); + XtFree (buf); + buf = XtMalloc ((Cardinal)(len + 1)); if (buf == NULL) return NULL; - strncpy(buf, start, len); + strncpy(buf, start, (size_t) len); *(buf + len) = '\0'; # ifdef WHITEFILL - for (start = buf; start = strchr(start, ' '); ) - *start++ = '-'; + for (temp = buf; (temp = strchr(temp, ' ')) != NULL; ) + *temp++ = '-'; # endif return buf; } else /* if no ENDCHAR is found we are at the end of the line */ @@ -1229,12 +1238,11 @@ static char *ExtractLocaleName( } # ifdef WHITEFILL if (strchr(lang, ' ')) { - if (buf != NULL) XtFree (buf); - else buf = XtMalloc (strlen (lang) + 1); + XtFree (buf); + buf = strdup (lang); if (buf == NULL) return NULL; - strcpy(buf, lang); - for (start = buf; start = strchr(start, ' '); ) - *start++ = '-'; + for (temp = buf; (temp = strchr(temp, ' ')) != NULL; ) + *temp++ = '-'; return buf; } # endif @@ -1251,7 +1259,8 @@ static void FillInLangSubs( XtPerDisplay pd) { int len; - char *string, *p1, *p2, *p3; + String string; + char *p1, *p2, *p3; char **rest; char *ch; @@ -1271,9 +1280,9 @@ static void FillInLangSubs( return; } - len = strlen(string) + 1; - subs[0].substitution = string; - p1 = subs[1].substitution = __XtMalloc((Cardinal) 3*len); + len = (int) strlen(string) + 1; + subs[0].substitution = (_XtString) string; + p1 = subs[1].substitution = __XtMalloc((Cardinal) (3*len)); p2 = subs[2].substitution = subs[1].substitution + len; p3 = subs[3].substitution = subs[2].substitution + len; @@ -1285,8 +1294,8 @@ static void FillInLangSubs( ch = strchr(string, '_'); if (ch != NULL) { - len = ch - string; - (void) strncpy(p1, string, len); + len = (int) (ch - string); + (void) strncpy(p1, string, (size_t) len); p1[len] = '\0'; string = ch + 1; rest = &p2; @@ -1296,8 +1305,8 @@ static void FillInLangSubs( ch = strchr(string, '.'); if (ch != NULL) { - len = ch - string; - strncpy(*rest, string, len); + len = (int) (ch - string); + strncpy(*rest, string, (size_t) len); (*rest)[len] = '\0'; (void) strcpy(p3, ch+1); } else (void) strcpy(*rest, string); @@ -1333,7 +1342,7 @@ static SubstitutionRec defaultSubs[] = { }; -String XtResolvePathname( +_XtString XtResolvePathname( Display *dpy, _Xconst char* type, _Xconst char* filename, @@ -1346,7 +1355,7 @@ String XtResolvePathname( XtPerDisplay pd; static const char *defaultPath = NULL; const char *impl_default = implementation_default_path(); - int idef_len = strlen(impl_default); + int idef_len = (int) strlen(impl_default); char *massagedPath; int bytesAllocd, bytesLeft; char *ch, *result; @@ -1378,7 +1387,7 @@ String XtResolvePathname( } bytesAllocd = bytesLeft = 1000; - massagedPath = ALLOCATE_LOCAL(bytesAllocd); + massagedPath = ALLOCATE_LOCAL((size_t)bytesAllocd); if (massagedPath == NULL) _XtAllocError(NULL); if (path[0] == ':') { @@ -1398,7 +1407,7 @@ String XtResolvePathname( char *new; bytesAllocd +=1000; new = __XtMalloc((Cardinal) bytesAllocd); - strncpy( new, massagedPath, bytesUsed ); + strncpy( new, massagedPath, (size_t) bytesUsed ); ch = new + bytesUsed; if (pathMallocd) XtFree(massagedPath); @@ -1443,14 +1452,14 @@ String XtResolvePathname( int i = XtNumber(defaultSubs); Substitution sub, def; merged_substitutions = sub = (Substitution) - ALLOCATE_LOCAL((unsigned)(num_substitutions+i)*sizeof(SubstitutionRec)); + ALLOCATE_LOCAL((unsigned)(num_substitutions+(Cardinal)i)*sizeof(SubstitutionRec)); if (sub == NULL) _XtAllocError(NULL); for (def = defaultSubs; i--; sub++, def++) sub->match = def->match; - for (i = num_substitutions; i--; ) *sub++ = *substitutions++; + for (i = (int) num_substitutions; i--; ) *sub++ = *substitutions++; } - merged_substitutions[0].substitution = (String)filename; - merged_substitutions[1].substitution = (String)type; - merged_substitutions[2].substitution = (String)suffix; + merged_substitutions[0].substitution = (_XtString)filename; + merged_substitutions[1].substitution = (_XtString)type; + merged_substitutions[2].substitution = (_XtString)suffix; name_list[0] = pd->name; name_list[1] = XrmPermStringToQuark("customization"); name_list[2] = NULLQUARK; @@ -1566,14 +1575,13 @@ _XtGeoTab (int direction) /* +1 or -1 */ void -_XtGeoTrace (Widget widget, ...) +_XtGeoTrace (Widget widget, const char *fmt, ...) { - va_list args; - char *fmt; - int i ; if (IsTattled(widget)) { - va_start(args, widget); - fmt = va_arg(args, char *); + va_list args; + int i ; + + va_start(args, fmt); for (i=0; i<n_tab; i++) printf(" "); (void) vprintf(fmt, args); va_end(args); diff --git a/lib/libXt/src/Keyboard.c b/lib/libXt/src/Keyboard.c index c8ba863ba..7697275d0 100644 --- a/lib/libXt/src/Keyboard.c +++ b/lib/libXt/src/Keyboard.c @@ -104,12 +104,12 @@ static XtServerGrabPtr CheckServerGrabs( Widget *trace, Cardinal traceDepth) { - XtServerGrabPtr grab; Cardinal i; for (i = traceDepth; i > 0; i--) { - if ((grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD))) + XtServerGrabPtr grab; + if ((grab = _XtCheckServerGrabsOnWidget(event, trace[i-1], KEYBOARD))) return (grab); } return (XtServerGrabPtr)0; @@ -241,10 +241,10 @@ static Boolean IsOutside( */ XtTranslateCoords(w, 0, 0, &left, &top); /* We need to take borders into consideration */ - left = left - w->core.border_width; - top = top - w->core.border_width; - right = left + w->core.width + w->core.border_width; - bottom = top + w->core.height + w->core.border_width; + left = (Position) (left - w->core.border_width); + top = (Position) (top - w->core.border_width); + right = (Position) (left + w->core.width + w->core.border_width); + bottom = (Position) (top + w->core.height + w->core.border_width); if ( (e->x_root < left) || (e->y_root < top) || @@ -331,7 +331,6 @@ static Widget FindKeyDestination( { XtUngrabKeyboard(devGrab->widget, event->time); - devGrabType = XtNoServerGrab; } /* * if there isn't a grab with then check @@ -367,12 +366,12 @@ static Widget FindKeyDestination( } if ((grab = CheckServerGrabs((XEvent*)event, pseudoTrace, - pseudoTraceDepth))) + (Cardinal)pseudoTraceDepth))) { XtDevice device = &pdi->keyboard; device->grabType = XtPseudoPassiveServerGrab; - pdi->activatingKey = event->keycode; + pdi->activatingKey = (KeyCode) event->keycode; device->grab = *grab; if (grab @@ -395,7 +394,7 @@ Widget _XtProcessKeyboardEvent( XtPerDisplayInput pdi) { XtDevice device = &pdi->keyboard; - XtServerGrabPtr newGrab, devGrab = &device->grab; + XtServerGrabPtr devGrab = &device->grab; XtServerGrabRec prevGrabRec; XtServerGrabType prevGrabType = device->grabType; Widget dspWidget = NULL; @@ -407,11 +406,13 @@ Widget _XtProcessKeyboardEvent( { case KeyPress: { + XtServerGrabPtr newGrab; + if (event->keycode != 0 && /* Xlib XIM composed input */ !IsServerGrab(device->grabType) && (newGrab = CheckServerGrabs((XEvent*)event, pdi->trace, - pdi->traceDepth))) + (Cardinal) pdi->traceDepth))) { /* * honor pseudo-grab from prior event by X @@ -424,7 +425,7 @@ Widget _XtProcessKeyboardEvent( { /* Activate the grab */ device->grab = *newGrab; - pdi->activatingKey = event->keycode; + pdi->activatingKey = (KeyCode) event->keycode; device->grabType = XtPassiveServerGrab; } } @@ -574,9 +575,7 @@ void _XtHandleFocus( newFocalPoint = XtUnrelated; break; case NotifyInferior: - newFocalPoint = XtMyDescendant; return; - break; } break; } diff --git a/lib/libXt/src/Makefile.am b/lib/libXt/src/Makefile.am index 7f8ba6dd7..a26e10d7a 100644 --- a/lib/libXt/src/Makefile.am +++ b/lib/libXt/src/Makefile.am @@ -96,10 +96,13 @@ all-local: $(BUILT_FILES) $(BUILT_HEADER): $(BUILT_SOURCE) -$(BUILT_SOURCE): +$(BUILT_SOURCE): $(top_builddir)/util/makestrs$(EXEEXT) $(AM_V_GEN)$(top_builddir)/util/makestrs -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c $(AM_V_at)$(MKDIR_P) $(top_builddir)/src $(AM_V_at)$(MKDIR_P) $(top_builddir)/include/X11 $(AM_V_at)cp StringDefs.h $(top_builddir)/include/X11 $(AM_V_at)cp Shell.h $(top_builddir)/include/X11 $(AM_V_at)rm StringDefs.h Shell.h + +$(top_builddir)/util/makestrs$(EXEEXT) : + $(am__cd) $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) diff --git a/lib/libXt/src/Makefile.in b/lib/libXt/src/Makefile.in index d8eadeb6f..015927578 100644 --- a/lib/libXt/src/Makefile.in +++ b/lib/libXt/src/Makefile.in @@ -798,7 +798,7 @@ all-local: $(BUILT_FILES) $(BUILT_HEADER): $(BUILT_SOURCE) -$(BUILT_SOURCE): +$(BUILT_SOURCE): $(top_builddir)/util/makestrs$(EXEEXT) $(AM_V_GEN)$(top_builddir)/util/makestrs -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c $(AM_V_at)$(MKDIR_P) $(top_builddir)/src $(AM_V_at)$(MKDIR_P) $(top_builddir)/include/X11 @@ -806,6 +806,9 @@ $(BUILT_SOURCE): $(AM_V_at)cp Shell.h $(top_builddir)/include/X11 $(AM_V_at)rm StringDefs.h Shell.h +$(top_builddir)/util/makestrs$(EXEEXT) : + $(am__cd) $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lib/libXt/src/Manage.c b/lib/libXt/src/Manage.c index 575be7dfe..96bacbb5c 100644 --- a/lib/libXt/src/Manage.c +++ b/lib/libXt/src/Manage.c @@ -73,10 +73,10 @@ in this Software without prior written authorization from The Open Group. #endif #include "IntrinsicI.h" -static String XtNinvalidChild = "invalidChild"; -static String XtNxtUnmanageChildren = "xtUnmanageChildren"; -static String XtNxtManageChildren = "xtManageChildren"; -static String XtNxtChangeManagedSet = "xtChangeManagedSet"; +static _Xconst _XtString XtNinvalidChild = "invalidChild"; +static _Xconst _XtString XtNxtUnmanageChildren = "xtUnmanageChildren"; +static _Xconst _XtString XtNxtManageChildren = "xtManageChildren"; +static _Xconst _XtString XtNxtChangeManagedSet = "xtChangeManagedSet"; static void UnmanageChildren( WidgetList children, @@ -84,7 +84,7 @@ static void UnmanageChildren( Widget parent, Cardinal* num_unique_children, Boolean call_change_managed, - String caller_func) + _Xconst _XtString caller_func) { Widget child; Cardinal i; @@ -103,7 +103,7 @@ static void UnmanageChildren( XtAppErrorMsg(XtWidgetToApplicationContext((Widget)parent), "invalidParent",caller_func, XtCXtToolkitError, "Attempt to unmanage a child when parent is not Composite", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); } for (i = 0; i < num_children; i++) { @@ -112,14 +112,14 @@ static void UnmanageChildren( XtAppWarningMsg(XtWidgetToApplicationContext(parent), XtNinvalidChild,caller_func,XtCXtToolkitError, "Null child passed to XtUnmanageChildren", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } if (child->core.parent != parent) { XtAppWarningMsg(XtWidgetToApplicationContext(parent), "ambiguousParent",caller_func,XtCXtToolkitError, "Not all children have same parent in UnmanageChildren", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } else if (child->core.managed) { (*num_unique_children)++; @@ -138,8 +138,8 @@ static void UnmanageChildren( if ((pw!=NULL) && XtIsRealized (pw)) XClearArea (XtDisplay (pw), XtWindow (pw), r->rectangle.x, r->rectangle.y, - r->rectangle.width + (r->rectangle.border_width << 1), - r->rectangle.height + (r->rectangle.border_width << 1), + (unsigned) (r->rectangle.width + (r->rectangle.border_width << 1)), + (unsigned) (r->rectangle.height + (r->rectangle.border_width << 1)), TRUE); } @@ -169,7 +169,7 @@ void XtUnmanageChildren ( if (children[0] == NULL) { XtWarningMsg(XtNinvalidChild,XtNxtUnmanageChildren,XtCXtToolkitError, "Null child found in argument list to unmanage", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } #ifdef XTHREADS @@ -210,7 +210,7 @@ static void ManageChildren( Cardinal num_children, Widget parent, Boolean call_change_managed, - String caller_func) + _Xconst _XtString caller_func) { #define MAXCHILDREN 100 Widget child; @@ -230,14 +230,14 @@ static void ManageChildren( XtAppErrorMsg(XtWidgetToApplicationContext((Widget)parent), "invalidParent",caller_func, XtCXtToolkitError, "Attempt to manage a child when parent is not Composite", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); } /* Construct new list of children that really need to be operated upon. */ if (num_children <= MAXCHILDREN) { unique_children = cache; } else { - unique_children = (WidgetList) __XtMalloc(num_children * sizeof(Widget)); + unique_children = (WidgetList) __XtMalloc((Cardinal) ((size_t)num_children * sizeof(Widget))); } num_unique_children = 0; for (i = 0; i < num_children; i++) { @@ -246,7 +246,7 @@ static void ManageChildren( XtAppWarningMsg(XtWidgetToApplicationContext((Widget)parent), XtNinvalidChild,caller_func,XtCXtToolkitError, "null child passed to ManageChildren", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if (unique_children != cache) XtFree((char *) unique_children); return; } @@ -267,7 +267,7 @@ static void ManageChildren( XtAppWarningMsg(XtWidgetToApplicationContext((Widget)parent), "ambiguousParent",caller_func,XtCXtToolkitError, "Not all children have same parent in XtManageChildren", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } else if (! child->core.managed && !child->core.being_destroyed) { unique_children[num_unique_children++] = child; CALLGEOTAT(_XtGeoTrace(child, @@ -302,8 +302,8 @@ static void ManageChildren( if (pw != NULL) XClearArea (XtDisplay (pw), XtWindow (pw), r->rectangle.x, r->rectangle.y, - r->rectangle.width + (r->rectangle.border_width << 1), - r->rectangle.height + (r->rectangle.border_width << 1), + (unsigned) (r->rectangle.width + (r->rectangle.border_width << 1)), + (unsigned) (r->rectangle.height + (r->rectangle.border_width << 1)), TRUE); } } @@ -325,7 +325,7 @@ void XtManageChildren( if (children[0] == NULL) { XtWarningMsg(XtNinvalidChild, XtNxtManageChildren, XtCXtToolkitError, "null child passed to XtManageChildren", - (String*)NULL, (Cardinal*)NULL); + NULL, NULL); return; } #ifdef XTHREADS @@ -373,7 +373,7 @@ void XtSetMappedWhenManaged( UNLOCK_APP(app); return; } - widget->core.mapped_when_managed = mapped_when_managed; + widget->core.mapped_when_managed = (Boolean) mapped_when_managed; hookobj = XtHooksOfDisplay(XtDisplay(widget)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { @@ -416,7 +416,6 @@ void XtChangeManagedSet( int i; Cardinal some_unmanaged; Boolean call_out; - CompositeClassExtension ext; XtAppContext app; Widget hookobj; XtChangeHookDataRec call_data; @@ -432,21 +431,21 @@ void XtChangeManagedSet( parent = XtParent(*childp); childp = unmanage_children; - for (i = num_unmanage; --i >= 0 && XtParent(*childp) == parent; childp++); + for (i = (int) num_unmanage; --i >= 0 && XtParent(*childp) == parent; childp++); call_out = (i >= 0); childp = manage_children; - for (i = num_manage; --i >= 0 && XtParent(*childp) == parent; childp++); + for (i = (int) num_manage; --i >= 0 && XtParent(*childp) == parent; childp++); if (call_out || i >= 0) { XtAppWarningMsg(app, "ambiguousParent", XtNxtChangeManagedSet, XtCXtToolkitError, "Not all children have same parent", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } if (! XtIsComposite(parent)) { UNLOCK_APP(app); XtAppErrorMsg(app, "invalidParent", XtNxtChangeManagedSet, XtCXtToolkitError, "Attempt to manage a child when parent is not Composite", - (String *) NULL, (Cardinal *) NULL); + NULL, NULL); } if (parent->core.being_destroyed) { UNLOCK_APP(app); @@ -455,7 +454,7 @@ void XtChangeManagedSet( call_out = False; if (do_change_proc) { - ext = (CompositeClassExtension) + CompositeClassExtension ext = (CompositeClassExtension) XtGetClassExtension(parent->core.widget_class, XtOffsetOf(CompositeClassRec, composite_class.extension), diff --git a/lib/libXt/src/NextEvent.c b/lib/libXt/src/NextEvent.c index 4f2dcfb69..a686bb379 100644 --- a/lib/libXt/src/NextEvent.c +++ b/lib/libXt/src/NextEvent.c @@ -75,6 +75,9 @@ in this Software without prior written authorization from The Open Group. #include <stdio.h> #include <errno.h> +#ifdef _WIN32 +typedef long suseconds_t; +#endif static TimerEventRec* freeTimerRecs; static WorkProcRec* freeWorkRecs; @@ -154,7 +157,7 @@ static void AdjustHowLong ( if(*howlong <= (unsigned long)(time_spent.tv_sec*1000+time_spent.tv_usec/1000)) *howlong = (unsigned long)0; /* Timed out */ else - *howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000); + *howlong = (*howlong - (unsigned long)(time_spent.tv_sec*1000+time_spent.tv_usec/1000)); } typedef struct { @@ -164,19 +167,19 @@ typedef struct { struct timeval new_time; struct timeval time_spent; struct timeval max_wait_time; -#ifndef USE_POLL - struct timeval *wait_time_ptr; -#else +#ifdef USE_POLL int poll_wait; +#else + struct timeval *wait_time_ptr; #endif } wait_times_t, *wait_times_ptr_t; static struct timeval zero_time = { 0 , 0}; -#ifndef USE_POLL -static fd_set zero_fd; -#else +#ifdef USE_POLL #define X_BLOCK -1 #define X_DONT_BLOCK 0 +#else +static fd_set zero_fd; #endif static void InitTimes ( @@ -189,38 +192,38 @@ static void InitTimes ( FIXUP_TIMEVAL(wt->cur_time); wt->start_time = wt->cur_time; if(howlong == NULL) { /* special case for ever */ -#ifndef USE_POLL - wt->wait_time_ptr = NULL; -#else +#ifdef USE_POLL wt->poll_wait = X_BLOCK; +#else + wt->wait_time_ptr = NULL; #endif } else { /* block until at most */ - wt->max_wait_time.tv_sec = *howlong/1000; - wt->max_wait_time.tv_usec = (*howlong %1000)*1000; -#ifndef USE_POLL - wt->wait_time_ptr = &wt->max_wait_time; + wt->max_wait_time.tv_sec = (time_t) (*howlong/1000); + wt->max_wait_time.tv_usec = (suseconds_t) ((*howlong %1000)*1000); +#ifdef USE_POLL + wt->poll_wait = (int) *howlong; #else - wt->poll_wait = *howlong; + wt->wait_time_ptr = &wt->max_wait_time; #endif } } else { /* don't block */ wt->max_wait_time = zero_time; -#ifndef USE_POLL - wt->wait_time_ptr = &wt->max_wait_time; -#else +#ifdef USE_POLL wt->poll_wait = X_DONT_BLOCK; +#else + wt->wait_time_ptr = &wt->max_wait_time; #endif } } typedef struct { -#ifndef USE_POLL - fd_set rmask, wmask, emask; - int nfds; -#else +#ifdef USE_POLL struct pollfd* fdlist; struct pollfd* stack; int fdlistlen, num_dpys; +#else + fd_set rmask, wmask, emask; + int nfds; #endif } wait_fds_t, *wait_fds_ptr_t; @@ -232,20 +235,7 @@ static void InitFds ( { int ii; app->rebuild_fdlist = FALSE; -#ifndef USE_POLL - wf->nfds = app->fds.nfds; - if( !ignoreInputs ) { - wf->rmask = app->fds.rmask; - wf->wmask = app->fds.wmask; - wf->emask = app->fds.emask; - } else - wf->rmask = wf->wmask = wf->emask = zero_fd; - - if (!ignoreEvents) - for (ii = 0; ii < app->count; ii++) { - FD_SET (ConnectionNumber(app->list[ii]), &wf->rmask); - } -#else +#ifdef USE_POLL #ifndef POLLRDNORM #define POLLRDNORM 0 #endif @@ -272,7 +262,6 @@ static void InitFds ( wf->fdlistlen = wf->num_dpys = 0; if (!ignoreInputs && app->input_list != NULL) { - int ii; for (ii = 0; ii < (int) app->input_max; ii++) if (app->input_list[ii] != NULL) wf->fdlistlen++; @@ -280,11 +269,11 @@ static void InitFds ( if (!wf->fdlist || wf->fdlist == wf->stack) { wf->fdlist = (struct pollfd*) - XtStackAlloc (sizeof (struct pollfd) * wf->fdlistlen, wf->stack); + XtStackAlloc (sizeof (struct pollfd) * (size_t)wf->fdlistlen, wf->stack); } else { wf->fdlist = (struct pollfd*) XtRealloc ((char*) wf->fdlist, - sizeof (struct pollfd) * wf->fdlistlen); + (Cardinal) (sizeof (struct pollfd) * (size_t)wf->fdlistlen)); } if (wf->fdlistlen) { @@ -313,6 +302,19 @@ static void InitFds ( fdlp++; } } +#else + wf->nfds = app->fds.nfds; + if( !ignoreInputs ) { + wf->rmask = app->fds.rmask; + wf->wmask = app->fds.wmask; + wf->emask = app->fds.emask; + } else + wf->rmask = wf->wmask = wf->emask = zero_fd; + + if (!ignoreEvents) + for (ii = 0; ii < app->count; ii++) { + FD_SET (ConnectionNumber(app->list[ii]), &wf->rmask); + } #endif } @@ -324,24 +326,26 @@ static void AdjustTimes ( wait_times_ptr_t wt) { if (app->timerQueue != NULL && !ignoreTimers && block) { +#ifdef USE_POLL if (IS_AFTER (wt->cur_time, app->timerQueue->te_timer_value)) { TIMEDELTA (wt->wait_time, app->timerQueue->te_timer_value, wt->cur_time); if (howlong == NULL || IS_AFTER (wt->wait_time, wt->max_wait_time)) -#ifndef USE_POLL - wt->wait_time_ptr = &wt->wait_time; + wt->poll_wait = (int) (wt->wait_time.tv_sec * 1000 + wt->wait_time.tv_usec / 1000); else - wt->wait_time_ptr = &wt->max_wait_time; + wt->poll_wait = (int) (wt->max_wait_time.tv_sec * 1000 + wt->max_wait_time.tv_usec / 1000); } else - wt->wait_time_ptr = &zero_time; - } + wt->poll_wait = X_DONT_BLOCK; #else - wt->poll_wait = wt->wait_time.tv_sec * 1000 + wt->wait_time.tv_usec / 1000; + if (IS_AFTER (wt->cur_time, app->timerQueue->te_timer_value)) { + TIMEDELTA (wt->wait_time, app->timerQueue->te_timer_value, wt->cur_time); + if (howlong == NULL || IS_AFTER (wt->wait_time, wt->max_wait_time)) + wt->wait_time_ptr = &wt->wait_time; else - wt->poll_wait = wt->max_wait_time.tv_sec * 1000 + wt->max_wait_time.tv_usec / 1000; + wt->wait_time_ptr = &wt->max_wait_time; } else - wt->poll_wait = X_DONT_BLOCK; - } + wt->wait_time_ptr = &zero_time; #endif + } } @@ -349,11 +353,11 @@ static int IoWait ( wait_times_ptr_t wt, wait_fds_ptr_t wf) { -#ifndef USE_POLL +#ifdef USE_POLL + return poll (wf->fdlist, (nfds_t) wf->fdlistlen, wt->poll_wait); +#else return Select (wf->nfds, &wf->rmask, &wf->wmask, &wf->emask, wt->wait_time_ptr); -#else - return poll (wf->fdlist, wf->fdlistlen, wt->poll_wait); #endif } @@ -367,10 +371,63 @@ static void FindInputs ( int* dpy_no, int* found_input) { - XtInputMask condition; InputEvent *ep; int ii; -#ifndef USE_POLL /* { check ready file descriptors block */ +#ifdef USE_POLL /* { check ready file descriptors block */ + struct pollfd* fdlp; + + *dpy_no = -1; + *found_input = False; + + if (!ignoreEvents) { + fdlp = wf->fdlist; + for (ii = 0; ii < wf->num_dpys; ii++, fdlp++) { + if (*dpy_no == -1 && fdlp->revents & (POLLIN|POLLHUP|POLLERR) && +#ifdef XTHREADS + !(fdlp->revents & POLLNVAL) && +#endif + XEventsQueued (app->list[ii], QueuedAfterReading)) { + *dpy_no = ii; + break; + } + } + } + + if (!ignoreInputs) { + fdlp = &wf->fdlist[wf->num_dpys]; + for (ii = wf->num_dpys; ii < wf->fdlistlen; ii++, fdlp++) { + XtInputMask condition = 0; + if (fdlp->revents) { + if (fdlp->revents & (XPOLL_READ|POLLHUP|POLLERR) +#ifdef XTHREADS + && !(fdlp->revents & POLLNVAL) +#endif + ) + condition = XtInputReadMask; + if (fdlp->revents & XPOLL_WRITE) + condition |= XtInputWriteMask; + if (fdlp->revents & XPOLL_EXCEPT) + condition |= XtInputExceptMask; + } + if (condition) { + *found_input = True; + for (ep = app->input_list[fdlp->fd]; ep; ep = ep->ie_next) + if (condition & ep->ie_condition) { + InputEvent *oq; + /* make sure this input isn't already marked outstanding */ + for (oq = app->outstandingQueue; oq; oq = oq->ie_oq) + if (oq == ep) + break; + if (!oq) + { + ep->ie_oq = app->outstandingQueue; + app->outstandingQueue = ep; + } + } + } + } + } +#else /* }{ */ #ifdef XTHREADS fd_set rmask; #endif @@ -385,7 +442,8 @@ static void FindInputs ( #endif for (ii = 0; ii < wf->nfds && nfds > 0; ii++) { - condition = 0; + XtInputMask condition = 0; + if (FD_ISSET (ii, &wf->rmask) #ifdef XTHREADS && FD_ISSET (ii, &rmask) @@ -448,60 +506,6 @@ static void FindInputs ( } ENDILOOP: ; } /* endfor */ -#else /* }{ */ - struct pollfd* fdlp; - - *dpy_no = -1; - *found_input = False; - - if (!ignoreEvents) { - fdlp = wf->fdlist; - for (ii = 0; ii < wf->num_dpys; ii++, fdlp++) { - if (*dpy_no == -1 && fdlp->revents & (POLLIN|POLLHUP|POLLERR) && -#ifdef XTHREADS - !(fdlp->revents & POLLNVAL) && -#endif - XEventsQueued (app->list[ii], QueuedAfterReading)) { - *dpy_no = ii; - break; - } - } - } - - if (!ignoreInputs) { - fdlp = &wf->fdlist[wf->num_dpys]; - for (ii = wf->num_dpys; ii < wf->fdlistlen; ii++, fdlp++) { - condition = 0; - if (fdlp->revents) { - if (fdlp->revents & (XPOLL_READ|POLLHUP|POLLERR) -#ifdef XTHREADS - && !(fdlp->revents & POLLNVAL) -#endif - ) - condition = XtInputReadMask; - if (fdlp->revents & XPOLL_WRITE) - condition |= XtInputWriteMask; - if (fdlp->revents & XPOLL_EXCEPT) - condition |= XtInputExceptMask; - } - if (condition) { - *found_input = True; - for (ep = app->input_list[fdlp->fd]; ep; ep = ep->ie_next) - if (condition & ep->ie_condition) { - InputEvent *oq; - /* make sure this input isn't already marked outstanding */ - for (oq = app->outstandingQueue; oq; oq = oq->ie_oq) - if (oq == ep) - break; - if (!oq) - { - ep->ie_oq = app->outstandingQueue; - app->outstandingQueue = ep; - } - } - } - } - } #endif /* } */ } @@ -555,9 +559,7 @@ int _XtWaitForSomething( _XtBoolean ignoreInputs, _XtBoolean ignoreSignals, _XtBoolean block, -#ifdef XTHREADS - _XtBoolean drop_lock, -#endif + _XtBoolean drop_lock, /* only needed with XTHREADS */ unsigned long *howlong) { wait_times_t wt; @@ -577,9 +579,11 @@ int _XtWaitForSomething( /* If not multi-threaded, never drop lock */ if (app->lock == (ThreadAppProc) NULL) drop_lock = FALSE; +#else + drop_lock=drop_lock; /* avoid unsed warning */ #endif - InitTimes (block, howlong, &wt); + InitTimes ((Boolean) block, howlong, &wt); #ifdef USE_POLL wf.fdlist = NULL; @@ -591,7 +595,7 @@ WaitLoop: app->rebuild_fdlist = TRUE; while (1) { - AdjustTimes (app, block, howlong, ignoreTimers, &wt); + AdjustTimes (app, (Boolean) block, howlong, (Boolean) ignoreTimers, &wt); if (block && app->block_hook_list) { BlockHook hook; @@ -612,7 +616,7 @@ WaitLoop: } if (app->rebuild_fdlist) - InitFds (app, ignoreEvents, ignoreInputs, &wf); + InitFds (app, (Boolean) ignoreEvents, (Boolean) ignoreInputs, &wf); #ifdef XTHREADS /* { */ if (drop_lock) { @@ -660,25 +664,25 @@ WaitLoop: } if (block) { -#ifndef USE_POLL - if (wt.wait_time_ptr == NULL) -#else +#ifdef USE_POLL if (wt.poll_wait == X_BLOCK) +#else + if (wt.wait_time_ptr == NULL) #endif continue; X_GETTIMEOFDAY (&wt.new_time); FIXUP_TIMEVAL (wt.new_time); TIMEDELTA (wt.time_spent, wt.new_time, wt.cur_time); wt.cur_time = wt.new_time; -#ifndef USE_POLL - if (IS_AFTER (wt.time_spent, *wt.wait_time_ptr)) { - TIMEDELTA (wt.wait_time, *wt.wait_time_ptr, wt.time_spent); - wt.wait_time_ptr = &wt.wait_time; +#ifdef USE_POLL + if ((wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000) < wt.poll_wait) { + wt.poll_wait -= (int)(wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000); continue; } else #else - if ((wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000) < wt.poll_wait) { - wt.poll_wait -= (wt.time_spent.tv_sec * 1000 + wt.time_spent.tv_usec / 1000); + if (IS_AFTER (wt.time_spent, *wt.wait_time_ptr)) { + TIMEDELTA (wt.wait_time, *wt.wait_time_ptr, wt.time_spent); + wt.wait_time_ptr = &wt.wait_time; continue; } else #endif @@ -719,7 +723,7 @@ WaitLoop: return -1; } else FindInputs (app, &wf, nfds, - ignoreEvents, ignoreInputs, + (Boolean) ignoreEvents, (Boolean) ignoreInputs, &dpy_no, &found_input); if (dpy_no >= 0 || found_input) { @@ -798,8 +802,8 @@ XtIntervalId XtAppAddTimeOut( tptr->te_closure = closure; tptr->te_proc = proc; tptr->app = app; - tptr->te_timer_value.tv_sec = interval/1000; - tptr->te_timer_value.tv_usec = (interval%1000)*1000; + tptr->te_timer_value.tv_sec = (time_t) (interval/1000); + tptr->te_timer_value.tv_usec = (suseconds_t) ((interval%1000)*1000); X_GETTIMEOFDAY (¤t_time); FIXUP_TIMEVAL(current_time); ADD_TIME(tptr->te_timer_value,tptr->te_timer_value,current_time); @@ -993,19 +997,19 @@ XtInputId XtAppAddInput( LOCK_APP(app); if (!condition || - condition & ~(XtInputReadMask|XtInputWriteMask|XtInputExceptMask)) + condition & (unsigned long)(~(XtInputReadMask|XtInputWriteMask|XtInputExceptMask))) XtAppErrorMsg(app,"invalidParameter","xtAddInput",XtCXtToolkitError, "invalid condition passed to XtAppAddInput", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if (app->input_max <= source) { - Cardinal n = source + 1; + Cardinal n = (Cardinal) (source + 1); int ii; app->input_list = (InputEvent**)XtRealloc((char*) app->input_list, - n * sizeof(InputEvent*)); + (Cardinal)((size_t)n * sizeof(InputEvent*))); for (ii = app->input_max; ii < (int) n; ii++) app->input_list[ii] = (InputEvent*) NULL; - app->input_max = n; + app->input_max = (short) n; } sptr = XtNew(InputEvent); sptr->ie_proc = proc; @@ -1017,15 +1021,15 @@ XtInputId XtAppAddInput( sptr->ie_next = app->input_list[source]; app->input_list[source] = sptr; -#ifndef USE_POLL +#ifdef USE_POLL + if (sptr->ie_next == NULL) + app->fds.nfds++; +#else if (condition & XtInputReadMask) FD_SET(source, &app->fds.rmask); if (condition & XtInputWriteMask) FD_SET(source, &app->fds.wmask); if (condition & XtInputExceptMask) FD_SET(source, &app->fds.emask); if (app->fds.nfds < (source+1)) app->fds.nfds = source+1; -#else - if (sptr->ie_next == NULL) - app->fds.nfds++; #endif app->input_count++; app->rebuild_fdlist = TRUE; @@ -1096,7 +1100,7 @@ void XtRemoveInput( XtAppWarningMsg(app, "invalidProcedure","inputHandler", XtCXtToolkitError, "XtRemoveInput: Input handler not found", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); } @@ -1138,9 +1142,7 @@ static void DoOtherSources( (void) _XtWaitForSomething (app, TRUE, TRUE, FALSE, TRUE, FALSE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *)NULL); DrainQueue(); } @@ -1261,18 +1263,13 @@ void XtAppNextEvent( d = _XtWaitForSomething (app, FALSE, FALSE, FALSE, FALSE, TRUE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *) NULL); if (d != -1) { GotEvent: XNextEvent (app->list[d], event); -#ifdef XTHREADS - /* assert(app->list[d] == event->xany.display); */ -#endif - app->last = d; + app->last = (short) d; if (event->xany.type == MappingNotify) _XtRefreshMapping(event, False); UNLOCK_APP(app); @@ -1341,9 +1338,7 @@ void XtAppProcessEvent( (void) _XtWaitForSomething (app, TRUE, TRUE, FALSE, TRUE, FALSE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *)NULL); } if (app->outstandingQueue != NULL) { @@ -1374,23 +1369,18 @@ void XtAppProcessEvent( if (CallWorkProc(app)) continue; d = _XtWaitForSomething (app, - (mask & XtIMXEvent ? FALSE : TRUE), - (mask & XtIMTimer ? FALSE : TRUE), - (mask & XtIMAlternateInput ? FALSE : TRUE), - (mask & XtIMSignal ? FALSE : TRUE), + ((mask & XtIMXEvent) ? FALSE : TRUE), + ((mask & XtIMTimer) ? FALSE : TRUE), + ((mask & XtIMAlternateInput) ? FALSE : TRUE), + ((mask & XtIMSignal) ? FALSE : TRUE), TRUE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *) NULL); if (mask & XtIMXEvent && d != -1) { GotEvent: XNextEvent(app->list[d], &event); -#ifdef XTHREADS - /* assert(app->list[d] == event.xany.display); */ -#endif - app->last = d; + app->last = (short) d; if (event.xany.type == MappingNotify) { _XtRefreshMapping(&event, False); } @@ -1463,9 +1453,7 @@ XtInputMask XtAppPending( if(_XtWaitForSomething (app, FALSE, TRUE, FALSE, TRUE, FALSE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *) NULL) != -1) ret |= XtIMXEvent; if (app->outstandingQueue != NULL) ret |= XtIMAlternateInput; @@ -1497,9 +1485,7 @@ static Boolean PeekOtherSources( (void) _XtWaitForSomething (app, TRUE, TRUE, FALSE, TRUE, FALSE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *)NULL); if (app->outstandingQueue != NULL) return TRUE; } @@ -1554,15 +1540,13 @@ Boolean XtAppPeekEvent( d = _XtWaitForSomething (app, FALSE, FALSE, FALSE, FALSE, TRUE, -#ifdef XTHREADS TRUE, -#endif (unsigned long *) NULL); if (d != -1) { /* event */ GotEvent: XPeekEvent(app->list[d], event); - app->last = (d == 0 ? app->count : d) - 1; + app->last = (short) ((d == 0 ? app->count : d) - 1); UNLOCK_APP(app); return TRUE; } diff --git a/lib/libXt/src/Object.c b/lib/libXt/src/Object.c index ae1ac757b..ee1ea6d0a 100644 --- a/lib/libXt/src/Object.c +++ b/lib/libXt/src/Object.c @@ -130,7 +130,7 @@ externaldef(objectClass) WidgetClass objectClass static void ConstructCallbackOffsets( - WidgetClass widgetClass) + WidgetClass myWidgetClass) { static XrmQuark QCallback = NULLQUARK; register int i; @@ -138,7 +138,7 @@ static void ConstructCallbackOffsets( register CallbackTable newTable; register CallbackTable superTable; register XrmResourceList resourceList; - ObjectClass objectClass = (ObjectClass)widgetClass; + ObjectClass myObjectClass = (ObjectClass)myWidgetClass; /* This function builds an array of pointers to the resource @@ -150,9 +150,9 @@ static void ConstructCallbackOffsets( if (QCallback == NULLQUARK) QCallback = XrmPermStringToQuark(XtRCallback); - if (objectClass->object_class.superclass != NULL) { + if (myObjectClass->object_class.superclass != NULL) { superTable = (CallbackTable) - ((ObjectClass) objectClass->object_class.superclass)-> + ((ObjectClass) myObjectClass->object_class.superclass)-> object_class.callback_private; tableSize = (int)(long) superTable[0]; } else { @@ -161,8 +161,8 @@ static void ConstructCallbackOffsets( } /* Count the number of callbacks */ - resourceList = (XrmResourceList) objectClass->object_class.resources; - for (i = objectClass->object_class.num_resources; --i >= 0; resourceList++) + resourceList = (XrmResourceList) myObjectClass->object_class.resources; + for (i = (int) myObjectClass->object_class.num_resources; --i >= 0; resourceList++) if (resourceList->xrm_type == QCallback) tableSize++; @@ -172,13 +172,13 @@ static void ConstructCallbackOffsets( * offsets so that resource overrides work. */ newTable = (CallbackTable) - __XtMalloc(sizeof(XrmResource *) * (tableSize + 1)); + __XtMalloc((Cardinal) (sizeof(XrmResource *) * (size_t) (tableSize + 1))); newTable[0] = (XrmResource *)(long) tableSize; if (superTable) tableSize -= (int)(long) superTable[0]; - resourceList = (XrmResourceList) objectClass->object_class.resources; + resourceList = (XrmResourceList) myObjectClass->object_class.resources; for (i=1; tableSize > 0; resourceList++) if (resourceList->xrm_type == QCallback) { newTable[i++] = resourceList; @@ -190,7 +190,7 @@ static void ConstructCallbackOffsets( --tableSize >= 0; superTable++) newTable[i++] = *superTable; - objectClass->object_class.callback_private = (XtPointer) newTable; + myObjectClass->object_class.callback_private = (XtPointer) newTable; } static void InheritObjectExtensionMethods( @@ -258,15 +258,15 @@ static Boolean ObjectSetValues( ArgList args, Cardinal * num_args) { - register CallbackTable offsets; - register int i; - register InternalCallbackList *ol, *nl; + CallbackTable offsets; + int i; LOCK_PROCESS; /* Compile any callback lists into internal form */ offsets = (CallbackTable) XtClass(widget)->core_class.callback_private; for (i= (int)(long) *(offsets++); --i >= 0; offsets++) { + InternalCallbackList *ol, *nl; ol = (InternalCallbackList *) ((char *) old - (*offsets)->xrm_offset - 1); nl = (InternalCallbackList *) @@ -286,9 +286,8 @@ static Boolean ObjectSetValues( static void ObjectDestroy ( register Widget widget) { - register CallbackTable offsets; - register int i; - register InternalCallbackList cl; + CallbackTable offsets; + int i; /* Remove all callbacks associated with widget */ LOCK_PROCESS; @@ -296,7 +295,7 @@ static void ObjectDestroy ( widget->core.widget_class->core_class.callback_private; for (i = (int)(long) *(offsets++); --i >= 0; offsets++) { - cl = *(InternalCallbackList *) + InternalCallbackList cl = *(InternalCallbackList *) ((char *) widget - (*offsets)->xrm_offset - 1); if (cl) XtFree((char *) cl); } diff --git a/lib/libXt/src/PassivGrab.c b/lib/libXt/src/PassivGrab.c index 8d3a1d151..bece0d959 100644 --- a/lib/libXt/src/PassivGrab.c +++ b/lib/libXt/src/PassivGrab.c @@ -111,7 +111,7 @@ static void DeleteDetailFromMask( int i; pDetailMask = (Mask *)__XtMalloc(sizeof(Mask) * MasksPerDetailMask); for (i = MasksPerDetailMask; --i >= 0; ) - pDetailMask[i] = ~0; + pDetailMask[i] = (unsigned long) (~0); *ppDetailMask = pDetailMask; } BITCLEAR((pDetailMask), detail); @@ -166,13 +166,13 @@ static XtServerGrabPtr CreateGrab( : 0)); grab->next = NULL; grab->widget = widget; - grab->ownerEvents = ownerEvents; - grab->pointerMode = pointer_mode; - grab->keyboardMode = keyboard_mode; - grab->eventMask = event_mask; - grab->hasExt = need_ext; + XtSetBit(grab->ownerEvents, ownerEvents); + XtSetBit(grab->pointerMode, pointer_mode); + XtSetBit(grab->keyboardMode, keyboard_mode); + grab->eventMask = (unsigned short)event_mask; + XtSetBit(grab->hasExt, need_ext); grab->confineToIsWidgetWin = (XtWindow (widget) == confine_to); - grab->modifiers = modifiers; + grab->modifiers = (unsigned short) modifiers; grab->keybut = keybut; if (need_ext) { XtServerGrabExtPtr ext = GRABEXT(grab); @@ -578,7 +578,7 @@ XtServerGrabPtr _XtCheckServerGrabsOnWidget ( * Extension may be representing keyboard group state in two upper bits. */ tempGrab.widget = widget; - tempGrab.keybut = event->xkey.keycode; /* also xbutton.button */ + tempGrab.keybut = (KeyCode) event->xkey.keycode; /* also xbutton.button */ tempGrab.modifiers = event->xkey.state & 0x1FFF; /*also xbutton.state*/ tempGrab.hasExt = False; @@ -655,8 +655,6 @@ static void MakeGrabs( XtPerDisplayInput pdi) { XtServerGrabPtr next = *passiveListPtr; - XtServerGrabPtr grab; - XtPerWidgetInput pwi; /* * make MakeGrab build a new list that has had the merge * processing done on it. Start with an empty list @@ -666,6 +664,9 @@ static void MakeGrabs( *passiveListPtr = NULL; while (next) { + XtServerGrabPtr grab; + XtPerWidgetInput pwi; + grab = next; next = grab->next; pwi = _XtGetPerWidgetInput(grab->widget, FALSE); @@ -782,8 +783,8 @@ void UngrabKeyOrButton ( /* Build a temporary grab list entry */ tempGrab.widget = widget; - tempGrab.modifiers = modifiers; - tempGrab.keybut = keyOrButton; + tempGrab.modifiers = (unsigned short) modifiers; + tempGrab.keybut = (KeyCode) keyOrButton; tempGrab.hasExt = False; LOCK_PROCESS; @@ -797,7 +798,7 @@ void UngrabKeyOrButton ( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidGrab", "ungrabKeyOrButton", XtCXtToolkitError, "Attempt to remove nonexistent passive grab", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -809,7 +810,7 @@ void UngrabKeyOrButton ( widget->core.window); else XUngrabButton(widget->core.screen->display, - keyOrButton, (unsigned int)modifiers, + (unsigned) keyOrButton, (unsigned int)modifiers, widget->core.window); } @@ -830,7 +831,7 @@ void XtGrabKey ( WIDGET_TO_APPCON(widget); LOCK_APP(app); - GrabKeyOrButton(widget, (KeyCode)keycode, modifiers, owner_events, + GrabKeyOrButton(widget, (KeyCode)keycode, modifiers, (Boolean) owner_events, pointer_mode, keyboard_mode, (Mask)0, (Window)None, (Cursor)None, KEYBOARD); UNLOCK_APP(app); @@ -850,7 +851,7 @@ void XtGrabButton( WIDGET_TO_APPCON(widget); LOCK_APP(app); - GrabKeyOrButton(widget, (KeyCode)button, modifiers, owner_events, + GrabKeyOrButton(widget, (KeyCode)button, modifiers, (Boolean) owner_events, pointer_mode, keyboard_mode, (Mask)event_mask, confine_to, cursor, POINTER); UNLOCK_APP(app); @@ -912,7 +913,7 @@ static int GrabDevice ( UNLOCK_PROCESS; if (!isKeyboard) returnVal = XGrabPointer(XtDisplay(widget), XtWindow(widget), - owner_events, event_mask, + owner_events, (unsigned) event_mask, pointer_mode, keyboard_mode, confine_to, cursor, time); else @@ -928,9 +929,9 @@ static int GrabDevice ( device->grab.widget = widget; device->grab.modifiers = 0; device->grab.keybut = 0; - device->grab.ownerEvents = owner_events; - device->grab.pointerMode = pointer_mode; - device->grab.keyboardMode = keyboard_mode; + XtSetBit(device->grab.ownerEvents, owner_events); + XtSetBit(device->grab.pointerMode, pointer_mode); + XtSetBit(device->grab.keyboardMode, keyboard_mode); device->grab.hasExt = False; device->grabType = XtActiveServerGrab; pdi->activatingKey = (KeyCode)0; @@ -982,7 +983,7 @@ int XtGrabKeyboard ( WIDGET_TO_APPCON(widget); LOCK_APP(app); - retval = GrabDevice (widget, owner_events, + retval = GrabDevice (widget, (Boolean) owner_events, pointer_mode, keyboard_mode, (Mask)0, (Window)None, (Cursor)None, time, KEYBOARD); UNLOCK_APP(app); @@ -1025,7 +1026,7 @@ int XtGrabPointer ( WIDGET_TO_APPCON(widget); LOCK_APP(app); - retval = GrabDevice (widget, owner_events, + retval = GrabDevice (widget, (Boolean) owner_events, pointer_mode, keyboard_mode, (Mask)event_mask, confine_to, cursor, time, POINTER); diff --git a/lib/libXt/src/Pointer.c b/lib/libXt/src/Pointer.c index 4e537173d..70b0ea810 100644 --- a/lib/libXt/src/Pointer.c +++ b/lib/libXt/src/Pointer.c @@ -75,7 +75,7 @@ Widget _XtProcessPointerEvent( { Cardinal i; - for (i = pdi->traceDepth; + for (i = (Cardinal) pdi->traceDepth; i > 0 && !newGrab; i--) newGrab = _XtCheckServerGrabsOnWidget((XEvent*)event, @@ -94,7 +94,7 @@ Widget _XtProcessPointerEvent( case ButtonRelease: { if ((device->grabType == XtPassiveServerGrab) && - !(event->state & ~(Button1Mask << (event->button - 1)) & + !(event->state & (unsigned)(~(Button1Mask << (event->button - 1))) & AllButtonsMask)) deactivateGrab = TRUE; } diff --git a/lib/libXt/src/Popup.c b/lib/libXt/src/Popup.c index 3f4554b69..56fa60dd7 100644 --- a/lib/libXt/src/Popup.c +++ b/lib/libXt/src/Popup.c @@ -62,7 +62,7 @@ void _XtPopup( XtAppErrorMsg(XtWidgetToApplicationContext(widget), "invalidClass","xtPopup",XtCXtToolkitError, "XtPopup requires a subclass of shellWidgetClass", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } if (! shell_widget->shell.popped_up) { @@ -70,7 +70,7 @@ void _XtPopup( XtCallCallbacks(widget, XtNpopupCallback, (XtPointer)&call_data); shell_widget->shell.popped_up = TRUE; shell_widget->shell.grab_kind = grab_kind; - shell_widget->shell.spring_loaded = spring_loaded; + shell_widget->shell.spring_loaded = (Boolean) spring_loaded; if (shell_widget->shell.create_popup_child_proc != NULL) { (*(shell_widget->shell.create_popup_child_proc))(widget); } @@ -102,7 +102,7 @@ void XtPopup (Widget widget, XtGrabKind grab_kind) XtWidgetToApplicationContext(widget), "invalidGrabKind","xtPopup",XtCXtToolkitError, "grab kind argument has invalid value; XtGrabNone assumed", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); grab_kind = XtGrabNone; } @@ -152,7 +152,7 @@ void XtPopdown( XtAppErrorMsg(XtWidgetToApplicationContext(widget), "invalidClass","xtPopdown",XtCXtToolkitError, "XtPopdown requires a subclass of shellWidgetClass", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } #ifndef X_NO_XT_POPDOWN_CONFORMANCE diff --git a/lib/libXt/src/ResConfig.c b/lib/libXt/src/ResConfig.c index 5a7f6d239..b668736f9 100644 --- a/lib/libXt/src/ResConfig.c +++ b/lib/libXt/src/ResConfig.c @@ -118,10 +118,16 @@ _set_resource_values ( Display *dpy; XrmDatabase tmp_db; - if (!XtIsWidget (w)) - dpy = XtDisplay (w->core.parent); - else - dpy = XtDisplay (w); + if (last_part == NULL) + return; + + if (!XtIsWidget (w)) { + if (w == 0 || w->core.parent == 0) + return; + dpy = XtDisplay (w->core.parent); + } else { + dpy = XtDisplay (w); + } tmp_db = XtDatabase(dpy); /* @@ -201,8 +207,8 @@ _set_resource_values ( cur->core.widget_class->core_class.class_name); } } - if (resource_class != NULL) - XtFree (resource_class); + + XtFree (resource_class); resource_class = temp; cur = XtParent(cur); @@ -213,8 +219,8 @@ _set_resource_values ( */ XtAsprintf (&temp, "%s.%s", resource_name, resources_return[res_index].resource_name); - if (resource_name != NULL) - XtFree (resource_name); + + XtFree (resource_name); resource_name = temp; /* @@ -222,8 +228,8 @@ _set_resource_values ( */ XtAsprintf (&temp, "%s.%s", resource_class, resources_return[res_index].resource_class); - if (resource_class != NULL) - XtFree (resource_class); + + XtFree (resource_class); resource_class = temp; #ifdef DEBUG @@ -557,6 +563,7 @@ _set_and_search ( } else _search_child (w, local_index, remainder, resource, value, last_token, last_part); + XtFree (part); return; } if (token == '*') { @@ -675,7 +682,6 @@ _search_widget_tree ( char *last_part; char *remainder = NULL; char last_token; - char *indx, *copy; char *loose, *tight; int loose_len, tight_len; @@ -702,8 +708,8 @@ _search_widget_tree ( if ((loose == NULL) && (tight == NULL)) return; - loose_len = (loose) ? strlen (loose) : 0; - tight_len = (tight) ? strlen (tight) : 0; + loose_len = (loose) ? (int) strlen (loose) : 0; + tight_len = (tight) ? (int) strlen (tight) : 0; if ((loose == NULL) || (tight_len > loose_len)) remainder = XtNewString (tight); @@ -714,32 +720,35 @@ _search_widget_tree ( * Parse last segment off of resource string, (eg. background, font, * etc.) */ - last_token = _get_last_part (remainder, &last_part); - /* - * this case covers resources of only one level (eg. *background) - */ - if (remainder[0] == 0) { - _set_resource_values (w, resource, value, last_part); - if (last_token == '*') - _apply_values_to_children (parent, remainder, resource, - value, last_token, last_part); - /* - * all other resource strings are recursively applied to the widget tree. - * Prepend a '.' to the remainder string if there is no leading token. - */ - } else { - if (remainder[0] != '*' && remainder[0] != '.') { - XtAsprintf (©, ".%s", remainder); - XtFree (remainder); - remainder = copy; - } - indx = remainder; - _set_and_search (parent, indx, remainder, resource, value, - last_token, last_part); + if (remainder) { + last_token = _get_last_part (remainder, &last_part); + /* + * this case covers resources of only one level (eg. *background) + */ + if (remainder[0] == 0) { + _set_resource_values (w, resource, value, last_part); + if (last_token == '*') + _apply_values_to_children (parent, remainder, resource, + value, last_token, last_part); + /* + * all other resource strings are recursively applied to the widget tree. + * Prepend a '.' to the remainder string if there is no leading token. + */ + } else { + char *indx, *copy; + if (remainder[0] != '*' && remainder[0] != '.') { + XtAsprintf (©, ".%s", remainder); + XtFree (remainder); + remainder = copy; + } + indx = remainder; + _set_and_search (parent, indx, remainder, resource, value, + last_token, last_part); + } + + XtFree (remainder); + XtFree (last_part); } - - XtFree (remainder); - XtFree (last_part); } /* @@ -774,16 +783,16 @@ _locate_children ( * count the number of children */ if (XtIsWidget (parent)) - num_children += parent->core.num_popups; + num_children = (int) ((Cardinal) num_children + parent->core.num_popups); if (XtIsComposite (parent)) - num_children += comp->composite.num_children; + num_children = (int) ((Cardinal) num_children + comp->composite.num_children); if (num_children == 0) { *children = NULL; return (0); } *children = (Widget *) - XtMalloc ((Cardinal) sizeof(Widget) * num_children); + XtMalloc ((Cardinal) (sizeof(Widget) * (size_t) num_children)); if (XtIsComposite (parent)) { for (i=0; i<comp->composite.num_children; i++) { @@ -893,20 +902,17 @@ _XtResourceConfigurationEH ( unsigned long nitems; unsigned long leftover; char *data = NULL; - unsigned long resource_len; char *data_ptr; - char *resource; - char *value; #ifdef DEBUG int indent = 0; #endif XtPerDisplay pd; #ifdef DEBUG - fprintf (stderr, "in _XtResourceConfiguationEH atom = %d\n",event->xproperty.atom); - fprintf (stderr, " window = %x\n", XtWindow (w)); + fprintf (stderr, "in _XtResourceConfiguationEH atom = %u\n",(unsigned) event->xproperty.atom); + fprintf (stderr, " window = %x\n", (unsigned) XtWindow (w)); if (XtIsWidget (w)) - fprintf (stderr, " widget = %x name = %s\n", w, w->core.name); + fprintf (stderr, " widget = %zx name = %s\n", (size_t)w, w->core.name); #endif pd = _XtGetPerDisplay (XtDisplay (w)); @@ -966,6 +972,7 @@ _XtResourceConfigurationEH ( if (data) { char *data_end = data + nitems; char *data_value; + unsigned long resource_len; resource_len = strtoul (data, &data_ptr, 10); @@ -976,12 +983,15 @@ _XtResourceConfigurationEH ( data_ptr = data_value = NULL; if (data_value > data_ptr && data_value < data_end) { + char *resource; + char *value; + *data_value++ = '\0'; resource = XtNewString (data_ptr); value = XtNewString (data_value); #ifdef DEBUG - fprintf (stderr, "resource_len=%d\n", + fprintf (stderr, "resource_len=%lu\n", resource_len); fprintf (stderr, "resource = %s\t value = %s\n", resource, value); @@ -998,6 +1008,5 @@ _XtResourceConfigurationEH ( } } - if (data) - XFree ((char *)data); + XFree ((char *)data); } diff --git a/lib/libXt/src/Resources.c b/lib/libXt/src/Resources.c index 9e0f065bd..83ffd4c7d 100644 --- a/lib/libXt/src/Resources.c +++ b/lib/libXt/src/Resources.c @@ -96,7 +96,7 @@ void _XtCopyFromParent( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidParent","xtCopyFromParent",XtCXtToolkitError, "CopyFromParent must have non-NULL parent", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); value->addr = NULL; return; } @@ -110,7 +110,7 @@ void _XtCopyFromArg( register unsigned int size) { if (size > sizeof(XtArgVal)) - (void) memmove((char *) dst, (char *) src, (int) size); + (void) memmove((char *) dst, (char *) src, (size_t) size); else { union { long longval; @@ -133,7 +133,7 @@ void _XtCopyFromArg( else if (size == sizeof(char*)) u.charptr = (char*)src; else p = (char*)&src; - (void) memmove(dst, p, (int) size); + (void) memmove(dst, p, (size_t) size); } } /* _XtCopyFromArg */ @@ -158,7 +158,7 @@ void _XtCopyToArg( XtPointer ptr; } u; if (size <= sizeof(XtArgVal)) { - (void) memmove((char*)&u, (char*)src, (int)size ); + (void) memmove((char*)&u, (char*)src, (size_t)size ); if (size == sizeof(long)) *dst = (XtArgVal)u.longval; #ifdef LONG64 else if (size == sizeof(int)) *dst = (XtArgVal)u.intval; @@ -167,18 +167,18 @@ void _XtCopyToArg( else if (size == sizeof(char)) *dst = (XtArgVal)u.charval; else if (size == sizeof(char*)) *dst = (XtArgVal)u.charptr; else if (size == sizeof(XtPointer)) *dst = (XtArgVal)u.ptr; - else (void) memmove((char*)dst, (char*)src, (int)size ); + else (void) memmove((char*)dst, (char*)src, (size_t)size ); } else - (void) memmove((char*)dst, (char*)src, (int)size ); + (void) memmove((char*)dst, (char*)src, (size_t)size ); #else XtErrorMsg("invalidGetValues", "xtGetValues", XtCXtToolkitError, - "NULL ArgVal in XtGetValues", (String*) NULL, (Cardinal*) NULL); + "NULL ArgVal in XtGetValues", NULL, NULL); #endif } else { /* proper GetValues semantics: argval is pointer to destination */ - (void) memmove((char*)*dst, (char*)src, (int)size ); + (void) memmove((char*)*dst, (char*)src, (size_t)size ); } } /* _XtCopyToArg */ @@ -202,7 +202,7 @@ static void CopyToArg( XtPointer ptr; } u; if (size <= sizeof(XtArgVal)) { - (void) memmove((char*)&u, (char*)src, (int)size ); + (void) memmove((char*)&u, (char*)src, (size_t)size ); if (size == sizeof(long)) *dst = (XtArgVal)u.longval; #ifdef LONG64 else if (size == sizeof(int)) *dst = (XtArgVal)u.intval; @@ -211,14 +211,14 @@ static void CopyToArg( else if (size == sizeof(char)) *dst = (XtArgVal)u.charval; else if (size == sizeof(char*)) *dst = (XtArgVal)u.charptr; else if (size == sizeof(XtPointer)) *dst = (XtArgVal)u.ptr; - else (void) memmove((char*)dst, (char*)src, (int)size ); + else (void) memmove((char*)dst, (char*)src, (size_t)size ); } else - (void) memmove((char*)dst, (char*)src, (int)size ); + (void) memmove((char*)dst, (char*)src, (size_t)size ); } else { /* proper GetValues semantics: argval is pointer to destination */ - (void) memmove((char*)*dst, (char*)src, (int)size ); + (void) memmove((char*)*dst, (char*)src, (size_t)size ); } } /* CopyToArg */ @@ -290,7 +290,7 @@ void _XtCompileResourceList( xrmres->xrm_name = PSToQ(resources->resource_name); xrmres->xrm_class = PSToQ(resources->resource_class); xrmres->xrm_type = PSToQ(resources->resource_type); - xrmres->xrm_offset = (Cardinal) + xrmres->xrm_offset = (int) (-(int)resources->resource_offset - 1); xrmres->xrm_default_type = PSToQ(resources->default_type); } @@ -311,7 +311,7 @@ static void XrmCompileResourceListEphem( xrmres->xrm_name = StringToName(resources->resource_name); xrmres->xrm_class = StringToClass(resources->resource_class); xrmres->xrm_type = StringToQuark(resources->resource_type); - xrmres->xrm_offset = (Cardinal) + xrmres->xrm_offset = (int) (-(int)resources->resource_offset - 1); xrmres->xrm_default_type = StringToQuark(resources->default_type); } @@ -363,7 +363,7 @@ void _XtDependencies( /* Allocate and initialize new_res with superclass resource pointers */ new_num_res = super_num_res + class_num_res; - new_res = (XrmResourceList *) __XtMalloc(new_num_res*sizeof(XrmResourceList)); + new_res = (XrmResourceList *) __XtMalloc((Cardinal)(new_num_res*sizeof(XrmResourceList))); if (super_num_res > 0) XtMemmove(new_res, super_res, super_num_res * sizeof(XrmResourceList)); @@ -426,13 +426,13 @@ void _XtResourceDependencies( void _XtConstraintResDependencies( ConstraintWidgetClass wc) { - ConstraintWidgetClass sc; - if (wc == (ConstraintWidgetClass) constraintWidgetClass) { _XtDependencies(&(wc->constraint_class.resources), &(wc->constraint_class.num_resources), (XrmResourceList *)NULL, (unsigned)0, (unsigned)0); } else { + ConstraintWidgetClass sc; + sc = (ConstraintWidgetClass) wc->core_class.superclass; _XtDependencies(&(wc->constraint_class.resources), &(wc->constraint_class.num_resources), @@ -452,7 +452,7 @@ XrmResourceList* _XtCreateIndirectionTable ( register Cardinal idx; XrmResourceList* table; - table = (XrmResourceList*)__XtMalloc(num_resources * sizeof(XrmResourceList)); + table = (XrmResourceList*)__XtMalloc((Cardinal)(num_resources * sizeof(XrmResourceList))); for (idx = 0; idx < num_resources; idx++) table[idx] = (XrmResourceList)(&(resources[idx])); return table; @@ -491,7 +491,7 @@ static XtCacheRef *GetResources( XtCacheRef *cache_ptr, *cache_base; Boolean persistent_resources = True; Boolean found_persistence = False; - int num_typed_args = *pNumTypedArgs; + int num_typed_args = (int) *pNumTypedArgs; XrmDatabase db; Boolean do_tm_hack = False; @@ -499,7 +499,7 @@ static XtCacheRef *GetResources( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidArgCount","getResources",XtCXtToolkitError, "argument count > 0 on NULL argument list", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); num_args = 0; } if (num_resources == 0) { @@ -508,19 +508,19 @@ static XtCacheRef *GetResources( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidResourceCount","getResources",XtCXtToolkitError, "too many resources", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return NULL; } else if (table == NULL) { XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidResourceCount","getResources",XtCXtToolkitError, "resource count > 0 on NULL resource list", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return NULL; } /* Mark each resource as not found on arg list */ - bzero((char *) found, (int) (num_resources * sizeof(Boolean))); - bzero((char *) typed, (int) (num_resources * sizeof(int))); + memset((void *) found, 0, (size_t) (num_resources * sizeof(Boolean))); + memset((void *) typed, 0, (size_t) (num_resources * sizeof(int))); /* Copy the args into the resources, mark each as found */ { @@ -584,12 +584,12 @@ static XtCacheRef *GetResources( db = XtScreenDatabase(XtScreenOfObject(widget)); while (!XrmQGetSearchList(db, names, classes, - searchList, searchListSize)) { + searchList, (int) searchListSize)) { if (searchList == stackSearchList) searchList = NULL; searchList = (XrmHashTable*)XtRealloc((char*)searchList, - sizeof(XrmHashTable) * - (searchListSize *= 2)); + (Cardinal) (sizeof(XrmHashTable) * + (searchListSize *= 2))); } if (persistent_resources) @@ -612,7 +612,7 @@ static XtCacheRef *GetResources( XrmValue from_val, to_val; from_type = StringToQuark(arg->type); - from_val.size = arg->size; + from_val.size = (Cardinal) arg->size; if ((from_type == QString) || ((unsigned) arg->size > sizeof(XtArgVal))) from_val.addr = (XPointer)arg->value; else @@ -645,12 +645,12 @@ static XtCacheRef *GetResources( if (widget->core.screen != oldscreen) { db = XtScreenDatabase(widget->core.screen); while (!XrmQGetSearchList(db, names, classes, - searchList, searchListSize)) { + searchList, (int) searchListSize)) { if (searchList == stackSearchList) searchList = NULL; searchList = (XrmHashTable*)XtRealloc((char*)searchList, - sizeof(XrmHashTable) * - (searchListSize *= 2)); + (Cardinal)(sizeof(XrmHashTable) * + (searchListSize *= 2))); } } } @@ -692,7 +692,7 @@ static XtCacheRef *GetResources( for (res = table, j = 0; j < num_resources; j++, res++) { rx = *res; - xrm_type = rx->xrm_type; + xrm_type = (XrmRepresentation) rx->xrm_type; if (typed[j]) { register XtTypedArg* arg = typed_args + typed[j] - 1; @@ -706,7 +706,7 @@ static XtCacheRef *GetResources( Boolean converted; from_type = StringToQuark(arg->type); - from_val.size = arg->size; + from_val.size = (Cardinal) arg->size; if ((from_type == QString) || ((unsigned) arg->size > sizeof(XtArgVal))) from_val.addr = (XPointer)arg->value; else @@ -733,7 +733,7 @@ static XtCacheRef *GetResources( */ if(rx->xrm_size > sizeof(XtArgVal)) { - arg->value = (XtArgVal) __XtMalloc(rx->xrm_size); + arg->value = (XtArgVal) (void *) __XtMalloc(rx->xrm_size); arg->size = -(arg->size); } else { /* will fit - copy directly into value field */ arg->value = (XtArgVal) NULL; @@ -755,7 +755,7 @@ static XtCacheRef *GetResources( Boolean have_value = False; if (XrmQGetSearchResource(searchList, - rx->xrm_name, rx->xrm_class, &rawType, &value)) { + (XrmName) rx->xrm_name, (XrmClass) rx->xrm_class, &rawType, &value)) { if (rawType != xrm_type) { convValue.size = rx->xrm_size; convValue.addr = (XPointer)(base - rx->xrm_offset - 1); @@ -774,7 +774,7 @@ static XtCacheRef *GetResources( || (rx->xrm_default_type == xrm_type) || (rx->xrm_default_addr != NULL))) { /* Convert default value to proper type */ - xrm_default_type = rx->xrm_default_type; + xrm_default_type = (XrmRepresentation) rx->xrm_default_type; if (xrm_default_type == QCallProc) { (*(XtResourceDefaultProc)(rx->xrm_default_addr))( widget,-(rx->xrm_offset+1), &value); @@ -806,7 +806,7 @@ static XtCacheRef *GetResources( } else { value.addr = rx->xrm_default_addr; if (xrm_default_type == QString) { - value.size = strlen((char *)value.addr) + 1; + value.size = (unsigned) strlen((char *)value.addr) + 1; } else { value.size = sizeof(XtPointer); } @@ -876,15 +876,15 @@ static XtCacheRef *GetResources( } } } - if ((Cardinal)num_typed_args != *pNumTypedArgs) *pNumTypedArgs = num_typed_args; + if ((Cardinal)num_typed_args != *pNumTypedArgs) *pNumTypedArgs = (Cardinal) num_typed_args; if (searchList != stackSearchList) XtFree((char*)searchList); if (!cache_ptr) cache_ptr = cache_base; if (cache_ptr && cache_ptr != cache_ref) { - int cache_ref_size = cache_ptr - cache_ref; + int cache_ref_size = (int) (cache_ptr - cache_ref); XtCacheRef *refs = (XtCacheRef*) - __XtMalloc((unsigned)sizeof(XtCacheRef)*(cache_ref_size + 1)); - (void) memmove(refs, cache_ref, sizeof(XtCacheRef)*cache_ref_size ); + __XtMalloc((Cardinal)(sizeof(XtCacheRef) * (size_t)(cache_ref_size + 1))); + (void) memmove(refs, cache_ref, sizeof(XtCacheRef)*(size_t)cache_ref_size ); refs[cache_ref_size] = NULL; return refs; } @@ -909,7 +909,7 @@ static void CacheArgs( count = (args != NULL) ? num_args : num_typed_args; if (num_quarks < count) { - quarks = (XrmQuarkList) __XtMalloc(count * sizeof(XrmQuark)); + quarks = (XrmQuarkList) __XtMalloc((Cardinal)(count * sizeof(XrmQuark))); } else { quarks = quark_cache; } @@ -941,8 +941,7 @@ XtCacheRef *_XtGetResources( XrmQuark quark_cache[100]; XrmQuarkList quark_args; WidgetClass wc; - ConstraintWidgetClass cwc; - XtCacheRef *cache_refs, *cache_refs_core; + XtCacheRef *cache_refs = NULL; Cardinal count; wc = XtClass(w); @@ -950,37 +949,41 @@ XtCacheRef *_XtGetResources( count = CountTreeDepth(w); names = (XrmName*) XtStackAlloc (count * sizeof(XrmName), names_s); classes = (XrmClass*) XtStackAlloc (count * sizeof(XrmClass), classes_s); - if (names == NULL || classes == NULL) _XtAllocError(NULL); - - /* Get names, classes for widget and ancestors */ - GetNamesAndClasses(w, names, classes); + if (names == NULL || classes == NULL) { + _XtAllocError(NULL); + } else { - /* Compile arg list into quarks */ - CacheArgs(args, num_args, typed_args, *num_typed_args, quark_cache, - XtNumber(quark_cache), &quark_args); + /* Get names, classes for widget and ancestors */ + GetNamesAndClasses(w, names, classes); - /* Get normal resources */ - LOCK_PROCESS; - cache_refs = GetResources(w, (char*)w, names, classes, - (XrmResourceList *) wc->core_class.resources, - wc->core_class.num_resources, quark_args, args, num_args, - typed_args, num_typed_args, XtIsWidget(w)); - - if (w->core.constraints != NULL) { - cwc = (ConstraintWidgetClass) XtClass(w->core.parent); - cache_refs_core = - GetResources(w, (char*)w->core.constraints, names, classes, - (XrmResourceList *) cwc->constraint_class.resources, - cwc->constraint_class.num_resources, - quark_args, args, num_args, typed_args, num_typed_args, False); - if (cache_refs_core) { - XtFree((char *)cache_refs_core); + /* Compile arg list into quarks */ + CacheArgs(args, num_args, typed_args, *num_typed_args, quark_cache, + XtNumber(quark_cache), &quark_args); + + /* Get normal resources */ + LOCK_PROCESS; + cache_refs = GetResources(w, (char*)w, names, classes, + (XrmResourceList *) wc->core_class.resources, + wc->core_class.num_resources, quark_args, args, num_args, + typed_args, num_typed_args, XtIsWidget(w)); + + if (w->core.constraints != NULL) { + ConstraintWidgetClass cwc; + XtCacheRef *cache_refs_core; + + cwc = (ConstraintWidgetClass) XtClass(w->core.parent); + cache_refs_core = + GetResources(w, (char*)w->core.constraints, names, classes, + (XrmResourceList *) cwc->constraint_class.resources, + cwc->constraint_class.num_resources, + quark_args, args, num_args, typed_args, num_typed_args, False); + XtFree((char *)cache_refs_core); } + FreeCache(quark_cache, quark_args); + UNLOCK_PROCESS; + XtStackFree((XtPointer)names, names_s); + XtStackFree((XtPointer)classes, classes_s); } - FreeCache(quark_cache, quark_args); - UNLOCK_PROCESS; - XtStackFree((XtPointer)names, names_s); - XtStackFree((XtPointer)classes, classes_s); return cache_refs; } /* _XtGetResources */ @@ -1013,35 +1016,37 @@ void _XtGetSubresources ( count++; /* make sure there's enough room for name and class */ names = (XrmName*) XtStackAlloc(count * sizeof(XrmName), names_s); classes = (XrmClass*) XtStackAlloc(count * sizeof(XrmClass), classes_s); - if (names == NULL || classes == NULL) _XtAllocError(NULL); - - /* Get full name, class of subobject */ - GetNamesAndClasses(w, names, classes); - count -= 2; - names[count] = StringToName(name); - classes[count] = StringToClass(class); - count++; - names[count] = NULLQUARK; - classes[count] = NULLQUARK; + if (names == NULL || classes == NULL) { + _XtAllocError(NULL); + } else { + /* Get full name, class of subobject */ + GetNamesAndClasses(w, names, classes); + count -= 2; + names[count] = StringToName(name); + classes[count] = StringToClass(class); + count++; + names[count] = NULLQUARK; + classes[count] = NULLQUARK; - /* Compile arg list into quarks */ - CacheArgs(args, num_args, typed_args, num_typed_args, - quark_cache, XtNumber(quark_cache), &quark_args); + /* Compile arg list into quarks */ + CacheArgs(args, num_args, typed_args, num_typed_args, + quark_cache, XtNumber(quark_cache), &quark_args); - /* Compile resource list if needed */ - if (((int) resources->resource_offset) >= 0) { - XrmCompileResourceListEphem(resources, num_resources); + /* Compile resource list if needed */ + if (((int) resources->resource_offset) >= 0) { + XrmCompileResourceListEphem(resources, num_resources); + } + table = _XtCreateIndirectionTable(resources, num_resources); + Resrc = GetResources(w, (char*)base, names, classes, table, num_resources, + quark_args, args, num_args, + typed_args, &ntyped_args, False); + FreeCache(quark_cache, quark_args); + XtFree((char *)table); + XtFree((char *)Resrc); + XtStackFree((XtPointer)names, names_s); + XtStackFree((XtPointer)classes, classes_s); + UNLOCK_APP(app); } - table = _XtCreateIndirectionTable(resources, num_resources); - Resrc = GetResources(w, (char*)base, names, classes, table, num_resources, - quark_args, args, num_args, - typed_args, &ntyped_args, False); - FreeCache(quark_cache, quark_args); - XtFree((char *)table); - XtFree((char *)Resrc); - XtStackFree((XtPointer)names, names_s); - XtStackFree((XtPointer)classes, classes_s); - UNLOCK_APP(app); } void XtGetSubresources ( @@ -1073,7 +1078,7 @@ void _XtGetApplicationResources ( XrmQuark quark_cache[100]; XrmQuarkList quark_args; XrmResourceList* table; - Cardinal count, ntyped_args = num_typed_args; + Cardinal ntyped_args = num_typed_args; #ifdef XTHREADS XtAppContext app; #endif @@ -1093,17 +1098,24 @@ void _XtGetApplicationResources ( XtPerDisplay pd = _XtGetPerDisplay(_XtDefaultAppContext()->list[0]); names = (XrmName*) XtStackAlloc (2 * sizeof(XrmName), names_s); classes = (XrmClass*) XtStackAlloc (2 * sizeof(XrmClass), classes_s); - names[0] = pd->name; - names[1] = NULLQUARK; - classes[0] = pd->class; - classes[1] = NULLQUARK; + if (names == NULL || classes == NULL) { + _XtAllocError(NULL); + } else { + names[0] = pd->name; + names[1] = NULLQUARK; + classes[0] = pd->class; + classes[1] = NULLQUARK; + } } else { - count = CountTreeDepth(w); + Cardinal count = CountTreeDepth(w); names = (XrmName*) XtStackAlloc(count * sizeof(XrmName), names_s); classes = (XrmClass*) XtStackAlloc(count * sizeof(XrmClass), classes_s); - if (names == NULL || classes == NULL) _XtAllocError(NULL); - GetNamesAndClasses(w, names, classes); + if (names == NULL || classes == NULL) { + _XtAllocError(NULL); + } else { + GetNamesAndClasses(w, names, classes); + } } /* Compile arg list into quarks */ @@ -1147,7 +1159,7 @@ void _XtResourceListInitialize(void) if (initialized) { XtWarningMsg("initializationError","xtInitialize",XtCXtToolkitError, "Initializing Resource Lists twice", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_PROCESS; return; } diff --git a/lib/libXt/src/Selection.c b/lib/libXt/src/Selection.c index 4f59d7028..8c48dd788 100644 --- a/lib/libXt/src/Selection.c +++ b/lib/libXt/src/Selection.c @@ -139,8 +139,9 @@ static void RemoveParamInfo(Widget, Atom); static Atom GetParamInfo(Widget, Atom); static int StorageSize[3] = {1, sizeof(short), sizeof(long)}; -#define BYTELENGTH(length, format) ((length) * StorageSize[(format)>>4]) +#define BYTELENGTH(length, format) ((length) * (size_t)StorageSize[(format)>>4]) #define NUMELEM(bytelength, format) ((bytelength) / StorageSize[(format)>>4]) +#define NUMELEM2(bytelength, format) ((unsigned long)(bytelength) / (unsigned long) StorageSize[(format)>>4]) /* Xlib and Xt are permitted to have different memory allocators, and in the * XtSelectionCallbackProc the client is instructed to free the selection @@ -173,18 +174,19 @@ static PropList GetPropList( Display *dpy) { PropList sarray; - Atom atoms[4]; - static char* names[] = { - "INCR", - "MULTIPLE", - "TIMESTAMP", - "_XT_SELECTION_0" }; LOCK_PROCESS; if (selectPropertyContext == 0) selectPropertyContext = XUniqueContext(); if (XFindContext(dpy, DefaultRootWindow(dpy), selectPropertyContext, (XPointer *)&sarray)) { + Atom atoms[4]; + static char* names[] = { + "INCR", + "MULTIPLE", + "TIMESTAMP", + "_XT_SELECTION_0" }; + XtPerDisplay pd = _XtGetPerDisplay(dpy); sarray = (PropList) __XtMalloc((unsigned) sizeof(PropListRec)); sarray->dpy = dpy; @@ -225,7 +227,7 @@ static Atom GetSelectionProperty( } propCount = sarray->propCount++; sarray->list = (SelectionProp) XtRealloc((XtPointer)sarray->list, - (unsigned)(sarray->propCount*sizeof(SelectionPropRec))); + (Cardinal)((size_t)sarray->propCount * sizeof(SelectionPropRec))); (void) snprintf(propname, sizeof(propname), "_XT_SELECTION_%d", propCount); sarray->list[propCount].prop = XInternAtom(dpy, propname, FALSE); sarray->list[propCount].avail = FALSE; @@ -246,7 +248,7 @@ static void FreeSelectionProperty( XtAppErrorMsg(XtDisplayToApplicationContext(dpy), "noSelectionProperties", "freeSelectionProperty", XtCXtToolkitError, "internal error: no selection property context for display", - (String *)NULL, (Cardinal *)NULL ); + NULL, NULL ); UNLOCK_PROCESS; for (p = sarray->list, propCount=sarray->propCount; propCount; @@ -281,13 +283,13 @@ static CallBackInfo MakeInfo( info->ctx = ctx; info->callbacks = (XtSelectionCallbackProc *) - __XtMalloc((unsigned) (count * sizeof(XtSelectionCallbackProc))); + __XtMalloc((unsigned) ((size_t)count * sizeof(XtSelectionCallbackProc))); (void) memmove((char*)info->callbacks, (char*)callbacks, - count * sizeof(XtSelectionCallbackProc)); + (size_t)count * sizeof(XtSelectionCallbackProc)); info->req_closure = - (XtPointer*)__XtMalloc((unsigned) (count * sizeof(XtPointer))); + (XtPointer*)__XtMalloc((unsigned) ((size_t)count * sizeof(XtPointer))); (void) memmove((char*)info->req_closure, (char*)closures, - count * sizeof(XtPointer)); + (size_t)count * sizeof(XtPointer)); if (count == 1 && properties != NULL && properties[0] != None) info->property = properties[0]; else { @@ -298,9 +300,9 @@ static CallBackInfo MakeInfo( info->proc = HandleSelectionReplies; info->widget = widget; info->time = time; - info->incremental = (Boolean*) __XtMalloc(count * sizeof(Boolean)); + info->incremental = (Boolean*) __XtMalloc((Cardinal)((size_t)count * sizeof(Boolean))); (void) memmove((char*)info->incremental, (char*) incremental, - count * sizeof(Boolean)); + (size_t)count * sizeof(Boolean)); info->current = 0; info->value = NULL; return (info); @@ -499,7 +501,7 @@ static void AddHandler( UNLOCK_PROCESS; if (requestWindowRec->active_transfer_count++ == 0) { XtRegisterDrawable(dpy, window, widget); - XSelectInput(dpy, window, mask); + XSelectInput(dpy, window, (long)mask); } XtAddRawEventHandler(widget, mask, FALSE, proc, closure); } @@ -579,7 +581,7 @@ static void SendIncrement( { Display *dpy = incr->ctx->dpy; - unsigned long incrSize = MAX_SELECTION_INCR(dpy); + unsigned long incrSize = (unsigned long) MAX_SELECTION_INCR(dpy); if (incrSize > incr->bytelength - incr->offset) incrSize = incr->bytelength - incr->offset; StartProtectedSection(dpy, incr->requestor); @@ -643,7 +645,7 @@ static void HandlePropertyGone( if (req->bytelength == 0) AllSent(req); else { - unsigned long size = MAX_SELECTION_INCR(ctx->dpy); + unsigned long size = (unsigned long) MAX_SELECTION_INCR(ctx->dpy); SendIncrement(req); (*(XtConvertSelectionIncrProc)ctx->convert) (ctx->widget, &ctx->selection, &req->target, @@ -725,7 +727,7 @@ static Boolean GetConversion( if (timestamp_target) { value = __XtMalloc(sizeof(long)); - *(long*)value = ctx->time; + *(long*)value = (long) ctx->time; targetType = XA_INTEGER; length = 1; format = 32; @@ -733,7 +735,7 @@ static Boolean GetConversion( else { ctx->ref_count++; if (ctx->incremental == TRUE) { - unsigned long size = MAX_SELECTION_INCR(ctx->dpy); + unsigned long size = (unsigned long) MAX_SELECTION_INCR(ctx->dpy); if ((*(XtConvertSelectionIncrProc)ctx->convert) (ctx->widget, &event->selection, &target, &targetType, &value, &length, &format, @@ -802,8 +804,6 @@ static void HandleSelectionEvents( Select ctx; XSelectionEvent ev; Atom target; - int count; - Boolean writeback = FALSE; ctx = (Select) closure; switch (event->type) { @@ -840,13 +840,16 @@ static void HandleSelectionEvents( int format; unsigned long bytesafter, length; unsigned char *value = NULL; + int count; + Boolean writeback = FALSE; + ev.property = event->xselectionrequest.property; StartProtectedSection(ev.display, ev.requestor); if (XGetWindowProperty(ev.display, ev.requestor, event->xselectionrequest.property, 0L, 1000000, False,(Atom)AnyPropertyType, &target, &format, &length, &bytesafter, &value) == Success) - count = BYTELENGTH(length, format) / sizeof(IndirectPair); + count = (int) (BYTELENGTH(length, format) / sizeof(IndirectPair)); else count = 0; for (p = (IndirectPair *)value; count; p++, count--) { @@ -961,7 +964,7 @@ static Boolean OwnSelection( ctx->loses = lose; ctx->notify = notify; ctx->owner_cancel = cancel; - ctx->incremental = incremental; + XtSetBit(ctx->incremental, incremental); ctx->owner_closure = closure; ctx->was_disowned = FALSE; @@ -1125,8 +1128,6 @@ static void ReqTimedOut( unsigned long bytesafter; unsigned long proplength; Atom type; - XtPointer *c; - int i; if (*info->target == info->ctx->prop_list->indirect_atom) { IndirectPair *pairs = NULL; @@ -1135,6 +1136,9 @@ static void ReqTimedOut( AnyPropertyType, &type, &format, &proplength, &bytesafter, (unsigned char **) &pairs) == Success) { + XtPointer *c; + int i; + XFree(pairs); for (proplength = proplength / IndirectPairWordSize, i = 0, c = info->req_closure; @@ -1192,7 +1196,7 @@ static void HandleGetIncrement( XtRemoveTimeOut(info->timeout); #endif if (length == 0) { - unsigned long u_offset = NUMELEM(info->offset, info->format); + unsigned long u_offset = NUMELEM2(info->offset, info->format); (*info->callbacks[n])(widget, *info->req_closure, &ctx->selection, &info->type, (info->offset == 0 ? value : info->value), @@ -1206,23 +1210,23 @@ static void HandleGetIncrement( } else { /* add increment to collection */ if (info->incremental[n]) { #ifdef XT_COPY_SELECTION - int size = BYTELENGTH(length, info->format) + 1; + int size = (int) BYTELENGTH(length, info->format) + 1; char *tmp = __XtMalloc((Cardinal) size); - (void) memmove(tmp, value, size); + (void) memmove(tmp, value, (size_t) size); XFree(value); value = tmp; #endif (*info->callbacks[n])(widget, *info->req_closure, &ctx->selection, &info->type, value, &length, &info->format); } else { - int size = BYTELENGTH(length, info->format); + int size = (int) BYTELENGTH(length, info->format); if (info->offset + size > info->bytelength) { /* allocate enough for this and the next increment */ info->bytelength = info->offset + size * 2; info->value = XtRealloc(info->value, (Cardinal) info->bytelength); } - (void) memmove(&info->value[info->offset], value, size); + (void) memmove(&info->value[info->offset], value, (size_t)size); info->offset += size; XFree(value); } @@ -1253,22 +1257,22 @@ static void HandleNone( } -static long IncrPropSize( +static unsigned long IncrPropSize( Widget widget, unsigned char* value, int format, unsigned long length) { - unsigned long size; if (format == 32) { - size = ((long*)value)[length-1]; /* %%% what order for longs? */ + unsigned long size; + size = ((unsigned long*)value)[length-1]; /* %%% what order for longs? */ return size; } else { XtAppWarningMsg( XtWidgetToApplicationContext(widget), "badFormat","xtGetSelectionValue",XtCXtToolkitError, "Selection owner returned type INCR property with format != 32", - (String*)NULL, (Cardinal*)NULL ); + NULL, NULL ); return 0; } } @@ -1315,9 +1319,9 @@ Boolean HandleNormal( XDeleteProperty(dpy, XtWindow(widget), property); #ifdef XT_COPY_SELECTION if (value) { /* it could have been deleted after the SelectionNotify */ - int size = BYTELENGTH(length, info->format) + 1; + int size = (int) BYTELENGTH(length, info->format) + 1; char *tmp = __XtMalloc((Cardinal) size); - (void) memmove(tmp, value, size); + (void) memmove(tmp, value, (size_t) size); XFree(value); value = (unsigned char *) tmp; } @@ -1349,7 +1353,7 @@ static void HandleIncremental( XDeleteProperty(dpy, XtWindow(widget), property); XFlush(dpy); - info->bytelength = size; + info->bytelength = (int) size; if (info->incremental[info->current]) /* requestor wants incremental too */ info->value = NULL; /* so no need for buffer to assemble value */ else @@ -1382,7 +1386,6 @@ static void HandleSelectionReplies( unsigned long length; int format; Atom type; - XtPointer *c; if (event->type != SelectionNotify) return; if (!MATCH_SELECT(event, info)) return; /* not really for us */ @@ -1393,6 +1396,8 @@ static void HandleSelectionReplies( HandleSelectionReplies, (XtPointer) info ); if (event->target == ctx->prop_list->indirect_atom) { IndirectPair *pairs = NULL, *p; + XtPointer *c; + if (XGetWindowProperty(dpy, XtWindow(widget), info->property, 0L, 10000000, True, AnyPropertyType, &type, &format, &length, &bytesafter, (unsigned char **) &pairs) @@ -1453,7 +1458,7 @@ static void DoLocalTransfer( req->event.requestor = req->requestor = XtWindow(widget); if (ctx->incremental) { - unsigned long size = MAX_SELECTION_INCR(ctx->dpy); + unsigned long size = (unsigned long) MAX_SELECTION_INCR(ctx->dpy); if (!(*(XtConvertSelectionIncrProc)ctx->convert) (ctx->widget, &selection, &target, &resulttype, &value, &length, &format, @@ -1465,10 +1470,10 @@ static void DoLocalTransfer( Boolean allSent = FALSE; while (!allSent) { if (ctx->notify && (value != NULL)) { - int bytelength = BYTELENGTH(length,format); + int bytelength = (int) BYTELENGTH(length,format); /* both sides think they own this storage */ temp = __XtMalloc((unsigned)bytelength); - (void) memmove(temp, value, bytelength); + (void) memmove(temp, value, (size_t) bytelength); value = temp; } /* use care; older clients were never warned that @@ -1491,19 +1496,19 @@ static void DoLocalTransfer( } } else { while (length) { - int bytelength = BYTELENGTH(length, format); + int bytelength = (int) BYTELENGTH(length, format); total = XtRealloc(total, - (unsigned) (totallength += bytelength)); + (Cardinal) (totallength = totallength + (unsigned long)bytelength)); (void) memmove((char*)total + totallength - bytelength, value, - bytelength); + (size_t) bytelength); (*(XtConvertSelectionIncrProc)ctx->convert) (ctx->widget, &selection, &target, &resulttype, &value, &length, &format, &size, ctx->owner_closure, (XtRequestId*)&req); } if (total == NULL) total = __XtMalloc(1); - totallength = NUMELEM(totallength, format); + totallength = NUMELEM2(totallength, format); (*callback)(widget, closure, &selection, &resulttype, total, &totallength, &format); } @@ -1519,10 +1524,10 @@ static void DoLocalTransfer( HandleNone(widget, callback, closure, selection); } else { if (ctx->notify && (value != NULL)) { - int bytelength = BYTELENGTH(length,format); + int bytelength = (int) BYTELENGTH(length,format); /* both sides think they own this storage; better copy */ temp = __XtMalloc((unsigned)bytelength); - (void) memmove(temp, value, bytelength); + (void) memmove(temp, value, (size_t) bytelength); value = temp; } if (value == NULL) value = __XtMalloc((unsigned)1); @@ -1545,7 +1550,6 @@ static void GetSelectionValue( Atom property) { Select ctx; - CallBackInfo info; Atom properties[1]; properties[0] = property; @@ -1565,6 +1569,7 @@ static void GetSelectionValue( ctx->req = NULL; } else { + CallBackInfo info; info = MakeInfo(ctx, &callback, &closure, 1, widget, time, &incremental, properties); info->target = (Atom *)__XtMalloc((unsigned) sizeof(Atom)); @@ -1642,9 +1647,7 @@ static void GetSelectionValues( Atom *properties) { Select ctx; - CallBackInfo info; - IndirectPair *pairs, *p; - Atom *t; + IndirectPair *pairs; if (count == 0) return; ctx = FindCtx(XtDisplay(widget), selection); @@ -1670,10 +1673,13 @@ static void GetSelectionValues( } else { XtSelectionCallbackProc *passed_callbacks; XtSelectionCallbackProc stack_cbs[32]; + CallBackInfo info; + IndirectPair *p; + Atom *t; int i = 0, j = 0; passed_callbacks = (XtSelectionCallbackProc *) - XtStackAlloc(sizeof(XtSelectionCallbackProc) * count, stack_cbs); + XtStackAlloc(sizeof(XtSelectionCallbackProc) * (size_t)count, stack_cbs); /* To deal with the old calls from XtGetSelectionValues* we will repeat however many callbacks have been passed into @@ -1687,11 +1693,11 @@ static void GetSelectionValues( time, incremental, properties); XtStackFree((XtPointer) passed_callbacks, stack_cbs); - info->target = (Atom *)__XtMalloc((unsigned) ((count+1) * sizeof(Atom))); + info->target = (Atom *)__XtMalloc((unsigned) ((size_t)(count+1) * sizeof(Atom))); (*info->target) = ctx->prop_list->indirect_atom; (void) memmove((char *) info->target+sizeof(Atom), (char *) targets, - count * sizeof(Atom)); - pairs = (IndirectPair*)__XtMalloc((unsigned)(count*sizeof(IndirectPair))); + (size_t) count * sizeof(Atom)); + pairs = (IndirectPair*)__XtMalloc((unsigned)((size_t)count*sizeof(IndirectPair))); for (p = &pairs[count-1], t = &targets[count-1], i = count - 1; p >= pairs; p--, t--, i--) { p->target = *t; @@ -1728,7 +1734,7 @@ void XtGetSelectionValues( WIDGET_TO_APPCON(widget); LOCK_APP(app); - incremental = XtStackAlloc(count * sizeof(Boolean), incremental_values); + incremental = XtStackAlloc((size_t)count * sizeof(Boolean), incremental_values); for(i = 0; i < count; i++) incremental[i] = FALSE; if (IsGatheringRequest(widget, selection)) { AddSelectionRequests(widget, selection, count, targets, &callback, @@ -1757,7 +1763,7 @@ void XtGetSelectionValuesIncremental( WIDGET_TO_APPCON(widget); LOCK_APP(app); - incremental = XtStackAlloc(count * sizeof(Boolean), incremental_values); + incremental = XtStackAlloc((size_t)count * sizeof(Boolean), incremental_values); for(i = 0; i < count; i++) incremental[i] = TRUE; if (IsGatheringRequest(widget, selection)) { AddSelectionRequests(widget, selection, count, targets, &callback, @@ -1890,8 +1896,8 @@ static void AddSelectionRequests( qi->count += count; req = (QueuedRequest*) XtRealloc((char*) req, - (start + count) * - sizeof(QueuedRequest)); + (Cardinal)((size_t)(start + count) * + sizeof(QueuedRequest))); while(i < count) { QueuedRequest newreq = (QueuedRequest) __XtMalloc(sizeof(QueuedRequestRec)); @@ -1932,7 +1938,6 @@ static Boolean IsGatheringRequest( Window window = XtWindow(wid); Display *dpy = XtDisplay(wid); Boolean found = False; - int i; if (multipleContext == 0) multipleContext = XUniqueContext(); @@ -1940,7 +1945,7 @@ static Boolean IsGatheringRequest( (void) XFindContext(dpy, window, multipleContext, (XPointer*) &qi); if (qi != NULL) { - i = 0; + int i = 0; while(qi->selections[i] != None) { if (qi->selections[i] == sel) { found = True; @@ -2027,7 +2032,7 @@ void XtCreateSelectionRequest( while(queueInfo->selections[n] != None) n++; queueInfo->selections = (Atom*) XtRealloc((char*) queueInfo->selections, - (n + 2) * sizeof(Atom)); + (Cardinal)((size_t)(n + 2) * sizeof(Atom))); queueInfo->selections[n] = selection; queueInfo->selections[n + 1] = None; @@ -2050,8 +2055,8 @@ void XtSendSelectionRequest( queueInfo = NULL; (void) XFindContext(dpy, window, multipleContext, (XPointer*) &queueInfo); if (queueInfo != NULL) { - int count = 0; int i; + int count = 0; QueuedRequest *req = queueInfo->requests; /* Construct the requests and send it using @@ -2079,16 +2084,15 @@ void XtSendSelectionRequest( Boolean ins[PREALLOCED]; Atom *props; Atom p[PREALLOCED]; - int i = 0; int j = 0; /* Allocate */ - targets = (Atom *) XtStackAlloc(count * sizeof(Atom), t); + targets = (Atom *) XtStackAlloc((size_t)count * sizeof(Atom), t); cbs = (XtSelectionCallbackProc *) - XtStackAlloc(count * sizeof(XtSelectionCallbackProc), c); - closures = (XtPointer *) XtStackAlloc(count * sizeof(XtPointer), cs); - incrs = (Boolean *) XtStackAlloc(count * sizeof(Boolean), ins); - props = (Atom *) XtStackAlloc(count * sizeof(Atom), p); + XtStackAlloc((size_t)count * sizeof(XtSelectionCallbackProc), c); + closures = (XtPointer *) XtStackAlloc((size_t)count * sizeof(XtPointer), cs); + incrs = (Boolean *) XtStackAlloc((size_t)count * sizeof(Boolean), ins); + props = (Atom *) XtStackAlloc((size_t)count * sizeof(Atom), p); /* Copy */ for(i = 0; i < queueInfo->count; i++) { @@ -2164,7 +2168,7 @@ void XtSetSelectionParameters( XChangeProperty(dpy, window, property, type, format, PropModeReplace, - (unsigned char *) value, length); + (unsigned char *) value, (int) length); } /* Retrieves data passed in a parameter. Data for this is stored @@ -2183,7 +2187,7 @@ void XtGetSelectionParameters( WIDGET_TO_APPCON(owner); *value_return = NULL; - *length_return = *format_return = 0; + *length_return = (unsigned long) (*format_return = 0); *type_return = None; LOCK_APP(app); @@ -2200,9 +2204,9 @@ void XtGetSelectionParameters( EndProtectedSection(dpy); #ifdef XT_COPY_SELECTION if (*value_return) { - int size = BYTELENGTH(*length_return, *format_return) + 1; + int size = (int) BYTELENGTH(*length_return, *format_return) + 1; char *tmp = __XtMalloc((Cardinal) size); - (void) memmove(tmp, *value_return, size); + (void) memmove(tmp, *value_return, (size_t) size); XFree(*value_return); *value_return = tmp; } @@ -2222,7 +2226,6 @@ static void AddParamInfo( Atom selection, Atom param_atom) { - int n; Param p; ParamInfo pinfo; @@ -2240,7 +2243,8 @@ static void AddParamInfo( (char *)pinfo); } else { - for (n = pinfo->count, p = pinfo->paramlist; n; n--, p++) { + int n; + for (n = (int) pinfo->count, p = pinfo->paramlist; n; n--, p++) { if (p->selection == None || p->selection == selection) break; } @@ -2248,7 +2252,7 @@ static void AddParamInfo( pinfo->count++; pinfo->paramlist = (Param) XtRealloc((char*) pinfo->paramlist, - pinfo->count * sizeof(ParamRec)); + (Cardinal)(pinfo->count * sizeof(ParamRec))); p = &pinfo->paramlist[pinfo->count - 1]; (void) XSaveContext(XtDisplay(w), XtWindow(w), paramPropertyContext, (char *)pinfo); @@ -2263,8 +2267,6 @@ static void RemoveParamInfo( Widget w, Atom selection) { - int n; - Param p; ParamInfo pinfo; Boolean retain = False; @@ -2272,9 +2274,11 @@ static void RemoveParamInfo( if (paramPropertyContext && (XFindContext(XtDisplay(w), XtWindow(w), paramPropertyContext, (XPointer *) &pinfo) == 0)) { + Param p; + int n; /* Find and invalidate the parameter data. */ - for (n = pinfo->count, p = pinfo->paramlist; n; n--, p++) { + for (n = (int) pinfo->count, p = pinfo->paramlist; n; n--, p++) { if (p->selection != None) { if (p->selection == selection) p->selection = None; @@ -2296,8 +2300,6 @@ static Atom GetParamInfo( Widget w, Atom selection) { - int n; - Param p; ParamInfo pinfo; Atom atom = None; @@ -2305,8 +2307,10 @@ static Atom GetParamInfo( if (paramPropertyContext && (XFindContext(XtDisplay(w), XtWindow(w), paramPropertyContext, (XPointer *) &pinfo) == 0)) { + Param p; + int n; - for (n = pinfo->count, p = pinfo->paramlist; n; n--, p++) + for (n = (int) pinfo->count, p = pinfo->paramlist; n; n--, p++) if (p->selection == selection) { atom = p->param; break; diff --git a/lib/libXt/src/SetSens.c b/lib/libXt/src/SetSens.c index 85443a591..04d3f3a41 100644 --- a/lib/libXt/src/SetSens.c +++ b/lib/libXt/src/SetSens.c @@ -82,9 +82,7 @@ static void SetAncestorSensitive( register Widget widget, Boolean ancestor_sensitive) { - Arg args[1]; - register Cardinal i; - register WidgetList children; + Arg args[1]; if (widget->core.ancestor_sensitive == ancestor_sensitive) return; @@ -96,6 +94,9 @@ static void SetAncestorSensitive( ancestor_sensitive is already FALSE */ if (widget->core.sensitive && XtIsComposite(widget)) { + Cardinal i; + WidgetList children; + children = ((CompositeWidget) widget)->composite.children; for (i=0; i < ((CompositeWidget)widget)->composite.num_children; i++) { SetAncestorSensitive (children[i], ancestor_sensitive); @@ -109,8 +110,6 @@ void XtSetSensitive( _XtBoolean sensitive) { Arg args[1]; - register Cardinal i; - register WidgetList children; WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -127,9 +126,12 @@ void XtSetSensitive( ancestor_sensitive is already FALSE */ if (widget->core.ancestor_sensitive && XtIsComposite (widget)) { + Cardinal i; + WidgetList children; + children = ((CompositeWidget) widget)->composite.children; for (i = 0; i < ((CompositeWidget)widget)->composite.num_children; i++){ - SetAncestorSensitive (children[i], sensitive); + SetAncestorSensitive (children[i], (Boolean) sensitive); } } UNLOCK_APP(app); diff --git a/lib/libXt/src/SetValues.c b/lib/libXt/src/SetValues.c index e432ec75d..cbfd68073 100644 --- a/lib/libXt/src/SetValues.c +++ b/lib/libXt/src/SetValues.c @@ -151,23 +151,26 @@ CallConstraintSetValues ( { Boolean redisplay = FALSE; XtSetValuesFunc set_values; - ConstraintWidgetClass superclass; if ((WidgetClass)class != constraintWidgetClass) { - if (class == NULL) + ConstraintWidgetClass superclass; + + if (class == NULL) { XtAppErrorMsg(XtWidgetToApplicationContext(current), "invalidClass","constraintSetValue",XtCXtToolkitError, "Subclass of Constraint required in CallConstraintSetValues", - (String *)NULL, (Cardinal *)NULL); - LOCK_PROCESS; - superclass = (ConstraintWidgetClass) class->core_class.superclass; - UNLOCK_PROCESS; - redisplay = - CallConstraintSetValues(superclass, - current, request, new, args, num_args); + NULL, NULL); + } else { + LOCK_PROCESS; + superclass = (ConstraintWidgetClass) class->core_class.superclass; + UNLOCK_PROCESS; + redisplay = + CallConstraintSetValues(superclass, + current, request, new, args, num_args); + } } LOCK_PROCESS; - set_values = class->constraint_class.set_values; + set_values = class ? class->constraint_class.set_values : NULL; UNLOCK_PROCESS; if (set_values) redisplay |= (*set_values) (current, request, new, args, &num_args); @@ -204,7 +207,6 @@ void XtSetValues( WidgetClass wc; ConstraintWidgetClass cwc = NULL; Boolean hasConstraints; - XtAlmostProc set_values_almost; XtAppContext app = XtWidgetToApplicationContext(w); Widget hookobj = XtHooksOfDisplay(XtDisplayOfObject(w)); @@ -214,7 +216,7 @@ void XtSetValues( XtAppErrorMsg(app, "invalidArgCount","xtSetValues",XtCXtToolkitError, "Argument count > 0 on NULL argument list in XtSetValues", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } /* Allocate and copy current widget into old widget */ @@ -224,7 +226,7 @@ void XtSetValues( UNLOCK_PROCESS; oldw = (Widget) XtStackAlloc(widgetSize, oldwCache); reqw = (Widget) XtStackAlloc (widgetSize, reqwCache); - (void) memmove((char *) oldw, (char *) w, (int) widgetSize); + (void) memmove((char *) oldw, (char *) w, (size_t) widgetSize); /* Set resource values */ @@ -233,7 +235,7 @@ void XtSetValues( wc->core_class.num_resources, args, num_args); UNLOCK_PROCESS; - (void) memmove ((char *) reqw, (char *) w, (int) widgetSize); + (void) memmove ((char *) reqw, (char *) w, (size_t) widgetSize); hasConstraints = (XtParent(w) != NULL && !XtIsShell(w) && XtIsConstraint(XtParent(w))); @@ -253,7 +255,7 @@ void XtSetValues( oldw->core.constraints = XtStackAlloc(constraintSize, oldcCache); reqw->core.constraints = XtStackAlloc(constraintSize, reqcCache); (void) memmove((char *) oldw->core.constraints, - (char *) w->core.constraints, (int) constraintSize); + (char *) w->core.constraints, (size_t) constraintSize); /* Set constraint values */ LOCK_PROCESS; @@ -262,7 +264,7 @@ void XtSetValues( cwc->constraint_class.num_resources, args, num_args); UNLOCK_PROCESS; (void) memmove((char *) reqw->core.constraints, - (char *) w->core.constraints, (int) constraintSize); + (char *) w->core.constraints, (size_t) constraintSize); } /* Inform widget of changes, then inform parent of changes */ @@ -350,6 +352,7 @@ void XtSetValues( CALLGEOTAT(_XtGeoTab(1)); do { XtGeometryHookDataRec call_data; + XtAlmostProc set_values_almost; if (XtHasCallbacks(hookobj, XtNgeometryHook) == XtCallbackHasSome) { call_data.type = XtHpreGeometry; @@ -383,7 +386,7 @@ void XtSetValues( "invalidProcedure","set_values_almost", XtCXtToolkitError, "set_values_almost procedure shouldn't be NULL", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); break; } if (result == XtGeometryNo) geoReply.request_mode = 0; @@ -432,8 +435,8 @@ void XtSetValues( XtName(w),XtName(pw))); XClearArea (XtDisplay (pw), XtWindow (pw), r->rectangle.x, r->rectangle.y, - r->rectangle.width + bw2, - r->rectangle.height + bw2,TRUE); + (unsigned) (r->rectangle.width + bw2), + (unsigned) (r->rectangle.height + bw2), TRUE); } } } diff --git a/lib/libXt/src/Shell.c b/lib/libXt/src/Shell.c index f160527bb..9527a6e04 100644 --- a/lib/libXt/src/Shell.c +++ b/lib/libXt/src/Shell.c @@ -1055,9 +1055,9 @@ static void TopLevelInitialize( w->wm.wm_hints.initial_state = IconicState; } -static String *NewArgv(int, String *); -static String *NewStringArray(String *); -static void FreeStringArray(String *); +static _XtString *NewArgv(int, _XtString *); +static _XtString *NewStringArray(_XtString *); +static void FreeStringArray(_XtString *); /* ARGSUSED */ static void ApplicationInitialize( @@ -1193,11 +1193,11 @@ static void Realize( */ register Widget *childP = w->composite.children; int i; - for (i = w->composite.num_children; i; i--, childP++) { + for (i = (int) w->composite.num_children; i; i--, childP++) { if (XtIsWidget(*childP) && XtIsManaged(*childP)) { if ((*childP)->core.background_pixmap != XtUnspecifiedPixmap) { - mask &= ~(CWBackPixel); + mask &= (unsigned long) (~(CWBackPixel)); mask |= CWBackPixmap; attr->background_pixmap = w->core.background_pixmap = @@ -1461,7 +1461,7 @@ static void _popup_set_prop( ); } - classhint.res_name = w->core.name; + classhint.res_name = (_XtString) w->core.name; /* For the class, look up to the top of the tree */ for (p = (Widget)w; p->core.parent != NULL; p = p->core.parent); if (XtIsApplicationShell(p)) { @@ -1469,7 +1469,7 @@ static void _popup_set_prop( ((ApplicationShellWidget)p)->application.class; } else { LOCK_PROCESS; - classhint.res_class = XtClass(p)->core_class.class_name; + classhint.res_class = (_XtString) XtClass(p)->core_class.class_name; UNLOCK_PROCESS; } @@ -1502,7 +1502,7 @@ static void _popup_set_prop( XInternAtom(XtDisplay((Widget)w), "WM_LOCALE_NAME", False), XA_STRING, 8, PropModeReplace, - (unsigned char *)locale, strlen(locale)); + (unsigned char *)locale, (int) strlen(locale)); } UNLOCK_PROCESS; @@ -1525,7 +1525,7 @@ static void _popup_set_prop( "SM_CLIENT_ID", False), XA_STRING, 8, PropModeReplace, (unsigned char *) sm_client_id, - strlen(sm_client_id)); + (int) strlen(sm_client_id)); } } } @@ -1537,7 +1537,7 @@ static void _popup_set_prop( "WM_WINDOW_ROLE", False), XA_STRING, 8, PropModeReplace, (unsigned char *)wmshell->wm.window_role, - strlen(wmshell->wm.window_role)); + (int) strlen(wmshell->wm.window_role)); } /* ARGSUSED */ @@ -1555,7 +1555,7 @@ static void EventHandler( XtAppErrorMsg(XtWidgetToApplicationContext(wid), "invalidWindow","eventHandler",XtCXtToolkitError, "Event with wrong window", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -1567,16 +1567,16 @@ static void EventHandler( if( NEQ(width) || NEQ(height) || NEQ(border_width) ) { sizechanged = TRUE; #undef NEQ - w->core.width = event->xconfigure.width; - w->core.height = event->xconfigure.height; - w->core.border_width = event->xconfigure.border_width; + w->core.width = (Dimension) event->xconfigure.width; + w->core.height = (Dimension) event->xconfigure.height; + w->core.border_width = (Dimension) event->xconfigure.border_width; } if (event->xany.send_event /* ICCCM compliant synthetic ev */ /* || w->shell.override_redirect */ || w->shell.client_specified & _XtShellNotReparented) { - w->core.x = event->xconfigure.x; - w->core.y = event->xconfigure.y; + w->core.x = (Position) event->xconfigure.x; + w->core.y = (Position) event->xconfigure.y; w->shell.client_specified |= _XtShellPositionValid; } else w->shell.client_specified &= ~_XtShellPositionValid; @@ -1599,8 +1599,8 @@ static void EventHandler( w->shell.client_specified &= ~(_XtShellNotReparented | _XtShellPositionValid); else { - w->core.x = event->xreparent.x; - w->core.y = event->xreparent.y; + w->core.x = (Position) event->xreparent.x; + w->core.y = (Position) event->xreparent.y; w->shell.client_specified |= (_XtShellNotReparented | _XtShellPositionValid); } @@ -1712,7 +1712,7 @@ static void SessionDestroy( FreeStringArray(w->session.shutdown_command); FreeStringArray(w->session.environment); XtFree(w->session.current_dir); - XtFree(w->session.program_path); + XtFree((_XtString) w->session.program_path); #endif /* !XT_NO_SM */ } @@ -1885,7 +1885,7 @@ static XtGeometryResult GeometryManager( wid->core.width = shell->core.width; wid->core.height = shell->core.height; if (request->request_mode & CWBorderWidth) { - wid->core.x = wid->core.y = -request->border_width; + wid->core.x = wid->core.y = (Position) (-request->border_width); } } return XtGeometryYes; @@ -1941,7 +1941,7 @@ static Boolean _wait_for_response( unsigned long timeout; if (XtIsWMShell((Widget)w)) - timeout = ((WMShellWidget)w)->wm.wm_timeout; + timeout = (unsigned long) ((WMShellWidget)w)->wm.wm_timeout; else timeout = DEFAULT_WM_TIMEOUT; @@ -2008,16 +2008,17 @@ static XtGeometryResult RootGeometryManager( oldborder_width = w->core.border_width; #define PutBackGeometry() \ - { w->core.x = oldx; \ - w->core.y = oldy; \ - w->core.width = oldwidth; \ - w->core.height = oldheight; \ - w->core.border_width = oldborder_width; } + { w->core.x = (Position) (oldx); \ + w->core.y = (Position) (oldy); \ + w->core.width = (Dimension) (oldwidth); \ + w->core.height = (Dimension) (oldheight); \ + w->core.border_width = (Dimension) (oldborder_width); } + memset(&values, 0, sizeof(values)); if (mask & CWX) { - if (w->core.x == request->x) mask &= ~CWX; + if (w->core.x == request->x) mask &= (unsigned int) (~CWX); else { - w->core.x = values.x = request->x; + w->core.x = (Position) (values.x = request->x); if (wm) { hintp->flags &= ~USPosition; hintp->flags |= PPosition; @@ -2026,9 +2027,9 @@ static XtGeometryResult RootGeometryManager( } } if (mask & CWY) { - if (w->core.y == request->y) mask &= ~CWY; + if (w->core.y == request->y) mask &= (unsigned int) (~CWY); else { - w->core.y = values.y = request->y; + w->core.y = (Position) (values.y = request->y); if (wm) { hintp->flags &= ~USPosition; hintp->flags |= PPosition; @@ -2038,16 +2039,16 @@ static XtGeometryResult RootGeometryManager( } if (mask & CWBorderWidth) { if (w->core.border_width == request->border_width) { - mask &= ~CWBorderWidth; + mask &= (unsigned int) (~CWBorderWidth); } else w->core.border_width = - values.border_width = - request->border_width; + (Dimension) (values.border_width = + request->border_width); } if (mask & CWWidth) { - if (w->core.width == request->width) mask &= ~CWWidth; + if (w->core.width == request->width) mask &= (unsigned int) (~CWWidth); else { - w->core.width = values.width = request->width; + w->core.width = (Dimension)(values.width = request->width); if (wm) { hintp->flags &= ~USSize; hintp->flags |= PSize; @@ -2056,9 +2057,9 @@ static XtGeometryResult RootGeometryManager( } } if (mask & CWHeight) { - if (w->core.height == request->height) mask &= ~CWHeight; + if (w->core.height == request->height) mask &= (unsigned int) (~CWHeight); else { - w->core.height = values.height = request->height; + w->core.height = (Dimension)(values.height = request->height); if (wm) { hintp->flags &= ~USSize; hintp->flags |= PSize; @@ -2113,7 +2114,7 @@ static XtGeometryResult RootGeometryManager( /* If no non-stacking bits are set, there's no way to tell whether or not this worked, so assume it did */ - if (!(mask & ~(CWStackMode | CWSibling))) return XtGeometryYes; + if (!(mask & (unsigned)(~(CWStackMode | CWSibling)))) return XtGeometryYes; if (wm && ((WMShellWidget)w)->wm.wait_for_wm == FALSE) { /* the window manager is sick @@ -2184,14 +2185,14 @@ static XtGeometryResult RootGeometryManager( return XtGeometryNo; } else { - w->core.width = event.xconfigure.width; - w->core.height = event.xconfigure.height; - w->core.border_width = event.xconfigure.border_width; + w->core.width = (Dimension) event.xconfigure.width; + w->core.height = (Dimension) event.xconfigure.height; + w->core.border_width = (Dimension) event.xconfigure.border_width; if (event.xany.send_event || /* ICCCM compliant synth */ w->shell.client_specified & _XtShellNotReparented) { - w->core.x = event.xconfigure.x; - w->core.y = event.xconfigure.y; + w->core.x = (Position) event.xconfigure.x; + w->core.y = (Position) event.xconfigure.y; w->shell.client_specified |= _XtShellPositionValid; } else w->shell.client_specified &= ~_XtShellPositionValid; @@ -2209,7 +2210,7 @@ static XtGeometryResult RootGeometryManager( } else XtAppWarningMsg(XtWidgetToApplicationContext((Widget)w), "internalError", "shell", XtCXtToolkitError, "Shell's window manager interaction is broken", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } else if (wm) { /* no event */ ((WMShellWidget)w)->wm.wait_for_wm = FALSE; /* timed out; must be broken */ } @@ -2299,7 +2300,7 @@ static Boolean WMSetValues( if (nwmshell->wm.title != owmshell->wm.title) { XtFree(owmshell->wm.title); - if (! nwmshell->wm.title) nwmshell->wm.title = ""; + if (! nwmshell->wm.title) nwmshell->wm.title = (_XtString) ""; nwmshell->wm.title = XtNewString(nwmshell->wm.title); title_changed = True; } else @@ -2370,14 +2371,14 @@ static Boolean WMSetValues( } if (nwmshell->wm.window_role != owmshell->wm.window_role) { - XtFree(owmshell->wm.window_role); + XtFree((_XtString) owmshell->wm.window_role); if (set_prop && nwmshell->wm.window_role) { XChangeProperty(XtDisplay(new), XtWindow(new), XInternAtom(XtDisplay(new), "WM_WINDOW_ROLE", False), XA_STRING, 8, PropModeReplace, (unsigned char *)nwmshell->wm.window_role, - strlen(nwmshell->wm.window_role)); + (int) strlen(nwmshell->wm.window_role)); } else if (XtIsRealized(new) && ! nwmshell->wm.window_role) { XDeleteProperty(XtDisplay(new), XtWindow(new), XInternAtom(XtDisplay(new), "WM_WINDOW_ROLE", @@ -2422,7 +2423,7 @@ static Boolean TopLevelSetValues( if (old->topLevel.icon_name != new->topLevel.icon_name) { XtFree((XtPointer)old->topLevel.icon_name); - if (! new->topLevel.icon_name) new->topLevel.icon_name = ""; + if (! new->topLevel.icon_name) new->topLevel.icon_name = (_XtString) ""; new->topLevel.icon_name = XtNewString(new->topLevel.icon_name); name_changed = True; } else @@ -2475,24 +2476,25 @@ static Boolean TopLevelSetValues( return False; } -static String * NewArgv( +static _XtString * NewArgv( int count, - String *str) /* do not assume it's terminated by a NULL element */ + _XtString *str) /* do not assume it's terminated by a NULL element */ { Cardinal nbytes = 0; Cardinal num = 0; - String *newarray, *new; - String *strarray = str; - String sptr; + _XtString *newarray; + _XtString *new; + _XtString *strarray = str; + _XtString sptr; if (count <= 0 || !str) return NULL; - for (num = count; num--; str++) { - nbytes += strlen(*str); + for (num = (Cardinal) count; num--; str++) { + nbytes = (nbytes + (Cardinal) strlen(*str)); nbytes++; } - num = (count+1) * sizeof(String); - new = newarray = (String *) __XtMalloc(num + nbytes); + num = (Cardinal) ((size_t)(count+1) * sizeof(_XtString)); + new = newarray = (_XtString *) __XtMalloc(num + nbytes); sptr = ((char *) new) + num; for (str = strarray; count--; str++) { @@ -2661,7 +2663,7 @@ static Boolean SessionSetValues( False), XA_STRING, 8, PropModeReplace, (unsigned char *) nw->session.session_id, - strlen(nw->session.session_id)); + (int) strlen(nw->session.session_id)); } } return False; @@ -2682,8 +2684,8 @@ void _XtShellGetCoordinates( (int) -w->core.border_width, (int) -w->core.border_width, &tmpx, &tmpy, &tmpchild); - w->core.x = tmpx; - w->core.y = tmpy; + w->core.x = (Position) tmpx; + w->core.y = (Position) tmpy; w->shell.client_specified |= _XtShellPositionValid; } *x = w->core.x; @@ -2722,7 +2724,7 @@ static void ApplicationShellInsertChild( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidClass", "applicationShellInsertChild", XtCXtToolkitError, "ApplicationShell does not accept RectObj children; ignored", - (String*)NULL, (Cardinal*)NULL); + NULL, NULL); } else { XtWidgetProc insert_child; @@ -2746,7 +2748,7 @@ static void ApplicationShellInsertChild( #define XtSessionInteract 1 static void CallSaveCallbacks(SessionShellWidget ); -static String *EditCommand(String, String *, String *); +static _XtString *EditCommand(_XtString, _XtString *, _XtString *); static Boolean ExamineToken(XtPointer); static void GetIceEvent(XtPointer, int *, XtInputId *); static XtCheckpointToken GetToken(Widget, int); @@ -2842,22 +2844,23 @@ static void JoinSession( #endif /* !XT_NO_SM */ -static String * NewStringArray(String *str) +static _XtString * NewStringArray(_XtString *str) { Cardinal nbytes = 0; Cardinal num = 0; - String *newarray, *new; - String *strarray = str; - String sptr; + _XtString *newarray; + _XtString *new; + _XtString *strarray = str; + _XtString sptr; if (!str) return NULL; for (num = 0; *str; num++, str++) { - nbytes += strlen(*str); + nbytes = nbytes + (Cardinal)strlen(*str); nbytes++; } - num = (num + 1) * sizeof(String); - new = newarray = (String *) __XtMalloc(num + nbytes); + num = (Cardinal)((size_t)(num + 1) * sizeof(_XtString)); + new = newarray = (_XtString *) __XtMalloc(num + nbytes); sptr = ((char *) new) + num; for (str = strarray; *str; str++) { @@ -2871,16 +2874,16 @@ static String * NewStringArray(String *str) return newarray; } -static void FreeStringArray(String *str) +static void FreeStringArray(_XtString *str) { if (str) - XtFree((char *) str); + XtFree((_XtString) str); } #ifndef XT_NO_SM static SmProp * CardPack( - char *name, + _Xconst _XtString name, XtPointer closure) { unsigned char *prop = (unsigned char *) closure; @@ -2889,47 +2892,47 @@ static SmProp * CardPack( p = (SmProp *) __XtMalloc(sizeof(SmProp) + sizeof(SmPropValue)); p->vals = (SmPropValue *) (((char *) p) + sizeof(SmProp)); p->num_vals = 1; - p->type = SmCARD8; - p->name = name; + p->type = (char *)SmCARD8; + p->name = (char *)name; p->vals->length = 1; p->vals->value = (SmPointer) prop; return p; } -static SmProp * ArrayPack(char *name, XtPointer closure) +static SmProp * ArrayPack(_Xconst _XtString name, XtPointer closure) { - String prop = *(String *) closure; + _XtString prop = *(_XtString *) closure; SmProp *p; p = (SmProp *) __XtMalloc(sizeof(SmProp) + sizeof(SmPropValue)); p->vals = (SmPropValue *) (((char *) p) + sizeof(SmProp)); p->num_vals = 1; - p->type = SmARRAY8; - p->name = name; - p->vals->length = strlen(prop) + 1; + p->type = (char *)SmARRAY8; + p->name = (char *) name; + p->vals->length = (int) strlen(prop) + 1; p->vals->value = prop; return p; } static SmProp * ListPack( - char *name, + _Xconst _XtString name, XtPointer closure) { - String *prop = *(String **) closure; + _XtString *prop = *(_XtString **) closure; SmProp *p; - String *ptr; + _XtString *ptr; SmPropValue *vals; int n = 0; for (ptr = prop; *ptr; ptr++) n++; - p = (SmProp*) __XtMalloc(sizeof(SmProp) + (Cardinal)(n*sizeof(SmPropValue))); + p = (SmProp*) __XtMalloc((Cardinal)(sizeof(SmProp) + (size_t)n * sizeof(SmPropValue))); p->vals = (SmPropValue *) (((char *) p) + sizeof(SmProp)); p->num_vals = n; - p->type = SmLISTofARRAY8; - p->name = name; + p->type = (char *)SmLISTofARRAY8; + p->name = (char *)name; for (ptr = prop, vals = p->vals; *ptr; ptr++, vals++) { - vals->length = strlen(*ptr) + 1; + vals->length = (int) strlen(*ptr) + 1; vals->value = *ptr; } return p; @@ -2943,10 +2946,10 @@ static void FreePacks( XtFree((char *) props[num_props]); } -typedef SmProp* (*PackProc)(char *, XtPointer); +typedef SmProp* (*PackProc)(_Xconst _XtString, XtPointer); typedef struct PropertyRec { - char * name; + String name; int offset; PackProc proc; } PropertyRec, *PropertyTable; @@ -2979,7 +2982,6 @@ static void SetSessionProperties( XtPointer *addr; unsigned long mask; SmProp *props[XT_NUM_SM_PROPS]; - char *pnames[XT_NUM_SM_PROPS]; if (w->session.connection == NULL) return; @@ -3026,11 +3028,13 @@ static void SetSessionProperties( } if (unset_mask) { + char *pnames[XT_NUM_SM_PROPS]; + mask = 1L; num_props = 0; for (n = XtNumber(propertyTable); n; n--, p++, mask <<= 1) if (mask & unset_mask) - pnames[num_props++] = p->name; + pnames[num_props++] = (char *)p->name; SmcDeleteProperties(w->session.connection, num_props, pnames); } } @@ -3067,13 +3071,13 @@ static void CleanUpSave( static void CallSaveCallbacks( SessionShellWidget w) { - XtCheckpointToken token; - if (XtHasCallbacks((Widget) w, XtNsaveCallback) != XtCallbackHasSome) { /* if the application makes no attempt to save state, report failure */ SmcSaveYourselfDone(w->session.connection, False); CleanUpSave(w); } else { + XtCheckpointToken token; + w->session.checkpoint_state = XtSaveActive; token = GetToken((Widget) w, XtSessionCheckpoint); _XtCallConditionalCallbackList((Widget)w, w->session.save_callbacks, @@ -3099,8 +3103,8 @@ static void XtCallSaveCallbacks( save->next = NULL; save->save_type = save_type; save->interact_style = interact; - save->shutdown = shutdown; - save->fast = fast; + save->shutdown = (Boolean) shutdown; + save->fast = (Boolean) fast; save->cancel_shutdown = False; save->phase = 1; save->interact_dialog_type = SmDialogNormal; @@ -3123,7 +3127,6 @@ static void XtInteractPermission( { Widget w = (Widget) data; SessionShellWidget sw = (SessionShellWidget) data; - XtCheckpointToken token; XtCallbackProc callback; XtPointer client_data; @@ -3131,6 +3134,8 @@ static void XtInteractPermission( _XtPeekCallback(w, sw->session.interact_callbacks, &callback, &client_data); if (callback) { + XtCheckpointToken token; + sw->session.checkpoint_state = XtInteractActive; token = GetToken(w, XtSessionInteract); XtRemoveCallback(w, XtNinteractCallback, callback, client_data); @@ -3341,7 +3346,7 @@ void XtSessionReturnToken(XtCheckpointToken token) static Boolean IsInArray( String str, - String *sarray) + _XtString *sarray) { if (str == NULL || sarray == NULL) return False; @@ -3352,17 +3357,17 @@ static Boolean IsInArray( return False; } -static String* EditCommand( - String str, /* if not NULL, the sm_client_id */ - String *src1, /* first choice */ - String *src2) /* alternate */ +static _XtString* EditCommand( + _XtString str, /* if not NULL, the sm_client_id */ + _XtString *src1, /* first choice */ + _XtString *src2) /* alternate */ { Boolean have; Boolean want; int count; - String *sarray; - String *s; - String *new; + _XtString *sarray; + _XtString *s; + _XtString *new; want = (str != NULL); sarray = (src1 ? src1 : src2); @@ -3380,17 +3385,17 @@ static String* EditCommand( count++; if (want) { - s = new = (String *) __XtMalloc((Cardinal)(count+3) * sizeof(String*)); - *s = *sarray; s++; sarray++; - *s = "-xtsessionID"; s++; - *s = str; s++; + s = new = (_XtString *) __XtMalloc((Cardinal)((size_t) (count+3) * sizeof(_XtString*))); + *s = *sarray; s++; sarray++; + *s = (_XtString) "-xtsessionID"; s++; + *s = str; s++; for (; --count > 0; s++, sarray++) *s = *sarray; - *s = (String) NULL; + *s = NULL; } else { if (count < 3) return NewStringArray(sarray); - s = new = (String *) __XtMalloc((Cardinal)(count-1) * sizeof(String*)); + s = new = (_XtString *) __XtMalloc((Cardinal)((size_t)(count-1) * sizeof(_XtString*))); for (; --count >= 0; sarray++) { if (strcmp(*sarray, "-xtsessionID") == 0) { sarray++; @@ -3400,7 +3405,7 @@ static String* EditCommand( s++; } } - *s = (String) NULL; + *s = NULL; } s = new; new = NewStringArray(new); diff --git a/lib/libXt/src/TMaction.c b/lib/libXt/src/TMaction.c index 7af75ada0..84ba2a0c4 100644 --- a/lib/libXt/src/TMaction.c +++ b/lib/libXt/src/TMaction.c @@ -86,7 +86,7 @@ in this Software without prior written authorization from The Open Group. #define RConst /**/ #endif -static String XtNtranslationError = "translationError"; +static _Xconst _XtString XtNtranslationError = "translationError"; typedef struct _CompiledAction{ XrmQuark signature; @@ -117,16 +117,16 @@ static CompiledActionTable CompileActionTable( if (! stat) { cTableHold = cActions = (CompiledActionTable) - __XtMalloc(count * sizeof(CompiledAction)); + __XtMalloc((Cardinal)((size_t)count * sizeof(CompiledAction))); - for (i=count; --i >= 0; cActions++, actions++) { + for (i= (int)count; --i >= 0; cActions++, actions++) { cActions->proc = actions->proc; cActions->signature = (*func)(actions->string); } } else { cTableHold = (CompiledActionTable) actions; - for (i=count; --i >= 0; actions++) + for (i= (int)count; --i >= 0; actions++) ((CompiledActionTable) actions)->signature = (*func)(actions->string); } @@ -136,7 +136,7 @@ static CompiledActionTable CompileActionTable( for (i=1; (Cardinal) i <= count - 1; i++) { register Cardinal j; hold = cActions[i]; - j = i; + j = (Cardinal)i; while (j && cActions[j-1].signature > hold.signature) { cActions[j] = cActions[j-1]; j--; @@ -159,12 +159,11 @@ static void ReportUnboundActions( XtTranslations xlations, TMBindData bindData) { - TMSimpleStateTree stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[0]; + TMSimpleStateTree stateTree; Cardinal num_unbound = 0; Cardinal num_params = 1; char* message; char messagebuf[1000]; - String params[1]; register Cardinal num_chars = 0; register Cardinal i, j; XtActionProc *procs; @@ -181,7 +180,7 @@ static void ReportUnboundActions( String s = XrmQuarkToString(stateTree->quarkTbl[j]); if (num_unbound != 0) num_chars += 2; - num_chars += strlen(s); + num_chars += (Cardinal)strlen(s); num_unbound++; } } @@ -190,9 +189,10 @@ static void ReportUnboundActions( return; message = XtStackAlloc (num_chars + 1, messagebuf); if (message != NULL) { + String params[1]; + *message = '\0'; num_unbound = 0; - stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[0]; for (i=0; i < xlations->numStateTrees; i++) { if (bindData->simple.isComplex) procs = TMGetComplexBindEntry(bindData, i)->procs; @@ -225,12 +225,12 @@ static CompiledAction *SearchActionTable( CompiledActionTable actionTable, Cardinal numActions) { - register int i, left, right; + int left, right; left = 0; - right = numActions - 1; + right = (int)numActions - 1; while (left <= right) { - i = (left + right) >> 1; + int i = (left + right) >> 1; if (signature < actionTable[i].signature) right = i - 1; else if (signature > actionTable[i].signature) @@ -251,7 +251,7 @@ static int BindActions( TMShortCard numActions, Cardinal *ndxP) { - register int unbound = stateTree->numQuarks - *ndxP; + register int unbound = (int)(stateTree->numQuarks - *ndxP); CompiledAction* action; register Cardinal ndx; register Boolean savedNdx = False; @@ -331,7 +331,7 @@ static int BindProcs( BindActions(stateTree, procs, GetClassActions(class), - class->core_class.num_actions, + (TMShortCard) class->core_class.num_actions, &ndx); class = class->core_class.superclass; } while (unbound != 0 && class != NULL); @@ -422,7 +422,7 @@ XtPointer _XtInitializeActionData( TMClassCache classCache; classCache = XtNew(TMClassCacheRec); - classCache->actions = CompileActionTable(actions, count, inPlace, True); + classCache->actions = CompileActionTable(actions, count, (Boolean) inPlace, True); classCache->bindCache = NULL; return (XtPointer)classCache; } @@ -444,7 +444,7 @@ static XtActionProc *EnterBindCache( LOCK_PROCESS; classCache = GetClassCache(w); bindCachePtr = &classCache->bindCache; - procsSize = stateTree->numQuarks * sizeof(XtActionProc); + procsSize = (TMShortCard)(stateTree->numQuarks * sizeof(XtActionProc)); for (bindCache = *bindCachePtr; (*bindCachePtr); @@ -466,8 +466,8 @@ static XtActionProc *EnterBindCache( { *bindCachePtr = bindCache = (TMBindCache) - __XtMalloc(sizeof(TMBindCacheRec) + - (procsSize - sizeof(XtActionProc))); + __XtMalloc((Cardinal)(sizeof(TMBindCacheRec) + + (size_t)(procsSize - sizeof(XtActionProc)))); bindCache->next = NULL; bindCache->status = *bindStatus; bindCache->status.refCount = 1; @@ -476,11 +476,12 @@ static XtActionProc *EnterBindCache( bindCache->widgetClass = XtClass(w); if (_XtGlobalTM.numBindCache == _XtGlobalTM.bindCacheTblSize) { - _XtGlobalTM.bindCacheTblSize += 16; + _XtGlobalTM.bindCacheTblSize = + (TMShortCard)(_XtGlobalTM.bindCacheTblSize + 16); _XtGlobalTM.bindCacheTbl = (TMBindCache *) XtRealloc((char *)_XtGlobalTM.bindCacheTbl, - ((_XtGlobalTM.bindCacheTblSize) * - sizeof(TMBindCache))); + (Cardinal)((_XtGlobalTM.bindCacheTblSize) * + sizeof(TMBindCache))); } _XtGlobalTM.bindCacheTbl[_XtGlobalTM.numBindCache++] = bindCache; #endif /* TRACE_TM */ @@ -553,7 +554,7 @@ static void RemoveAccelerators( XtAppWarningMsg(XtWidgetToApplicationContext(widget), XtNtranslationError,"nullTable",XtCXtToolkitError, "Can't remove accelerators from NULL table", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -581,7 +582,7 @@ static void RemoveAccelerators( XtAppWarningMsg(XtWidgetToApplicationContext(widget), XtNtranslationError,"nullTable",XtCXtToolkitError, "Tried to remove nonexistent accelerators", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); else { if (!destination->core.being_destroyed) for (i = 0; i < numXlations; i++) @@ -607,8 +608,6 @@ void _XtBindActions( if ((xlations == NULL) || widget->core.being_destroyed) return; - stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[0]; - for (i = 0; i < xlations->numStateTrees; i++) { stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[i]; @@ -776,7 +775,7 @@ void XtAppAddActions( rec->next = app->action_table; app->action_table = rec; rec->table = CompileActionTable(actions, num_actions, False, False); - rec->count = num_actions; + rec->count = (TMShortCard) num_actions; UNLOCK_APP(app); } @@ -785,9 +784,7 @@ void XtGetActionList( XtActionList* actions_return, Cardinal* num_actions_return) { - XtActionList list; CompiledActionTable table; - int i; *actions_return = NULL; *num_actions_return = 0; @@ -803,11 +800,14 @@ void XtGetActionList( } *num_actions_return = widget_class->core_class.num_actions; if (*num_actions_return) { - list = *actions_return = (XtActionList) - __XtMalloc(*num_actions_return * sizeof(XtActionsRec)); + XtActionList list = *actions_return = (XtActionList) + __XtMalloc((Cardinal)((size_t)*num_actions_return * sizeof(XtActionsRec))); + table = GetClassActions(widget_class); + if (table != NULL) { - for (i= (*num_actions_return); --i >= 0; list++, table++) { + int i; + for (i= (int)(*num_actions_return); --i >= 0; list++, table++) { list->string = XrmQuarkToString(table->signature); list->proc = table->proc; } @@ -855,7 +855,7 @@ void XtMenuPopupAction( XtAppWarningMsg(app, "invalidParameters","xtMenuPopupAction",XtCXtToolkitError, "MenuPopup wants exactly one argument", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -868,7 +868,7 @@ void XtMenuPopupAction( XtAppWarningMsg(app, "invalidPopup","unsupportedOperation",XtCXtToolkitError, "Pop-up menu creation is only supported on ButtonPress, KeyPress or EnterNotify events.", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); UNLOCK_APP(app); return; } @@ -914,7 +914,7 @@ static void _XtMenuPopdownAction( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidParameters","xtMenuPopdown",XtCXtToolkitError, "XtMenuPopdown called with num_params != 0 or 1", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); } } @@ -1041,14 +1041,14 @@ void XtCallActionProc( } { - String params[2]; - Cardinal num_params = 2; - params[0] = (String)action; - params[1] = XtName(widget); + String par[2]; + Cardinal num_par = 2; + par[0] = (String)action; + par[1] = XtName(widget); XtAppWarningMsg(app, "noActionProc", "xtCallActionProc", XtCXtToolkitError, "No action proc named \"%s\" is registered for widget \"%s\"", - params, &num_params + par, &num_par ); } UNLOCK_APP(app); diff --git a/lib/libXt/src/TMgrab.c b/lib/libXt/src/TMgrab.c index 08cb4869a..5ffcebfcb 100644 --- a/lib/libXt/src/TMgrab.c +++ b/lib/libXt/src/TMgrab.c @@ -102,16 +102,20 @@ static void GrabAllCorrectKeys( &careOn, &careMask); if (!resolved) return; } - careOn |= modMatch->modifiers; - careMask |= modMatch->modifierMask; + careOn = (careOn | (Modifiers)modMatch->modifiers); + careMask = (careMask | (Modifiers)modMatch->modifierMask); + keycodes = NULL; XtKeysymToKeycodeList( dpy, (KeySym)typeMatch->eventCode, &keycodes, &keycount ); - if (keycount == 0) return; + if (keycount == 0) { + XtFree((char *)keycodes); + return; + } for (keycodeP = keycodes; keycount--; keycodeP++) { if (modMatch->standard) { /* find standard modifiers that produce this keysym */ @@ -120,8 +124,10 @@ static void GrabAllCorrectKeys( Modifiers modifiers_return; XtTranslateKeycode( dpy, *keycodeP, (Modifiers)0, &modifiers_return, &keysym ); - if (careOn & modifiers_return) + if (careOn & modifiers_return) { + XtFree((char *)keycodes); return; + } if (keysym == typeMatch->eventCode) { XtGrabKey(widget, *keycodeP, careOn, grabP->owner_events, @@ -130,13 +136,13 @@ static void GrabAllCorrectKeys( ); /* continue; */ /* grab all modifier combinations */ } - least_mod = modifiers_return & (~modifiers_return + 1); - for (std_mods = modifiers_return; + least_mod = (int) (modifiers_return & (~modifiers_return + 1)); + for (std_mods = (int) modifiers_return; std_mods >= least_mod; std_mods--) { Modifiers dummy; /* check all useful combinations of modifier bits */ - if (modifiers_return & std_mods && - !(~modifiers_return & std_mods)) { + if ((modifiers_return & (Modifiers)std_mods) && + !(~modifiers_return & (Modifiers)std_mods)) { XtTranslateKeycode( dpy, *keycodeP, (Modifiers)std_mods, &dummy, &keysym ); @@ -183,7 +189,6 @@ static Boolean DoGrab( TMModifierMatch modMatch; Modifiers careOn = 0; Modifiers careMask = 0; - Boolean resolved; LOCK_PROCESS; typeMatch = TMGetTypeMatch(typeIndex); @@ -200,15 +205,15 @@ static Boolean DoGrab( case ButtonPress: case ButtonRelease: if (modMatch->lateModifiers) { - resolved = _XtComputeLateBindings(XtDisplay(widget), - modMatch->lateModifiers, - &careOn, &careMask); + Boolean resolved = _XtComputeLateBindings(XtDisplay(widget), + modMatch->lateModifiers, + &careOn, &careMask); if (!resolved) break; } - careOn |= modMatch->modifiers; + careOn = (careOn | (Modifiers) modMatch->modifiers); XtGrabButton( widget, - (unsigned) typeMatch->eventCode, + (int) typeMatch->eventCode, careOn, grabP->owner_events, grabP->event_mask, @@ -231,7 +236,7 @@ static Boolean DoGrab( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "invalidPopup","unsupportedOperation",XtCXtToolkitError, "Pop-up menu creation is only supported on Button, Key or EnterNotify events.", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); break; } UNLOCK_PROCESS; @@ -277,7 +282,7 @@ void _XtRegisterGrabs( */ doGrab.widget = widget; doGrab.grabP = grabP; - doGrab.count = count; + doGrab.count = (TMShortCard) count; _XtTraverseStateTree((TMStateTree)*stateTreePtr, DoGrab, (XtPointer)&doGrab); @@ -321,7 +326,7 @@ void XtRegisterGrabAction( } #endif /*DEBUG*/ - actionP->owner_events = owner_events; + actionP->owner_events = (Boolean) owner_events; actionP->event_mask = event_mask; actionP->pointer_mode = pointer_mode; actionP->keyboard_mode = keyboard_mode; diff --git a/lib/libXt/src/TMkey.c b/lib/libXt/src/TMkey.c index e59bccae2..06924ac12 100644 --- a/lib/libXt/src/TMkey.c +++ b/lib/libXt/src/TMkey.c @@ -86,7 +86,7 @@ in this Software without prior written authorization from The Open Group. #endif #define FLUSHKEYCACHE(ctx) \ - bzero((char *)&ctx->keycache, sizeof(TMKeyCache)) + memset((void *)&ctx->keycache, 0, sizeof(TMKeyCache)) /* * The following array reorders the modifier bits so that the most common ones @@ -136,7 +136,7 @@ FM(0x1e), FM(0x9e), FM(0x5e), FM(0xde), FM(0x3e), FM(0xbe), FM(0x7e), FM(0xfe) #define TRANSLATE(ctx,pd,dpy,key,mod,mod_ret,sym_ret) \ { \ - int _i_ = (((key) - (pd)->min_keycode + modmix[(mod) & 0xff]) & \ + int _i_ = (((key) - (TMLongCard) (pd)->min_keycode + modmix[(mod) & 0xff]) & \ (TMKEYCACHESIZE-1)); \ if ((key) == 0) { /* Xlib XIM composed input */ \ mod_ret = 0; \ @@ -147,8 +147,8 @@ FM(0x1e), FM(0x9e), FM(0x5e), FM(0xde), FM(0x3e), FM(0xbe), FM(0x7e), FM(0xfe) mod_ret = MOD_RETURN(ctx, key); \ sym_ret = (ctx)->keycache.keysym[_i_]; \ } else { \ - XtTranslateKeycode(dpy, key, mod, &mod_ret, &sym_ret); \ - (ctx)->keycache.keycode[_i_] = key; \ + XtTranslateKeycode(dpy, (KeyCode) key, mod, &mod_ret, &sym_ret); \ + (ctx)->keycache.keycode[_i_] = (KeyCode) (key); \ (ctx)->keycache.modifiers[_i_] = (unsigned char)(mod); \ (ctx)->keycache.keysym[_i_] = sym_ret; \ MOD_RETURN(ctx, key) = (unsigned char)mod_ret; \ @@ -157,12 +157,12 @@ FM(0x1e), FM(0x9e), FM(0x5e), FM(0xde), FM(0x3e), FM(0xbe), FM(0x7e), FM(0xfe) #define UPDATE_CACHE(ctx, pd, key, mod, mod_ret, sym_ret) \ { \ - int _i_ = (((key) - (pd)->min_keycode + modmix[(mod) & 0xff]) & \ + int _i_ = (((key) - (TMLongCard) (pd)->min_keycode + modmix[(mod) & 0xff]) & \ (TMKEYCACHESIZE-1)); \ - (ctx)->keycache.keycode[_i_] = key; \ + (ctx)->keycache.keycode[_i_] = (KeyCode) (key); \ (ctx)->keycache.modifiers[_i_] = (unsigned char)(mod); \ (ctx)->keycache.keysym[_i_] = sym_ret; \ - MOD_RETURN(ctx, key) = (unsigned char)mod_ret; \ + MOD_RETURN(ctx, key) = (unsigned char)(mod_ret); \ } /* usual number of expected keycodes in XtKeysymToKeycodeList */ @@ -177,7 +177,6 @@ Boolean _XtComputeLateBindings( int i,j,ref; ModToKeysymTable* temp; XtPerDisplay perDisplay; - Boolean found; KeySym tempKeysym = NoSymbol; perDisplay = _XtGetPerDisplay(dpy); @@ -185,12 +184,12 @@ Boolean _XtComputeLateBindings( XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "displayError","invalidDisplay",XtCXtToolkitError, "Can't find display structure", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return FALSE; } _InitializeKeysymTables(dpy, perDisplay); for (ref=0; lateModifiers[ref].keysym; ref++) { - found = FALSE; + Boolean found = FALSE; for (i=0;i<8;i++) { temp = &(perDisplay->modsToKeysyms[i]); for (j=0;j<temp->count;j++){ @@ -250,23 +249,24 @@ Boolean _XtMatchUsingDontCareMods( Modifiers modifiers_return; KeySym keysym_return; Modifiers useful_mods; - int i, num_modbits; Modifiers computed = 0; Modifiers computedMask = 0; Boolean resolved = TRUE; Display *dpy = eventSeq->xev->xany.display; XtPerDisplay pd; - TMKeyContext tm_context; if (modMatch->lateModifiers != NULL) resolved = _XtComputeLateBindings(dpy, modMatch->lateModifiers, &computed, &computedMask); if (!resolved) return FALSE; - computed |= modMatch->modifiers; - computedMask |= modMatch->modifierMask; /* gives do-care mask */ + computed = (Modifiers) (computed | modMatch->modifiers); + computedMask = (Modifiers) (computedMask | modMatch->modifierMask); /* gives do-care mask */ if ( (computed & computedMask) == (eventSeq->event.modifiers & computedMask) ) { + TMKeyContext tm_context; + int num_modbits; + int i; pd = _XtGetPerDisplay(dpy); tm_context = pd->tm_context; @@ -283,7 +283,7 @@ Boolean _XtMatchUsingDontCareMods( useful_mods = ~computedMask & modifiers_return; if (useful_mods == 0) return FALSE; - switch (num_modbits = num_bits(useful_mods)) { + switch (num_modbits = (int) num_bits(useful_mods)) { case 1: case 8: /* @@ -296,7 +296,7 @@ Boolean _XtMatchUsingDontCareMods( * applications. We can only hope that Motif's virtual * modifiers won't result in all eight modbits being set. */ - for (i = useful_mods; i > 0; i--) { + for (i = (int) useful_mods; i > 0; i--) { TRANSLATE(tm_context, pd, dpy, eventSeq->event.eventCode, (Modifiers)i, modifiers_return, keysym_return); if (keysym_return == @@ -374,7 +374,6 @@ Boolean _XtMatchUsingStandardMods ( KeySym keysym_return; Modifiers computed= 0; Modifiers computedMask = 0; - Boolean resolved = TRUE; Display *dpy = eventSeq->xev->xany.display; XtPerDisplay pd = _XtGetPerDisplay(dpy); TMKeyContext tm_context = pd->tm_context; @@ -389,25 +388,27 @@ Boolean _XtMatchUsingStandardMods ( modifiers_return = MOD_RETURN(tm_context, eventSeq->event.eventCode); if (!modifiers_return) { XtTranslateKeycode(dpy, (KeyCode)eventSeq->event.eventCode, - eventSeq->event.modifiers, &modifiers_return, + (Modifiers)eventSeq->event.modifiers, &modifiers_return, &keysym_return); - translateModifiers = eventSeq->event.modifiers & modifiers_return; + translateModifiers = (Modifiers) (eventSeq->event.modifiers & modifiers_return); UPDATE_CACHE(tm_context, pd, eventSeq->event.eventCode, translateModifiers, modifiers_return, keysym_return); } else { - translateModifiers = eventSeq->event.modifiers & modifiers_return; + translateModifiers = (Modifiers) (eventSeq->event.modifiers & modifiers_return); TRANSLATE(tm_context, pd, dpy, (KeyCode)eventSeq->event.eventCode, translateModifiers, modifiers_return, keysym_return); } if ((typeMatch->eventCode & typeMatch->eventCodeMask) == (keysym_return & typeMatch->eventCodeMask)) { + Boolean resolved = TRUE; + if (modMatch->lateModifiers != NULL) resolved = _XtComputeLateBindings(dpy, modMatch->lateModifiers, &computed, &computedMask); if (!resolved) return FALSE; - computed |= modMatch->modifiers; - computedMask |= modMatch->modifierMask; + computed = (Modifiers) (computed | modMatch->modifiers); + computedMask = (Modifiers) (computedMask | modMatch->modifierMask); if ((computed & computedMask) == (eventSeq->event.modifiers & ~modifiers_return & computedMask)) { @@ -434,20 +435,19 @@ void _XtBuildKeysymTables( #define KeysymTableSize 16 FLUSHKEYCACHE(pd->tm_context); - if (pd->keysyms) - XFree( (char *)pd->keysyms ); + + XFree( (char *)pd->keysyms ); pd->keysyms_serial = NextRequest(dpy); - pd->keysyms = XGetKeyboardMapping(dpy, pd->min_keycode, + pd->keysyms = XGetKeyboardMapping(dpy, (KeyCode) pd->min_keycode, pd->max_keycode-pd->min_keycode+1, &pd->keysyms_per_keycode); - if (pd->modKeysyms) - XtFree((char *)pd->modKeysyms); - if (pd->modsToKeysyms) - XtFree((char *)pd->modsToKeysyms); + XtFree((char *)pd->modKeysyms); + pd->modKeysyms = (KeySym*)__XtMalloc((Cardinal)KeysymTableSize*sizeof(KeySym)); maxCount = KeysymTableSize; tempCount = 0; + XtFree((char *)pd->modsToKeysyms); table = (ModToKeysymTable*)__XtMalloc((Cardinal)8*sizeof(ModToKeysymTable)); pd->modsToKeysyms = table; @@ -472,21 +472,21 @@ void _XtBuildKeysymTables( for (j=0;j<modKeymap->max_keypermod;j++) { keycode = modKeymap->modifiermap[i*modKeymap->max_keypermod+j]; if (keycode != 0) { - pd->isModifier[keycode>>3] |= 1 << (keycode & 7); + pd->isModifier[keycode>>3] |= (unsigned char) (1 << (keycode & 7)); for (k=0; k<pd->keysyms_per_keycode;k++) { idx = ((keycode-pd->min_keycode)* pd->keysyms_per_keycode)+k; keysym = pd->keysyms[idx]; if ((keysym == XK_Mode_switch) && (i > 2)) - pd->mode_switch |= 1 << i; + pd->mode_switch = (pd->mode_switch | (Modifiers) (1 << i)); if ((keysym == XK_Num_Lock) && (i > 2)) - pd->num_lock |= 1 << i; + pd->num_lock = (pd->num_lock | (Modifiers) (1 << i)); if (keysym != 0 && keysym != tempKeysym ){ if (tempCount==maxCount) { maxCount += KeysymTableSize; pd->modKeysyms = (KeySym*)XtRealloc( (char*)pd->modKeysyms, - (unsigned) (maxCount*sizeof(KeySym)) ); + (unsigned) ((size_t)maxCount * sizeof(KeySym)) ); } pd->modKeysyms[tempCount++] = keysym; table[i].count++; @@ -590,7 +590,7 @@ void XtTranslateKey( *keysym_return = NoSymbol; UNLOCK_APP(app); #else - XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return, keysym_return); + XkbLookupKeySym(dpy, (KeyCode) keycode, modifiers, modifiers_return, keysym_return); #endif } @@ -656,7 +656,7 @@ KeySym *XtGetKeysymTable( LOCK_APP(app); pd = _XtGetPerDisplay(dpy); _InitializeKeysymTables(dpy, pd); - *min_keycode_return = pd->min_keycode; /* %%% */ + *min_keycode_return = (KeyCode) pd->min_keycode; /* %%% */ *keysyms_per_keycode_return = pd->keysyms_per_keycode; retval = pd->keysyms; UNLOCK_APP(app); @@ -671,7 +671,7 @@ void XtKeysymToKeycodeList( { XtPerDisplay pd; unsigned keycode; - int per, match; + int per; register KeySym *syms; register int i, j; KeySym lsym, usym; @@ -688,7 +688,7 @@ void XtKeysymToKeycodeList( for (syms = pd->keysyms, keycode = (unsigned) pd->min_keycode; (int)keycode <= pd->max_keycode; syms += per, keycode++) { - match = 0; + int match = 0; for (j = 0; j < per; j++) { if (syms[j] == keysym) { match = 1; diff --git a/lib/libXt/src/TMparse.c b/lib/libXt/src/TMparse.c index df94181b4..9582b0cdc 100644 --- a/lib/libXt/src/TMparse.c +++ b/lib/libXt/src/TMparse.c @@ -99,10 +99,12 @@ in this Software without prior written authorization from The Open Group. #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif -static String XtNtranslationParseError = "translationParseError"; +static _Xconst char *XtNtranslationParseError = "translationParseError"; typedef int EventType; +#define PARSE_PROC_DECL String, Opaque, EventPtr, Boolean* + typedef String (*ParseProc)( String /* str; */, Opaque /* closure; */, @@ -228,13 +230,13 @@ static NameValueRec mappingNotify[] = { {NULL, NULLQUARK, 0}, }; -static String ParseKeySym(String, Opaque, EventPtr, Boolean*); -static String ParseKeyAndModifiers(String, Opaque, EventPtr, Boolean*); -static String ParseTable(String, Opaque, EventPtr, Boolean*); -static String ParseImmed(String, Opaque, EventPtr, Boolean*); -static String ParseAddModifier(String, Opaque, EventPtr, Boolean*); -static String ParseNone(String, Opaque, EventPtr, Boolean*); -static String ParseAtom(String, Opaque, EventPtr, Boolean*); +static String ParseKeySym(PARSE_PROC_DECL); +static String ParseKeyAndModifiers(PARSE_PROC_DECL); +static String ParseTable(PARSE_PROC_DECL); +static String ParseImmed(PARSE_PROC_DECL); +static String ParseAddModifier(PARSE_PROC_DECL); +static String ParseNone(PARSE_PROC_DECL); +static String ParseAtom(PARSE_PROC_DECL); static EventKey events[] = { @@ -445,7 +447,7 @@ static void Compile_XtEventTable( register int i; register EventKeys entry = table; - for (i=count; --i >= 0; entry++) + for (i= (int)count; --i >= 0; entry++) entry->signature = XrmPermStringToQuark(entry->event); qsort(table, count, sizeof(EventKey), OrderEvents); } @@ -463,7 +465,7 @@ static void Compile_XtModifierTable( register int i; register ModifierKeys entry = table; - for (i=count; --i >= 0; entry++) + for (i= (int)count; --i >= 0; entry++) entry->signature = XrmPermStringToQuark(entry->name); qsort(table, count, sizeof(ModifierRec), OrderModifiers); } @@ -479,13 +481,13 @@ static String PanicModeRecovery( static void Syntax( - String str0,String str1) + _Xconst char *str0, _Xconst char *str1) { Cardinal num_params = 2; String params[2]; - params[0] = str0; - params[1] = str1; + params[0] = (String) str0; + params[1] = (String) str1; XtWarningMsg(XtNtranslationParseError,"parseError",XtCXtToolkitError, "translation table syntax error: %s %s",params,&num_params); } @@ -535,9 +537,12 @@ static void StoreLateBindings( LateBindingsPtr* lateBindings) { LateBindingsPtr temp; - Boolean pair = FALSE; - unsigned long count,number; + if (lateBindings != NULL){ + Boolean pair = FALSE; + unsigned long count; + unsigned long number; + temp = *lateBindings; if (temp != NULL) { for (count = 0; temp[count].keysym; count++){/*EMPTY*/} @@ -552,13 +557,13 @@ static void StoreLateBindings( temp = (LateBindingsPtr)XtRealloc((char *)temp, (unsigned)((count+number+1) * sizeof(LateBindings)) ); *lateBindings = temp; - temp[count].knot = notL; - temp[count].pair = pair; + XtSetBit(temp[count].knot, notL); + XtSetBit(temp[count].pair, pair); if (count == 0) temp[count].ref_count = 1; temp[count++].keysym = keysymL; if (keysymR){ - temp[count].knot = notR; + XtSetBit(temp[count].knot, notR); temp[count].pair = FALSE; temp[count].ref_count = 0; temp[count++].keysym = keysymR; @@ -591,7 +596,7 @@ static Boolean _XtLookupModifier( Value *valueP, Bool constMask) { - register int i, left, right; + int left, right; static int previous = 0; LOCK_PROCESS; @@ -607,7 +612,7 @@ static Boolean _XtLookupModifier( left = 0; right = XtNumber(modifiers) - 1; while (left <= right) { - i = (left + right) >> 1; + int i = (left + right) >> 1; if (signature < modifiers[i].signature) right = i - 1; else if (signature > modifiers[i].signature) @@ -651,25 +656,22 @@ static String FetchModifierToken( if (*str == '$') { *token_return = QMeta; str++; - return str; - } - if (*str == '^') { + } else if (*str == '^') { *token_return = QCtrl; str++; - return str; - } - str = ScanIdent(str); - if (start != str) { - char modStrbuf[100]; - char* modStr; - - modStr = XtStackAlloc ((size_t)(str - start + 1), modStrbuf); - if (modStr == NULL) _XtAllocError (NULL); - (void) memmove(modStr, start, str-start); - modStr[str-start] = '\0'; - *token_return = XrmStringToQuark(modStr); - XtStackFree (modStr, modStrbuf); - return str; + } else { + str = ScanIdent(str); + if (start != str) { + char modStrbuf[100]; + char* modStr; + + modStr = XtStackAlloc ((size_t)(str - start + 1), modStrbuf); + if (modStr == NULL) _XtAllocError (NULL); + (void) memmove(modStr, start, (size_t) (str - start)); + modStr[str-start] = '\0'; + *token_return = XrmStringToQuark(modStr); + XtStackFree (modStr, modStrbuf); + } } return str; } @@ -682,7 +684,7 @@ static String ParseModifiers( register String start; Boolean notFlag, exclusive, keysymAsMod; Value maskBit; - XrmQuark Qmod; + XrmQuark Qmod = QNone; ScanWhitespace(str); start = str; @@ -690,7 +692,7 @@ static String ParseModifiers( exclusive = FALSE; if (start != str) { if (Qmod == QNone) { - event->event.modifierMask = ~0; + event->event.modifierMask = (unsigned long) (~0); event->event.modifiers = 0; ScanWhitespace(str); return str; @@ -748,11 +750,11 @@ static String ParseModifiers( return PanicModeRecovery(str); } event->event.modifierMask |= maskBit; - if (notFlag) event->event.modifiers &= ~maskBit; + if (notFlag) event->event.modifiers = (event->event.modifiers & (TMLongCard) (~maskBit)); else event->event.modifiers |= maskBit; ScanWhitespace(str); } - if (exclusive) event->event.modifierMask = ~0; + if (exclusive) event->event.modifierMask = (unsigned long) (~0); return str; } @@ -769,13 +771,13 @@ static String ParseXtEventType( ScanAlphanumeric(str); eventTypeStr = XtStackAlloc ((size_t)(str - start + 1), eventTypeStrbuf); if (eventTypeStr == NULL) _XtAllocError (NULL); - (void) memmove(eventTypeStr, start, str-start); + (void) memmove(eventTypeStr, start, (size_t)(str-start)); eventTypeStr[str-start] = '\0'; *tmEventP = LookupTMEventType(eventTypeStr,error); XtStackFree (eventTypeStr, eventTypeStrbuf); if (*error) return PanicModeRecovery(str); - event->event.eventType = events[*tmEventP].eventType; + event->event.eventType = (TMLongCard) events[*tmEventP].eventType; return str; } @@ -786,9 +788,9 @@ static unsigned long StrToHex( register unsigned long val = 0; while ((c = *str)) { - if ('0' <= c && c <= '9') val = val*16+c-'0'; - else if ('a' <= c && c <= 'z') val = val*16+c-'a'+10; - else if ('A' <= c && c <= 'Z') val = val*16+c-'A'+10; + if ('0' <= c && c <= '9') val = (unsigned long) (val * 16 + (unsigned long)c - '0'); + else if ('a' <= c && c <= 'z') val = (unsigned long) (val*16+(unsigned long)c-'a'+10); + else if ('A' <= c && c <= 'Z') val = (unsigned long) (val*16+(unsigned long)c-'A'+10); else return 0; str++; } @@ -803,7 +805,7 @@ static unsigned long StrToOct( register unsigned long val = 0; while ((c = *str)) { - if ('0' <= c && c <= '7') val = val*8+c-'0'; else return 0; + if ('0' <= c && c <= '7') val = val*8+(unsigned long)c-'0'; else return 0; str++; } @@ -823,7 +825,7 @@ static unsigned long StrToNum( } while ((c = *str)) { - if ('0' <= c && c <= '9') val = val*10+c-'0'; + if ('0' <= c && c <= '9') val = val*10+(unsigned long)c-'0'; else return 0; str++; } @@ -842,7 +844,7 @@ static KeySym StringToKeySym( #ifndef NOTASCII /* special case single character ASCII, for speed */ if (*(str+1) == '\0') { - if (' ' <= *str && *str <= '~') return XK_space + (*str - ' '); + if (' ' <= *str && *str <= '~') return (KeySym) (XK_space + (*str - ' ')); } #endif @@ -906,7 +908,7 @@ static String ParseImmed( Boolean* error) { event->event.eventCode = (unsigned long)closure; - event->event.eventCodeMask = ~0UL; + event->event.eventCodeMask = (unsigned long) (~0UL); return BROKEN_OPTIMIZER_HACK(str); } @@ -952,9 +954,9 @@ static String ParseKeySym( EventPtr event, Boolean* error) { - char *start; + String start; char keySymNamebuf[100]; - char* keySymName; + char* keySymName = NULL; ScanWhitespace(str); @@ -965,7 +967,7 @@ static String ParseKeySym( if (*str != '\0' && !IsNewline(*str)) str++; keySymName[1] = '\0'; event->event.eventCode = StringToKeySym(keySymName, error); - event->event.eventCodeMask = ~0L; + event->event.eventCodeMask = (unsigned long) (~0L); } else if (*str == ',' || *str == ':' || /* allow leftparen to be single char symbol, * for backwards compatibility @@ -986,12 +988,12 @@ static String ParseKeySym( && (*str != '(' || *(str+1) <= '0' || *(str+1) >= '9') && *str != '\0') str++; keySymName = XtStackAlloc ((size_t)(str - start + 1), keySymNamebuf); - (void) memmove(keySymName, start, str-start); + (void) memmove(keySymName, start, (size_t) (str-start)); keySymName[str-start] = '\0'; event->event.eventCode = StringToKeySym(keySymName, error); - event->event.eventCodeMask = ~0L; + event->event.eventCodeMask = (unsigned long) (~0L); } - if (*error) { + if (*error && keySymName) { /* We never get here when keySymName hasn't been allocated */ if (keySymName[0] == '<') { /* special case for common error */ @@ -1032,13 +1034,13 @@ static String ParseTable( *error = TRUE; return str; } - (void) memmove(tableSymName, start, str-start); + (void) memmove(tableSymName, start, (size_t) (str-start)); tableSymName[str-start] = '\0'; signature = StringToQuark(tableSymName); for (; table->signature != NULLQUARK; table++) if (table->signature == signature) { event->event.eventCode = table->value; - event->event.eventCodeMask = ~0L; + event->event.eventCodeMask = (unsigned long) (~0L); return str; } @@ -1074,7 +1076,8 @@ static String ParseAtom( event->event.eventCode = 0L; event->event.eventCodeMask = 0L; } else { - char *start, atomName[1000]; + String start; + char atomName[1000]; start = str; while ( *str != ',' @@ -1088,9 +1091,9 @@ static String ParseAtom( *error = TRUE; return str; } - (void) memmove(atomName, start, str-start); + (void) memmove(atomName, start, (size_t) (str-start)); atomName[str-start] = '\0'; - event->event.eventCode = XrmStringToQuark(atomName); + event->event.eventCode = (TMLongCard) XrmStringToQuark(atomName); event->event.matchEvent = _XtMatchAtom; } return str; @@ -1141,8 +1144,8 @@ static String ParseEvent( && (event->event.modifiers | event->event.modifierMask) /* any */ && (event->event.modifiers != AnyModifier)) { - event->event.modifiers - |= buttonModifierMasks[event->event.eventCode]; + event->event.modifiers = (event->event.modifiers + | (TMLongCard) buttonModifierMasks[event->event.eventCode]); /* the button that is going up will always be in the modifiers... */ } @@ -1173,7 +1176,7 @@ static String ParseQuotedStringEvent( event->event.eventType = KeyPress; event->event.eventCode = StringToKeySym(s, error); if (*error) return PanicModeRecovery(str); - event->event.eventCodeMask = ~0L; + event->event.eventCodeMask = (unsigned long) (~0L); event->event.matchEvent = _XtMatchUsingStandardMods; event->event.standard = TRUE; @@ -1205,11 +1208,11 @@ static void RepeatDown( if ((upEvent->event.eventType == ButtonRelease) && (upEvent->event.modifiers != AnyModifier) && (upEvent->event.modifiers | upEvent->event.modifierMask)) - upEvent->event.modifiers - |= buttonModifierMasks[event->event.eventCode]; + upEvent->event.modifiers = (upEvent->event.modifiers + | (TMLongCard) buttonModifierMasks[event->event.eventCode]); if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += (reps - 1) * 2; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + (reps - 1) * 2); for (i=1; i<reps; i++) { @@ -1252,11 +1255,11 @@ static void RepeatDownPlus( if ((upEvent->event.eventType == ButtonRelease) && (upEvent->event.modifiers != AnyModifier) && (upEvent->event.modifiers | upEvent->event.modifierMask)) - upEvent->event.modifiers - |= buttonModifierMasks[event->event.eventCode]; + upEvent->event.modifiers = (upEvent->event.modifiers + | (TMLongCard) buttonModifierMasks[event->event.eventCode]); if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += reps * 2 - 1; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + reps * 2 - 1); for (i=0; i<reps; i++) { @@ -1306,11 +1309,11 @@ static void RepeatUp( if ((downEvent->event.eventType == ButtonPress) && (downEvent->event.modifiers != AnyModifier) && (downEvent->event.modifiers | downEvent->event.modifierMask)) - downEvent->event.modifiers - &= ~buttonModifierMasks[event->event.eventCode]; + downEvent->event.modifiers = (downEvent->event.modifiers + & (TMLongCard) (~buttonModifierMasks[event->event.eventCode])); if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += reps * 2 - 1; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + reps * 2 - 1); /* up */ event->next = XtNew(EventSeqRec); @@ -1362,11 +1365,11 @@ static void RepeatUpPlus( if ((downEvent->event.eventType == ButtonPress) && (downEvent->event.modifiers != AnyModifier) && (downEvent->event.modifiers | downEvent->event.modifierMask)) - downEvent->event.modifiers - &= ~buttonModifierMasks[event->event.eventCode]; + downEvent->event.modifiers = (downEvent->event.modifiers + & (TMLongCard) (~buttonModifierMasks[event->event.eventCode])); if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += reps * 2; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + reps * 2); for (i=0; i<reps; i++) { @@ -1403,7 +1406,7 @@ static void RepeatOther( tempEvent = event = *eventP; if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += reps - 1; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + reps - 1); for (i=1; i<reps; i++) { event->next = XtNew(EventSeqRec); @@ -1426,7 +1429,7 @@ static void RepeatOtherPlus( tempEvent = event = *eventP; if (event->event.lateModifiers) - event->event.lateModifiers->ref_count += reps - 1; + event->event.lateModifiers->ref_count = (unsigned short) (event->event.lateModifiers->ref_count + reps - 1); for (i=1; i<reps; i++) { event->next = XtNew(EventSeqRec); @@ -1481,11 +1484,11 @@ static String ParseRepeat( size_t len; ScanNumeric(str); - len = (str - start); + len = (size_t) (str - start); if (len < sizeof repStr) { (void) memmove(repStr, start, len); repStr[len] = '\0'; - *reps = StrToNum(repStr); + *reps = (int) StrToNum(repStr); } else { Syntax("Repeat count too large.", ""); *error = TRUE; @@ -1551,6 +1554,7 @@ static String ParseEventSeq( XtCXtToolkitError, "... probably due to non-Latin1 character in quoted string", (String*)NULL, (Cardinal*)NULL); + XtFree((char *)event); return PanicModeRecovery(str); } *nextEvent = event; @@ -1616,7 +1620,7 @@ static String ParseActionProc( *error = TRUE; return str; } - (void) memmove(procName, start, str-start); + (void) memmove(procName, start, (size_t) (str-start)); procName[str-start] = '\0'; *actionProcNameP = XrmStringToQuark( procName ); return str; @@ -1625,7 +1629,7 @@ static String ParseActionProc( static String ParseString( register String str, - String *strP) + _XtString *strP) { register String start; @@ -1642,9 +1646,9 @@ static String ParseString( */ if (*str == '\\' && (*(str+1) == '"' || (*(str+1) == '\\' && *(str+2) == '"'))) { - len = prev_len + (str-start+2); + len = (unsigned) (prev_len + (str-start+2)); *strP = XtRealloc(*strP, len); - (void) memmove(*strP + prev_len, start, str-start); + (void) memmove(*strP + prev_len, start, (size_t) (str-start)); prev_len = len-1; str++; (*strP)[prev_len-1] = *str; @@ -1653,9 +1657,9 @@ static String ParseString( } str++; } - len = prev_len + (str-start+1); + len = (unsigned) (prev_len + (str-start+1)); *strP = XtRealloc(*strP, len); - (void) memmove( *strP + prev_len, start, str-start); + (void) memmove( *strP + prev_len, start, (size_t) (str-start)); (*strP)[len-1] = '\0'; if (*str == '"') str++; else XtWarningMsg(XtNtranslationParseError,"parseString", @@ -1671,7 +1675,7 @@ static String ParseString( && !IsNewline(*str) && *str != '\0') str++; *strP = __XtMalloc((unsigned)(str-start+1)); - (void) memmove(*strP, start, str-start); + (void) memmove(*strP, start, (size_t) (str-start)); (*strP)[str-start] = '\0'; } return str; @@ -1690,12 +1694,11 @@ static String ParseParamSeq( } ParamRec; ParamPtr params = NULL; - register Cardinal num_params = 0; - register Cardinal i; + Cardinal num_params = 0; ScanWhitespace(str); while (*str != ')' && *str != '\0' && !IsNewline(*str)) { - String newStr; + _XtString newStr; str = ParseString(str, &newStr); if (newStr != NULL) { ParamPtr temp = (ParamRec*) @@ -1716,7 +1719,9 @@ static String ParseParamSeq( if (num_params != 0) { String *paramP = (String *) - __XtMalloc( (unsigned)(num_params+1) * sizeof(String) ); + __XtMalloc( (Cardinal)((num_params+1) * sizeof(String)) ); + Cardinal i; + *paramSeqP = paramP; *paramNumP = num_params; paramP += num_params; /* list is LIFO right now */ @@ -1768,9 +1773,11 @@ static String ParseActionSeq( ActionPtr *actionsP, Boolean *error) { - ActionPtr *nextActionP = actionsP; + ActionPtr *nextActionP; + + if ((nextActionP = actionsP) != NULL) + *actionsP = NULL; - *actionsP = NULL; while (*str != '\0' && !IsNewline(*str)) { register ActionPtr action; XrmQuark quark; @@ -1781,12 +1788,17 @@ static String ParseActionSeq( action->next = NULL; str = ParseAction(str, action, &quark, error); - if (*error) return PanicModeRecovery(str); + if (*error) { + XtFree((char *)action); + return PanicModeRecovery(str); + } action->idx = _XtGetQuarkIndex(parseTree, quark); ScanWhitespace(str); - *nextActionP = action; - nextActionP = &action->next; + if (nextActionP) { + *nextActionP = action; + nextActionP = &action->next; + } } if (IsNewline(*str)) str++; ScanWhitespace(str); @@ -1803,7 +1815,7 @@ static void ShowProduction( char *eol, *production, productionbuf[500]; eol = strchr(currentProduction, '\n'); - if (eol) len = eol - currentProduction; + if (eol) len = (size_t) (eol - currentProduction); else len = strlen (currentProduction); production = XtStackAlloc (len + 1, productionbuf); if (production == NULL) _XtAllocError (NULL); @@ -1832,21 +1844,18 @@ static String ParseTranslationTableProduction( String production = str; actionsP = NULL; - str = ParseEventSeq(str, &eventSeq, &actionsP,error); - if (*error == TRUE) { - ShowProduction(production); - FreeEventSeq(eventSeq); - return (str); - } - ScanWhitespace(str); - str = ParseActionSeq(parseTree, str, actionsP, error); + str = ParseEventSeq(str, &eventSeq, &actionsP, error); if (*error == TRUE) { ShowProduction(production); - FreeEventSeq(eventSeq); - return (str); + } else { + ScanWhitespace(str); + str = ParseActionSeq(parseTree, str, actionsP, error); + if (*error == TRUE) { + ShowProduction(production); + } else { + _XtAddEventSeqToStateTree(eventSeq, parseTree); + } } - - _XtAddEventSeqToStateTree(eventSeq, parseTree); FreeEventSeq(eventSeq); return (str); } @@ -1856,19 +1865,21 @@ static String CheckForPoundSign( _XtTranslateOp defaultOp, _XtTranslateOp *actualOpRtn) { - String start; - char operation[20]; _XtTranslateOp opType; opType = defaultOp; ScanWhitespace(str); + if (*str == '#') { + String start; + char operation[20]; int len; + str++; start = str; str = ScanIdent(str); - len = MIN(19, str-start); - (void) memmove(operation, start, len); + len = MIN(19, (int)(str - start)); + (void) memmove(operation, start, (size_t) len); operation[len] = '\0'; if (!strcmp(operation,"replace")) opType = XtTableReplace; @@ -1909,7 +1920,7 @@ static XtTranslations ParseTranslationTable( parseTree->isSimple = TRUE; parseTree->mappingNotifyInterest = FALSE; - parseTree->isAccelerator = isAccelerator; + XtSetBit(parseTree->isAccelerator, isAccelerator); parseTree->isStackBranchHeads = parseTree->isStackQuarks = parseTree->isStackComplexBranchHeads = TRUE; @@ -1940,7 +1951,7 @@ static XtTranslations ParseTranslationTable( XtFree((char *)parseTree->complexBranchHeadTbl); xlations = _XtCreateXlations(stateTrees, 1, NULL, NULL); - xlations->operation = actualOp; + xlations->operation = (unsigned char) actualOp; #ifdef notdef XtFree(stateTrees); diff --git a/lib/libXt/src/TMprint.c b/lib/libXt/src/TMprint.c index 6c469f167..397189ca4 100644 --- a/lib/libXt/src/TMprint.c +++ b/lib/libXt/src/TMprint.c @@ -76,8 +76,8 @@ in this Software without prior written authorization from The Open Group. #include <stdio.h> typedef struct _TMStringBufRec{ - String start; - String current; + _XtString start; + _XtString current; Cardinal max; }TMStringBufRec, *TMStringBuf; @@ -86,16 +86,16 @@ typedef struct _TMStringBufRec{ #define STR_INCAMOUNT 100 #define CHECK_STR_OVERFLOW(sb) \ if (sb->current - sb->start > (int)sb->max - STR_THRESHOLD) \ -{ String old = sb->start; \ +{ _XtString old = sb->start; \ sb->start = XtRealloc(old, (Cardinal)(sb->max += STR_INCAMOUNT)); \ sb->current = sb->current - old + sb->start; \ } #define ExpandForChars(sb, nchars ) \ - if ((unsigned)(sb->current - sb->start) > sb->max - STR_THRESHOLD - nchars) { \ - String old = sb->start; \ + if ((unsigned)(sb->current - sb->start) > (sb->max - STR_THRESHOLD - (Cardinal) nchars)) { \ + _XtString old = sb->start; \ sb->start = XtRealloc(old, \ - (Cardinal)(sb->max += STR_INCAMOUNT + nchars)); \ + (Cardinal)(sb->max = (Cardinal)(sb->max + STR_INCAMOUNT + (Cardinal) nchars))); \ sb->current = sb->current - old + sb->start; \ } @@ -147,6 +147,7 @@ static void PrintModifiers( CHECK_STR_OVERFLOW(sb); PRINTMOD(Button4Mask, "Button4"); PRINTMOD(Button5Mask, "Button5"); + (void) notfirst; #undef PRINTMOD } @@ -208,7 +209,7 @@ static void PrintCode( if (mask != 0) { if (mask != ~0UL) (void) sprintf(sb->current, "0x%lx:0x%lx", mask, code); - else (void) sprintf(sb->current, /*"0x%lx"*/ "%d", (unsigned)code); + else (void) sprintf(sb->current, /*"0x%lx"*/ "%u", (unsigned)code); sb->current += strlen(sb->current); } } @@ -237,7 +238,7 @@ static void PrintAtom( Display *dpy, Atom atom) { - String atomName; + _XtString atomName; if (atom == 0) return; @@ -338,7 +339,7 @@ static void PrintActions( if (accelWidget) { /* accelerator */ String name = XtName(accelWidget); - int nameLen = strlen(name); + int nameLen = (int) strlen(name); ExpandForChars(sb, nameLen ); XtMemmove(sb->current, name, nameLen ); sb->current += nameLen; @@ -396,8 +397,8 @@ static Boolean LookAheadForCycleOrMulticlick( else if (typeMatch->eventType == _XtEventTimerEventType) continue; else /* not same event as starting event and not timer */ { - unsigned int type = sTypeMatch->eventType; - unsigned int t = typeMatch->eventType; + unsigned int type = (unsigned) sTypeMatch->eventType; + unsigned int t = (unsigned) typeMatch->eventType; if ( (type == ButtonPress && t != ButtonRelease) || (type == ButtonRelease && t != ButtonPress) || (type == KeyPress && t != KeyRelease) @@ -495,12 +496,13 @@ static int FindNextMatch( TMShortCard startIndex) { TMShortCard i; - TMComplexStateTree stateTree; StatePtr currState, candState; Boolean noMatch = True; - TMBranchHead prBranchHead; for (i = startIndex; noMatch && i < numPrints; i++) { + TMBranchHead prBranchHead; + TMComplexStateTree stateTree; + stateTree = (TMComplexStateTree) xlations->stateTreeTbl[printData[i].tIndex]; prBranchHead = @@ -569,8 +571,8 @@ static void ProcessLaterMatches( branchHead, (state ? state->nextLevel : NULL), 0) == TM_NO_MATCH)) { - printData[*numPrintsRtn].tIndex = i; - printData[*numPrintsRtn].bIndex = j; + printData[*numPrintsRtn].tIndex = (TMShortCard) i; + printData[*numPrintsRtn].bIndex = (TMShortCard) j; (*numPrintsRtn)++; } } @@ -603,7 +605,7 @@ static void ProcessStateTree( == TM_NO_MATCH) { if (!branchHead->isSimple || branchHead->hasActions) { printData[*numPrintsRtn].tIndex = tIndex; - printData[*numPrintsRtn].bIndex = i; + printData[*numPrintsRtn].bIndex = (TMShortCard) i; (*numPrintsRtn)++; } LOCK_PROCESS; @@ -668,7 +670,7 @@ static void PrintState( UNLOCK_PROCESS; } -String _XtPrintXlations( +_XtString _XtPrintXlations( Widget w, XtTranslations xlations, Widget accelWidget, @@ -690,14 +692,14 @@ String _XtPrintXlations( sb->max = 1000; maxPrints = 0; for (i = 0; i < xlations->numStateTrees; i++) - maxPrints += - ((TMSimpleStateTree)(xlations->stateTreeTbl[i]))->numBranchHeads; + maxPrints = (TMShortCard) (maxPrints + + ((TMSimpleStateTree)(xlations->stateTreeTbl[i]))->numBranchHeads); prints = (PrintRec *) XtStackAlloc(maxPrints * sizeof(PrintRec), stackPrints); numPrints = 0; for (i = 0; i < xlations->numStateTrees; i++) - ProcessStateTree(prints, xlations, i, &numPrints); + ProcessStateTree(prints, xlations, (TMShortCard) i, &numPrints); for (i = 0; i < numPrints; i++) { TMSimpleStateTree stateTree = (TMSimpleStateTree) @@ -716,7 +718,7 @@ String _XtPrintXlations( } #endif /* TRACE_TM */ PrintState(sb, (TMStateTree)stateTree, branchHead, - includeRHS, accelWidget, XtDisplay(w)); + (Boolean) includeRHS, accelWidget, XtDisplay(w)); } XtStackFree((XtPointer)prints, (XtPointer)stackPrints); return (sb->start); @@ -731,7 +733,7 @@ void _XtDisplayTranslations( String *params, Cardinal *num_params) { - String xString; + _XtString xString; xString = _XtPrintXlations(widget, widget->core.tm.translations, @@ -750,7 +752,7 @@ void _XtDisplayAccelerators( String *params, Cardinal *num_params) { - String xString; + _XtString xString; xString = _XtPrintXlations(widget, @@ -796,8 +798,8 @@ void _XtDisplayInstalledAccelerators( sb->max = 1000; maxPrints = 0; for (i = 0; i < xlations->numStateTrees; i++) - maxPrints += - ((TMSimpleStateTree)xlations->stateTreeTbl[i])->numBranchHeads; + maxPrints = (TMShortCard) (maxPrints + + ((TMSimpleStateTree)xlations->stateTreeTbl[i])->numBranchHeads); prints = (PrintRec *) XtStackAlloc(maxPrints * sizeof(PrintRec), stackPrints); @@ -809,7 +811,7 @@ void _XtDisplayInstalledAccelerators( i++, complexBindProcs++) { if (complexBindProcs->widget) { - ProcessStateTree(prints, xlations, i, &numPrints); + ProcessStateTree(prints, xlations, (TMShortCard) i, &numPrints); } } for (i = 0; i < numPrints; i++) { @@ -864,8 +866,6 @@ String _XtPrintEventSeq( Display *dpy) { TMStringBufRec sbRec, *sb = &sbRec; - TMTypeMatch typeMatch; - TMModifierMatch modMatch; #define MAXSEQS 100 EventSeqPtr eventSeqs[MAXSEQS]; TMShortCard i, j; @@ -884,6 +884,9 @@ String _XtPrintEventSeq( } LOCK_PROCESS; for (j = 0; j < i; j++) { + TMTypeMatch typeMatch; + TMModifierMatch modMatch; + typeMatch = TMGetTypeMatch(_XtGetTypeIndex(&eventSeqs[j]->event)); modMatch = diff --git a/lib/libXt/src/TMstate.c b/lib/libXt/src/TMstate.c index 4a634b439..910788a35 100644 --- a/lib/libXt/src/TMstate.c +++ b/lib/libXt/src/TMstate.c @@ -113,14 +113,14 @@ static TMShortCard GetBranchHead( #define TM_BRANCH_HEAD_TBL_REALLOC 8 TMBranchHead branchHead = parseTree->branchHeadTbl; - TMShortCard newSize, i; - /* * dummy is used as a place holder for later matching in old-style * matching behavior. If there's already an entry we don't need * another dummy. */ if (isDummy) { + TMShortCard i; + for (i = 0; i < parseTree->numBranchHeads; i++, branchHead++) { if ((branchHead->typeIndex == typeIndex) && (branchHead->modIndex == modIndex)) @@ -129,12 +129,14 @@ static TMShortCard GetBranchHead( } if (parseTree->numBranchHeads == parseTree->branchHeadTblSize) { + TMShortCard newSize; + if (parseTree->branchHeadTblSize == 0) - parseTree->branchHeadTblSize += TM_BRANCH_HEAD_TBL_ALLOC; + parseTree->branchHeadTblSize = (TMShortCard) (parseTree->branchHeadTblSize + TM_BRANCH_HEAD_TBL_ALLOC); else - parseTree->branchHeadTblSize += - TM_BRANCH_HEAD_TBL_REALLOC; - newSize = (parseTree->branchHeadTblSize * sizeof(TMBranchHeadRec)); + parseTree->branchHeadTblSize = (TMShortCard) (parseTree->branchHeadTblSize + + TM_BRANCH_HEAD_TBL_REALLOC); + newSize = (TMShortCard) (parseTree->branchHeadTblSize * sizeof(TMBranchHeadRec)); if (parseTree->isStackBranchHeads) { TMBranchHead oldBranchHeadTbl = parseTree->branchHeadTbl; parseTree->branchHeadTbl = (TMBranchHead) __XtMalloc(newSize); @@ -144,7 +146,7 @@ static TMShortCard GetBranchHead( else { parseTree->branchHeadTbl = (TMBranchHead) XtRealloc((char *)parseTree->branchHeadTbl, - (parseTree->branchHeadTblSize * + (Cardinal)(parseTree->branchHeadTblSize * sizeof(TMBranchHeadRec))); } } @@ -161,7 +163,7 @@ static TMShortCard GetBranchHead( branchHead->isSimple = True; branchHead->hasActions = False; branchHead->hasCycles = False; - return parseTree->numBranchHeads-1; + return (TMShortCard) (parseTree->numBranchHeads - 1); } TMShortCard _XtGetQuarkIndex( @@ -170,7 +172,7 @@ TMShortCard _XtGetQuarkIndex( { #define TM_QUARK_TBL_ALLOC 16 #define TM_QUARK_TBL_REALLOC 16 - TMShortCard i = parseTree->numQuarks; + TMShortCard i; for (i=0; i < parseTree->numQuarks; i++) if (parseTree->quarkTbl[i] == quark) @@ -183,10 +185,10 @@ TMShortCard _XtGetQuarkIndex( TMShortCard newSize; if (parseTree->quarkTblSize == 0) - parseTree->quarkTblSize += TM_QUARK_TBL_ALLOC; + parseTree->quarkTblSize = (TMShortCard) (parseTree->quarkTblSize + TM_QUARK_TBL_ALLOC); else - parseTree->quarkTblSize += TM_QUARK_TBL_REALLOC; - newSize = (parseTree->quarkTblSize * sizeof(XrmQuark)); + parseTree->quarkTblSize = (TMShortCard) (parseTree->quarkTblSize + TM_QUARK_TBL_REALLOC); + newSize = (TMShortCard) (parseTree->quarkTblSize * sizeof(XrmQuark)); if (parseTree->isStackQuarks) { XrmQuark *oldquarkTbl = parseTree->quarkTbl; @@ -197,7 +199,7 @@ TMShortCard _XtGetQuarkIndex( else { parseTree->quarkTbl = (XrmQuark *) XtRealloc((char *)parseTree->quarkTbl, - (parseTree->quarkTblSize * + (Cardinal)(parseTree->quarkTblSize * sizeof(XrmQuark))); } } @@ -223,11 +225,11 @@ static TMShortCard GetComplexBranchIndex( TMShortCard newSize; if (parseTree->complexBranchHeadTblSize == 0) - parseTree->complexBranchHeadTblSize += TM_COMPLEXBRANCH_HEAD_TBL_ALLOC; + parseTree->complexBranchHeadTblSize = (TMShortCard) (parseTree->complexBranchHeadTblSize + TM_COMPLEXBRANCH_HEAD_TBL_ALLOC); else - parseTree->complexBranchHeadTblSize += TM_COMPLEXBRANCH_HEAD_TBL_REALLOC; + parseTree->complexBranchHeadTblSize = (TMShortCard) (parseTree->complexBranchHeadTblSize + TM_COMPLEXBRANCH_HEAD_TBL_REALLOC); - newSize = (parseTree->complexBranchHeadTblSize * sizeof(StatePtr)); + newSize = (TMShortCard) (parseTree->complexBranchHeadTblSize * sizeof(StatePtr)); if (parseTree->isStackComplexBranchHeads) { StatePtr *oldcomplexBranchHeadTbl @@ -240,12 +242,12 @@ static TMShortCard GetComplexBranchIndex( else { parseTree->complexBranchHeadTbl = (StatePtr *) XtRealloc((char *)parseTree->complexBranchHeadTbl, - (parseTree->complexBranchHeadTblSize * + (Cardinal)(parseTree->complexBranchHeadTblSize * sizeof(StatePtr))); } } parseTree->complexBranchHeadTbl[parseTree->numComplexBranchHeads++] = NULL; - return parseTree->numComplexBranchHeads-1; + return (TMShortCard) (parseTree->numComplexBranchHeads - 1); } TMShortCard _XtGetTypeIndex( @@ -276,10 +278,10 @@ TMShortCard _XtGetTypeIndex( if (j == TM_TYPE_SEGMENT_SIZE) { if (_XtGlobalTM.numTypeMatchSegments == _XtGlobalTM.typeMatchSegmentTblSize) { - _XtGlobalTM.typeMatchSegmentTblSize += 4; + _XtGlobalTM.typeMatchSegmentTblSize = (TMShortCard) (_XtGlobalTM.typeMatchSegmentTblSize + 4); _XtGlobalTM.typeMatchSegmentTbl = (TMTypeMatch *) XtRealloc((char *)_XtGlobalTM.typeMatchSegmentTbl, - (_XtGlobalTM.typeMatchSegmentTblSize * sizeof(TMTypeMatch))); + (Cardinal)(_XtGlobalTM.typeMatchSegmentTblSize * sizeof(TMTypeMatch))); } _XtGlobalTM.typeMatchSegmentTbl[_XtGlobalTM.numTypeMatchSegments++] = segment = (TMTypeMatch) @@ -371,10 +373,10 @@ TMShortCard _XtGetModifierIndex( if (j == TM_MOD_SEGMENT_SIZE) { if (_XtGlobalTM.numModMatchSegments == _XtGlobalTM.modMatchSegmentTblSize) { - _XtGlobalTM.modMatchSegmentTblSize += 4; + _XtGlobalTM.modMatchSegmentTblSize = (TMShortCard) (_XtGlobalTM.modMatchSegmentTblSize + 4); _XtGlobalTM.modMatchSegmentTbl = (TMModifierMatch *) XtRealloc((char *)_XtGlobalTM.modMatchSegmentTbl, - (_XtGlobalTM.modMatchSegmentTblSize * sizeof(TMModifierMatch))); + (Cardinal)(_XtGlobalTM.modMatchSegmentTblSize * sizeof(TMModifierMatch))); } _XtGlobalTM.modMatchSegmentTbl[_XtGlobalTM.numModMatchSegments++] = segment = (TMModifierMatch) @@ -382,7 +384,7 @@ TMShortCard _XtGetModifierIndex( j = 0; } modMatch = &segment[j]; - modMatch->modifiers = event->modifiers;; + modMatch->modifiers = event->modifiers; modMatch->modifierMask = event->modifierMask; modMatch->standard = event->standard; /* @@ -446,8 +448,8 @@ Boolean _XtRegularMatch( modMatch->lateModifiers, &computed, &computedMask); if (!resolved) return FALSE; - computed |= modMatch->modifiers; - computedMask |= modMatch->modifierMask; + computed = (Modifiers) (computed | modMatch->modifiers); + computedMask = (Modifiers) (computedMask | modMatch->modifierMask); return ( (computed & computedMask) == (eventSeq->event.modifiers & computedMask)); @@ -462,7 +464,7 @@ Boolean _XtMatchAtom( Atom atom; atom = XInternAtom(eventSeq->xev->xany.display, - XrmQuarkToString(typeMatch->eventCode), + XrmQuarkToString((XrmQuark)(typeMatch->eventCode)), False); return (atom == eventSeq->event.eventCode); } @@ -498,7 +500,7 @@ static void XEventToTMEvent( tmEvent->xev = event; tmEvent->event.eventCodeMask = 0; tmEvent->event.modifierMask = 0; - tmEvent->event.eventType = event->type; + tmEvent->event.eventType = (TMLongCard) event->type; tmEvent->event.lateModifiers = NULL; tmEvent->event.matchEvent = NULL; tmEvent->event.standard = FALSE; @@ -518,13 +520,13 @@ static void XEventToTMEvent( break; case MotionNotify: - tmEvent->event.eventCode = event->xmotion.is_hint; + tmEvent->event.eventCode = (TMLongCard) event->xmotion.is_hint; tmEvent->event.modifiers = event->xmotion.state; break; case EnterNotify: case LeaveNotify: - tmEvent->event.eventCode = event->xcrossing.mode; + tmEvent->event.eventCode = (TMLongCard) event->xcrossing.mode; tmEvent->event.modifiers = event->xcrossing.state; break; @@ -554,13 +556,13 @@ static void XEventToTMEvent( break; case MappingNotify: - tmEvent->event.eventCode = event->xmapping.request; + tmEvent->event.eventCode = (TMLongCard) event->xmapping.request; tmEvent->event.modifiers = 0; break; case FocusIn: case FocusOut: - tmEvent->event.eventCode = event->xfocus.mode; + tmEvent->event.eventCode = (TMLongCard) event->xfocus.mode; tmEvent->event.modifiers = 0; break; @@ -699,7 +701,7 @@ static void PushContext( !(context->matches[i].isCycleStart); i++){}; if (i < context->numMatches) - context->numMatches = i+1; + context->numMatches = (TMShortCard) (i + 1); #ifdef DEBUG else XtWarning("pushing cycle end with no cycle start"); @@ -710,12 +712,12 @@ static void PushContext( if (context->numMatches == context->maxMatches) { if (context->maxMatches == 0) - context->maxMatches += TM_CONTEXT_MATCHES_ALLOC; + context->maxMatches = (TMShortCard) (context->maxMatches + TM_CONTEXT_MATCHES_ALLOC); else - context->maxMatches += TM_CONTEXT_MATCHES_REALLOC; + context->maxMatches = (TMShortCard) (context->maxMatches + TM_CONTEXT_MATCHES_REALLOC); context->matches = (MatchPairRec *) XtRealloc((char *)context->matches, - context->maxMatches * sizeof(MatchPairRec)); + (Cardinal)(context->maxMatches * sizeof(MatchPairRec))); } context->matches[context->numMatches].isCycleStart = newState->isCycleStart; context->matches[context->numMatches].isCycleEnd = newState->isCycleEnd; @@ -742,8 +744,7 @@ static void FreeContext( context->numMatches = 0; else if (*contextPtr) { - if ((*contextPtr)->matches) - XtFree ((char *) ((*contextPtr)->matches)); + XtFree ((char *) ((*contextPtr)->matches)); XtFree((char *)*contextPtr); } @@ -779,25 +780,22 @@ static void HandleSimpleState( TMEventRec *curEventPtr) { XtTranslations xlations = tmRecPtr->translations; - TMSimpleStateTree stateTree; TMContext *contextPtr = GetContextPtr(tmRecPtr); TMShortCard i; ActionRec *actions = NULL; Boolean matchExact = False; Boolean match = False; StatePtr complexMatchState = NULL; - int currIndex; TMShortCard typeIndex = 0, modIndex = 0; int matchTreeIndex = TM_NO_MATCH; LOCK_PROCESS; - stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[0]; - for (i = 0; ((!match || !complexMatchState) && (i < xlations->numStateTrees)); i++){ - stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[i]; - currIndex = -1; + int currIndex = -1; + TMSimpleStateTree stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[i]; + /* * don't process this tree if we're only looking for a * complexMatchState and there are no complex states @@ -902,7 +900,7 @@ static int MatchComplexBranch( TMShortCard i; LOCK_PROCESS; - for (i = startIndex; i < stateTree->numComplexBranchHeads; i++) + for (i = (TMShortCard) startIndex; i < stateTree->numComplexBranchHeads; i++) { StatePtr candState; TMShortCard numMatches = context->numMatches; @@ -982,7 +980,7 @@ static StatePtr TryCurrentTree( XEvent *xev = curEventPtr->xev; unsigned long time = GetTime(tmRecPtr, xev); XtPerDisplay pd = _XtGetPerDisplay(xev->xany.display); - unsigned long delta = pd->multi_click_time; + unsigned long delta = (unsigned long) pd->multi_click_time; if ((tmRecPtr->lastEventTime + delta) >= time) { if (nextState->actions) { @@ -1094,7 +1092,7 @@ void _XtTranslateEvent ( XtAppWarningMsg(XtWidgetToApplicationContext(w), XtNtranslationError,"nullTable",XtCXtToolkitError, "Can't translate event through NULL table", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return ; } if (current_state == NULL) @@ -1185,7 +1183,7 @@ static EventMask EventToMask( unsigned long eventType = typeMatch->eventType; if (eventType == MotionNotify) { - Modifiers modifierMask = modMatch->modifierMask; + Modifiers modifierMask = (Modifiers) modMatch->modifierMask; Modifiers tempMask; returnMask = 0; @@ -1212,7 +1210,7 @@ static EventMask EventToMask( returnMask |= Button5MotionMask; return returnMask; } - returnMask = _XtConvertTypeToMask(eventType); + returnMask = _XtConvertTypeToMask((int)eventType); if (returnMask == (StructureNotifyMask|SubstructureNotifyMask)) returnMask = StructureNotifyMask; return returnMask; @@ -1256,7 +1254,6 @@ void _XtInstallTranslations( { XtTranslations xlations; Cardinal i; - TMStateTree stateTree; Boolean mappingNotifyInterest = False; xlations = widget->core.tm.translations; @@ -1282,11 +1279,11 @@ void _XtInstallTranslations( i < xlations->numStateTrees; i++) { - stateTree = xlations->stateTreeTbl[i]; + TMStateTree stateTree = xlations->stateTreeTbl[i]; _XtTraverseStateTree(stateTree, AggregateEventMask, (XtPointer)&xlations->eventMask); - mappingNotifyInterest |= stateTree->simple.mappingNotifyInterest; + mappingNotifyInterest = (Boolean) (mappingNotifyInterest | stateTree->simple.mappingNotifyInterest); } /* double click needs to make sure that you have selected on both button down and up. */ @@ -1328,7 +1325,6 @@ void _XtRemoveTranslations( Widget widget) { Cardinal i; - TMSimpleStateTree stateTree; Boolean mappingNotifyInterest = False; XtTranslations xlations = widget->core.tm.translations; @@ -1339,8 +1335,8 @@ void _XtRemoveTranslations( i < xlations->numStateTrees; i++) { - stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[i]; - mappingNotifyInterest |= stateTree->mappingNotifyInterest; + TMSimpleStateTree stateTree = (TMSimpleStateTree)xlations->stateTreeTbl[i]; + mappingNotifyInterest = (Boolean) (mappingNotifyInterest | stateTree->mappingNotifyInterest); } if (mappingNotifyInterest) RemoveFromMappingCallbacks(widget, (XtPointer)widget, NULL); @@ -1368,11 +1364,9 @@ void _XtDestroyTMData( if ((cBindData = (TMComplexBindData)widget->core.tm.proc_table)) { if (cBindData->isComplex) { - ATranslations aXlations, nXlations; - - nXlations = (ATranslations) cBindData->accel_context; + ATranslations nXlations = (ATranslations) cBindData->accel_context; while (nXlations){ - aXlations = nXlations; + ATranslations aXlations = nXlations; nXlations = nXlations->next; XtFree((char *)aXlations); } @@ -1400,7 +1394,7 @@ void XtUninstallTranslations( _XtUninstallTranslations(widget); if (XtIsRealized(widget) && oldMask) XSelectInput(XtDisplay(widget), XtWindow(widget), - XtBuildEventMask(widget)); + (long) XtBuildEventMask(widget)); hookobj = XtHooksOfDisplay(XtDisplayOfObject(widget)); if (XtHasCallbacks(hookobj, XtNchangeHook) == XtCallbackHasSome) { XtChangeHookDataRec call_data; @@ -1424,15 +1418,15 @@ XtTranslations _XtCreateXlations( TMShortCard i; xlations = (XtTranslations) - __XtMalloc(sizeof(TranslationData) + - (numStateTrees-1) * sizeof(TMStateTree)); + __XtMalloc((Cardinal)(sizeof(TranslationData) + + (size_t)(numStateTrees - 1) * sizeof(TMStateTree))); #ifdef TRACE_TM LOCK_PROCESS; if (_XtGlobalTM.numTms == _XtGlobalTM.tmTblSize) { - _XtGlobalTM.tmTblSize += 16; + _XtGlobalTM.tmTblSize = (TMShortCard)(_XtGlobalTM.tmTblSize + 16); _XtGlobalTM.tmTbl = (XtTranslations *) XtRealloc((char *)_XtGlobalTM.tmTbl, - _XtGlobalTM.tmTblSize * sizeof(XtTranslations)); + (Cardinal)(_XtGlobalTM.tmTblSize * sizeof(XtTranslations))); } _XtGlobalTM.tmTbl[_XtGlobalTM.numTms++] = xlations; UNLOCK_PROCESS; @@ -1464,7 +1458,7 @@ TMStateTree _XtParseTreeToStateTree( complexTree = XtNew(TMComplexStateTreeRec); complexTree->isSimple = False; - tableSize = parseTree->numComplexBranchHeads * sizeof(StatePtr); + tableSize = (unsigned) (parseTree->numComplexBranchHeads * sizeof(StatePtr)); complexTree->complexBranchHeadTbl = (StatePtr *) __XtMalloc(tableSize); XtMemmove(complexTree->complexBranchHeadTbl, @@ -1481,13 +1475,13 @@ TMStateTree _XtParseTreeToStateTree( simpleTree->refCount = 0; simpleTree->mappingNotifyInterest = parseTree->mappingNotifyInterest; - tableSize = parseTree->numBranchHeads * sizeof(TMBranchHeadRec); + tableSize = (unsigned) (parseTree->numBranchHeads * sizeof(TMBranchHeadRec)); simpleTree->branchHeadTbl = (TMBranchHead) __XtMalloc(tableSize); XtMemmove(simpleTree->branchHeadTbl, parseTree->branchHeadTbl, tableSize); simpleTree->numBranchHeads = parseTree->numBranchHeads; - tableSize = parseTree->numQuarks * sizeof(XrmQuark); + tableSize = (unsigned) (parseTree->numQuarks * sizeof(XrmQuark)); simpleTree->quarkTbl = (XrmQuark *) __XtMalloc(tableSize); XtMemmove(simpleTree->quarkTbl, parseTree->quarkTbl, tableSize); simpleTree->numQuarks = parseTree->numQuarks; @@ -1502,8 +1496,8 @@ static void FreeActions( TMShortCard i; for (action = actions; action;) { ActionPtr nextAction = action->next; - for (i = action->num_params; i;) { - XtFree( action->params[--i] ); + for (i = (TMShortCard) action->num_params; i;) { + XtFree( (_XtString)action->params[--i] ); } XtFree( (char*)action->params ); XtFree((char*) action); @@ -1536,7 +1530,7 @@ static void AmbigActions( XtWarningMsg (XtNtranslationError,"ambiguousActions", XtCXtToolkitError, "Overriding earlier translation manager actions.", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); FreeActions((*state)->actions); (*state)->actions = NULL; @@ -1581,7 +1575,7 @@ void _XtAddEventSeqToStateTree( if (eventSeq->event.eventType == MappingNotify) stateTree->mappingNotifyInterest = True; branchHead->hasActions = True; - branchHead->more = eventSeq->actions->idx; + XtSetBits(branchHead->more, eventSeq->actions->idx, 13); FreeActions(eventSeq->actions); eventSeq->actions = NULL; return; @@ -1590,7 +1584,7 @@ void _XtAddEventSeqToStateTree( branchHead->isSimple = False; if (!eventSeq->next) branchHead->hasActions = True; - branchHead->more = GetComplexBranchIndex(stateTree, typeIndex, modIndex); + XtSetBits(branchHead->more, GetComplexBranchIndex(stateTree, typeIndex, modIndex), 13); state = &stateTree->complexBranchHeadTbl[TMBranchMore(branchHead)]; for (;;) { @@ -1607,7 +1601,7 @@ void _XtAddEventSeqToStateTree( AmbigActions(initialEvent, state, stateTree); (*state)->actions = eventSeq->actions; #ifdef TRACE_TM - LOCK_PROCESS + LOCK_PROCESS; _XtGlobalTM.numComplexActions++; UNLOCK_PROCESS; #endif /* TRACE_TM */ @@ -1660,7 +1654,7 @@ Boolean _XtCvtMergeTranslations( if (*num_args != 0) XtWarningMsg("invalidParameters","mergeTranslations",XtCXtToolkitError, "MergeTM to TranslationTable needs no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); if (to->addr != NULL && to->size < sizeof(XtTranslations)) { to->size = sizeof(XtTranslations); @@ -1670,7 +1664,7 @@ Boolean _XtCvtMergeTranslations( first = ((TMConvertRec*)from->addr)->old; second = ((TMConvertRec*)from->addr)->new; - numStateTrees = first->numStateTrees + second->numStateTrees; + numStateTrees = (TMShortCard) (first->numStateTrees + second->numStateTrees); stateTrees = (TMStateTree *) XtStackAlloc(numStateTrees * sizeof(TMStateTree), stackStateTrees); @@ -1771,11 +1765,12 @@ static XtTranslations UnmergeTranslations( else first = NULL; - if (xlations->composers[1]) { + if (xlations->composers[0] + && xlations->composers[1]) { second = UnmergeTranslations(widget, xlations->composers[1], unmergeXlations, - currIndex + - xlations->composers[0]->numStateTrees, + (TMShortCard)(currIndex + + xlations->composers[0]->numStateTrees), oldBindings, numOldBindings, newBindings, numNewBindingsRtn); } @@ -1829,7 +1824,7 @@ static XtTranslations MergeTranslations( TMComplexBindProcs bindings; TMShortCard i, j; TMStateTree *treePtr; - TMShortCard numNew = *numNewRtn; + TMShortCard numNew; MergeBindRec bindPair[2]; /* If the new translation has an accelerator context then pull it @@ -1909,15 +1904,15 @@ static TMBindData MakeBindData( isComplex = (i < numBindings); if (isComplex) bytes = (sizeof(TMComplexBindDataRec) + - ((numBindings - 1) * + ((TMLongCard)(numBindings - 1) * sizeof(TMComplexBindProcsRec))); else bytes = (sizeof(TMSimpleBindDataRec) + - ((numBindings - 1) * + ((TMLongCard)(numBindings - 1) * sizeof(TMSimpleBindProcsRec))); - bindData = (TMBindData) __XtCalloc(sizeof(char), bytes); - bindData->simple.isComplex = isComplex; + bindData = (TMBindData) __XtCalloc((Cardinal) sizeof(char), (Cardinal) bytes); + XtSetBit(bindData->simple.isComplex, isComplex); if (isComplex) { TMComplexBindData cBindData = (TMComplexBindData)bindData; /* @@ -1962,7 +1957,7 @@ static Boolean ComposeTranslations( XtAppWarningMsg(XtWidgetToApplicationContext(dest), XtNtranslationError,"nullTable",XtCXtToolkitError, "table to (un)merge must not be null", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return False; } @@ -2021,7 +2016,7 @@ static Boolean ComposeTranslations( (&((TMSimpleBindData)bindData)->bindTbl[0]); } - numBytes =(((oldXlations ? oldXlations->numStateTrees : 0) + numBytes =(TMShortCard) ((size_t)((oldXlations ? oldXlations->numStateTrees : 0) + newXlations->numStateTrees) * sizeof(TMComplexBindProcsRec)); newBindings = (TMComplexBindProcs) XtStackAlloc(numBytes, stackBindings); XtBZero((char *)newBindings, numBytes); @@ -2062,7 +2057,7 @@ static Boolean ComposeTranslations( dest->core.tm.proc_table = (XtActionProc *) MakeBindData(newBindings, numNewBindings, bindData); - if (bindData) XtFree((char *)bindData); + XtFree((char *)bindData); dest->core.tm.translations = newTable; @@ -2073,7 +2068,7 @@ static Boolean ComposeTranslations( mask = newTable->eventMask; if (mask != oldMask) XSelectInput(XtDisplay(dest), XtWindow(dest), - XtBuildEventMask(dest)); + (long) XtBuildEventMask(dest)); } XtStackFree((XtPointer)newBindings, (XtPointer)stackBindings); return(newTable != NULL); @@ -2114,8 +2109,8 @@ XtTranslations _XtGetTranslationValue( Cardinal numBindings = xlations->numStateTrees; (*aXlationsPtr) = aXlations = (ATranslations) - __XtMalloc(sizeof(ATranslationData) + - (numBindings - 1) * sizeof(TMComplexBindProcsRec)); + __XtMalloc((Cardinal) (sizeof(ATranslationData) + + (numBindings - 1) * sizeof(TMComplexBindProcsRec))); aXlations->hasBindings = True; aXlations->xlations = xlations; @@ -2194,7 +2189,7 @@ void _XtFreeTranslations( XtAppWarningMsg(app, "invalidParameters","freeTranslations",XtCXtToolkitError, "Freeing XtTranslations requires no extra arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); xlations = *(XtTranslations*)toVal->addr; for (i = 0; i < (int)xlations->numStateTrees; i++) @@ -2210,7 +2205,6 @@ void XtInstallAccelerators( { XtTranslations aXlations; _XtTranslateOp op; - String buf; WIDGET_TO_APPCON(destination); /* @@ -2233,8 +2227,7 @@ void XtInstallAccelerators( if (ComposeTranslations(destination, op, source, aXlations) && (XtClass(source)->core_class.display_accelerator != NULL)) { - - buf = _XtPrintXlations(destination, aXlations, source, False); + _XtString buf = _XtPrintXlations(destination, aXlations, source, False); (*(XtClass(source)->core_class.display_accelerator))(source,buf); XtFree(buf); } @@ -2247,14 +2240,13 @@ void XtInstallAllAccelerators( Widget source) { Cardinal i; - CompositeWidget cw; WIDGET_TO_APPCON(destination); /* Recurse down normal children */ LOCK_APP(app); LOCK_PROCESS; if (XtIsComposite(source)) { - cw = (CompositeWidget) source; + CompositeWidget cw = (CompositeWidget) source; for (i = 0; i < cw->composite.num_children; i++) { XtInstallAllAccelerators(destination,cw->composite.children[i]); } diff --git a/lib/libXt/src/Threads.c b/lib/libXt/src/Threads.c index 7ae9e18f4..14954d079 100644 --- a/lib/libXt/src/Threads.c +++ b/lib/libXt/src/Threads.c @@ -199,8 +199,9 @@ AppUnlock(XtAppContext app) xmutex_unlock(app_lock->mutex); #else xthread_t self; - self = xthread_self(); + (void)self; + xmutex_lock(app_lock->mutex); assert(xthread_equal(app_lock->holder, self)); if (app_lock->level != 0) { @@ -236,7 +237,7 @@ YieldAppLock( unsigned ii; app_lock->stack.st = (struct _Tstack *) XtRealloc ((char *)app_lock->stack.st, - (app_lock->stack.size + STACK_INCR) * sizeof (struct _Tstack)); + (Cardinal)((app_lock->stack.size + STACK_INCR) * sizeof (struct _Tstack))); ii = app_lock->stack.size; app_lock->stack.size += STACK_INCR; for ( ; ii < app_lock->stack.size; ii++) { diff --git a/lib/libXt/src/VarCreate.c b/lib/libXt/src/VarCreate.c index 0fba379bb..896935df2 100644 --- a/lib/libXt/src/VarCreate.c +++ b/lib/libXt/src/VarCreate.c @@ -79,9 +79,8 @@ _XtVaCreateWidget( widget = _XtCreateWidget(name, widget_class, parent, (ArgList)NULL, (Cardinal)0, typed_args, num_args); - if (typed_args != NULL) { - XtFree((XtPointer)typed_args); - } + + XtFree((XtPointer)typed_args); return widget; } @@ -165,9 +164,8 @@ XtVaAppCreateShell( _XtVaToTypedArgList(var, total_count, &typed_args, &num_args); widget = _XtAppCreateShell((String)name, (String)class, widget_class, display, (ArgList)NULL, (Cardinal)0, typed_args, num_args); - if (typed_args != NULL) { - XtFree((XtPointer)typed_args); - } + + XtFree((XtPointer)typed_args); va_end(var); UNLOCK_APP(app); @@ -199,9 +197,8 @@ XtVaCreatePopupShell( _XtVaToTypedArgList(var, total_count, &typed_args, &num_args); widget = _XtCreatePopupShell((String)name, widget_class, parent, (ArgList)NULL, (Cardinal)0, typed_args, num_args); - if (typed_args != NULL) { - XtFree((XtPointer)typed_args); - } + + XtFree((XtPointer)typed_args); va_end(var); UNLOCK_APP(app); @@ -254,9 +251,7 @@ XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resource XtSetSubvalues(base, resources, num_resources, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); va_end(var); } @@ -268,7 +263,7 @@ _XtVaOpenApplication( XrmOptionDescList options, Cardinal num_options, int *argc_in_out, - String *argv_in_out, + _XtString *argv_in_out, String *fallback_resources, WidgetClass widget_class, va_list var_args) @@ -303,7 +298,7 @@ _XtVaOpenApplication( count++; typed_args = (XtTypedArgList) XtRealloc((char *) typed_args, - (unsigned) (count + 1) * sizeof(XtTypedArg)); + (Cardinal) ((size_t)(count + 1) * sizeof(XtTypedArg))); } typed_args[count].name = NULL; @@ -333,7 +328,7 @@ _XtVaAppInitialize( XrmOptionDescList options, Cardinal num_options, int *argc_in_out, - String *argv_in_out, + _XtString *argv_in_out, String *fallback_resources, va_list var_args) { @@ -357,17 +352,20 @@ XtVaOpenApplication( XrmOptionDescList options, Cardinal num_options, int *argc_in_out, - String *argv_in_out, + _XtString *argv_in_out, String *fallback_resources, WidgetClass widget_class, ...) { + Widget code; va_list var; va_start(var, widget_class); - return _XtVaOpenApplication(app_context_return, (String)application_class, + code = _XtVaOpenApplication(app_context_return, (String)application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, widget_class, var); + va_end(var); + return code; } Widget @@ -377,17 +375,20 @@ XtVaAppInitialize( XrmOptionDescList options, Cardinal num_options, int *argc_in_out, - String *argv_in_out, + _XtString *argv_in_out, String *fallback_resources, ...) { + Widget code; va_list var; va_start(var, fallback_resources); - return _XtVaOpenApplication(app_context_return, (String)application_class, + code = _XtVaOpenApplication(app_context_return, (String)application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, applicationShellWidgetClass, var); + va_end(var); + return code; } #endif /* !((SUNSHLIB || AIXSHLIB) && SHAREDCODE) */ diff --git a/lib/libXt/src/VarGet.c b/lib/libXt/src/VarGet.c index 7b4cea65d..273689993 100644 --- a/lib/libXt/src/VarGet.c +++ b/lib/libXt/src/VarGet.c @@ -86,9 +86,7 @@ XtVaGetSubresources( _XtGetSubresources(widget, base, name, class, resources, num_resources, NULL, 0, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); va_end(var); UNLOCK_APP(app); @@ -116,9 +114,7 @@ XtVaGetApplicationResources(Widget widget, XtPointer base, XtResourceList resour _XtGetApplicationResources(widget, base, resources, num_resources, NULL, 0, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); va_end(var); UNLOCK_APP(app); @@ -153,7 +149,7 @@ GetTypedArg( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "unknownType", XtNxtGetTypedArg, XtCXtToolkitError, "Unable to find type of resource for conversion", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return; } @@ -165,7 +161,7 @@ GetTypedArg( from_val.size = from_size; from_val.addr = (XPointer)value; to_val.addr = (XPointer)typed_arg->value; - to_val.size = typed_arg->size; + to_val.size = (unsigned) typed_arg->size; if (!XtConvertAndStore(widget, from_type, &from_val, typed_arg->type, &to_val)) { @@ -238,47 +234,47 @@ XtVaGetValues(Widget widget, ...) _XtCountVaList(var, &total_count, &typed_count); if (total_count != typed_count) { - args = (ArgList)__XtMalloc((unsigned)((total_count - typed_count) - * sizeof(Arg))); + size_t limit = (size_t)(total_count - typed_count); + args = (ArgList)__XtMalloc((unsigned)(limit * sizeof(Arg))); } else args = NULL; /* for lint; really unused */ va_end(var); - va_start(var,widget); - for(attr = va_arg(var, String), count = 0 ; attr != NULL; - attr = va_arg(var, String)) { - if (strcmp(attr, XtVaTypedArg) == 0) { - typed_arg.name = va_arg(var, String); - typed_arg.type = va_arg(var, String); - typed_arg.value = va_arg(var, XtArgVal); - typed_arg.size = va_arg(var, int); - - if (resources == NULL) { - XtGetResourceList(XtClass(widget), &resources,&num_resources); - } - - GetTypedArg(widget, &typed_arg, resources, num_resources); - } else if (strcmp(attr, XtVaNestedList) == 0) { - if (resources == NULL) { - XtGetResourceList(XtClass(widget),&resources, &num_resources); + if (args != NULL) { + va_start(var,widget); + for(attr = va_arg(var, String), count = 0 ; attr != NULL; + attr = va_arg(var, String)) { + if (strcmp(attr, XtVaTypedArg) == 0) { + typed_arg.name = va_arg(var, String); + typed_arg.type = va_arg(var, String); + typed_arg.value = va_arg(var, XtArgVal); + typed_arg.size = va_arg(var, int); + + if (resources == NULL) { + XtGetResourceList(XtClass(widget), &resources,&num_resources); + } + + GetTypedArg(widget, &typed_arg, resources, num_resources); + } else if (strcmp(attr, XtVaNestedList) == 0) { + if (resources == NULL) { + XtGetResourceList(XtClass(widget),&resources, &num_resources); + } + + count += GetNestedArg(widget, va_arg(var, XtTypedArgList), + (args+count), resources, num_resources); + } else { + args[count].name = attr; + args[count].value = va_arg(var, XtArgVal); + count ++; } - - count += GetNestedArg(widget, va_arg(var, XtTypedArgList), - (args+count), resources, num_resources); - } else { - args[count].name = attr; - args[count].value = va_arg(var, XtArgVal); - count ++; } + va_end(var); } - va_end(var); - if (resources != (XtResourceList)NULL) { - XtFree((XtPointer)resources); - } + XtFree((XtPointer)resources); - if (total_count != typed_count) { - XtGetValues(widget, args, count); + if (args != NULL) { + XtGetValues(widget, args, (Cardinal) count); XtFree((XtPointer)args); } UNLOCK_APP(app); @@ -307,7 +303,5 @@ XtVaGetSubvalues(XtPointer base,XtResourceList resources, Cardinal num_resource XtGetSubvalues(base, resources, num_resources, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); } diff --git a/lib/libXt/src/Varargs.c b/lib/libXt/src/Varargs.c index b33e287d8..76bbeb9a9 100644 --- a/lib/libXt/src/Varargs.c +++ b/lib/libXt/src/Varargs.c @@ -138,7 +138,7 @@ XtTypedArgList _XtVaCreateTypedArgList(va_list var, register int count) XtTypedArgList avlist; avlist = (XtTypedArgList) - __XtCalloc((int)count + 1, (unsigned)sizeof(XtTypedArg)); + __XtCalloc((Cardinal)count + 1, (unsigned)sizeof(XtTypedArg)); for(attr = va_arg(var, String), count = 0; attr != NULL; attr = va_arg(var, String)) { @@ -185,7 +185,7 @@ TypedArgToArg( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "nullWidget", XtNxtConvertVarToArgList, XtCXtToolkitError, "XtVaTypedArg conversion needs non-NULL widget handle", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return(0); } @@ -201,12 +201,12 @@ TypedArgToArg( XtAppWarningMsg(XtWidgetToApplicationContext(widget), "unknownType", XtNxtConvertVarToArgList, XtCXtToolkitError, "Unable to find type of resource for conversion", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return(0); } to_val.addr = NULL; - from_val.size = typed_arg->size; + from_val.size = (Cardinal) typed_arg->size; if ((strcmp(typed_arg->type, XtRString) == 0) || ((unsigned) typed_arg->size > sizeof(XtArgVal))) { from_val.addr = (XPointer)typed_arg->value; @@ -221,7 +221,7 @@ TypedArgToArg( UNLOCK_PROCESS; XtAppWarningMsg(XtWidgetToApplicationContext(widget), "conversionFailed", XtNxtConvertVarToArgList, XtCXtToolkitError, - "Type conversion failed", (String *)NULL, (Cardinal *)NULL); + "Type conversion failed", NULL, NULL); return(0); } @@ -243,8 +243,8 @@ TypedArgToArg( else if (to_val.size == sizeof(XtArgVal)) arg_return->value = *(XtArgVal *)to_val.addr; else if (to_val.size > sizeof(XtArgVal)) { - arg_return->value = (XtArgVal) __XtMalloc(to_val.size); - memory_return->value = (XtArgVal) + arg_return->value = (XtArgVal) (void *) __XtMalloc(to_val.size); + if ((memory_return->value = arg_return->value) != 0) memcpy((void *)arg_return->value, to_val.addr, to_val.size); } } @@ -312,16 +312,16 @@ NestedArgtoArg( void _XtFreeArgList( ArgList args, /* as returned by _XtVaToArgList */ - int total_count, /* argument count returned by _XtCountVaList */ + int total_count, /* argument count returned by _XtCountVaList */ int typed_count) /* typed arg count returned by _XtCountVaList */ { - ArgList p; - if (args) { - if (typed_count) + if (typed_count) { + ArgList p; for (p = args + total_count; total_count--; ++p) { XtFree((char *)p->value); } + } XtFree((char *)args); } } @@ -350,7 +350,7 @@ _XtVaToArgList( ArgList args = (ArgList)NULL; XtTypedArg typed_arg; XtResourceList resources = (XtResourceList)NULL; - Cardinal num_resources; + Cardinal num_resources = 0; Boolean fetched_resource_list = False; if (max_count == 0) { @@ -359,45 +359,49 @@ _XtVaToArgList( return; } - args = (ArgList)__XtMalloc((unsigned)(max_count * 2 * sizeof(Arg))); - for (count = max_count * 2; --count >= 0; ) - args[count].value = (XtArgVal) NULL; - count = 0; - - for(attr = va_arg(var, String) ; attr != NULL; - attr = va_arg(var, String)) { - if (strcmp(attr, XtVaTypedArg) == 0) { - typed_arg.name = va_arg(var, String); - typed_arg.type = va_arg(var, String); - typed_arg.value = va_arg(var, XtArgVal); - typed_arg.size = va_arg(var, int); - - /* if widget is NULL, typed args are ignored */ - if (widget != NULL) { - if (!fetched_resource_list) { - GetResources(widget, &resources, &num_resources); - fetched_resource_list = True; + args = (ArgList)__XtMalloc((Cardinal)((size_t)(max_count * 2) * sizeof(Arg))); + if (args) { + for (count = max_count * 2; --count >= 0; ) + args[count].value = (XtArgVal) NULL; + count = 0; + + for(attr = va_arg(var, String) ; attr != NULL; + attr = va_arg(var, String)) { + if (strcmp(attr, XtVaTypedArg) == 0) { + typed_arg.name = va_arg(var, String); + typed_arg.type = va_arg(var, String); + typed_arg.value = va_arg(var, XtArgVal); + typed_arg.size = va_arg(var, int); + + /* if widget is NULL, typed args are ignored */ + if (widget != NULL) { + if (!fetched_resource_list) { + GetResources(widget, &resources, &num_resources); + fetched_resource_list = True; + } + count += TypedArgToArg(widget, &typed_arg, &args[count], + resources, num_resources, + &args[max_count + count]); } - count += TypedArgToArg(widget, &typed_arg, &args[count], - resources, num_resources, - &args[max_count + count]); - } - } else if (strcmp(attr, XtVaNestedList) == 0) { - if (widget != NULL) { - if (!fetched_resource_list) { - GetResources(widget, &resources, &num_resources); - fetched_resource_list = True; + } else if (strcmp(attr, XtVaNestedList) == 0) { + if (widget != NULL) { + if (!fetched_resource_list) { + GetResources(widget, &resources, &num_resources); + fetched_resource_list = True; + } } - } - count += NestedArgtoArg(widget, va_arg(var, XtTypedArgList), - &args[count], resources, num_resources, - &args[max_count + count]); - } else { - args[count].name = attr; - args[count].value = va_arg(var, XtArgVal); - count ++; + count += NestedArgtoArg(widget, va_arg(var, XtTypedArgList), + &args[count], resources, num_resources, + &args[max_count + count]); + } else { + args[count].name = attr; + args[count].value = va_arg(var, XtArgVal); + count ++; + } } + } else { + count = 0; } XtFree((XtPointer)resources); @@ -407,7 +411,7 @@ _XtVaToArgList( } /* Function Name: GetResources - * Description: Retreives the normal and constraint resources + * Description: Retrieves the normal and constraint resources * for this widget. * Arguments: widget - the widget. * RETURNED res_list - the list of resource for this widget @@ -435,7 +439,7 @@ GetResources( cons_top = constraint; *res_list = (XtResourceList) XtRealloc((char*)*res_list, - ((*number + num_constraint) * + (Cardinal)((*number + num_constraint) * sizeof(XtResource))); for (temp= num_constraint, res= *res_list + *number; temp != 0; temp--) @@ -491,7 +495,7 @@ _XtVaToTypedArgList( int count; args = (XtTypedArgList) - __XtMalloc((unsigned)(max_count * sizeof(XtTypedArg))); + __XtMalloc((Cardinal)((size_t) max_count * sizeof(XtTypedArg))); for(attr = va_arg(var, String), count = 0 ; attr != NULL; attr = va_arg(var, String)) { @@ -513,5 +517,5 @@ _XtVaToTypedArgList( } *args_return = args; - *num_args_return = count; + *num_args_return = (Cardinal) count; } diff --git a/lib/libXt/test-driver b/lib/libXt/test-driver index 8e575b017..b8521a482 100644 --- a/lib/libXt/test-driver +++ b/lib/libXt/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 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 @@ -16,7 +16,7 @@ scriptversion=2013-07-13.22; # 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 @@ -140,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # 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: diff --git a/lib/libXt/util/Makefile.am b/lib/libXt/util/Makefile.am index 800b35b43..f2dd1f959 100644 --- a/lib/libXt/util/Makefile.am +++ b/lib/libXt/util/Makefile.am @@ -11,7 +11,6 @@ EXTRA_DIST = \ StrDefs.ht \ string.list -AM_CFLAGS = $(XT_CFLAGS) makestrs_SOURCES = makestrs.c diff --git a/lib/libXt/util/Makefile.in b/lib/libXt/util/Makefile.in index ff35e4337..412882f9f 100644 --- a/lib/libXt/util/Makefile.in +++ b/lib/libXt/util/Makefile.in @@ -284,7 +284,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = Shell.ht StrDefs.ct StrDefs.ht string.list $(appman_PRE) -AM_CFLAGS = $(XT_CFLAGS) makestrs_SOURCES = makestrs.c # Man page diff --git a/lib/libXt/util/makestrs.c b/lib/libXt/util/makestrs.c index 576484999..774faa441 100644 --- a/lib/libXt/util/makestrs.c +++ b/lib/libXt/util/makestrs.c @@ -35,7 +35,7 @@ typedef struct _TableEnt { struct _TableEnt* next; char* left; char* right; - int offset; + size_t offset; } TableEnt; typedef struct _Table { @@ -44,7 +44,7 @@ typedef struct _Table { TableEnt* tableentcurrent; TableEnt** tableenttail; char* name; - int offset; + size_t offset; } Table; typedef struct _File { @@ -88,7 +88,7 @@ static int solaris_abi_names = FALSE; * commandline. Needed to separate source and build directories. */ static char* includedir = NULL; -static FILE *ifopen(const char *file, const char *mode) +static FILE *ifopen(const char *myfile, const char *mode) { #ifndef HAVE_ASPRINTF size_t len; @@ -97,18 +97,18 @@ static FILE *ifopen(const char *file, const char *mode) FILE *ret; if (includedir == NULL) - return fopen(file, mode); + return fopen(myfile, mode); #ifdef HAVE_ASPRINTF - if (asprintf(&buffer, "%s/%s", includedir, file) == -1) + if (asprintf(&buffer, "%s/%s", includedir, myfile) == -1) return NULL; #else - len = strlen(file) + strlen(includedir) + 1; + len = strlen(myfile) + strlen(includedir) + 1; buffer = (char*)malloc(len + 1); if (buffer == NULL) return NULL; - snprintf(buffer, len + 1, "%s/%s", includedir, file); + snprintf(buffer, len + 1, "%s/%s", includedir, myfile); #endif ret = fopen(buffer, mode); @@ -123,7 +123,7 @@ static void WriteHeaderProlog (FILE *f, File *phile) TableEnt* te; (void) fprintf (f, "#ifdef %s\n", featurestr); - for (t = phile->table; t; t = t->next) + for (t = phile->table; t; t = t->next) { for (te = t->tableent; te; te = te->next) { if (strcmp (te->left, "RAtom") == 0) { (void) fprintf (f, @@ -135,6 +135,7 @@ static void WriteHeaderProlog (FILE *f, File *phile) prefixstr, te->left, te->right); } } + } (void) fprintf (f, "%s", "#else\n"); } @@ -148,10 +149,12 @@ static void IntelABIWriteHeader (FILE *f, File *phile) for (t = phile->table; t; t = t->next) { (void) fprintf (f, "%s %sConst char %s[];\n", externrefstr, conststr ? conststr : fileprotstr, t->name); - for (te = t->tableent; te; te = te->next) + for (te = t->tableent; te; te = te->next) { (void) fprintf (f, - "#ifndef %s%s\n#define %s%s ((char*)&%s[%d])\n#endif\n", - prefixstr, te->left, prefixstr, te->left, t->name, te->offset); + "#ifndef %s%s\n#define %s%s ((String)&%s[%lu])\n#endif\n", + prefixstr, te->left, prefixstr, te->left, t->name, + (unsigned long) te->offset); + } } (void) fprintf (f, "#endif /* %s */\n", featurestr); @@ -162,10 +165,12 @@ static void SPARCABIWriteHeader (FILE *f, File *phile) Table* t; TableEnt* te; - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { (void) fprintf (f, "#define %s%s \"%s\"\n", prefixstr, te->left, te->right); + } + } } static void FunctionWriteHeader (FILE *f, File *phile) @@ -179,12 +184,14 @@ static void FunctionWriteHeader (FILE *f, File *phile) externrefstr, conststr ? conststr : fileprotstr, phile->table->name); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { (void) fprintf (f, - "#ifndef %s%s\n#define %s%s (%s(%d))\n#endif\n", + "#ifndef %s%s\n#define %s%s (%s(%lu))\n#endif\n", prefixstr, te->left, prefixstr, te->left, phile->table->name, - te->offset); + (unsigned long) te->offset); + } + } (void) fprintf (f, "#endif /* %s */\n", featurestr); } @@ -196,13 +203,15 @@ static void ArrayperWriteHeader (FILE *f, File *phile) WriteHeaderProlog (f, phile); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { (void) fprintf (f, "#ifndef %s%s\n%s %sConst char %s%s[];\n#endif\n", prefixstr, te->left, externrefstr, conststr ? conststr : fileprotstr, prefixstr, te->left); + } + } (void) fprintf (f, "#endif /* %s */\n", featurestr); } @@ -218,12 +227,14 @@ static void DefaultWriteHeader (FILE *f, File *phile) externrefstr, conststr ? conststr : fileprotstr, phile->table->name); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { (void) fprintf (f, - "#ifndef %s%s\n#define %s%s ((char*)&%s[%d])\n#endif\n", + "#ifndef %s%s\n#define %s%s ((String)&%s[%lu])\n#endif\n", prefixstr, te->left, prefixstr, te->left, phile->table->name, - te->offset); + (unsigned long) te->offset); + } + } (void) fprintf (f, "#endif /* %s */\n", featurestr); } @@ -232,7 +243,7 @@ static void CopyTmplProlog (FILE *tmpl, FILE *f) { char buf[1024]; static const char* magic_string = X_MAGIC_STRING; - int magic_string_len = strlen (magic_string); + size_t magic_string_len = strlen (magic_string); while (fgets (buf, sizeof buf, tmpl)) { if (strncmp (buf, magic_string, magic_string_len) == 0) { @@ -316,7 +327,7 @@ static void WriteSourceLine (TableEnt *te, int abi, int fudge) (void) printf ("%s", "\n"); } -static const char* const_string = "%s %sConst char %s[] = {\n"; +#define const_string "%s %sConst char %s[] = {\n" static void IntelABIWriteSource (int abi) { @@ -329,8 +340,9 @@ static void IntelABIWriteSource (int abi) for (t = phile->table; t; t = t->next) { (void) printf (const_string, externdefstr, conststr ? conststr : "", t->name); - for (te = t->tableent; te; te = te->next) + for (te = t->tableent; te; te = te->next) { WriteSourceLine (te, abi, 0); + } (void) printf ("%s\n\n", "};"); } } @@ -347,17 +359,21 @@ static void IntelABIBCWriteSource (int abi) (void) printf (const_string, externdefstr, conststr ? conststr : "", phile->table->name); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { WriteSourceLine (te, abi, t->next ? 1 : 0); + } + } (void) printf ("%s\n\n", "};"); if (phile->table->next) { (void) printf (const_string, externdefstr, conststr ? conststr : "", phile->table->next->name); - for (t = phile->table->next; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table->next; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { WriteSourceLine (te, abi, 0); + } + } (void) printf ("%s\n\n", "};"); } } @@ -374,9 +390,11 @@ static void FunctionWriteSource (int abi) (void) printf ("static %sConst char _%s[] = {\n", conststr ? conststr : "", phile->table->name); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { WriteSourceLine (te, abi, t->next ? 1 : 0); + } + } (void) printf ("%s\n\n", "};"); (void) printf ("%sConst char* %s(index)\n int index;\n{\n return &_%s[index];\n}\n\n", @@ -394,7 +412,7 @@ static void ArrayperWriteSource (int abi) Table* t; TableEnt* te; - for (t = phile->table; t; t = t->next) + for (t = phile->table; t; t = t->next) { for (te = t->tableent; te; te = te->next) { if (strcmp (te->left, "RAtom") == 0) { if (done_atom) return; @@ -405,6 +423,7 @@ static void ArrayperWriteSource (int abi) prefixstr, te->left, te->right); } + } } } @@ -419,9 +438,11 @@ static void DefaultWriteSource (int abi) (void) printf (const_string, externdefstr, conststr ? conststr : "", phile->table->name); - for (t = phile->table; t; t = t->next) - for (te = t->tableent; te; te = te->next) + for (t = phile->table; t; t = t->next) { + for (te = t->tableent; te; te = te->next) { WriteSourceLine (te, abi, t->next ? 1 : 0); + } + } (void) printf ("%s\n\n", "};"); } } @@ -457,7 +478,10 @@ static void WriteSource(char *tagline, int abi) (*sourceproc[abi])(abi); - if (tmpl) CopyTmplEpilog (tmpl, stdout); + if (tmpl) { + CopyTmplEpilog (tmpl, stdout); + fclose(tmpl); + } } static void DoLine(char *buf) @@ -586,9 +610,9 @@ static void DoLine(char *buf) { char* right; TableEnt* tableent; - int llen; - int rlen; - int len; + size_t llen; + size_t rlen; + size_t len; if ((right = strchr(buf, ' '))) *right++ = 0; @@ -602,7 +626,8 @@ static void DoLine(char *buf) llen = len = strlen(buf) + 1; rlen = strlen(right) + 1; if (right != buf + 1) len += rlen; - if ((tableent = (TableEnt*)malloc(sizeof(TableEnt) + len)) == NULL) + tableent = (TableEnt*)calloc(sizeof(TableEnt) + len, 1); + if (tableent == NULL) exit(1); tableent->left = (char *)(tableent + 1); strcpy(tableent->left, buf); @@ -622,44 +647,46 @@ static void DoLine(char *buf) } } -static void IntelABIIndexEntries (File *file) +static void IntelABIIndexEntries (File *myfile) { Table* t; TableEnt* te; - for (t = file->table; t; t = t->next) + for (t = myfile->table; t; t = t->next) { for (te = t->tableent; te; te = te->next) { te->offset = t->offset; t->offset += strlen (te->right); t->offset++; + } } } -static void DefaultIndexEntries (File *file) +static void DefaultIndexEntries (File *myfile) { Table* t; TableEnt* te; - int offset = 0; + size_t offset = 0; - for (t = file->table; t; t = t->next) + for (t = myfile->table; t; t = t->next) { for (te = t->tableent; te; te = te->next) { te->offset = offset; offset += strlen (te->right); offset++; + } } } -static void IndexEntries (File *file, int abi) +static void IndexEntries (File *myfile, int abi) { switch (abi) { case X_SPARC_ABI: break; case X_INTEL_ABI: case X_INTEL_ABI_BC: - IntelABIIndexEntries (file); + IntelABIIndexEntries (myfile); break; default: - DefaultIndexEntries (file); + DefaultIndexEntries (myfile); break; } } @@ -669,12 +696,12 @@ static char* DoComment (char *line) char* tag; char* eol; char* ret; - int len; + size_t len; /* assume that the first line with two '$' in it is the RCS tag line */ if ((tag = strchr (line, '$')) == NULL) return NULL; if ((eol = strchr (tag + 1, '$')) == NULL) return NULL; - len = eol - tag; + len = (size_t)(eol - tag); if ((ret = malloc (len)) == NULL) exit (1); (void) strncpy (ret, tag + 1, len - 1); @@ -684,7 +711,7 @@ static char* DoComment (char *line) int main(int argc, char *argv[]) { - int len, i; + size_t len; char* tagline = NULL; File* phile; FILE *f; @@ -698,6 +725,7 @@ int main(int argc, char *argv[]) f = stdin; if (argc > 1) { + int i; for (i = 1; i < argc; i++) { if (strcmp (argv[i], "-f") == 0) { if (++i < argc) @@ -706,10 +734,12 @@ int main(int argc, char *argv[]) return 1; } if (strcmp (argv[i], "-i") == 0) { - if (++i < argc) + if (++i < argc) { includedir = argv[i]; - else + } else { + if (f != 0 && f != stdin) fclose(f); return 1; + } } if (strcmp (argv[i], "-sparcabi") == 0) abi = X_SPARC_ABI; |