diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-08-09 17:51:46 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-08-09 17:51:46 +0000 |
commit | 12450a96cc8ed9d0442062cc77a69aaefe98f3f5 (patch) | |
tree | 46168cb038fff76345cc1af67afd7f65157ce5a4 /lib/libXaw | |
parent | 32207585e8391a525723e468eff64411b1dcd62b (diff) |
Update to libXaw 1.0.14
Diffstat (limited to 'lib/libXaw')
109 files changed, 3962 insertions, 2879 deletions
diff --git a/lib/libXaw/ChangeLog b/lib/libXaw/ChangeLog index 184019513..bc7caaaa3 100644 --- a/lib/libXaw/ChangeLog +++ b/lib/libXaw/ChangeLog @@ -1,3 +1,793 @@ +commit 9cfeba9db7f3ac4e0b351969c9ff5ab8f58ec7ef +Author: Matt Turner <mattst88@gmail.com> +Date: Sat Mar 27 13:38:39 2021 -0400 + + libXaw 1.0.14 + + Signed-off-by: Matt Turner <mattst88@gmail.com> + +commit 197e9d055f3cd351ae73551955ff463294b965bf +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Nov 26 19:05:01 2019 -0500 + + compiler-warning fixes for const-mismatches, no object-change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9f5025729992607eaac987f7f82208018af84fb6 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Nov 25 20:49:28 2019 -0500 + + reduce compiler warnings using casts, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4ea048a88a378d05bfef1633bcafae17a757e024 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Nov 25 19:15:33 2019 -0500 + + fix compiler warning by updating parameter type for call to XtDisplayInitialize + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 78f66e92c66ad637da33df454a7aae149476e765 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Nov 25 17:57:14 2019 -0500 + + change COMMON_CFLAGS and COMMON_CPPFLAGS to AM_CFLAGS and AM_CPPFLAGS + respectively so the default .c.o rule works (needed for the "Regress" + script). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 15860a8e2804243777c1e3d1fc997b9d6a500cb5 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Jul 6 06:33:35 2019 -0400 + + use _X_UNUSED to quiet unused-parameter warnings + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 70fb870ca41cd2a5f9c46ad0244004bd7f808202 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 21:04:03 2019 -0400 + + fix some compiler warnings in MenuButton.c by changing the menu name from String to char* + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit a68226ab5e620a49cfedbe01b437d1ebac2adf9b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:37:07 2019 -0400 + + fix some type/conversion warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7a6b35790865bd40009eef58d0a4d504b2fce0c8 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:33:22 2019 -0400 + + fix some type/conversion warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9b4f070bfb7cbaad22b03d2d38b338e82cbf80c0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:30:02 2019 -0400 + + fix misleading indentation, which gave a compiler warning + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 29144b39e9b7e5bad43b5e6013ecb4cfac049bd5 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:25:01 2019 -0400 + + fix some type/conversion compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit ccca832690f7ee56469786d7926e79f219259cea +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:21:18 2019 -0400 + + fix some type/conversion compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 666ecd9890cef9726cd29da7acb3e397ca90442b +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:18:45 2019 -0400 + + fix some type/conversion compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e1fc6483141c483c1b5e1bfb67fc443faaa314e3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:06:00 2019 -0400 + + fix some type/comparison compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5ea7395991b55b0b7ce8cc1dcaafc37e2b8b9d46 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 20:00:26 2019 -0400 + + change a couple of variable-types to reduce compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 30a9013124591c253254255dbda16bdd516c2e9a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 19:54:00 2019 -0400 + + fix a missing struct-initializer, and quiet unused-parameter warnings + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9836ef1ff74744dc8316b762baf9f9f5f70bbd8f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 19:50:15 2019 -0400 + + change variables to/from char* vs String to reduce compiler warnings (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d7a86b4b9017c67fbdabd4e6006fba6689c63ed1 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 19:47:45 2019 -0400 + + quiet some more type-conversion warnings, as well as unused-parameters + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c22df47605e3e5230addea2fc9a531fb0b84339d +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 19:35:02 2019 -0400 + + trim some stray backslashes leftover from nroff, and fix some whitespace in code samples + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit dc53edf2132fa7a25a75e2f8f12ed4623c4cbb2a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Thu Jul 4 14:46:44 2019 -0400 + + add --disable-const option, from libXt + +commit 89d3815e07e883f7f399b69c709518667af179a0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:55:07 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit bca947bda79e992b1bd0537ad68fedc9740188e3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:55:56 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 88dabfee7a5a45ef747f4e3367c1705cddfd871a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:08 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit bc737a82007a880c6d17d2334bf85346640409e7 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:16 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit cc3f0b591987c8edd0c573479c9df34fda253c06 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:28 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2a14a606cb23843ca6c4ba5b8546cc54bccbb29a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:38 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 40af785c9cbe82c0caf3d143980f4e92d1ac3f67 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:46 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 5abff2885ddcb9fc1732bf00ebad9bf09e08c2cc +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:56:55 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit eeea8a6b2b84ef2a3f50387d1ae99037b692a3f4 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:57:05 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 729e6f0b05664952f04865f2c0143524d4ac01d3 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:57:16 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 58d4568a6b685a7f0bce2e2af238b5a54edbbde7 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:57:26 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d01732e7cddfb08fe16e6c2e673ee1bb78bd18bc +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:57:34 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7b3ba952e590c975c6e6bf2d64fb04dab0959272 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:57:51 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 0dd86d04aa36dd592c6720c7653a0246345ddbc1 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:00 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit b3ce7ce658b4336bca487aa1c9e7689622db4211 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:08 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 3afd76ce8640b1bff299ada10af6faa7ae41e21c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:17 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 32fdbc4cf763dbf7307414f7e3b0e0ea744bc3d5 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:25 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 380dfc6ea9ea7f2ca2a0378f4bdeb1c52ad341b4 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:33 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit d4db24bbb20434bee94d7c7df95bbd43c8d5ea7c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:40 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9adace08e31dbebe6733c173e5c47157e1ce13bf +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:48 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 56aaaca5ab452ff2a06ebcd27c1b69e603ee9807 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:58:57 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e088c92de5014446409da027a6314ea3d2b0491a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:59:12 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 0561f5dbd9504e1d16041272e71914faa0a5f21c +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:59:21 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit e53025f667a3c85eb2e2ea97047d9ee8839afac4 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:59:28 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 834371d9f5ab3aed734bb10dbba224f780f080e4 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 09:59:36 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 58106a04c8ac4b13b50c420fe8f0e9451253ff0f +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:49:53 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fe2e19befb423cd8d709dcac494734c2496744f1 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:04 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 88edd1c49afc62da1a7cd8a3c80f9bd85ef25a44 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:12 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2bf5b17770af9e79a6370e992dc3fb43d4c5a5f0 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:22 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit fa416f3488e248616186bccfcfdce3e0c8992a32 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:30 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit b5a234bcd12f1c1e235fd882b913ec63f9c69cb2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:39 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 4739c329307ec58adfe10d76236354fa36b74b7a +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:50:55 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit c35e10f93b4f93de81fed3b128dabb7db2a490c9 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:51:03 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 9b9d0ee75990fcba5643c13611a56d25627846d2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:51:10 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 6859e8208de83cb6ad280aea5255f1b505ba8c38 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:51:21 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 2823d6c1ccc4b8311c6f611171067a2df78b7b46 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:51:28 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 11bc3a8d8a93cd3cf49f2a1736a4db4dd7d4d8fc +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Wed Jul 3 15:51:40 2019 -0400 + + add casts to quiet gcc conversion-warnings, no object change + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 7daff9f7e522d2ba5f303847df8ec20e93f27583 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Mon Jul 1 19:11:17 2019 -0400 + + build-fixes when _CONST_X_STRING is defined + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 894617e0220c3018d73081191699d135dcb19dc1 +Author: Jon Turney <jon.turney@dronecode.org.uk> +Date: Mon Jun 3 21:26:25 2019 +0100 + + Avoid warning about missing getpagesize() prototype on Windows + + Work-around AC_CHECK_FUNCS([getpagesize]) reporting a false positive + when using MinGW gcc, due to it being present in libgcc.a, which results + in trying to use it without a prototype. + + Future work: This value control the default memory allocation size for + text widgets. If there's some reason why a fallback to using BUFSIZ is + bad, we could use the actual pagesize instead. + +commit c01d47c4c0e0a66e0989d40f73827d0a55f693cc +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Mar 9 16:20:48 2019 -0800 + + Pass correct number of atoms from SelectSave to _XawTextSaltAwaySelection + + When filling in the array, we correctly limited to the 256 slots allocated + but then we reset the value to an unlimited number when passing it on to + the function that walks the array, which could lead to it walking too far. + + Fixes https://gitlab.freedesktop.org/xorg/lib/libxaw/issues/2 + + Reported-by: Praveen Kumar <praveen.pk@samsung.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c9d6b0fa101238063b36182f170f4e1b0a233e15 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 15:10:17 2019 -0800 + + specs: app-defaults & rgb.txt are in /usr/share now, not /usr/lib + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 759b58d33aa3b4040ba39d722988149b1daa165f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 15:00:55 2019 -0800 + + specs: remove excess spaces between < > and header names + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 9206b0ff74b9a37bc961f9ab09cd46d0e6fce215 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 14:52:17 2019 -0800 + + specs: move trailing punctuation to behind </function> tag + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c134bc0d72387399d73640a72842b0a1121c32ff +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 15:15:11 2019 -0800 + + specs: replace nroff hair space (\^) with Unicode entity ( ) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7e982604b4afaf1208dfc5e57e37740bf515e487 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 14:49:14 2019 -0800 + + specs: replace nroff 1/6th-em space (\|) with Unicode entity ( ) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e395fd92c8f74c04dc33e6fc9568ef5d80221ca6 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 14:32:41 2019 -0800 + + specs: misc. manual fixes + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 27dc1e9e6d014f21fbec1d6f4a2220598884f389 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 13:55:34 2019 -0800 + + specs: Convert ``quotes'' to <quote> + + perl -i -p -e 's{\`\`(.*?)\x27\x27}{<quote>\1</quote>}' *.xml + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1ba0cad53d1805476d146576153e52af981c8478 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 13:46:05 2019 -0800 + + specs: fixup remaining troff \fI & \fP escapes + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f5c7109d2697c441f5c845efeb55b4b60f9bdd1c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 13:33:26 2019 -0800 + + specs: fixup some more xrefs & links + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 8ef58ff4b99d986e3223e0138287eb0dd7b0105f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 12:44:53 2019 -0800 + + specs: restore missing list terms in "Underlying Model" + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 32b3bb8a7aeefa7d1f35b55c2b1010cf483d3928 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 12:28:08 2019 -0800 + + specs: use glossary list markup for Terminology section + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 492d5d25ebd1545e422ec5319655ef335b1bd32c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 12:08:52 2019 -0800 + + specs: show libXaw version instead of X11R7.7 + + Since we stopped doing katamaris, the library version is needed to tell + what release the docs are from. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2d78b52c8a798957e0fd8f739fcda07cd64a0bec +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 18 11:50:37 2019 -0800 + + specs: update credits for DocBook conversion + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit fc4f97769996c1086848e3fd7bbe8c093c8f0276 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 20:33:36 2019 -0800 + + specs: Reorder subsections of CH5 to match X11R6.6 spec + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5b9f06194bfcb6e6e09b57dd54f2480e2fa3f089 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 20:25:59 2019 -0800 + + specs: Add missing subsections of CH4 and reorder to match X11R6.6 spec + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 80fc6c7cf49ce2820b18dbdb35601f81b54e20be +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 20:18:23 2019 -0800 + + specs: Add olinks to ICCCM spec + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit fc0859cda710485e7312a3c3759601b251af7d8d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 20:10:26 2019 -0800 + + specs: Add olinks to libX11 spec + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f4c93256a82ba9bde938101acb9b361c0a2b2f43 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 20:00:24 2019 -0800 + + specs: Add olinks to libXt spec + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 543d26d206fe5393de6bd6ae3d52d6d8e1f0abea +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 19:08:36 2019 -0800 + + specs: Convert troff .IN macros to docbook <indexterm> tags + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2b9a7f2c89ebaf411e23af40dd18ad84d48019e8 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Feb 17 18:33:24 2019 -0800 + + specs: suggest XtOpenApplication instead of XtAppInitialize + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=37552 + "libXaw.html promotes obsolete XtAppInitialize" + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c03defced6a8dfb1c3c6d20f64b6efd0b60aa16c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Dec 7 19:39:24 2018 -0800 + + Update configure.ac bug URL for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit ae6ed2c1cb024b2dcb0c62e7fc2a393cc7cb7252 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Nov 19 21:37:41 2018 -0800 + + Update README for gitlab migration + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2f298ec305c072c68906dd90d6a9f10f5cbdaa71 +Author: Roberto Branciforti <rbbrnc@gmail.com> +Date: Wed Jan 19 21:20:59 2011 +0100 + + Scrollbar.c: Add Btn4 & Btn5 to default translations + + Add default translations to handle mouse wheel events for moving the + scrollbar. + + Signed-off-by: Roberto Branciforti <rbbrnc@gmail.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5a392266daf26d1959af9cc55ae53a905af159cf +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 5 12:07:27 2018 -0700 + + Fix misleading indentation in TextAction.c + + TextAction.c:838:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] + if (ctx->text.lt.top != 0) + ^~ + TextAction.c:840:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ + break; + ^~~~~ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f5699b698d512bb1060ef53704595d6accf7eb19 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Mar 24 22:42:40 2018 -0700 + + Fix xload crashes if the window is wider than 2048 pixels + + https://bugs.freedesktop.org/show_bug.cgi?id=96670 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> + Tested-by: Keith Packard <keithp@keithp.com> + +commit ba7321b6a52726cdb9964b82c5111518dc1f437d +Author: Tobias Stoeckmann <tobias@stoeckmann.org> +Date: Mon Mar 13 20:01:27 2017 +0100 + + NULL pointer dereference in XawAsciiSinkInitialize + + The function XawAsciiSinkInitialize is prone to a NULL pointer + dereference if no font is available. + + Even though a specific check for a NULL font exists, it is called + after GetGC(), which in turn would trigger the NPE in such a case. + + Spotted by calling xmessage on a system with an incomplete x font setup: + + $ xmessage -b text + Warning: Unable to load any usable ISO8859 font + Segmentation fault + $ _ + + Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit a77be15825c0e450dac84619bda966d9fa9af6ec +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 b461c11e0e9e9ebafa9a34c89c9598f162d54091 +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 a45aee9f79ce9613bab22d9d658bbc0992ff759f +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 b3049d9b13333c0e67f1f23959227020741f486b +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Wed Jan 6 22:21:01 2016 -0800 + + darwin: Remove incorrect export of vendorShellClassRec and vendorShellWidgetClass + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit 4a7626b5127c0eb597cd2b8d0ae3de0286b74d7c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 1 11:23:09 2016 -0800 + + editres can trigger sigsegv in inspected application (Debian bug 790325) + + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790325 + + Reported-by: Yuriy M. Kaminskiy <yumkam@gmail.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit 8c82c47a770274c50944f002b97369c4e30872d8 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Apr 30 22:06:03 2015 -0700 diff --git a/lib/libXaw/Makefile.am b/lib/libXaw/Makefile.am index ef5fcc1b4..09ea0b657 100644 --- a/lib/libXaw/Makefile.am +++ b/lib/libXaw/Makefile.am @@ -27,6 +27,7 @@ endif MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = \ + README.md \ autogen.sh \ old-doc/Changelog \ old-doc/CHANGES diff --git a/lib/libXaw/Makefile.in b/lib/libXaw/Makefile.in index 0032780bf..91542da8b 100644 --- a/lib/libXaw/Makefile.in +++ b/lib/libXaw/Makefile.in @@ -53,7 +53,7 @@ host_triplet = @host@ @BUILD_XAW6_TRUE@am__append_1 = xaw6.pc @BUILD_XAW7_TRUE@am__append_2 = xaw7.pc 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)/xaw6.pc.in $(srcdir)/xaw7.pc.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL compile \ @@ -314,6 +314,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -331,6 +332,7 @@ pkgconfig_DATA = $(am__append_1) $(am__append_2) @BUILD_XAW7_TRUE@@PLATFORM_DARWIN_TRUE@DEFAULT_LIB = libXaw.7.@LIBEXT@ MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = \ + README.md \ autogen.sh \ old-doc/Changelog \ old-doc/CHANGES diff --git a/lib/libXaw/README b/lib/libXaw/README deleted file mode 100644 index 14aa93903..000000000 --- a/lib/libXaw/README +++ /dev/null @@ -1,26 +0,0 @@ -Xaw is the X Athena Widget Set. -Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library. - -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/libXaw - - http://cgit.freedesktop.org/xorg/lib/libXaw - -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/libXaw/README.md b/lib/libXaw/README.md new file mode 100644 index 000000000..664b204f5 --- /dev/null +++ b/lib/libXaw/README.md @@ -0,0 +1,18 @@ +Xaw is the X Athena Widget Set. +Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library. + +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/libXaw + +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/libXaw/aclocal.m4 b/lib/libXaw/aclocal.m4 index 40d4a4a97..1f58de152 100644 --- a/lib/libXaw/aclocal.m4 +++ b/lib/libXaw/aclocal.m4 @@ -8606,32 +8606,63 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# 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.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +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.2]) +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)))?$]) @@ -8653,18 +8684,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" && \ @@ -8674,8 +8706,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" @@ -8687,10 +8721,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 @@ -8698,26 +8733,24 @@ 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 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -8727,11 +8760,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -8748,7 +8781,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -8764,16 +8797,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], @@ -8784,16 +8841,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], @@ -8804,7 +8863,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. # @@ -9861,7 +9937,7 @@ AC_SUBST([am__untar]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl -dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +dnl 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"), @@ -9898,7 +9974,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.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,, @@ -9976,6 +10052,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 @@ -9991,9 +10078,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 @@ -10001,9 +10088,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 @@ -10011,9 +10098,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 @@ -10021,9 +10108,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 @@ -10284,13 +10371,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]) @@ -11686,8 +11784,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 @@ -11748,10 +11847,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/libXaw/autogen.sh b/lib/libXaw/autogen.sh index fc34bd55c..aa8f07d5e 100644 --- a/lib/libXaw/autogen.sh +++ b/lib/libXaw/autogen.sh @@ -1,14 +1,17 @@ #! /bin/sh -srcdir=`dirname $0` +srcdir=`dirname "$0"` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` -cd $srcdir +cd "$srcdir" autoreconf -v --install || exit 1 -cd $ORIGDIR || exit $? +cd "$ORIGDIR" || exit $? + +git config --local --get format.subjectPrefix >/dev/null 2>&1 || + git config --local format.subjectPrefix "PATCH libXaw" if test -z "$NOCONFIGURE"; then - $srcdir/configure "$@" + exec "$srcdir"/configure "$@" fi diff --git a/lib/libXaw/config.h.in b/lib/libXaw/config.h.in index 3059a29ad..dd9351def 100644 --- a/lib/libXaw/config.h.in +++ b/lib/libXaw/config.h.in @@ -90,3 +90,6 @@ /* Version number of package */ #undef VERSION + +/* Define to 1 to use standard C const feature. */ +#undef _CONST_X_STRING diff --git a/lib/libXaw/configure b/lib/libXaw/configure index 237eb2c29..8a9fc710b 100644 --- a/lib/libXaw/configure +++ b/lib/libXaw/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXaw 1.0.13. +# Generated by GNU Autoconf 2.69 for libXaw 1.0.14. # -# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXaw/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/libXaw/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='libXaw' PACKAGE_TARNAME='libXaw' -PACKAGE_VERSION='1.0.13' -PACKAGE_STRING='libXaw 1.0.13' -PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' +PACKAGE_VERSION='1.0.14' +PACKAGE_STRING='libXaw 1.0.14' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libXaw/issues' PACKAGE_URL='' ac_unique_file="Makefile.am" @@ -846,6 +846,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -886,6 +887,7 @@ with_fop with_xsltproc enable_xaw6 enable_xaw7 +enable_const ' ac_precious_vars='build_alias host_alias @@ -944,6 +946,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1196,6 +1199,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1333,7 +1345,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1446,7 +1458,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libXaw 1.0.13 to adapt to many kinds of systems. +\`configure' configures libXaw 1.0.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1486,6 +1498,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1516,7 +1529,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXaw 1.0.13:";; + short | recursive ) echo "Configuration of libXaw 1.0.14:";; esac cat <<\_ACEOF @@ -1547,6 +1560,7 @@ Optional Features: --enable-specs Enable building the specs (default: yes) --disable-xaw6 Disable building of libXaw.so.6 --disable-xaw7 Disable building of libXaw.so.7 + --disable-const Disable const-support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1587,7 +1601,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/libXaw/issues>. _ACEOF ac_status=$? fi @@ -1650,7 +1664,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXaw configure 1.0.13 +libXaw configure 1.0.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2041,9 +2055,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/libXaw/issues ## +## -------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2065,7 +2079,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libXaw $as_me 1.0.13, which was +It was created by libXaw $as_me 1.0.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2894,7 +2908,7 @@ fi # Define the identity of the package. PACKAGE='libXaw' - VERSION='1.0.13' + VERSION='1.0.14' cat >>confdefs.h <<_ACEOF @@ -17580,10 +17594,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))" @@ -17591,14 +17606,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 @@ -17614,9 +17660,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 @@ -17624,9 +17670,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 @@ -17634,9 +17680,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 @@ -17644,9 +17690,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 @@ -17894,6 +17940,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 @@ -17901,10 +17952,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= @@ -18564,8 +18623,8 @@ fi if test "x$build_v6" = xyes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XAW6" >&5 -$as_echo_n "checking for XAW6... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xproto x11 xext xextproto xt xmu" >&5 +$as_echo_n "checking for xproto x11 xext xextproto xt xmu... " >&6; } if test -n "$XAW6_CFLAGS"; then pkg_cv_XAW6_CFLAGS="$XAW6_CFLAGS" @@ -18605,7 +18664,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -18632,7 +18691,7 @@ Alternatively, you may set the environment variables XAW6_CFLAGS and XAW6_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -18669,8 +18728,8 @@ fi if test "x$build_v7" = xyes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XAW7" >&5 -$as_echo_n "checking for XAW7... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xproto x11 xext xextproto xt xmu xpm" >&5 +$as_echo_n "checking for xproto x11 xext xextproto xt xmu xpm... " >&6; } if test -n "$XAW7_CFLAGS"; then pkg_cv_XAW7_CFLAGS="$XAW7_CFLAGS" @@ -18710,7 +18769,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -18737,7 +18796,7 @@ Alternatively, you may set the environment variables XAW7_CFLAGS and XAW7_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -18854,7 +18913,24 @@ fi ;; esac -ac_config_files="$ac_config_files Makefile include/Makefile man/Makefile specs/Makefile src/Makefile" +{ $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 + +ac_config_files="$ac_config_files Makefile include/Makefile man/Makefile specs/Makefile specs/libXaw.ent src/Makefile" if test "x$build_v6" = xyes; then @@ -19441,7 +19517,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libXaw $as_me 1.0.13, which was +This file was extended by libXaw $as_me 1.0.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19501,13 +19577,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/libXaw/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="\\ -libXaw config.status 1.0.13 +libXaw config.status 1.0.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -19921,6 +19997,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/libXaw.ent") CONFIG_FILES="$CONFIG_FILES specs/libXaw.ent" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "xaw6.pc") CONFIG_FILES="$CONFIG_FILES xaw6.pc" ;; "xaw7.pc") CONFIG_FILES="$CONFIG_FILES xaw7.pc" ;; diff --git a/lib/libXaw/configure.ac b/lib/libXaw/configure.ac index 05ce684b1..91b2de035 100644 --- a/lib/libXaw/configure.ac +++ b/lib/libXaw/configure.ac @@ -1,8 +1,8 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXaw], [1.0.13], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw]) +AC_INIT([libXaw], [1.0.14], + [https://gitlab.freedesktop.org/xorg/lib/libXaw/issues], [libXaw]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -106,10 +106,19 @@ case $host_os in ;; esac +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_CONFIG_FILES([Makefile include/Makefile man/Makefile specs/Makefile + specs/libXaw.ent src/Makefile]) if test "x$build_v6" = xyes; then diff --git a/lib/libXaw/include/Makefile.in b/lib/libXaw/include/Makefile.in index cef8f060b..9ee0b723e 100644 --- a/lib/libXaw/include/Makefile.in +++ b/lib/libXaw/include/Makefile.in @@ -252,6 +252,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libXaw/include/X11/Xaw/List.h b/lib/libXaw/include/X11/Xaw/List.h index 7fc59f4fe..663b17f62 100644 --- a/lib/libXaw/include/X11/Xaw/List.h +++ b/lib/libXaw/include/X11/Xaw/List.h @@ -167,7 +167,7 @@ _XFUNCPROTOBEGIN void XawListChange ( Widget w, - String *list, + _Xconst char **list, int nitems, int longest, #if NeedWidePrototypes diff --git a/lib/libXaw/include/X11/Xaw/MenuButtoP.h b/lib/libXaw/include/X11/Xaw/MenuButtoP.h index 8ee3195c5..9aa39bc08 100644 --- a/lib/libXaw/include/X11/Xaw/MenuButtoP.h +++ b/lib/libXaw/include/X11/Xaw/MenuButtoP.h @@ -61,7 +61,7 @@ extern MenuButtonClassRec menuButtonClassRec; /* New fields for the MenuButton widget */ typedef struct { /* resources */ - String menu_name; + char * menu_name; #ifndef OLDXAW XtPointer pad[4]; /* for future use and keep binary compatability */ #endif diff --git a/lib/libXaw/include/X11/Xaw/SmeBSBP.h b/lib/libXaw/include/X11/Xaw/SmeBSBP.h index 3df9b882a..299e4caa6 100644 --- a/lib/libXaw/include/X11/Xaw/SmeBSBP.h +++ b/lib/libXaw/include/X11/Xaw/SmeBSBP.h @@ -74,7 +74,7 @@ typedef struct { #ifndef OLDXAW /* new resources */ - String menu_name; /* name of nested sub menu or NULL */ + char * menu_name; /* name of nested sub menu or NULL */ XtPointer pad[4]; /* for future use and keep binary compatability */ #endif } SmeBSBPart; diff --git a/lib/libXaw/include/X11/Xaw/XawInit.h b/lib/libXaw/include/X11/Xaw/XawInit.h index 73226b26b..7e77f8119 100644 --- a/lib/libXaw/include/X11/Xaw/XawInit.h +++ b/lib/libXaw/include/X11/Xaw/XawInit.h @@ -54,7 +54,7 @@ extern Widget XawOpenApplication( String application_class, WidgetClass widget_class, int *argc, - String *argv + _XtString *argv ); _XFUNCPROTOEND diff --git a/lib/libXaw/man/Makefile.in b/lib/libXaw/man/Makefile.in index f1f7d7a16..ab6eac5ae 100644 --- a/lib/libXaw/man/Makefile.in +++ b/lib/libXaw/man/Makefile.in @@ -274,6 +274,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libXaw/specs/AsciiSink.xml b/lib/libXaw/specs/AsciiSink.xml index aba588b6c..88a4343f8 100644 --- a/lib/libXaw/specs/AsciiSink.xml +++ b/lib/libXaw/specs/AsciiSink.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- AsciiSink Object --> <!-- .XE --> -<!-- .IN "AsciiSink object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>AsciiSink object</primary></indexterm> </para> <para> <!-- .LP --> @@ -13,13 +13,13 @@ <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/AsciiSink.h> -<!-- .IN "AsciiSink.h" "" --> +<indexterm><primary>AsciiSink.h</primary></indexterm> Class Header file <X11/Xaw/AsciiSinkP.h> -<!-- .IN "AsciiSinkP.h" "" --> +<indexterm><primary>AsciiSinkP.h</primary></indexterm> Class asciiSinkObjectClass -<!-- .IN "asciiSinkObjectClass" "" --> +<indexterm><primary>asciiSinkObjectClass</primary></indexterm> Class Name AsciiSink -<!-- .IN "AsciiSink object" "class name" --> +<indexterm><primary>AsciiSink object</primary><secondary>class name</secondary></indexterm> Superclass TextSink </literallayout> </para> @@ -32,10 +32,10 @@ itself is created. Both types are nearly identical; the following discussion applies to both, with MultiSink differences noted only as they occur. The AsciiSink will display all printing characters in an 8 bit font, along with handling Tab -and Carriage Return. The name has been left as ``AsciiSink'' for compatibility. -\fIThe MultiSink will display all printing characters in a font set, along with -handling Tab and Carriage -Return.\fP The source object also reports the text window metrics to the +and Carriage Return. The name has been left as <quote>AsciiSink</quote> for compatibility. +<emphasis remap='I'>The MultiSink will display all printing characters in a +font set, along with handling Tab and Carriage Return.</emphasis> +The source object also reports the text window metrics to the text widgets. </para> <sect2 id='AsciiSink::Resources'> @@ -47,7 +47,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "AsciiSink object" "resources" --> +<indexterm><primary>AsciiSink object</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> diff --git a/lib/libXaw/specs/AsciiSource.xml b/lib/libXaw/specs/AsciiSource.xml index b3ca6da12..89628c58a 100644 --- a/lib/libXaw/specs/AsciiSource.xml +++ b/lib/libXaw/specs/AsciiSource.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- AsciiSrc Object --> <!-- .XE --> -<!-- .IN "AsciiSrc object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>AsciiSrc object</primary></indexterm> </para> <para> <!-- .LP --> @@ -13,13 +13,13 @@ <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/AsciiSrc.h> or <X11/Xaw/MultiSrc.h> -<!-- .IN "AsciiSrc.h" "" --> +<indexterm><primary>AsciiSrc.h</primary></indexterm> Class Header file <X11/Xaw/AsciiSrcP.h> or <X11/Xaw/MultiSrcP.h> -<!-- .IN "AsciiSrcP.h" "" --> +<indexterm><primary>AsciiSrcP.h</primary></indexterm> Class asciiSrcObjectClass or multiSrcObjectClass -<!-- .IN "asciiSrcObjectClass" "" --> +<indexterm><primary>asciiSrcObjectClass</primary></indexterm> Class Name AsciiSrc or MultiSrc -<!-- .IN "AsciiSrc object" "class name" --> +<indexterm><primary>AsciiSrc object</primary><secondary>class name</secondary></indexterm> Superclass TextSource </literallayout> </para> @@ -33,9 +33,9 @@ applies to both, with MultiSrc differences noted only as they occur. </para> <para> <!-- .LP --> -The AsciiSrc understands all Latin1 characters plus Tab -and Carriage Return. \fIThe MultiSrc understands any set of character sets that -the underlying X implementation's internationalization handles.\fP +The AsciiSrc understands all Latin1 characters plus Tab and Carriage Return. +<emphasis remap='I'>The MultiSrc understands any set of character sets that +the underlying X implementation's internationalization handles.</emphasis> </para> <para> <!-- .LP --> @@ -57,8 +57,8 @@ source is in this mode the <function>useStringInPlace</function> resource is ign <!-- .LP --> AsciiSrc objects of type <function>XawAsciiString</function> have the text buffer implemented as a string. -\fIMultiSrc objects of type <function>XawAsciiString</function> have the text buffer -implemented as a wide character string.\fP +<emphasis remap='I'>MultiSrc objects of type <function>XawAsciiString</function> +have the text buffer implemented as a wide character string.</emphasis> The string owner is responsible for allocating and managing storage for the string. </para> @@ -108,7 +108,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "AsciiSrc object" "resources" --> +<indexterm><primary>AsciiSrc object</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -333,7 +333,7 @@ This function returns <function>True</function> if the save was successful. <!-- .LP --> To find out if the text buffer in an AsciiSrc object has changed since the last time it was saved with <xref linkend='XawAsciiSave' xrefstyle='select: title'/> or queried -<!-- .IN "XawAsciiSave" "" --> +<indexterm><primary>XawAsciiSave</primary></indexterm> use <xref linkend='XawAsciiSourceChanged' xrefstyle='select: title'/>. <funcsynopsis id='XawAsciiSourceChanged'> <funcprototype> diff --git a/lib/libXaw/specs/AsciiText.xml b/lib/libXaw/specs/AsciiText.xml index 156e0c029..8dec8c2e2 100644 --- a/lib/libXaw/specs/AsciiText.xml +++ b/lib/libXaw/specs/AsciiText.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- AsciiText Widget --> <!-- .XE --> -<!-- .IN "AsciiText widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>AsciiText widget</primary></indexterm> </para> <para> <!-- .LP --> @@ -13,13 +13,13 @@ <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/AsciiText.h> -<!-- .IN "AsciiText.h" "" --> +<indexterm><primary>AsciiText.h</primary></indexterm> ClassHeader file <X11/Xaw/AsciiTextP.h> -<!-- .IN "AsciiTextP.h" "" --> +<indexterm><primary>AsciiTextP.h</primary></indexterm> Class asciiTextWidgetClass -<!-- .IN "asciiTextWidgetClass" "" --> +<indexterm><primary>asciiTextWidgetClass</primary></indexterm> Class Name Text -<!-- .IN "AsciiText widget" "class name" --> +<indexterm><primary>AsciiText widget</primary><secondary>class name</secondary></indexterm> Superclass Text Sink Name textSink Source Name textSource @@ -31,13 +31,13 @@ Source Name textSource For the ease of internationalization, the AsciiText widget class name has not been changed, although it is actually able to support non-ASCII locales. The AsciiText widget is really a collection of smaller parts. It -includes the Text widget itself, a ``Source'' (which supports memory management), -and a ``Sink'' (which handles the display). There are currently two supported +includes the Text widget itself, a <quote>Source</quote> (which supports memory management), +and a <quote>Sink</quote> (which handles the display). There are currently two supported sources, the AsciiSrc and MultiSrc, and two supported sinks, the AsciiSink and -<!-- .IN "AsciiSrc object" "" --> -<!-- .IN "AsciiSink object" "" --> -<!-- .IN "MultiSrc object" "" --> -<!-- .IN "MultiSink object" "" --> +<indexterm><primary>AsciiSrc object</primary></indexterm> +<indexterm><primary>AsciiSink object</primary></indexterm> +<indexterm><primary>MultiSrc object</primary></indexterm> +<indexterm><primary>MultiSink object</primary></indexterm> MultiSink. Some of the resources listed below are not actually resources of the AsciiText, but belong to the associated source or sink. This is @@ -58,7 +58,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "AsciiText widget" "resources" --> +<indexterm><primary>AsciiText widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> diff --git a/lib/libXaw/specs/Box.xml b/lib/libXaw/specs/Box.xml index 692d7d236..9796c9957 100644 --- a/lib/libXaw/specs/Box.xml +++ b/lib/libXaw/specs/Box.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Box Widget --> <!-- .XE --> -<!-- .IN "Box widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Box widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Box.h> -<!-- .IN "Box.h" "" --> +<indexterm><primary>Box.h</primary></indexterm> Class Header file <X11/Xaw/BoxP.h> -<!-- .IN "BoxP.h" "" --> +<indexterm><primary>BoxP.h</primary></indexterm> Class boxWidgetClass -<!-- .IN "boxWidgetClass" "" --> +<indexterm><primary>boxWidgetClass</primary></indexterm> Class Name Box -<!-- .IN "Box widget" "class name" --> +<indexterm><primary>Box widget</primary><secondary>class name</secondary></indexterm> Superclass Composite <!-- .sp --> </literallayout> @@ -47,7 +47,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Box widget" "resources" --> +<indexterm><primary>Box widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -279,9 +279,9 @@ children and the edge of the box. Specifies whether the preferred shape of the box (i.e. the result returned by the query_geometry class method) is tall and narrow <function>XtorientVertical</function> or short and wide <function>XtorientHorizontal</function>. -<!-- .IN "XtorientVertical" "" --> -<!-- .IN "XtorientHorizontal" "" --> -<!-- .IN "conversions" "Orientation" --> +<indexterm><primary>XtorientVertical</primary></indexterm> +<indexterm><primary>XtorientHorizontal</primary></indexterm> +<indexterm><primary>conversions</primary><secondary>Orientation</secondary></indexterm> When the Box is a child of a parent which enforces width constraints, it is usually better to specify <function>XtorientVertical</function> (the default). When the parent enforces height constraints, it is usually better to @@ -299,7 +299,7 @@ specify <function>XtorientHorizontal</function>. </sect2> <sect2 id="Layout_Semantics"> <title>Layout Semantics</title> -<!-- .IN "Box widget" "layout semantics" --> +<indexterm><primary>Box widget</primary><secondary>layout semantics</secondary></indexterm> <para> <!-- .LP --> Each time a child is managed or unmanaged, the Box widget will attempt @@ -313,7 +313,7 @@ algorithm used depends on the <function>orientation</function> of the Box. </term> <listitem> <para> -<!-- .IN "XtorientVertical" "" @DEF@ --> +<indexterm significance="preferred"><primary>XtorientVertical</primary></indexterm> When the next child does not fit on the current row, a new row is started. If a child is wider than the width of the box, the box will request a larger width from its parent and will begin the layout @@ -327,7 +327,7 @@ process from the beginning if a new width is granted. </term> <listitem> <para> -<!-- .IN "XtorientHorizontal" "" @DEF@ --> +<indexterm significance="preferred"><primary>XtorientHorizontal</primary></indexterm> When the next child does not fit on the current row, the Box widens if possible (so as to keep children on a single row); otherwise a new row is started. diff --git a/lib/libXaw/specs/CH1.xml b/lib/libXaw/specs/CH1.xml index 8d913b8a7..38065d9e2 100644 --- a/lib/libXaw/specs/CH1.xml +++ b/lib/libXaw/specs/CH1.xml @@ -13,7 +13,8 @@ sets it may be possible to use widgets from the Athena widget set with other widget sets based upon the Intrinsics. Since widget sets may also implement private protocols, all functionality may not be available when mixing and matching widget sets. For information about the Intrinsics, see -the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +the <olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> <para> The Athena widget set is a library package layered on top of the Intrinsics @@ -49,7 +50,7 @@ of radically differing widget implementations. <!-- .XS --> <!-- Introduction to the X Toolkit --> <!-- .XE --> -<!-- .IN "introduction" "" "@DEF@" --> +<indexterm significance="preferred"><primary>introduction</primary></indexterm> The X Toolkit provides tools that simplify the design of application user interfaces in the X Window System programming environment. It assists application programmers by providing a set of common @@ -84,7 +85,8 @@ A widget set for application programming While the majority of the Intrinsics functions are intended for the widget programmer, a subset of the Intrinsics functions are to be used by application programmers -(see <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>). +(see <olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>). The architectural model lets the widget programmer design new widgets by using the Intrinsics and by combining other widgets. The application interface layers built on top of the X Toolkit include a @@ -122,124 +124,97 @@ Format of the Widget Reference Chapters </sect1> <sect1 id="Terminology"> <title>Terminology</title> -<para> <!-- .LP --> <!-- .XS --> <!-- Terminology --> <!-- .XE --> -</para> <para> <!-- .LP --> In addition to the terms already defined for X programming (see -<emphasis remap='I'>Xlib - C Language Interface</emphasis>), +<olink targetdoc='libX11' targetptr='glossary' +><citetitle>Xlib - C Language Interface</citetitle></olink>), the following terms are specific to the Intrinsics and Athena widget set and used throughout this document. </para> -<para> -<!-- .LP --> -<function>Application programmer</function> -<!-- .IN "application programmer" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> +<glosslist> +<glossentry> + <glossterm>Application programmer</glossterm> +<indexterm significance="preferred"><primary>application programmer</primary></indexterm> + <glossdef> <para> A programmer who uses the X Toolkit to produce an application user interface. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Child</function> -<!-- .IN "child" "" "@DEF" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Child</glossterm> +<indexterm significance="preferred"><primary>child</primary></indexterm> + <glossdef> <para> A widget that is contained within another "parent" widget. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Class</function> -<!-- .IN "class" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Class</glossterm> +<indexterm significance="preferred"><primary>class</primary></indexterm> + <glossdef> <para> The general group to which a specific object belongs. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Client</function> -<!-- .IN "client" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Client</glossterm> +<indexterm significance="preferred"><primary>client</primary></indexterm> + <glossdef> <para> A function that uses a widget in an application or for composing other widgets. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>FullName</function> -<!-- .IN "FullName" "" "@DEF" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>FullName</glossterm> +<indexterm significance="preferred"><primary>FullName</primary></indexterm> + <glossdef> <para> The name of a widget instance appended to the full name of its parent. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Instance</function> -<!-- .IN "instance" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Instance</glossterm> +<indexterm significance="preferred"><primary>instance</primary></indexterm> + <glossdef> <para> A specific widget object as opposed to a general widget class. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Method</function> -<!-- .IN "method" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Method</glossterm> +<indexterm significance="preferred"><primary>method</primary></indexterm> + <glossdef> <para> A function or procedure implemented by a widget class. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Name</function> -<!-- .IN "name" "widget" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Name</glossterm> +<indexterm significance="preferred"><primary>name</primary><secondary>widget</secondary></indexterm> + <glossdef> <para> The name that is specific to an instance of a widget for a given client. This name is specified at creation time and cannot be modified. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Object</function> -<!-- .IN "object" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Object</glossterm> +<indexterm significance="preferred"><primary>object</primary></indexterm> + <glossdef> <para> A data abstraction consisting of private data and private and public functions that operate on the private data. @@ -255,97 +230,77 @@ types of widgets. If a function is unique to a single widget type, the widget exports the function. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Parent</function> -<!-- .IN "parent" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Parent</glossterm> +<indexterm significance="preferred"><primary>parent</primary></indexterm> + <glossdef> <para> A widget that contains at least one other ("child") widget. A parent widget is also known as a composite widget. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Resource</function> -<!-- .IN "resource" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Resource</glossterm> +<indexterm significance="preferred"><primary>resource</primary></indexterm> + <glossdef> <para> A named piece of data in a widget that can be set by a client, by an application, or by user defaults. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Superclass</function> -<!-- .IN "superclass" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Superclass</glossterm> +<indexterm significance="preferred"><primary>superclass</primary></indexterm> + <glossdef> <para> A larger class of which a specific class is a member. All members of a class are also members of the superclass. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>User</function> -<!-- .IN "user" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>User</glossterm> +<indexterm significance="preferred"><primary>user</primary></indexterm> + <glossdef> <para> A person interacting with a workstation. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Widget</function> -<!-- .IN "widget" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Widget</glossterm> +<indexterm significance="preferred"><primary>widget</primary></indexterm> + <glossdef> <para> An object providing a user-interface abstraction (for example, a Scrollbar widget). </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Widget class</function> -<!-- .IN "widget class" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Widget class</glossterm> +<indexterm significance="preferred"><primary>widget class</primary></indexterm> + <glossdef> <para> The general group to which a specific widget belongs, otherwise known as the type of the widget. </para> - </listitem> -</itemizedlist> -<para> -<!-- .LP --> -<function>Widget programmer</function> -<!-- .IN "widget programmer" "" "@DEF@" --> -</para> -<itemizedlist> - <listitem> + </glossdef> +</glossentry> +<glossentry> + <glossterm>Widget programmer</glossterm> +<indexterm significance="preferred"><primary>widget programmer</primary></indexterm> + <glossdef> <para> A programmer who adds new widgets to the X Toolkit. </para> - </listitem> -</itemizedlist> + </glossdef> +</glossentry> +</glosslist> </sect1> <sect1 id="Underlying_Model"> <title>Underlying Model</title> @@ -354,15 +309,13 @@ A programmer who adds new widgets to the X Toolkit. <!-- .XS --> <!-- Underlying Model --> <!-- .XE --> -<!-- .IN "underlying model" "" "@DEF@" --> +<indexterm significance="preferred"><primary>underlying model</primary></indexterm> The underlying architectural model is based on the following premises: <!-- .KS --> </para> -<itemizedlist> - <listitem> - <para> - </para> - </listitem> +<variablelist><?dbfo list-presentation="blocks"?> +<varlistentry> + <term>Widgets are X windows</term> <listitem> <para> Every user-interface widget is associated with an X window. @@ -373,10 +326,9 @@ output operations. <!-- .KS --> </para> </listitem> - <listitem> - <para> - </para> - </listitem> +</varlistentry> +<varlistentry> + <term>Information hiding</term> <listitem> <para> The data for every widget is private to the widget and its subclasses. @@ -388,10 +340,9 @@ All program interaction with the widget is performed by a set of operations <!-- .KS --> </para> </listitem> - <listitem> - <para> - </para> - </listitem> +</varlistentry> +<varlistentry> + <term>Widget semantics and widget layout geometry</term> <listitem> <para> Widget semantics are clearly separated from widget layout geometry. @@ -403,14 +354,15 @@ suggestions about their own geometry. <!-- .KE --> </para> </listitem> -</itemizedlist> +</varlistentry> +</variablelist> </sect1> <sect1 id="Conventions_Used_in_this_Manual"> <title>Conventions Used in this Manual</title> <itemizedlist> <listitem> <para> -<!-- .IN "conventions" "used in manual" "@DEF@" --> +<indexterm significance="preferred"><primary>conventions</primary><secondary>used in manual</secondary></indexterm> All resources available to the widgets are listed with each widget. Many of these are available to more than one widget class due to the object oriented nature of the Intrinsics. The new resources for each widget are @@ -454,8 +406,8 @@ All other pointers passed to these functions are used for reading only. A few arguments use pointers to structures that are used for both input and output and are indicated by using the <emphasis remap='I'>_in_out</emphasis> suffix. -<!-- .IN "_return" "" "@DEF@" --> -<!-- .IN "_in_out" "" "@DEF@" --> +<indexterm significance="preferred"><primary>_return</primary></indexterm> +<indexterm significance="preferred"><primary>_in_out</primary></indexterm> </para> </listitem> </itemizedlist> @@ -464,8 +416,8 @@ suffix. <title>Format of the Widget Reference Chapters</title> <para> <!-- .LP --> -<!-- .IN "conventions" "chapter format" "@DEF@" --> -<!-- .IN "chapter format" "" "@DEF@" --> +<indexterm significance="preferred"><primary>conventions</primary><secondary>chapter format</secondary></indexterm> +<indexterm significance="preferred"><primary>chapter format</primary></indexterm> The majority of this document is a reference guide for the Athena widget set. Chapters three through six give the programmer all information necessary to use the widgets. The layout of the chapters @@ -476,48 +428,12 @@ desired information. <!-- .LP --> The first few pages of every chapter give an overview of the widgets in that section. Widgets are grouped into chapters by functionality. -<variablelist> - <varlistentry> - <term> - "Chapter <!-- xref --> - </term> - <listitem> - <para> -Simple Widgets - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - "Chapter <!-- xref --> - </term> - <listitem> - <para> -Menus - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - "Chapter <!-- xref --> - </term> - <listitem> - <para> -Text Widgets - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - "Chapter <!-- xref --> - </term> - <listitem> - <para> -Composite and Constraint Widget - </para> - </listitem> - </varlistentry> -</variablelist> +<itemizedlist> + <listitem><para><xref linkend='Simple_Widgets'/></para></listitem> + <listitem><para><xref linkend='Menus'/></para></listitem> + <listitem><para><xref linkend='Text_Widgets'/></para></listitem> + <listitem><para><xref linkend='Composite_and_Constraint_Widgets'/></para></listitem> +</itemizedlist> </para> <para> <!-- .LP --> @@ -548,11 +464,11 @@ Superclass Composite </term> <listitem> <para> -<!-- .IN "application header file" "" "@DEF@" --> +<indexterm significance="preferred"><primary>application header file</primary></indexterm> This file must be included when an application uses this widget. It usually contains the class definition, and some resource macros. -This is often called the ``public'' header file. -<!-- .IN "class header file" "" "@DEF@" --> +This is often called the <quote>public</quote> header file. +<indexterm significance="preferred"><primary>class header file</primary></indexterm> </para> </listitem> </varlistentry> @@ -564,8 +480,8 @@ This is often called the ``public'' header file. <para> This file will only be used by widget programmers. It will need to be included by any widget that subclasses this widget. This is often -called the ``private'' header file. -<!-- .IN "class" "" "@DEF@" --> +called the <quote>private</quote> header file. +<indexterm significance="preferred"><primary>class</primary></indexterm> </para> </listitem> </varlistentry> @@ -578,7 +494,7 @@ called the ``private'' header file. This is the widget class of this widget. This global symbol is passed to <function>XtCreateWidget</function> so that the Intrinsics will know which type of widget to create. -<!-- .IN "class name" "" "@DEF@" --> +<indexterm significance="preferred"><primary>class name</primary></indexterm> </para> </listitem> </varlistentry> @@ -590,7 +506,7 @@ to create. <para> This is the resource name of this class. This name can be used in a resource file to match any widget of this class. -<!-- .IN "superclass" "" --> +<indexterm><primary>superclass</primary></indexterm> </para> </listitem> </varlistentry> @@ -622,11 +538,11 @@ The next section is a table showing the name, class, type and default value of each resource that is available to this widget. There is also a column containing notes describing special restrictions placed upon individual resources. -<!-- .IN "notes" "" "@DEF@" --> -<!-- .IN "A, note" "" "@DEF@" --> -<!-- .IN "D, note" "" "@DEF@" --> -<!-- .IN "C, note" "" "@DEF@" --> -<!-- .IN "R, note" "" "@DEF@" --> +<indexterm significance="preferred"><primary>notes</primary></indexterm> +<indexterm significance="preferred"><primary>A, note</primary></indexterm> +<indexterm significance="preferred"><primary>D, note</primary></indexterm> +<indexterm significance="preferred"><primary>C, note</primary></indexterm> +<indexterm significance="preferred"><primary>R, note</primary></indexterm> <variablelist> <varlistentry> <term> @@ -704,9 +620,9 @@ the widget. <!-- .XS --> <!-- Input Focus --> <!-- .XE --> -<!-- .IN "input focus" "" "@DEF@" --> -<!-- .IN "input" "" "@DEF@" --> -<!-- .IN "XtNinput" "" "@DEF@" --> +<indexterm significance="preferred"><primary>input focus</primary></indexterm> +<indexterm significance="preferred"><primary>input</primary></indexterm> +<indexterm significance="preferred"><primary>XtNinput</primary></indexterm> <para> <!-- .LP --> The Intrinsics define a resource on all Shell widgets that interact with @@ -717,7 +633,8 @@ default to <function>True</function> when an application is using the Athena wid set. An application programmer may override this default and set the resource back to <function>False</function> if the application does not need the window manager to give it the input focus. See the -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis> for details +<olink targetdoc='intrinsics' targetptr='Shell_Widgets' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink> for details on the <emphasis remap='I'>input</emphasis> resource. </para> diff --git a/lib/libXaw/specs/CH2.xml b/lib/libXaw/specs/CH2.xml index 98ac97ee1..ee242e01f 100644 --- a/lib/libXaw/specs/CH2.xml +++ b/lib/libXaw/specs/CH2.xml @@ -23,7 +23,8 @@ examples provided use the Athena widgets, though most of the concepts will apply to all widget sets. Although there are several programming interfaces to the X Toolkit, only one is described here. A full description of the programming interface is provided in the document -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +<olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> <sect2 id="Setting_the_Locale"> <title>Setting the Locale</title> @@ -35,16 +36,23 @@ description of the programming interface is provided in the document If it is desirable that the application take advantage of internationalization (i18n), you must establish locale with <function>XtSetLanguageProc</function> -before <function>XtDisplayInitialize</function> or <xref linkend='XtAppInitialize' xrefstyle='select: title'/> -is called. For full details, please refer to the document -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>, section 2.2. However, the following simplest-case +prior to calling +<xref linkend='XtOpenApplication' xrefstyle='select: title'/>, +<function>XtOpenDisplay</function>, +<function>XtDisplayInitialize</function>, +or +<function>XtAppInitialize</function>. +For full details, please refer to the document +<olink targetdoc='intrinsics' targetptr='Establishing_the_Locale' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle>, +section 2.2</olink>. However, the following simplest-case call is sufficient in many or most applications. </para> <para> <!-- .LP --> -<!-- .IN "internationalization" "" "" --> -<!-- .IN "XtSetLanguageProc" "" "@DEF@" --> -<!-- .IN "locale" "" "" --> +<indexterm><primary>internationalization</primary></indexterm> +<indexterm significance="preferred"><primary>XtSetLanguageProc</primary></indexterm> +<indexterm><primary>locale</primary></indexterm> <literallayout class="monospaced"> <!-- .TA .5i 2i --> <!-- .ta .5i 2i --> @@ -69,33 +77,34 @@ of programs in the default "C" locale. <!-- .XE --> You must call a toolkit initialization function before invoking any other toolkit routines (besides locale setting, above). -<xref linkend='XtAppInitialize' xrefstyle='select: title'/> +<xref linkend='XtOpenApplication' xrefstyle='select: title'/>, opens the X server connection, parses the command line, and creates an initial widget that will serve as the root of a tree of widgets created by this application. -<!-- .IN "initialization" "" "@DEF@" --> -<!-- .IN "toolkit initialization" "" "@DEF@" --> -<!-- .IN "XtAppInitialize" "" "@DEF@" --> -<!-- .IN "fallback resources" "" "@DEF@" --> -<funcsynopsis id='XtAppInitialize'> +<indexterm significance="preferred"><primary>initialization</primary></indexterm> +<indexterm significance="preferred"><primary>toolkit initialization</primary></indexterm> +<indexterm significance="preferred"><primary>XtOpenApplication</primary></indexterm> +<indexterm significance="preferred"><primary>fallback resources</primary></indexterm> +<funcsynopsis id='XtOpenApplication'> <funcprototype> - <funcdef>Widget<function> XtAppInitialize</function></funcdef> - <paramdef>XtAppContext<parameter> app_context_return</parameter></paramdef> - <paramdef>String<parameter> application_class</parameter></paramdef> - <paramdef>XrmOptionDescRec<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>ArgList<parameter> args</parameter></paramdef> - <paramdef>Cardinal<parameter> num_args</parameter></paramdef> +<funcdef>Widget <function>XtOpenApplication</function></funcdef> + <paramdef>XtAppContext *<parameter>app_context_return</parameter></paramdef> + <paramdef>String <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>WidgetClass <parameter>widget_class</parameter></paramdef> + <paramdef>ArgList <parameter>args</parameter></paramdef> + <paramdef>Cardinal <parameter>num_args</parameter></paramdef> </funcprototype> </funcsynopsis> <!-- .FN --> <variablelist> <varlistentry> <term> - <emphasis remap='I'>app_con_return</emphasis> + <emphasis remap='I'>app_context_return</emphasis> </term> <listitem> <para> @@ -113,7 +122,7 @@ Specifies the class name of this application, which is usually the generic name for all instances of this application. A useful convention is to form the class name by capitalizing the first letter of the application name. For example, the application named -``xman'' has a class name of ``Xman''. +<quote>xman</quote> has a class name of <quote>Xman</quote>. </para> </listitem> </varlistentry> @@ -128,7 +137,8 @@ resources. The options argument is passed as a parameter to <olink targetdoc='libX11' targetptr='XrmParseCommand'><function>XrmParseCommand</function></olink>. For further information, -see <emphasis remap='I'>Xlib - C Language Interface</emphasis>. +see <olink targetdoc='libX11' targetptr='XrmParseCommand' +><citetitle>Xlib - C Language Interface</citetitle></olink>. </para> </listitem> </varlistentry> @@ -175,6 +185,17 @@ defaults file cannot be opened, or NULL. </varlistentry> <varlistentry> <term> + <emphasis remap='I'>widget_class</emphasis> + </term> + <listitem> + <para> +Specifies the class of the widget to be created. Must be shellWidgetClass +or a subclass. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> <emphasis remap='I'>args</emphasis> </term> <listitem> @@ -213,9 +234,9 @@ widget to be used as the root of the application's widget tree. <!-- .XS --> <!-- Creating a Widget --> <!-- .XE --> -<!-- .IN "widget creation" "" "@DEF@" --> -<!-- .IN "creating widgets" "" "@DEF@" --> -<!-- .IN "XtRealizeWidget" "" "" --> +<indexterm significance="preferred"><primary>widget creation</primary></indexterm> +<indexterm significance="preferred"><primary>creating widgets</primary></indexterm> +<indexterm><primary>XtRealizeWidget</primary></indexterm> Creating a widget is a three-step process. First, the widget instance is allocated, and various instance-specific attributes are set by using <function>XtCreateWidget</function>. Second, the widget's parent is informed @@ -229,8 +250,8 @@ managed if the parent is already realized. <para> <!-- .LP --> To allocate, initialize, and manage a widget, use -<function>XtCreateManagedWidget .</function> -<!-- .IN "XtCreateManagedWidget" "" "@DEF@" --> +<function>XtCreateManagedWidget</function>. +<indexterm significance="preferred"><primary>XtCreateManagedWidget</primary></indexterm> <funcsynopsis id='XtCreateManagedWidget'> <funcprototype> <funcdef>Widget<function> XtCreateManagedWidget</function></funcdef> @@ -306,11 +327,13 @@ When a widget instance is successfully created, the widget identifier is returned to the application. If an error is encountered, the <function>XtError</function> routine is invoked to inform the user of the error. -<!-- .IN "XtError" "" "" --> +<indexterm><primary>XtError</primary></indexterm> </para> <para> <!-- .LP --> -For further information, see <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +For further information, see +<olink targetdoc='intrinsics' targetptr='Creating_Widgets' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect2> <sect2 id="Common_Resources"> @@ -318,7 +341,7 @@ For further information, see <emphasis remap='I'>X Toolkit Intrinsics - C Langua <!-- .XS --> <!-- Common Resources --> <!-- .XE --> -<!-- .IN "resource" "" --> +<indexterm><primary>resource</primary></indexterm> <para> <!-- .LP --> Although a widget can have unique arguments that it understands, all @@ -457,8 +480,8 @@ or from the resource database by all of the Athena widgets: </tbody> </tgroup> </informaltable> -<!-- .IN "XtDefaultForeground" "" "" --> -<!-- .IN "XtDefaultBackground" "" "" --> +<indexterm><primary>XtDefaultForeground</primary></indexterm> +<indexterm><primary>XtDefaultBackground</primary></indexterm> </para> <para> <!-- .LP --> @@ -506,7 +529,7 @@ or from the resource database by many of the Athena widgets: </tbody> </tgroup> </informaltable> -<!-- .IN "XtDefaultForeground" "" "" --> +<indexterm><primary>XtDefaultForeground</primary></indexterm> </para> </sect2> <sect2 id="Resource_Conversions"> @@ -514,9 +537,9 @@ or from the resource database by many of the Athena widgets: <!-- .XS --> <!-- Resource Conversions --> <!-- .XE --> -<!-- .IN "conversions" "" "@DEF@" --> -<!-- .IN "string conversions" "" "@DEF@" --> -<!-- .IN "type conversions" "" "@DEF@" --> +<indexterm significance="preferred"><primary>conversions</primary></indexterm> +<indexterm significance="preferred"><primary>string conversions</primary></indexterm> +<indexterm significance="preferred"><primary>type conversions</primary></indexterm> <para> <!-- .LP --> Most resources in the Athena widget set have a converter registered that @@ -550,9 +573,9 @@ will describe the converter. </para> <sect3 id="Cursor_Conversion"> <title>Cursor Conversion</title> -<!-- .IN "conversions" "ColorCursor" "@DEF@" --> -<!-- .IN "conversions" "Cursor" "@DEF@" --> -<!-- .IN "cursor" "" "" --> +<indexterm significance="preferred"><primary>conversions</primary><secondary>ColorCursor</secondary></indexterm> +<indexterm significance="preferred"><primary>conversions</primary><secondary>Cursor</secondary></indexterm> +<indexterm><primary>cursor</primary></indexterm> <para> <!-- .LP --> The value for the <function>cursorName</function> resource is specified in the resource @@ -561,7 +584,7 @@ database as a string, and is of the following forms: <itemizedlist> <listitem> <para> -A standard X cursor name from <function>< X11/cursorfont.h ></function>. +A standard X cursor name from <filename class="headerfile"><X11/cursorfont.h></filename>. The names in <function>cursorfont.h</function> each describe a specific cursor. The resource names for these cursors are exactly like the names in this file except the <function>XC_</function> is not used. The cursor definition <function>XC_gumby</function> @@ -594,22 +617,25 @@ file path is used (see section 2.4.3). <!-- xref --> <title>Pixel Conversion</title> <para> <!-- .LP --> -<!-- .IN "conversions" "Pixel" "@DEF@" --> -<!-- .IN "pixel" "" "" --> -<!-- .IN "rgb.txt" "" "" --> -<!-- .IN "XtDefaultForeground" "" "" --> -<!-- .IN "XtDefaultBackground" "" "" --> +<indexterm significance="preferred"><primary>conversions</primary><secondary>Pixel</secondary></indexterm> +<indexterm><primary>pixel</primary></indexterm> +<indexterm><primary>rgb.txt</primary></indexterm> +<indexterm><primary>XtDefaultForeground</primary></indexterm> +<indexterm><primary>XtDefaultBackground</primary></indexterm> The string-to-pixel converter takes any name that is acceptable to -XParseColor (see <emphasis remap='I'>Xlib - C Language Interface</emphasis>). In addition this routine understands +XParseColor (see <olink targetdoc='libX11' targetptr='Color_Strings' +><citetitle>Xlib - C Language Interface</citetitle></olink>). In addition this routine understands the special toolkit symbols `XtDefaultForeground' and -`XtDefaultBackground', described in <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. In short the acceptable +`XtDefaultBackground', described in +<olink targetdoc='intrinsics' targetptr='Predefined_Resource_Converters' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. In short the acceptable pixel names are: </para> <itemizedlist> <listitem> <para> Any color name for the rgb.txt file (typically in the directory -/usr/lib/X11 on POSIX systems). +/usr/share/X11 on POSIX systems). </para> </listitem> <listitem> @@ -627,11 +653,11 @@ The special strings `XtDefaultForeground' and `XtDefaultBackground' </sect3> <sect3 id="Bitmap_Conversion"> <title>Bitmap Conversion</title> -<!-- .IN "bitmap conversions" "" "@DEF@" --> -<!-- .IN "conversions" "Bitmap" "@DEF@" --> -<!-- .IN "bitmapFilePath" "" "@DEF@" --> -<!-- .IN "BitmapFilePath" "" "@DEF@" --> -<!-- .IN "/usr/include/X11/bitmaps" "" "" --> +<indexterm significance="preferred"><primary>bitmap conversions</primary></indexterm> +<indexterm significance="preferred"><primary>conversions</primary><secondary>Bitmap</secondary></indexterm> +<indexterm significance="preferred"><primary>bitmapFilePath</primary></indexterm> +<indexterm significance="preferred"><primary>BitmapFilePath</primary></indexterm> +<indexterm><primary>/usr/include/X11/bitmaps</primary></indexterm> <para> <!-- .LP --> The string-to-bitmap converter attempts to locate a file containing @@ -646,7 +672,7 @@ for each widget that wishes to convert a cursor to bitmap. In addition to the directories specified in the <function>bitmapFilePath</function> resource a default directory is searched. When using POSIX the default directory is -<function>/usr/include/X11/bitmaps .</function> +<function>/usr/include/X11/bitmaps</function>. </para> </sect3> </sect2> @@ -657,7 +683,7 @@ directory is <!-- .XS --> <!-- Realizing a Widget --> <!-- .XE --> -<!-- .IN "realizing widgets" "" "@DEF@" --> +<indexterm significance="preferred"><primary>realizing widgets</primary></indexterm> The <xref linkend='XtRealizeWidget' xrefstyle='select: title'/> function performs two tasks: @@ -674,7 +700,7 @@ for performance reasons. <para> Creates an X window for the widget and, if it is a composite widget, realizes each of its managed children. -<!-- .IN "XtRealizeWidget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtRealizeWidget</primary></indexterm> <funcsynopsis id='XtRealizeWidget'> <funcprototype> <funcdef>void<function> XtRealizeWidget</function></funcdef> @@ -693,7 +719,8 @@ Specifies the widget. <para> <!-- .LP --> For further information about this function, -see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +see the <olink targetdoc='intrinsics' targetptr='XtRealizeWidget' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect2> <sect2 id="Processing_Events"> @@ -703,13 +730,13 @@ see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasi <!-- .XS --> <!-- Processing Events --> <!-- .XE --> -<!-- .IN "events" "" "" --> -<!-- .IN "XtAppInitialize" "" "" --> +<indexterm><primary>events</primary></indexterm> +<indexterm><primary>XtAppInitialize</primary></indexterm> Now that the application has created, managed and realized its widgets, it is ready to process the events that will be delivered by the X Server to this client. A function call that will process the events is <xref linkend='XtAppMainLoop' xrefstyle='select: title'/>. -<!-- .IN "XtAppMainLoop" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtAppMainLoop</primary></indexterm> <funcsynopsis id='XtAppMainLoop'> <funcprototype> <funcdef>void<function> XtAppMainLoop</function></funcdef> @@ -725,7 +752,7 @@ events is <xref linkend='XtAppMainLoop' xrefstyle='select: title'/>. <listitem> <para> Specifies the application context of this application. The value is -normally returned by <xref linkend='XtAppInitialize' xrefstyle='select: title'/>. +normally returned by <xref linkend='XtOpenApplication' xrefstyle='select: title'/>. </para> </listitem> </varlistentry> @@ -736,7 +763,8 @@ normally returned by <xref linkend='XtAppInitialize' xrefstyle='select: title'/> This function never returns: it is an infinite loop that processes the X events. User input can be handled through callback procedures and application defined action routines. More details are provided in -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +<olink targetdoc='intrinsics' targetptr='Event_Management' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect2> <sect2 id="Standard_Widget_Manipulation_Functions"> @@ -789,9 +817,9 @@ widget windows are mapped (made viewable) automatically by <xref linkend='XtRealizeWidget' xrefstyle='select: title'/>. This behavior can be disabled by using <xref linkend='XtSetMappedWhenManaged' xrefstyle='select: title'/>, making the client responsible for calling <xref linkend='XtMapWidget' xrefstyle='select: title'/> to make the widget viewable. -<!-- .IN "XtSetMappedWhenManaged" "" "@DEF@" --> -<!-- .IN "XtMapWidget" "" "" --> -<!-- .IN "XtRealizeWidget" "" "" --> +<indexterm significance="preferred"><primary>XtSetMappedWhenManaged</primary></indexterm> +<indexterm><primary>XtMapWidget</primary></indexterm> +<indexterm><primary>XtRealizeWidget</primary></indexterm> <funcsynopsis id='XtSetMappedWhenManaged'> <funcprototype> <funcdef>void<function> XtSetMappedWhenManaged</function></funcdef> @@ -836,7 +864,7 @@ to cause the child window to be mapped. The definition for <xref linkend='XtMapWidget' xrefstyle='select: title'/> is: -<!-- .IN "XtMapWidget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtMapWidget</primary></indexterm> <funcsynopsis id='XtMapWidget'> <funcprototype> <funcdef>void<function> XtMapWidget</function></funcdef> @@ -865,9 +893,9 @@ list of children as they are created (using <function>XtCreateWidget</function>) then use <xref linkend='XtManageChildren' xrefstyle='select: title'/> to request that their parent managed them all at once. By managing a list of children at one time, the parent can avoid wasteful duplication of geometry processing and the -associated ``screen flash''. -<!-- .IN "XtManageChildren" "" "@DEF@" --> -<!-- .IN "XtCreateWidget" "" "" --> +associated <quote>screen flash</quote>. +<indexterm significance="preferred"><primary>XtManageChildren</primary></indexterm> +<indexterm><primary>XtCreateWidget</primary></indexterm> <funcsynopsis id='XtManageChildren'> <funcprototype> <funcdef>void<function> XtManageChildren</function></funcdef> @@ -908,7 +936,8 @@ reconfiguration is performed. <para> <!-- .LP --> For further information about these functions, -see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +see the <olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect3> <sect3 id="Destroying_Widgets"> @@ -917,7 +946,7 @@ see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasi <!-- .LP --> To destroy a widget instance of any type, use <xref linkend='XtDestroyWidget' xrefstyle='select: title'/> -<!-- .IN "XtDestroyWidget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtDestroyWidget</primary></indexterm> <funcsynopsis id='XtDestroyWidget'> <funcprototype> <funcdef>void<function> XtDestroyWidget</function></funcdef> @@ -944,7 +973,7 @@ Specifies the widget. destroys the widget and recursively destroys any children that it may have, including the windows created by its children. After calling -<function>XtDestroyWidget ,</function> +<function>XtDestroyWidget</function>, no further references should be made to the widget or any children that the destroyed widget may have had. </para> @@ -955,8 +984,8 @@ that the destroyed widget may have had. <!-- .LP --> To retrieve the current value of a resource attribute associated with a widget instance, use -<function>XtGetValues .</function> -<!-- .IN "XtGetValues" "" "@DEF@" --> +<function>XtGetValues</function>. +<indexterm significance="preferred"><primary>XtGetValues</primary></indexterm> <funcsynopsis id='XtGetValues'> <funcprototype> <funcdef>void<function> XtGetValues</function></funcdef> @@ -1007,7 +1036,9 @@ The arguments and values passed in the argument list are dependent on the widget. Note that the caller is responsible for providing space into which the returned resource value is copied; the <function>ArgList</function> contains a pointer to this storage (e.g. x and y must be -allocated as Position). For further information, see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +allocated as Position). For further information, see the +<olink targetdoc='intrinsics' targetptr='Reading_and_Writing_Widget_State' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect3> <sect3 id="Modifying_Widget_Resource_Values"> @@ -1016,8 +1047,8 @@ allocated as Position). For further information, see the <emphasis remap='I'>X <!-- .LP --> To modify the current value of a resource attribute associated with a widget instance, use -<function>XtSetValues .</function> -<!-- .IN "XtSetValues" "" "@DEF@" --> +<function>XtSetValues</function>. +<indexterm significance="preferred"><primary>XtSetValues</primary></indexterm> <funcsynopsis id='XtSetValues'> <funcprototype> <funcdef>void<function> XtSetValues</function></funcdef> @@ -1071,15 +1102,17 @@ ignored. </para> <para> <!-- .LP --> -For further information about these functions, see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. -<!-- .IN "XtGetValues" "" "" --> -<!-- .IN "XtSetValues" "" "" --> +For further information about these functions, see the +<olink targetdoc='intrinsics' targetptr='Reading_and_Writing_Widget_State' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. +<indexterm><primary>XtGetValues</primary></indexterm> +<indexterm><primary>XtSetValues</primary></indexterm> <!-- .NT --> The argument list entry for <xref linkend='XtGetValues' xrefstyle='select: title'/> specifies the address to which the caller wants the value copied. The argument list entry for -<function>XtSetValues ,</function> +<function>XtSetValues</function>, however, contains the new value itself, if the size of value is less than sizeof(XtArgVal) (architecture dependent, but at least sizeof(long)); otherwise, it is a pointer to the value. String resources are always @@ -1095,11 +1128,11 @@ passed as pointers, regardless of the length of the string. <!-- .XS --> <!-- Using the Client Callback Interface --> <!-- .XE --> -<!-- .IN "callbacks" "" "" --> +<indexterm><primary>callbacks</primary></indexterm> Widgets can communicate changes in their state to their clients by means of a callback facility. The format for a client's callback handler is: -<!-- .IN "CallbackProc" "" "@DEF@" --> +<indexterm significance="preferred"><primary>CallbackProc</primary></indexterm> <funcsynopsis id='CallbackProc'> <funcprototype> <funcdef>void<function> CallbackProc</function></funcdef> @@ -1157,14 +1190,14 @@ the callback list described below or by using the special convenience routines <xref linkend='XtAddCallback' xrefstyle='select: title'/> and <function>XtAddCallbacks</function>. When the widget is created, a pointer to a list of callback procedure and data pairs can be passed in the argument list to -<function>XtCreateWidget .</function> +<function>XtCreateWidget</function>. The list is of type <function>XtCallbackList :</function> -<!-- .IN "XtCallbackProc" --> -<!-- .IN "XtAddCallbacks" --> -<!-- .IN "XtAddCallback" --> -<!-- .IN "XtCallbackList" "" "@DEF@" --> -<!-- .IN "XtCallbackRec" "" "@DEF@" --> +<indexterm><primary>XtCallbackProc</primary></indexterm> +<indexterm><primary>XtAddCallbacks</primary></indexterm> +<indexterm><primary>XtAddCallback</primary></indexterm> +<indexterm significance="preferred"><primary>XtCallbackList</primary></indexterm> +<indexterm significance="preferred"><primary>XtCallbackRec</primary></indexterm> </para> <para> <!-- .LP --> @@ -1180,8 +1213,8 @@ typedef struct { <para> <!-- .LP --> The callback list must be allocated and initialized before calling -<function>XtCreateWidget .</function> -<!-- .IN "XtCreateWidget" --> +<function>XtCreateWidget</function>. +<indexterm><primary>XtCreateWidget</primary></indexterm> The end of the list is identified by an entry containing NULL in callback and closure. Once the widget is created, the client can change or de-allocate this list; the widget itself makes no further reference @@ -1193,7 +1226,7 @@ callback when the callback list is executed. The second method for registering callbacks is to use <xref linkend='XtAddCallback' xrefstyle='select: title'/> after the widget has been created. -<!-- .IN "XtAddCallback" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtAddCallback</primary></indexterm> <funcsynopsis id='XtAddCallback'> <funcprototype> <funcdef>void<function> XtAddCallback</function></funcdef> @@ -1256,7 +1289,7 @@ adds the specified callback to the list for the named widget. <!-- .LP --> All widgets provide a callback list named <function>destroyCallback</function> -<!-- .IN "destroyCallback" "" "@DEF@" --> +<indexterm significance="preferred"><primary>destroyCallback</primary></indexterm> where clients can register procedures that are to be executed when the widget is destroyed. The destroy callbacks are executed when the widget or an ancestor is destroyed. The <emphasis remap='I'>call_data</emphasis> argument is unused for @@ -1277,9 +1310,9 @@ program that uses the X Toolkit. <title>Writing Applications</title> <para> <!-- .LP --> -<!-- .IN "writing applications" --> -<!-- .IN "StringDefs.h" --> -<!-- .IN "Intrinsic.h" --> +<indexterm><primary>writing applications</primary></indexterm> +<indexterm><primary>StringDefs.h</primary></indexterm> +<indexterm><primary>Intrinsic.h</primary></indexterm> When writing an application that uses the X Toolkit, you should make sure that your application performs the following: </para> @@ -1287,12 +1320,12 @@ you should make sure that your application performs the following: <listitem> <para> Include -<function>< X11/Intrinsic.h ></function> +<filename class="headerfile"><X11/Intrinsic.h></filename> in your application programs. This header file automatically includes -<function>< X11/Xlib.h >,</function> +<filename class="headerfile"><X11/Xlib.h></filename>, so all Xlib functions also are defined. -It may also be necessary to include <function>< X11/StringDefs.h ></function> when setting +It may also be necessary to include <filename class="headerfile"><X11/StringDefs.h></filename> when setting up argument lists, as many of the XtN<emphasis remap='I'>something</emphasis> definitions are only defined in this file. </para> @@ -1302,19 +1335,21 @@ only defined in this file. Include the widget-specific header files for each widget type that you need to use. For example, -<function>< X11/Xaw/Label.h ></function> +<filename class="headerfile"><X11/Xaw/Label.h></filename> and -<function>< X11/Xaw/Command.h >.</function> +<filename class="headerfile"><X11/Xaw/Command.h></filename>. </para> </listitem> <listitem> <para> Call the -<xref linkend='XtAppInitialize' xrefstyle='select: title'/> -<!-- .IN "XtAppInitialize" --> +<xref linkend='XtOpenApplication' xrefstyle='select: title'/> +<indexterm><primary>XtOpenApplication</primary></indexterm> function before invoking any other toolkit or Xlib functions. For further information, -see Section 2.1 and the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +see Section 2.1 and the +<olink targetdoc='intrinsics' targetptr='Widget_Instantiation' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </listitem> <listitem> @@ -1325,10 +1360,8 @@ document, a list of valid argument names is provided in the discussion of each widget. The names each have a global symbol defined that begins with <function>XtN</function> to help catch spelling errors. For example, <function>XtNlabel</function> is defined for the <function>label</function> resource of many widgets. -<!-- .IN "XtN" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtN</primary></indexterm> </para> - </listitem> - <listitem> <para> For further information, see Section 2.9.2.2. <!-- xref --> </para> @@ -1337,8 +1370,10 @@ For further information, see Section 2.9.2.2. <!-- xref --> <para> When the argument list is set up, create the widget with the <xref linkend='XtCreateManagedWidget' xrefstyle='select: title'/> function. For further information, see -Section 2.2 and the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. -<!-- .IN "XtCreateManagedWidget" --> +Section 2.2 and the +<olink targetdoc='intrinsics' targetptr='XtCreateManagedWidget' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. +<indexterm><primary>XtCreateManagedWidget</primary></indexterm> </para> </listitem> <listitem> @@ -1348,7 +1383,7 @@ If the widget has any callback routines, set by the argument or the <xref linkend='XtAddCallback' xrefstyle='select: title'/> function, declare these routines within the application. -<!-- .IN "XtAddCallback" --> +<indexterm><primary>XtAddCallback</primary></indexterm> </para> </listitem> <listitem> @@ -1357,19 +1392,15 @@ After creating the initial widget hierarchy, windows must be created for each widget by calling <xref linkend='XtRealizeWidget' xrefstyle='select: title'/> on the top level widget. -<!-- .IN "XtRealizeWidget" --> +<indexterm><primary>XtRealizeWidget</primary></indexterm> </para> </listitem> <listitem> <para> Most applications now sit in a loop processing events using -<function>XtAppMainLoop ,</function> +<function>XtAppMainLoop</function>, for example: -<!-- .IN "XtAppMainLoop" --> - </para> - </listitem> - <listitem> - <para> +<indexterm><primary>XtAppMainLoop</primary></indexterm> <literallayout class="monospaced"> XtCreateManagedWidget(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>class</emphasis>, <emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>args</emphasis>, <emphasis remap='I'>num_args</emphasis>); XtRealizeWidget(<emphasis remap='I'>shell</emphasis>); @@ -1379,7 +1410,9 @@ XtAppMainLoop(<emphasis remap='I'>app_context</emphasis>); </listitem> <listitem> <para> -For information about this function, see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +For information about this function, see the +<olink targetdoc='intrinsics' targetptr='Event_Management' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </listitem> <listitem> @@ -1401,22 +1434,21 @@ rounded Command buttons), and <function>libX11</function> (the core X library). The following provides a sample command line: -<!-- .IN "libXaw" --> -<!-- .IN "libXmu" --> -<!-- .IN "libXt" --> -<!-- .IN "libSM" --> -<!-- .IN "libICE" --> -<!-- .IN "libXext" --> -<!-- .IN "libX11" --> -<!-- .IN "linking applications" --> -<!-- .IN "compiling applications" --> +<indexterm><primary>libXaw</primary></indexterm> +<indexterm><primary>libXmu</primary></indexterm> +<indexterm><primary>libXt</primary></indexterm> +<indexterm><primary>libSM</primary></indexterm> +<indexterm><primary>libICE</primary></indexterm> +<indexterm><primary>libXext</primary></indexterm> +<indexterm><primary>libX11</primary></indexterm> +<indexterm><primary>linking applications</primary></indexterm> +<indexterm><primary>compiling applications</primary></indexterm> </para> </listitem> <listitem> <para> <literallayout class="monospaced"> -cc -o <emphasis remap='I'>application</emphasis> <emphasis remap='I'>application</emphasis>.c \-lXaw \-lXmu \-lXt \ -\-lSM \-lICE \-lXext \-lX11 +cc -o <emphasis remap='I'>application</emphasis> <emphasis remap='I'>application</emphasis>.c -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 </literallayout> </para> </listitem> @@ -1424,7 +1456,7 @@ cc -o <emphasis remap='I'>application</emphasis> <emphasis remap='I'>application </sect3> <sect3 id="Changing_Resource_Values"> <title>Changing Resource Values</title> -<!-- .IN "resource" "" --> +<indexterm><primary>resource</primary></indexterm> <para> <!-- .LP --> The Intrinsics support two methods of changing the default resource @@ -1437,10 +1469,15 @@ functionality. <term>Resource Manager</term> <listitem> <para> -This method picks up resource definitions described in <emphasis remap='I'>Xlib - C Language Interface</emphasis> from +This method picks up resource definitions described in +<olink targetdoc='libX11' targetptr='Resource_Manager_Functions' +><citetitle>Xlib - C Language Interface</citetitle></olink> from many different locations at run time. The locations most important to the application programmer are the <emphasis remap='I'>fallback resources</emphasis> and the -<emphasis remap='I'>app-defaults</emphasis> file, (see <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis> for the complete list). +<emphasis remap='I'>app-defaults</emphasis> file, (see +<olink targetdoc='intrinsics' targetptr='Loading_the_Resource_Database' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink> +for the complete list). Since these resource are loaded at run time, they can be overridden by the user, allowing an application to be customized to fit the particular needs of each individual user. These values can also be @@ -1473,7 +1510,7 @@ understand how to use the X Resource Manager to specify resources for widgets in an X application. This section will describe the most common methods used to specify these resources, and how to use the X Resource manager. -<!-- .IN "xrdb" --> +<indexterm><primary>xrdb</primary></indexterm> <variablelist> <varlistentry> <term> @@ -1485,9 +1522,9 @@ The <function>xrdb</function> utility may be used to load a file containing resources into the X server. Once the resources are loaded, the resources will affect any new applications started on the display that they were loaded onto. -<!-- .IN "application defaults" --> -<!-- .IN "app-defaults" --> -<!-- .IN "/usr/lib/X11/app-defaults" --> +<indexterm><primary>application defaults</primary></indexterm> +<indexterm><primary>app-defaults</primary></indexterm> +<indexterm><primary>/usr/share/X11/app-defaults</primary></indexterm> </para> </listitem> </varlistentry> @@ -1496,7 +1533,7 @@ they were loaded onto. <listitem> <para> The application defaults (app-defaults) file (normally in -/usr/lib/X11/app-defaults/<emphasis remap='I'>classname</emphasis>) for an application is loaded +/usr/share/X11/app-defaults/<emphasis remap='I'>classname</emphasis>) for an application is loaded whenever the application is started. </para> </listitem> @@ -1591,7 +1628,7 @@ This matches any widget in the Foo application that is named <emphasis remap='I' <para> <!-- .LP --> The root of all application widget trees is the widget returned by -<xref linkend='XtAppInitialize' xrefstyle='select: title'/>. Even though this is actually an +<xref linkend='XtOpenApplication' xrefstyle='select: title'/>. Even though this is actually an ApplicationShell widget, the toolkit replaces its widget class with the class name of the application. The name of this widget is either the name used to invoke the application (<function>argv[0]</function>) or the name of @@ -1661,7 +1698,7 @@ An application programmer may add new resources to their application. These resources are associated with the global application, and not any particular widget. The X Toolkit function used for adding the application resources is <function>XtGetApplicationResources</function>. -<!-- .IN "XtGetApplicationResources" --> +<indexterm><primary>XtGetApplicationResources</primary></indexterm> </para> </listitem> <listitem> @@ -1702,26 +1739,30 @@ will override program defaults. <para> <!-- .LP --> For a complete explanation of the rules of precedence, and -other specific topics see <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis> and <emphasis remap='I'>Xlib - C Language Interface</emphasis>. +other specific topics see +<olink targetdoc='intrinsics' targetptr='Loading_the_Resource_Database' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink> and <olink targetdoc='libX11' targetptr='Resource_Manager_Functions' +><citetitle>Xlib - C Language Interface</citetitle></olink>. </para> </sect4> <sect4 id="Creating_Argument_Lists"> <title>Creating Argument Lists</title> -<!-- .IN "argument lists" "" "@DEF@" --> +<indexterm significance="preferred"><primary>argument lists</primary></indexterm> <para> <!-- .LP --> To set up an argument list for the inline specification of widget attributes, you may use any of the four approaches discussed in this section. Each resource name has a global symbol associated with it. This global symbol has the form XtN<emphasis remap='I'>resource name</emphasis>. For example, the -symbol for ``foreground'' is <function>XtNforeground</function>. For further information, -see the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +symbol for <quote>foreground</quote> is <function>XtNforeground</function>. For further information, +see the <olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> <para> <!-- .LP --> Argument are specified by using the following structure: -<!-- .IN "ArgList" "" "@DEF@" --> -<!-- .IN "Arg" "" "@DEF@" --> +<indexterm significance="preferred"><primary>ArgList</primary></indexterm> +<indexterm significance="preferred"><primary>Arg</primary></indexterm> </para> <para> <!-- .LP --> @@ -1755,7 +1796,7 @@ static Arg arglist[] = { This approach is convenient for lists that do not need to be computed at runtime and makes adding or deleting new elements easy. The -<!-- .IN "XtNumber" --> +<indexterm><primary>XtNumber</primary></indexterm> <function>XtNumber</function> macro is used to compute the number of elements in the argument list, preventing simple programming errors: @@ -1765,7 +1806,7 @@ preventing simple programming errors: <literallayout class="monospaced"> XtCreateWidget(<emphasis remap='I'>name</emphasis>, <emphasis remap='I'>class</emphasis>, <emphasis remap='I'>parent</emphasis>, <emphasis remap='I'>arglist</emphasis>, XtNumber(<emphasis remap='I'>arglist</emphasis>)); </literallayout> -<!-- .IN "XtSetArg" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XtSetArg</primary></indexterm> </para> <para> <!-- .LP --> @@ -1805,13 +1846,13 @@ XtSetArg(arglist[i], XtNheight, 300); i++; The i variable can then be used as the argument list count in the widget create function. In this example, -<!-- .IN "XtNumber" --> +<indexterm><primary>XtNumber</primary></indexterm> <function>XtNumber</function> would return 10, not 2, and therefore is not useful. <!-- .NT --> You should not use auto-increment or auto-decrement within the first argument to -<function>XtSetArg .</function> +<function>XtSetArg</function>. As it is currently implemented, <function>XtSetArg</function> is a macro that dereferences the first argument twice. @@ -1837,7 +1878,7 @@ arglist[1].value = (XtArgVal) 300; <para> <!-- .LP --> Note that in this example, as in the previous example, -<!-- .IN "XtNumber" --> +<indexterm><primary>XtNumber</primary></indexterm> <function>XtNumber</function> would return 10, not 2, and therefore would not be useful. </para> @@ -1862,7 +1903,7 @@ arglist[1].value = (XtArgVal) 300; <para> <!-- .LP --> In this example, -<!-- .IN "XtNumber" --> +<indexterm><primary>XtNumber</primary></indexterm> <function>XtNumber</function> can be used, as in the first approach, for easier code maintenance. </para> @@ -1874,7 +1915,7 @@ can be used, as in the first approach, for easier code maintenance. <!-- .XS --> <!-- Example Programs --> <!-- .XE --> -<!-- .IN "examples" --> +<indexterm><primary>examples</primary></indexterm> <para> <!-- .LP --> The best way to understand how to use any programming library is by diff --git a/lib/libXaw/specs/CH3.xml b/lib/libXaw/specs/CH3.xml index 37ee8b5ae..563f92edb 100644 --- a/lib/libXaw/specs/CH3.xml +++ b/lib/libXaw/specs/CH3.xml @@ -4,7 +4,8 @@ <!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH3.intro.xml"/> --> <para> Each of these widgets performs a specific user interface function. They -are <emphasis remap='I'>simple</emphasis> because they cannot have widget children\(emthey may only +are <emphasis remap='I'>simple</emphasis> because they cannot have widget +children—they may only be used as leaves of the widget tree. These widgets display information or take user input. </para> diff --git a/lib/libXaw/specs/CH4.xml b/lib/libXaw/specs/CH4.xml index 0546af551..90b510938 100644 --- a/lib/libXaw/specs/CH4.xml +++ b/lib/libXaw/specs/CH4.xml @@ -68,7 +68,7 @@ also provided as part of the Athena widget set. <!-- .XS --> <!-- Using the Menus --> <!-- .XE --> -<!-- .IN "Menus" "using" --> +<indexterm><primary>Menus</primary><secondary>using</secondary></indexterm> <para> <!-- .LP --> The default configuration for the menus is press-drag-release. @@ -76,10 +76,10 @@ The menus will typically be activated by clicking a pointer button while the pointer is over a MenuButton, causing the menu to appear in a fixed location relative to that button; this is a <function>pulldown</function> menu. Menus may also be activated -<!-- .IN "Menus" "pulldown" --> +<indexterm><primary>Menus</primary><secondary>pulldown</secondary></indexterm> when a specific pointer and/or key sequence is used anywhere in the application; this is a <function>popup</function> menu (e.g. clicking Ctrl-<pointer -<!-- .IN "Menus" "popup" --> +<indexterm><primary>Menus</primary><secondary>popup</secondary></indexterm> button 1> in the common application <function>xterm</function>). In this case the menu should be positioned under the cursor. Typically menus will be placed so the pointer cursor is on @@ -96,7 +96,9 @@ and causes any mechanism associated with this entry to be invoked. </para> </sect1> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sme.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SimpleMenu.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SmeBSB.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SmeLine.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Sme.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MenuButton.xml"/> </chapter> diff --git a/lib/libXaw/specs/CH5.xml b/lib/libXaw/specs/CH5.xml index 2636aff1e..caa9dfa0d 100644 --- a/lib/libXaw/specs/CH5.xml +++ b/lib/libXaw/specs/CH5.xml @@ -13,8 +13,9 @@ ease customization. The AsciiText widget class (actually not limited to ASCII but so named for compatibility) is be general enough to most needs. If more flexibility, special features, or extra functionality is needed, they can be added by implementing a new TextSource or TextSink, or -by subclassing the Text Widget (See Section 5.8 for customization -details.) <!-- xref --> +by subclassing the Text Widget +(<link linkend='Customizing_the_Text_Widget'>See Section 5.8</link> +for customization details.) </para> <para> The words <emphasis remap='I'>insertion point</emphasis> are used in this chapter to refer to the text @@ -45,7 +46,7 @@ append-only mode. </para> <sect1 id="Text_Widget_for_Users"> <title>Text Widget for Users</title> -<!-- .IN "Text widget" "User's Guide to the Text widget" --> +<indexterm><primary>Text widget</primary><secondary>User's Guide to the Text widget</secondary></indexterm> <!-- .XS --> <!-- Text Widget for Users --> <!-- .XE --> @@ -58,7 +59,7 @@ read-only text widget), the X server will beep. </para> <sect2 id="Default_Key_Bindings"> <title>Default Key Bindings</title> -<!-- .IN "Text widget" "default key bindings" --> +<indexterm><primary>Text widget</primary><secondary>default key bindings</secondary></indexterm> <para> <!-- .LP --> The default key bindings are patterned after those in the EMACS text editor: @@ -125,8 +126,8 @@ programmer can modify them by changing the Text widget's </sect2> <sect2 id="Search_and_Replace"> <title>Search and Replace</title> -<!-- .IN "Text widget" "search" --> -<!-- .IN "Text widget" "query replace" --> +<indexterm><primary>Text widget</primary><secondary>search</secondary></indexterm> +<indexterm><primary>Text widget</primary><secondary>query replace</secondary></indexterm> <para> <!-- .LP --> The Text widget provides a search popup that can be used to search for a @@ -259,7 +260,7 @@ Text <name of Text widget> <title>File Insertion</title> <para> <!-- .LP --> -<!-- .IN "Text widget" "file insertion" --> +<indexterm><primary>Text widget</primary><secondary>file insertion</secondary></indexterm> To insert a file into a text widget, type the key sequence <emphasis remap='I'>Meta-i</emphasis>, which will activate the file insert popup. This popup will appear under the pointer, and any text typed while the focus is in this popup will be @@ -295,7 +296,7 @@ Text <name of Text widget> <title>Text Selections for Users</title> <para> <!-- .LP --> -<!-- .IN "Text widget" "Text Selections for Users" --> +<indexterm><primary>Text widget</primary><secondary>Text Selections for Users</secondary></indexterm> The text widgets have a text selection mechanism that allows the user to copy pieces of the text into the <function>PRIMARY</function> selection, and paste @@ -387,11 +388,12 @@ To unset the text selection, click pointer button 1 without moving it. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextActions_text_widget_actions.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextActions_default_translation_bindings.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextFuncs.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiText.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiSource.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiSink.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextCustom.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Text.xml"/> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextSink.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextSource.xml"/> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiSink.xml"/> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiSource.xml"/> -<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AsciiText.xml"/> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TextSink.xml"/> + </chapter> diff --git a/lib/libXaw/specs/CH6.xml b/lib/libXaw/specs/CH6.xml index 84243870f..19a32af90 100644 --- a/lib/libXaw/specs/CH6.xml +++ b/lib/libXaw/specs/CH6.xml @@ -88,21 +88,23 @@ application programmer. <!-- .LP --> If the application wishes to change the size or location of any widget it should make a call to <xref linkend='XtSetValues' xrefstyle='select: title'/>. This will -<!-- .IN "XtSetValues" "" --> +<indexterm><primary>XtSetValues</primary></indexterm> allow the widget to ask its parent for the new size or location. As noted above the parent is allowed to refuse this request, and the child must live with the result. If the application is unable to achieve the desired semantics, then perhaps it should use a different composite widget. Under no circumstances should an application programmer resort to <function>XtMoveWidget</function> or -<!-- .IN "XtMoveWidget" "" --> +<indexterm><primary>XtMoveWidget</primary></indexterm> <function>XtResizeWidget</function>; these functions are exclusively for the use of -<!-- .IN "XtResizeWidget" "" --> +<indexterm><primary>XtResizeWidget</primary></indexterm> Composite widget implementors. </para> <para> <!-- .LP --> -For more information on geometry management consult the <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +For more information on geometry management consult the +<olink targetdoc='intrinsics' targetptr='Geometry_Management' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </note> diff --git a/lib/libXaw/specs/CH7.xml b/lib/libXaw/specs/CH7.xml index a84e3cf5a..3b015b611 100644 --- a/lib/libXaw/specs/CH7.xml +++ b/lib/libXaw/specs/CH7.xml @@ -64,7 +64,7 @@ writing the new widget if an existing widget class Expose, Resize and/or GeometryManager method can be used by the subclass. </para> <para> -Note that some trivial uses of a ``bare-bones'' widget may be achieved by +Note that some trivial uses of a <quote>bare-bones</quote> widget may be achieved by simply creating an instance of the Core widget. The class variable to use when creating a Core widget is <function>widgetClass</function>. @@ -112,9 +112,12 @@ un-necessarily waste many resources. In this section, an outline will be given of the procedure to follow to construct a special-purpose widget to address the items listed above. The reader should refer to the appropriate sections of the -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis> -for complete details of the material outlined here. Section 1.4 of -the <emphasis remap='I'>Intrinsics</emphasis> should be read in +<olink targetdoc='intrinsics' targetptr='intrinsics' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink> +for complete details of the material outlined here. +<olink targetdoc='intrinsics' targetptr='Widgets' +>Section 1.4 of the <citetitle>Intrinsics</citetitle></olink> +should be read in conjunction with this section. </para> <para> @@ -150,11 +153,11 @@ widget implementation can be merged into other application code. <para> In the following example, the public header file -<function>< X11/Xaw/Template.h ></function>, +<filename class="headerfile"><X11/Xaw/Template.h></filename>, the private header file -<function>< X11/Xaw/TemplateP.h ></function> +<filename class="headerfile"><X11/Xaw/TemplateP.h></filename> and the source code file -<function>< X11/Xaw/Template.c ></function> +<filename class="headerfile"><X11/Xaw/Template.c></filename> will be modified to produce the "WindowWidget" described above. In each case, the files have been designed so that a global string replacement of "Template" and "template" diff --git a/lib/libXaw/specs/Command.xml b/lib/libXaw/specs/Command.xml index 92d1b7253..d9f0ce7bd 100644 --- a/lib/libXaw/specs/Command.xml +++ b/lib/libXaw/specs/Command.xml @@ -3,19 +3,19 @@ <!-- .XS --> <!-- Command Widget --> <!-- .XE --> -<!-- .IN "Command widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Command widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/Command.h> -<!-- .IN "Command.h" "" --> +<indexterm><primary>Command.h</primary></indexterm> Class header file <X11/Xaw/CommandP.h> -<!-- .IN "CommandP.h" "" --> +<indexterm><primary>CommandP.h</primary></indexterm> Class commandWidgetClass -<!-- .IN "commandWidgetClass" "" --> +<indexterm><primary>commandWidgetClass</primary></indexterm> Class Name Command -<!-- .IN "Command widget" "class name" --> +<indexterm><primary>Command widget</primary><secondary>class name</secondary></indexterm> Superclass Label <!-- .sp --> </literallayout> @@ -23,7 +23,7 @@ Superclass Label <!-- .LP --> The Command widget is an area, often rectangular, that contains text or a graphical image. Command widgets are often referred to as -``push buttons.'' When the pointer is over a Command widget, the +<quote>push buttons.</quote> When the pointer is over a Command widget, the widget becomes highlighted by drawing a rectangle around its perimeter. This highlighting indicates that the widget is ready for selection. When mouse button 1 is pressed, the Command widget indicates that @@ -44,7 +44,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Command widget" "resources" --> +<indexterm><primary>Command widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -334,7 +334,7 @@ retrieved from the argument list or from the resource database: </tbody> </tgroup> </informaltable> -\" Resource Descriptions +<!-- \" Resource Descriptions --> <!-- .Ac --> <!-- .As --> <!-- .Bg --> @@ -375,7 +375,7 @@ retrieved from the argument list or from the resource database: </sect2> <sect2 id="Command_Actions"> <title>Command Actions</title> -<!-- .IN "Command widget" "actions" --> +<indexterm><primary>Command widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The Command widget supports the following actions: @@ -401,7 +401,7 @@ and unhighlighted states with <function>highlight</function> and <function>unhig </itemizedlist> <para> <!-- .LP --> -<!-- .IN "Command widget" "translation bindings" --> +<indexterm><primary>Command widget</primary><secondary>translation bindings</secondary></indexterm> The following are the default translation bindings used by the Command widget: </para> @@ -410,10 +410,10 @@ Command widget: <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> - <EnterWindow>: highlight(\|) - <LeaveWindow>: reset(\|) - <Btn1Down>: set(\|) - <Btn1Up>: notify(\|) unset(\|) + <EnterWindow>: highlight( ) + <LeaveWindow>: reset( ) + <Btn1Down>: set( ) + <Btn1Up>: notify( ) unset( ) </literallayout> </para> <para> @@ -436,7 +436,7 @@ understood by this action procedure. If no argument is passed, </varlistentry> <varlistentry> <term> - <function>unhighlight</function>(\|) + <function>unhighlight</function>( ) </term> <listitem> <para> @@ -448,7 +448,7 @@ Command widget. </varlistentry> <varlistentry> <term> - <function>set</function>(\|) + <function>set</function>( ) </term> <listitem> <para> @@ -461,7 +461,7 @@ action causes the button to display its interior in the </varlistentry> <varlistentry> <term> - <function>unset</function>(\|) + <function>unset</function>( ) </term> <listitem> <para> @@ -473,7 +473,7 @@ Cancels the <emphasis remap='I'>set</emphasis> state and displays the interior o </varlistentry> <varlistentry> <term> - <function>reset</function>(\|) + <function>reset</function>( ) </term> <listitem> <para> @@ -485,7 +485,7 @@ in the <function>foreground</function> color. </varlistentry> <varlistentry> <term> - <function>notify</function>(\|) + <function>notify</function>( ) </term> <listitem> <para> diff --git a/lib/libXaw/specs/Dialog.xml b/lib/libXaw/specs/Dialog.xml index aff03d7ec..dad555784 100644 --- a/lib/libXaw/specs/Dialog.xml +++ b/lib/libXaw/specs/Dialog.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Dialog Widget --> <!-- .XE --> -<!-- .IN "Dialog widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Dialog widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Dialog.h> -<!-- .IN "Dialog.h" "" --> +<indexterm><primary>Dialog.h</primary></indexterm> Class Header file <X11/Xaw/DialogP.h> -<!-- .IN "DialogP.h" "" --> +<indexterm><primary>DialogP.h</primary></indexterm> Class dialogWidgetClass -<!-- .IN "dialogWidgetClass" "" --> +<indexterm><primary>dialogWidgetClass</primary></indexterm> Class Name Dialog -<!-- .IN "Dialog widget" "class name" --> +<indexterm><primary>Dialog widget</primary><secondary>class name</secondary></indexterm> Superclass Form <!-- .sp --> </literallayout> @@ -46,7 +46,7 @@ areas may be omitted by the application. <!-- .LP --> When creating a Dialog widget instance, the following resources are retrieved from the argument list or the resource database: -<!-- .IN "Dialog widget" "resources" --> +<indexterm><primary>Dialog widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -300,7 +300,7 @@ specified then set this resource to "" (empty string). <title>Constraint Resources</title> <para> <!-- .LP --> -<!-- .IN "Dialog widget" "constraint resources" --> +<indexterm><primary>Dialog widget</primary><secondary>constraint resources</secondary></indexterm> Each child of the Dialog widget may request special layout resources be applied to it. These <emphasis remap='I'>constraint</emphasis> resources allow the Dialog widget's children to specify individual layout requirements. @@ -424,7 +424,7 @@ resizable If this resource is False then the parent </sect2> <sect2 id='Dialog::Layout_Semantics'> <title>Layout Semantics</title> -<!-- .IN "Dialog widget" "layout semantics" --> +<indexterm><primary>Dialog widget</primary><secondary>layout semantics</secondary></indexterm> <para> The Dialog widget uses two different sets of layout seman- tics. One is used when initially laying out the children. @@ -530,7 +530,7 @@ edges of the Dialog, and to never resize. </sect3> <sect3 id="Special_Considerations"> <title>Special Considerations</title> -<!-- .IN "Dialog widget" "special considerations" --> +<indexterm><primary>Dialog widget</primary><secondary>special considerations</secondary></indexterm> <para> <!-- .LP --> The Dialog widget automatically sets the <function>top</function> and <function>bottom</function> @@ -544,7 +544,7 @@ Command button without having to specify its constraints. <para> <!-- .LP --> The Dialog will also set <function>fromLeft</function> to the last button in the -<!-- .IN "fromLeft" "" --> +<indexterm><primary>fromLeft</primary></indexterm> Dialog for each new button added to the Dialog widget. </para> <para> @@ -558,14 +558,14 @@ own Dialog policy. </sect2> <sect2 id='Automatically_Created_Children'> <title>Automatically Created Children.</title> -<!-- .IN "Dialog widget" "automatically created children" --> +<indexterm><primary>Dialog widget</primary><secondary>automatically created children</secondary></indexterm> <para> <!-- .LP --> The Dialog uses Label widgets to contain the <function>label</function> and <function>icon</function>. These widgets are named <emphasis remap='I'>label</emphasis> and <emphasis remap='I'>icon</emphasis> respectively. The Dialog <function>value</function> is contained in an AsciiText widget whose name is <function>value</function>. Using <function>XtNameToWidget</function> the application can change -<!-- .IN "XtNameToWidget" "" --> +<indexterm><primary>XtNameToWidget</primary></indexterm> those resources associated with each of these widgets that are not available through the Dialog widget itself. </para> @@ -579,7 +579,7 @@ available through the Dialog widget itself. <!-- .LP --> To return the character string in the text field, use <!-- .PN XawDialogGetValueString . --> -<!-- .IN "XawDialogGetValueString" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawDialogGetValueString</primary></indexterm> <funcsynopsis id='XawDialogGetValueString'> <funcprototype> <funcdef>String<function> XawDialogGetValueString</function></funcdef> @@ -609,14 +609,14 @@ remain valid and unchanged until another call to <function>value</function> widget, when the string will be automatically freed, and a new string is returned. This string may be freed earlier by calling the function <xref linkend='XawAsciiSourceFreeString' xrefstyle='select: title'/>. -<!-- .IN "XawAsciiSourceFreeString" "" --> +<indexterm><primary>XawAsciiSourceFreeString</primary></indexterm> </para> <para> <!-- .LP --> <!-- .sp --> To add a new button to the Dialog widget use <xref linkend='XawDialogAddButton' xrefstyle='select: title'/>. -<!-- .IN "XawDialogAddButton" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawDialogAddButton</primary></indexterm> <funcsynopsis id='XawDialogAddButton'> <funcprototype> <funcdef>void<function> XawDialogAddButton</function></funcdef> diff --git a/lib/libXaw/specs/Form.xml b/lib/libXaw/specs/Form.xml index a6e0a0c3b..c0370a871 100644 --- a/lib/libXaw/specs/Form.xml +++ b/lib/libXaw/specs/Form.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Form Widget --> <!-- .XE --> -<!-- .IN "Form widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Form widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Form.h> -<!-- .IN "Form.h" "" --> +<indexterm><primary>Form.h</primary></indexterm> Class Header file <X11/Xaw/FormP.h> -<!-- .IN "FormP.h" "" --> +<indexterm><primary>FormP.h</primary></indexterm> Class formWidgetClass -<!-- .IN "formWidgetClass" "" --> +<indexterm><primary>formWidgetClass</primary></indexterm> Class Name Form -<!-- .IN "Form widget" "class name" --> +<indexterm><primary>Form widget</primary><secondary>class name</secondary></indexterm> Superclass Constraint <!-- .sp --> </literallayout> @@ -51,7 +51,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Form widget" "resources" --> +<indexterm><primary>Form widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -247,7 +247,7 @@ retrieved from the argument list or from the resource database: <title>Constraint Resources</title> <para> <!-- .LP --> -<!-- .IN "Form widget" "constraint resources" --> +<indexterm><primary>Form widget</primary><secondary>constraint resources</secondary></indexterm> Each child of the Form widget may request special layout resources be applied to it. These <emphasis remap='I'>constraint</emphasis> resources allow the Form widget's children to specify individual layout requirements. @@ -486,8 +486,8 @@ Form, and never to resize. <!-- .LP --> To force or defer a re-layout of the Form, use <!-- .PN XawFormDoLayout . --> -<!-- .IN "Form widget" "re-layout" --> -<!-- .IN "XawFormDoLayout" "" "@DEF@" --> +<indexterm><primary>Form widget</primary><secondary>re-layout</secondary></indexterm> +<indexterm significance="preferred"><primary>XawFormDoLayout</primary></indexterm> <funcsynopsis id='XawFormDoLayout'> <funcprototype> <funcdef>void<function> XawFormDoLayout</function></funcdef> diff --git a/lib/libXaw/specs/Grip.xml b/lib/libXaw/specs/Grip.xml index 73dd5a7ad..76ad5590d 100644 --- a/lib/libXaw/specs/Grip.xml +++ b/lib/libXaw/specs/Grip.xml @@ -3,19 +3,19 @@ <!-- .XS --> <!-- Grip Widget --> <!-- .XE --> -<!-- .IN "Grip widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Grip widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/Grip.h> -<!-- .IN "Grip.h" "" --> +<indexterm><primary>Grip.h</primary></indexterm> Class header file <X11/Xaw/GripP.h> -<!-- .IN "GripP.h" "" --> +<indexterm><primary>GripP.h</primary></indexterm> Class gripWidgetClass -<!-- .IN "gripWidgetClass" "" --> +<indexterm><primary>gripWidgetClass</primary></indexterm> Class Name Grip -<!-- .IN "Grip widget" "class name" --> +<indexterm><primary>Grip widget</primary><secondary>class name</secondary></indexterm> Superclass Simple <!-- .sp --> </literallayout> @@ -35,7 +35,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Grip widget" "resources" --> +<indexterm><primary>Grip widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -290,12 +290,12 @@ used to flood fill the entire Grip widget. </sect2> <sect2 id="Grip_Actions"> <title>Grip Actions</title> -<!-- .IN "Grip widget" "actions" --> +<indexterm><primary>Grip widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The Grip widget does not declare any default event translation bindings, but it does declare a single action routine named <function>GripAction</function>. The -<!-- .IN "Grip widget" "GripAction routine" --> +<indexterm><primary>Grip widget</primary><secondary>GripAction routine</secondary></indexterm> client specifies an arbitrary event translation table, optionally giving parameters to the <function>GripAction</function> routine. </para> @@ -311,8 +311,8 @@ header file. <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> -<!-- .IN "XawGripCallData" "" "@DEF@" --> -<!-- .IN "XawGripCallDataRec" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawGripCallData</primary></indexterm> +<indexterm significance="preferred"><primary>XawGripCallDataRec</primary></indexterm> <!-- .sp --> typedef struct _XawGripCallData { XEvent *event; @@ -320,9 +320,9 @@ typedef struct _XawGripCallData { Cardinal num_params; } XawGripCallDataRec, *XawGripCallData, GripCallDataRec, *GripCallData; /* supported for R4 compatibility */ -<!-- .IN "XawGripCallDataRec" "" --> -<!-- .IN "XawGripCallData" "" --> -<!-- .IN "GripCallData" "" --> +<indexterm><primary>XawGripCallDataRec</primary></indexterm> +<indexterm><primary>XawGripCallData</primary></indexterm> +<indexterm><primary>GripCallData</primary></indexterm> <!-- .sp --> </literallayout> </para> @@ -332,7 +332,7 @@ In this structure, the <emphasis remap='I'>event</emphasis> is a pointer to the triggered the action. <emphasis remap='I'>params</emphasis> and <emphasis remap='I'>num_params</emphasis> give the string parameters specified in the translation table for the particular event binding. -<!-- .IN "Grip widget" "GripAction table" --> +<indexterm><primary>Grip widget</primary><secondary>GripAction table</secondary></indexterm> </para> <para> <!-- .LP --> @@ -350,7 +350,8 @@ The following is an example of a translation table that uses the GripAction: <!-- .sp --> </literallayout> For a complete description of the format of translation tables, see the -<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. +<olink targetdoc='intrinsics' targetptr='Translation_Management' +><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>. </para> </sect2> diff --git a/lib/libXaw/specs/Label.xml b/lib/libXaw/specs/Label.xml index 65c4a9261..0b145db33 100644 --- a/lib/libXaw/specs/Label.xml +++ b/lib/libXaw/specs/Label.xml @@ -3,19 +3,19 @@ <!-- .XS --> <!-- Label Widget --> <!-- .XE --> -<!-- .IN "Label widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Label widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/Label.h> -<!-- .IN "Label.h" "" --> +<indexterm><primary>Label.h</primary></indexterm> Class header file <X11/Xaw/LabelP.h> -<!-- .IN "LabelP.h" "" --> +<indexterm><primary>LabelP.h</primary></indexterm> Class labelWidgetClass -<!-- .IN "labelWidgetClass" "" --> +<indexterm><primary>labelWidgetClass</primary></indexterm> Class Name Label -<!-- .IN "Label widget" "class name" --> +<indexterm><primary>Label widget</primary><secondary>class name</secondary></indexterm> Superclass Simple <!-- .sp --> </literallayout> @@ -41,7 +41,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Label widget" "resources" --> +<indexterm><primary>Label widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> diff --git a/lib/libXaw/specs/List.xml b/lib/libXaw/specs/List.xml index 2c541dcd0..acf20cbcd 100644 --- a/lib/libXaw/specs/List.xml +++ b/lib/libXaw/specs/List.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- List Widget --> <!-- .XE --> -<!-- .IN "List widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>List widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/List.h> -<!-- .IN "List.h" "" --> +<indexterm><primary>List.h</primary></indexterm> Class header file <X11/Xaw/ListP.h> -<!-- .IN "ListP.h" "" --> +<indexterm><primary>ListP.h</primary></indexterm> Class listWidgetClass -<!-- .IN "listWidgetClass" "" --> +<indexterm><primary>listWidgetClass</primary></indexterm> Class Name List -<!-- .IN "List widget" "class name" --> +<indexterm><primary>List widget</primary><secondary>class name</secondary></indexterm> Superclass Simple <!-- .sp --> </literallayout> @@ -39,7 +39,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "List widget" "resources" --> +<indexterm><primary>List widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -443,7 +443,7 @@ used to paint the text of the list elements. </varlistentry> <varlistentry> <term> - \fPinternalHeight\fP + <function>internalHeight</function> </term> <listitem> <para> @@ -454,7 +454,7 @@ used to paint the text of the list elements. </varlistentry> <varlistentry> <term> - \fPinternalWidth\fP + <function>internalWidth</function> </term> <listitem> <para> @@ -541,7 +541,7 @@ presented in column major order. </sect2> <sect2 id="List_Actions"> <title>List Actions</title> -<!-- .IN "List widget" "actions" --> +<indexterm><primary>List widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The List widget supports the following actions: @@ -562,14 +562,14 @@ Processing application callbacks with <function>Notify</function> <para> <!-- .LP --> The following is the default translation table used by the List Widget: -<!-- .IN "List widget" "default translation table" --> +<indexterm><primary>List widget</primary><secondary>default translation table</secondary></indexterm> </para> <para> <!-- .LP --> <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> -<Btn1Down>,<Btn1Up>: Set(\|) Notify(\|) +<Btn1Down>,<Btn1Up>: Set( ) Notify( ) <!-- .sp --> </literallayout> </para> @@ -579,7 +579,7 @@ The full list of actions supported by List widget is: <variablelist> <varlistentry> <term> - <function>Set</function>(\|) + <function>Set</function>( ) </term> <listitem> <para> @@ -593,7 +593,7 @@ element will be <emphasis remap='I'>unset</emphasis>. </varlistentry> <varlistentry> <term> - <function>Unset</function>(\|) + <function>Unset</function>( ) </term> <listitem> <para> @@ -604,7 +604,7 @@ and redraws it with normal foreground and background colors. </varlistentry> <varlistentry> <term> - <function>Notify</function>(\|) + <function>Notify</function>( ) </term> <listitem> <para> @@ -619,7 +619,7 @@ about the currently selected list element is passed in the </sect2> <sect2 id="List_Callbacks"> <title>List Callbacks</title> -<!-- .IN "List widget" "callbacks" --> +<indexterm><primary>List widget</primary><secondary>callbacks</secondary></indexterm> <para> <!-- .LP --> All procedures on the List widget's callback list will have a @@ -630,12 +630,12 @@ structure is defined in the List widget's application header file. <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> -<!-- .IN "XawListReturnStruct" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawListReturnStruct</primary></indexterm> typedef struct _XawListReturnStruct { String string; /* string shown in the list. */ int list_index; /* index of the item selected. */ } XawListReturnStruct; -<!-- .IN "XawListReturnStruct" "" --> +<indexterm><primary>XawListReturnStruct</primary></indexterm> <!-- .NT --> </literallayout> <note><para> @@ -650,8 +650,8 @@ operating systems, and had to be changed. <para> <!-- .LP --> To change the list that is displayed, use -<function>XawListChange .</function> -<!-- .IN "XawListChange" "" "@DEF@" --> +<function>XawListChange</function>. +<indexterm significance="preferred"><primary>XawListChange</primary></indexterm> <funcsynopsis id='XawListChange'> <funcprototype> <funcdef>void<function> XawListChange</function></funcdef> @@ -736,8 +736,8 @@ has been changed again with this function or with <xref linkend='XtSetValues' xr <para> <!-- .LP --> To highlight an item in the list, use -<function>XawListHighlight .</function> -<!-- .IN "XawListHighlight" "" "@DEF@" --> +<function>XawListHighlight</function>. +<indexterm significance="preferred"><primary>XawListHighlight</primary></indexterm> <funcsynopsis id='XawListHighlight'> <funcprototype> <funcdef>void<function> XawListHighlight</function></funcdef> @@ -784,8 +784,8 @@ the highlighted item is unhighlighted before the new item is highlighted. <para> <!-- .LP --> To unhighlight the currently highlighted item in the list, use -<function>XawListUnhighlight .</function> -<!-- .IN "XawListUnhighlight" "" "@DEF@" --> +<function>XawListUnhighlight</function>. +<indexterm significance="preferred"><primary>XawListUnhighlight</primary></indexterm> <funcsynopsis id='XawListUnhighlight'> <funcprototype> <funcdef>void<function> XawListUnhighlight</function></funcdef> @@ -812,8 +812,8 @@ Specifies the List widget. <para> <!-- .LP --> To retrieve the list element that is currently <emphasis remap='I'>set</emphasis>, use -<function>XawListShowCurrent .</function> -<!-- .IN "XawListShowCurrent" "" "@DEF@" --> +<function>XawListShowCurrent</function>. +<indexterm significance="preferred"><primary>XawListShowCurrent</primary></indexterm> <funcsynopsis id='XawListShowCurrent'> <funcprototype> <funcdef>XawListReturnStruct<function> *XawListShowCurrent</function></funcdef> @@ -842,7 +842,7 @@ returns a pointer to an structure, containing the currently highlighted item. If the value of the index member is XAW_LIST_NONE, -<!-- .IN "XAW_LIST_NONE" --> +<indexterm><primary>XAW_LIST_NONE</primary></indexterm> the string member is undefined, and no item is currently selected. </para> </sect2> @@ -850,11 +850,11 @@ the string member is undefined, and no item is currently selected. <title>Restrictions</title> <para> <!-- .LP --> -Many programmers create a ``scrolled list'' by putting a List +Many programmers create a <quote>scrolled list</quote> by putting a List widget with many entries as a child of a Viewport widget. The List continues to create a window as big as its contents, but that big window is only visible where it intersects the parent -Viewport's window. (I.e., it is ``clipped.'') +Viewport's window. (I.e., it is <quote>clipped.</quote>) </para> <para> <!-- .LP --> diff --git a/lib/libXaw/specs/Makefile.in b/lib/libXaw/specs/Makefile.in index ef1ae100c..4044162f9 100644 --- a/lib/libXaw/specs/Makefile.in +++ b/lib/libXaw/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)/libXaw.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) \ @@ -81,7 +82,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 = libXaw.ent CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -285,6 +286,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -439,6 +441,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): +libXaw.ent: $(top_builddir)/config.status $(srcdir)/libXaw.ent.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo diff --git a/lib/libXaw/specs/MenuButton.xml b/lib/libXaw/specs/MenuButton.xml index b7df723bb..c73b0e0d8 100644 --- a/lib/libXaw/specs/MenuButton.xml +++ b/lib/libXaw/specs/MenuButton.xml @@ -1,21 +1,21 @@ -<sect2 id="MenuButton_Widget"> +<sect1 id="MenuButton_Widget"> <title>MenuButton Widget</title> <!-- .XS --> <!-- MenuButton Widget --> <!-- .XE --> -<!-- .IN "MenuButton widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>MenuButton widget</primary></indexterm> <!-- .sp --> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/MenuButton.h> -<!-- .IN "MenuButton.h" "" --> +<indexterm><primary>MenuButton.h</primary></indexterm> Class Header file <X11/Xaw/MenuButtonP.h> -<!-- .IN "MenuButtonP.h" "" --> +<indexterm><primary>MenuButtonP.h</primary></indexterm> Class menuButtonWidgetClass -<!-- .IN "menuButtonWidgetClass" "" --> +<indexterm><primary>menuButtonWidgetClass</primary></indexterm> Class Name MenuButton -<!-- .IN "MenuButton widget" "class name" --> +<indexterm><primary>MenuButton widget</primary><secondary>class name</secondary></indexterm> Superclass Command </literallayout> <para> @@ -38,7 +38,7 @@ that the MenuButton is ready for selection. When a pointer button is pressed, the MenuButton widget will pop up the menu named in the <function>menuName</function> resource. </para> -<sect3 id="Resources"> +<sect2 id="MenuButton::Resources"> <title>Resources</title> <para> <!-- .LP --> @@ -48,7 +48,7 @@ or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "MenuButton widget" "resources" --> +<indexterm><primary>MenuButton widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -410,10 +410,10 @@ nonvolatile memory. </varlistentry> </variablelist> </para> -</sect3> -<sect3 id="MenuButton_Actions"> +</sect2> +<sect2 id="MenuButton_Actions"> <title>MenuButton Actions</title> -<!-- .IN "MenuButton widget" "actions" --> +<indexterm><primary>MenuButton widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The MenuButton widget supports the following actions: @@ -453,13 +453,13 @@ MenuButton widget: <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> - <EnterWindow>: highlight(\|) - <LeaveWindow>: reset(\|) - <BtnDown>: reset(\|) PopupMenu(\) + <EnterWindow>: highlight( ) + <LeaveWindow>: reset( ) + <BtnDown>: reset( ) PopupMenu(\) </literallayout> </para> -</sect3> -<sect3 id='MenuButton_Actions_b'> +</sect2> +<sect2 id='MenuButton_Actions_b'> <title>MenuButton Actions</title> <para> <!-- .LP --> @@ -481,7 +481,7 @@ understood by this action procedure. If no argument is passed, </varlistentry> <varlistentry> <term> - <function>unhighlight</function>(\|) + <function>unhighlight</function>( ) </term> <listitem> <para> @@ -493,7 +493,7 @@ MenuButton widget. </varlistentry> <varlistentry> <term> - <function>set</function>(\|) + <function>set</function>( ) </term> <listitem> <para> @@ -506,7 +506,7 @@ action causes the button to display its interior in the </varlistentry> <varlistentry> <term> - <function>unset</function>(\|) + <function>unset</function>( ) </term> <listitem> <para> @@ -518,7 +518,7 @@ Cancels the <emphasis remap='I'>set</emphasis> state and displays the interior o </varlistentry> <varlistentry> <term> - <function>reset</function>(\|) + <function>reset</function>( ) </term> <listitem> <para> @@ -530,7 +530,7 @@ button in the <function>background</function> color, with the label displayed in </varlistentry> <varlistentry> <term> - <function>notify</function>(\|) + <function>notify</function>( ) </term> <listitem> <para> @@ -542,7 +542,7 @@ the call_data argument in these callback functions is undefined. </varlistentry> <varlistentry> <term> - <function>PopupMenu</function>(\|) + <function>PopupMenu</function>( ) </term> <listitem> <para> @@ -563,5 +563,5 @@ in the application initialization routine, or use a different translation. <!-- .bp --> </para> -</sect3> </sect2> +</sect1> diff --git a/lib/libXaw/specs/Paned.xml b/lib/libXaw/specs/Paned.xml index 6ab2f1d90..e23802bcf 100644 --- a/lib/libXaw/specs/Paned.xml +++ b/lib/libXaw/specs/Paned.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Paned Widget --> <!-- .XE --> -<!-- .IN "Paned widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Paned widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Paned.h> -<!-- .IN "Paned.h" "" --> +<indexterm><primary>Paned.h</primary></indexterm> Class Header file <X11/Xaw/PanedP.h> -<!-- .IN "PanedP.h" "" --> +<indexterm><primary>PanedP.h</primary></indexterm> Class panedWidgetClass -<!-- .IN "panedWidgetClass" "" --> +<indexterm><primary>panedWidgetClass</primary></indexterm> Class Name Paned -<!-- .IN "Paned widget" "class name" --> +<indexterm><primary>Paned widget</primary><secondary>class name</secondary></indexterm> Superclass Constraint <!-- .sp --> </literallayout> @@ -37,7 +37,7 @@ adding a Grip as its own pane will confuse the Paned widget. </para> <sect2 id="Using_the_Paned_Widget"> <title>Using the Paned Widget</title> -<!-- .IN "Paned widget" "using" --> +<indexterm><primary>Paned widget</primary><secondary>using</secondary></indexterm> <para> <!-- .LP --> The grips allow the panes to be resized by the user. The semantics of @@ -104,7 +104,7 @@ retrieved from the argument list or the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Paned widget" "resources" --> +<indexterm><primary>Paned widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -578,9 +578,9 @@ number of panes. <para> The orientation to stack the panes. This value can be either <function>XtorientVertical</function> or <function>XtorientHorizontal</function>. -<!-- .IN "XtorientVertical" "" --> -<!-- .IN "XtorientHorizontal" "" --> -<!-- .IN "conversions" "Orientation" --> +<indexterm><primary>XtorientVertical</primary></indexterm> +<indexterm><primary>XtorientHorizontal</primary></indexterm> +<indexterm><primary>conversions</primary><secondary>Orientation</secondary></indexterm> <!-- .Rs "vertical \fPand\fB horizontal" --> </para> </listitem> @@ -609,7 +609,7 @@ widget. <title>Constraint Resources</title> <para> <!-- .LP --> -<!-- .IN "Paned widget" "constraint resources" --> +<indexterm><primary>Paned widget</primary><secondary>constraint resources</secondary></indexterm> Each child of the Paned widget may request special layout resources be applied to it. These <emphasis remap='I'>constraint</emphasis> resources allow the Paned widget's children to specify individual layout requirements. @@ -779,7 +779,7 @@ forced to be resized. See <function>Layout Semantics</function> for details. <title>Layout Semantics</title> <para> <!-- .LP --> -<!-- .IN "Paned widget" "layout semantics" --> +<indexterm><primary>Paned widget</primary><secondary>layout semantics</secondary></indexterm> In order to make effective use of the Paned widget it is helpful to know the rules it uses to determine which child will be resized in any given situation. There are three rules used to determine which child is @@ -913,7 +913,7 @@ Translation table. <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> <Btn1Down>: GripAction(Start, UpLeftPane) -<!-- .IN "GripAction" "" --> +<indexterm><primary>GripAction</primary></indexterm> <Btn2Down>: GripAction(Start, ThisBorderOnly) <Btn3Down>: GripAction(Start, LowRightPane) <Btn1Motion>: GripAction(Move, UpLeftPane) @@ -926,7 +926,7 @@ Translation table. <para> <!-- .LP --> The Paned widget interprets the <function>GripAction</function> as taking two arguments. -<!-- .IN "GripAction" "" --> +<indexterm><primary>GripAction</primary></indexterm> The first argument may be any of the following: <variablelist> <varlistentry> @@ -974,12 +974,12 @@ grip's inactive cursor. No second argument is needed in this case. <title>Convenience Routines</title> <para> <!-- .LP --> -<!-- .IN "Paned widget" "enable pane resizing" --> -<!-- .IN "Paned widget" "disable pane resizing" --> +<indexterm><primary>Paned widget</primary><secondary>enable pane resizing</secondary></indexterm> +<indexterm><primary>Paned widget</primary><secondary>disable pane resizing</secondary></indexterm> To enable or disable a child's request for pane resizing, use <function>XawPanedAllowResize :</function> -<!-- .IN "XawPanedAllowResize" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPanedAllowResize</primary></indexterm> <funcsynopsis id='XawPanedAllowResize'> <funcprototype> <funcdef>void<function> XawPanedAllowResize</function></funcdef> @@ -1025,10 +1025,10 @@ constraint resource for the child. <para> <!-- .LP --> <!-- .sp --> -<!-- .IN "Paned widget" "change height settings" --> +<indexterm><primary>Paned widget</primary><secondary>change height settings</secondary></indexterm> To change the minimum and maximum height settings for a pane, use <function>XawPanedSetMinMax :</function> -<!-- .IN "XawPanedSetMinMax" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPanedSetMinMax</primary></indexterm> <funcsynopsis id='XawPanedSetMinMax'> <funcprototype> <funcdef>void<function> XawPanedSetMinMax</function></funcdef> @@ -1078,10 +1078,10 @@ constraint resources for the child. <para> <!-- .LP --> <!-- .sp --> -<!-- .IN "Paned widget" "get height settings" --> +<indexterm><primary>Paned widget</primary><secondary>get height settings</secondary></indexterm> To retrieve the minimum and maximum height settings for a pane, use <function>XawPanedGetMinMax :</function> -<!-- .IN "XawPanedGetMinMax" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPanedGetMinMax</primary></indexterm> <funcsynopsis id='XawPanedGetMinMax'> <funcprototype> <funcdef>void<function> XawPanedGetMinMax</function></funcdef> @@ -1131,12 +1131,12 @@ resources for this child child. <para> <!-- .LP --> <!-- .sp --> -<!-- .IN "Paned widget" "enable auto-reconfiguring" --> -<!-- .IN "Paned widget" "disable auto-reconfiguring" --> +<indexterm><primary>Paned widget</primary><secondary>enable auto-reconfiguring</secondary></indexterm> +<indexterm><primary>Paned widget</primary><secondary>disable auto-reconfiguring</secondary></indexterm> To enable or disable automatic recalculation of pane sizes and positions, use <function>XawPanedSetRefigureMode :</function> -<!-- .IN "XawPanedSetRefigureMode" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPanedSetRefigureMode</primary></indexterm> <funcsynopsis id='XawPanedSetRefigureMode'> <funcprototype> <funcdef>void<function> XawPanedSetRefigureMode</function></funcdef> @@ -1178,10 +1178,10 @@ relayout until after all changes have been made. <para> <!-- .LP --> <!-- .sp --> -<!-- .IN "Paned widget" "getting the number of children" --> +<indexterm><primary>Paned widget</primary><secondary>getting the number of children</secondary></indexterm> To retrieve the number of panes in a paned widget use <xref linkend='XawPanedGetNumSub' xrefstyle='select: title'/>: -<!-- .IN "XawPanedGetNumSub" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPanedGetNumSub</primary></indexterm> <funcsynopsis id='XawPanedGetNumSub'> <funcprototype> <funcdef>int<function> XawPanedGetNumSub</function></funcdef> diff --git a/lib/libXaw/specs/Panner.xml b/lib/libXaw/specs/Panner.xml index f886af0dd..60f08bbb9 100644 --- a/lib/libXaw/specs/Panner.xml +++ b/lib/libXaw/specs/Panner.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Panner Widget --> <!-- .XE --> -<!-- .IN "Panner widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Panner widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/Panner.h> -<!-- .IN "Panner.h" "" --> +<indexterm><primary>Panner.h</primary></indexterm> Class header file <X11/Xaw/PannerP.h> -<!-- .IN "PannerP.h" "" --> +<indexterm><primary>PannerP.h</primary></indexterm> Class pannerWidgetClass -<!-- .IN "pannerWidgetClass" "" --> +<indexterm><primary>pannerWidgetClass</primary></indexterm> Class Name Panner -<!-- .IN "Panner widget" "class name" --> +<indexterm><primary>Panner widget</primary><secondary>class name</secondary></indexterm> Superclass Simple <!-- .sp --> </literallayout> @@ -25,9 +25,9 @@ Superclass Simple <para> <!-- .LP --> A Panner widget is a rectangle, called the -``canvas,'' on which another rectangle, the ``slider,'' moves in two +<quote>canvas,</quote> on which another rectangle, the <quote>slider,</quote> moves in two dimensions. It is often used with a Porthole widget to move, or -``scroll,'' a third widget in two dimensions, in which case the +<quote>scroll,</quote> a third widget in two dimensions, in which case the slider's size and position gives feedback as to what portion of the third widget is visible. </para> @@ -50,7 +50,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Panner widget" "resources" --> +<indexterm><primary>Panner widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -563,7 +563,7 @@ The size of the slider. </sect2> <sect2 id="Panner_Actions"> <title>Panner Actions</title> -<!-- .IN "Panner widget" "actions" --> +<indexterm><primary>Panner widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The actions supported by the Panner widget are: @@ -620,7 +620,7 @@ action procedure). <para> This action moves the slider by the specified amounts. The format for the amounts is a signed or unsigned floating-point number (e.g., +1.0 -or \-.5) followed +or -.5) followed by either <function>p</function> indicating pages (slider sizes), or <function>c</function> indicating canvas sizes. Thus, <emphasis remap='I'>page(+0,+.5p)</emphasis> represents vertical movement down one-half the height of the slider and <emphasis remap='I'>page(0,0)</emphasis> represents moving to @@ -658,23 +658,23 @@ may have one of the values <function>on</function>, <function>off</function>, or <!-- .LP --> <!-- .sp --> The default bindings for Panner are: -<!-- .IN "Panner widget" "default translation table" --> +<indexterm><primary>Panner widget</primary><secondary>default translation table</secondary></indexterm> </para> <!-- .LP --> <literallayout class="monospaced"> <!-- .TA .5i 1.75i --> <!-- .ta .5i 1.75i --> - <Btn1Down>: start(\|) - <Btn1Motion>: move(\|) - <Btn1Up>: notify(\|) stop(\|) - <Btn2Down>: abort(\|) + <Btn1Down>: start( ) + <Btn1Motion>: move( ) + <Btn1Up>: notify( ) stop( ) + <Btn2Down>: abort( ) <Key>KP_Enter: set(rubberband,toggle) <Key>space: page(+1p,+1p) - <Key>Delete: page(\-1p,\-1p) - <Key>BackSpace: page(\-1p,\-1p) - <Key>Left: page(\-.5p,+0) + <Key>Delete: page(-1p,-1p) + <Key>BackSpace: page(-1p,-1p) + <Key>Left: page(-.5p,+0) <Key>Right: page(+.5p,+0) - <Key>Up: page(+0,\-.5p) + <Key>Up: page(+0,-.5p) <Key>Down: page(+0,+.5p) <Key>Home: page(0,0) </literallayout> @@ -682,12 +682,12 @@ The default bindings for Panner are: <sect2 id="Panner_Callbacks"> <title>Panner Callbacks</title> -<!-- .IN "Panner widget" "callbacks" --> +<indexterm><primary>Panner widget</primary><secondary>callbacks</secondary></indexterm> <para> <!-- .LP --> The functions registered on the <function>reportCallback</function> list are invoked by the <function>notify</function> action as follows: -<!-- .IN "ReportProc" "" "@DEF@" --> +<indexterm significance="preferred"><primary>ReportProc</primary></indexterm> <funcsynopsis id='Panner::ReportProc'> <funcprototype> <funcdef>void<function> ReportProc</function></funcdef> diff --git a/lib/libXaw/specs/Porthole.xml b/lib/libXaw/specs/Porthole.xml index 04525780c..fba03265a 100644 --- a/lib/libXaw/specs/Porthole.xml +++ b/lib/libXaw/specs/Porthole.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Porthole Widget --> <!-- .XE --> -<!-- .IN "Porthole widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Porthole widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Porthole.h> -<!-- .IN "Porthole.h" "" --> +<indexterm><primary>Porthole.h</primary></indexterm> Class Header file <X11/Xaw/PortholeP.h> -<!-- .IN "PortholeP.h" "" --> +<indexterm><primary>PortholeP.h</primary></indexterm> Class portholeWidgetClass -<!-- .IN "portholeWidgetClass" "" --> +<indexterm><primary>portholeWidgetClass</primary></indexterm> Class Name Porthole -<!-- .IN "Porthole widget" "class name" --> +<indexterm><primary>Porthole widget</primary><secondary>class name</secondary></indexterm> Superclass Composite <!-- .sp --> </literallayout> @@ -38,7 +38,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Porthole widget" "resources" --> +<indexterm><primary>Porthole widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -244,7 +244,7 @@ size or position. </sect2> <sect2 id='Porthole::Layout_Semantics'> <title>Layout Semantics</title> -<!-- .IN "Porthole widget" "layout semantics" --> +<indexterm><primary>Porthole widget</primary><secondary>layout semantics</secondary></indexterm> <para> <!-- .LP --> The Porthole widget allows its managed child to request any size @@ -256,12 +256,12 @@ Panner widget. </sect2> <sect2 id="Porthole_Callbacks"> <title>Porthole Callbacks</title> -<!-- .IN "Porthole widget" "callbacks" --> +<indexterm><primary>Porthole widget</primary><secondary>callbacks</secondary></indexterm> <para> <!-- .LP --> The functions registered on the <function>reportCallback</function> list are invoked whenever the managed child changes size or position: -<!-- .IN "ReportProc" "" "@DEF@" --> +<indexterm significance="preferred"><primary>ReportProc</primary></indexterm> <funcsynopsis id='Porthole::ReportProc'> <funcprototype> <funcdef>void<function> ReportProc</function></funcdef> diff --git a/lib/libXaw/specs/Repeater.xml b/lib/libXaw/specs/Repeater.xml index 289e14dd6..8eaa64ce5 100644 --- a/lib/libXaw/specs/Repeater.xml +++ b/lib/libXaw/specs/Repeater.xml @@ -3,26 +3,27 @@ <!-- .XS --> <!-- Repeater Widget --> <!-- .XE --> -<!-- .IN "Repeater widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Repeater widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application header file <X11/Xaw/Repeater.h> -<!-- .IN "Repeater.h" "" --> +<indexterm><primary>Repeater.h</primary></indexterm> Class header file <X11/Xaw/RepeaterP.h> -<!-- .IN "RepeaterP.h" "" --> +<indexterm><primary>RepeaterP.h</primary></indexterm> Class repeaterWidgetClass -<!-- .IN "repeaterWidgetClass" "" --> +<indexterm><primary>repeaterWidgetClass</primary></indexterm> Class Name Repeater -<!-- .IN "Repeater widget" "class name" --> +<indexterm><primary>Repeater widget</primary><secondary>class name</secondary></indexterm> Superclass Command <!-- .sp --> </literallayout> <para> <!-- .LP --> -The Repeater widget is a subclass of the Command widget; see the <!-- xref --> -Command documentation for details. The difference is that the Repeater can call its +The Repeater widget is a subclass of the Command widget; see the +<link linkend='Command_Widget'>Command documentation</link> +for details. The difference is that the Repeater can call its registered callbacks repeatedly, at an increasing rate. The default translation does so for the duration the user holds down pointer button 1 while the pointer is on the Repeater. @@ -36,7 +37,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Repeater widget" "resources" --> +<indexterm><primary>Repeater widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -500,7 +501,7 @@ is set to NULL. </sect2> <sect2 id="Repeater_Actions"> <title>Repeater Actions</title> -<!-- .IN "Repeater widget" "actions" --> +<indexterm><primary>Repeater widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The Repeater widget supports the following actions beyond those of the Command @@ -535,7 +536,7 @@ further timers from occuring until the next <function>start</function> action. <para> <!-- .LP --> <!-- .sp --> -<!-- .IN "Repeater widget" "translation bindings" --> +<indexterm><primary>Repeater widget</primary><secondary>translation bindings</secondary></indexterm> The following are the default translation bindings used by the Repeater widget: </para> @@ -544,10 +545,10 @@ Repeater widget: <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> - <EnterWindow>: highlight(\|) - <LeaveWindow>: unhighlight(\|) - <Btn1Down>: set(\|) start(\|) - <Btn1Up>: stop(\|) unset(\|) + <EnterWindow>: highlight( ) + <LeaveWindow>: unhighlight( ) + <Btn1Down>: set( ) start( ) + <Btn1Up>: stop( ) unset( ) </literallayout> </para> <para> diff --git a/lib/libXaw/specs/Scrollbar.xml b/lib/libXaw/specs/Scrollbar.xml index f5d055343..a9f1ff634 100644 --- a/lib/libXaw/specs/Scrollbar.xml +++ b/lib/libXaw/specs/Scrollbar.xml @@ -10,12 +10,12 @@ Superclass Simple </literallayout> <para> -A Scrollbar widget is a rectangle, called the ``canvas,'' on -which another rectangle, the ``thumb,'' moves in one +A Scrollbar widget is a rectangle, called the <quote>canvas,</quote> on +which another rectangle, the <quote>thumb,</quote> moves in one dimension, either vertically or horizontally. A Scrollbar can be used alone, as a value generator, or it can be used within a composite widget (for example, a Viewport). When a -Scrollbar is used to move, or ``scroll,'' the contents of +Scrollbar is used to move, or <quote>scroll,</quote> the contents of another widget, the size and the position of the thumb usually give feedback as to what portion of the other widget's contents are visible. @@ -389,8 +389,8 @@ used to draw the thumb. <listitem> <para> All functions on this callback list are called when the -<function>NotifyThumb</function> action is invoked. See the <function>Scrollbar -Actions</function> section for details. +<function>NotifyThumb</function> action is invoked. See +<xref linkend="Scrollbar_Actions" /> for details. </para> </listitem> </varlistentry> @@ -463,8 +463,8 @@ This cursor is used when scrolling forward in a horizontal scrollbar. <listitem> <para> All functions on this callback list may be called when the -<function>NotifyScroll</function> action is invoked. See the \fBScrollbar -Actions\fP section for details. +<function>NotifyScroll</function> action is invoked. See +<xref linkend="Scrollbar_Actions" /> for details. </para> </listitem> </varlistentry> @@ -590,7 +590,7 @@ callbacks. </varlistentry> <varlistentry> <term> - <function>EndScroll</function>(\^) + <function>EndScroll</function>( ) </term> <listitem> <para> @@ -600,7 +600,7 @@ This must be the last action after a movement is complete. </varlistentry> <varlistentry> <term> - <function>MoveThumb</function>(\^) + <function>MoveThumb</function>( ) </term> <listitem> <para> @@ -610,7 +610,7 @@ Repositions the Scrollbar's thumb to the current pointer location. </varlistentry> <varlistentry> <term> - <function>NotifyThumb</function>(\^)\ + <function>NotifyThumb</function>( )\ </term> <listitem> <para> @@ -624,15 +624,15 @@ pointer as a percentage of the scroll bar length. </variablelist> <para> The default bindings for Scrollbar are: -<!-- .IN "Scrollbar widget" "default translation table" --> +<indexterm><primary>Scrollbar widget</primary><secondary>default translation table</secondary></indexterm> </para> <literallayout class="monospaced"> <Btn1Down>: StartScroll(Forward) - <Btn2Down>: StartScroll(Continuous) MoveThumb(\|) NotifyThumb(\|) + <Btn2Down>: StartScroll(Continuous) MoveThumb( ) NotifyThumb( ) <Btn3Down>: StartScroll(Backward) - <Btn2Motion>: MoveThumb(\|) NotifyThumb(\|) - <BtnUp>: NotifyScroll(Proportional) EndScroll(\|) + <Btn2Motion>: MoveThumb( ) NotifyThumb( ) + <BtnUp>: NotifyScroll(Proportional) EndScroll( ) </literallayout> <para> @@ -644,14 +644,14 @@ resource file are: *Scrollbar.Translations: \\ ~Meta<Key>space: StartScroll(Forward) NotifyScroll(FullLength) \\n\\ Meta<Key>space: StartScroll(Backward) NotifyScroll(FullLength) \\n\\ - EndScroll(\|) + EndScroll( ) </literallayout> </sect2> <sect2 id="Scrollbar_Callbacks"> <title>Scrollbar Callbacks</title> -<!-- .IN "Scrollbar widget" "callbacks" --> +<indexterm><primary>Scrollbar widget</primary><secondary>callbacks</secondary></indexterm> <para> <!-- .LP --> There are two callback lists provided by the Scrollbar widget. @@ -661,7 +661,7 @@ The procedural interface for these functions is described here. <para> <!-- .LP --> The calling interface to the <function>scrollProc</function> callback procedure is: -<!-- .IN "ScrollProc" "" "@DEF@" --> +<indexterm significance="preferred"><primary>ScrollProc</primary></indexterm> </para> <funcsynopsis id='ScrollProc'> <funcprototype> @@ -719,7 +719,7 @@ be greater than the length of the Scrollbar. <para> The calling interface to the <function>jumpProc</function> callback procedure is: </para> -<!-- .IN "jumpProc" "" "@DEF@" --> +<indexterm significance="preferred"><primary>jumpProc</primary></indexterm> <funcsynopsis id='JumpProc'> <funcprototype> <funcdef>void<function> JumpProc</function></funcdef> @@ -757,7 +757,7 @@ Specifies the client data. </term> <listitem> <para> -Specifies the floating point position of the thumb (0.0 \- 1.0). +Specifies the floating point position of the thumb (0.0 – 1.0). </para> </listitem> </varlistentry> @@ -787,10 +787,10 @@ Scrollbar. <sect2 id="Convenience_Routines"> <title>Convenience Routines</title> <para> -<!-- .IN "Scrollbar widget" "setting thumb values" --> +<indexterm><primary>Scrollbar widget</primary><secondary>setting thumb values</secondary></indexterm> To set the position and length of a Scrollbar thumb, use <!-- .PN XawScrollbarSetThumb . --> -<!-- .IN "XawScrollbarSetThumb" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawScrollbarSetThumb</primary></indexterm> </para> <funcsynopsis id='XawScrollbarSetThumb'> <funcprototype> @@ -838,8 +838,8 @@ of the Scrollbar. <para> <function>XawScrollbarThumb</function> -moves the visible thumb to a new position (0.0 \- 1.0) and length (0.0 \- 1.0). -Either the top or shown arguments can be specified as \-1.0, +moves the visible thumb to a new position (0.0 – 1.0) and length (0.0 – 1.0). +Either the top or shown arguments can be specified as -1.0, in which case the current value is left unchanged. Values greater than 1.0 are truncated to 1.0. </para> @@ -852,7 +852,7 @@ If called from <function>jumpProc</function>, <xref linkend='XawScrollbarSetThum <sect2 id="Setting_Float_Resources"> <title>Setting Float Resources</title> -<!-- .IN "float resources" "setting" --> +<indexterm><primary>float resources</primary><secondary>setting</secondary></indexterm> <para> The <function>shown</function> and <function>topOfThumb</function> resources are of type <emphasis remap='I'>float</emphasis>. These resources can be difficult to get into an @@ -865,16 +865,16 @@ getting a float into an argument list. top = 0.5; if (sizeof(float) > sizeof(XtArgVal)) { /* - \ * If a float is larger than an XtArgVal then pass this - \ * resource value by reference. - \ */ + * If a float is larger than an XtArgVal then pass this + * resource value by reference. + */ XtSetArg(args[0], XtNshown, &top); } else { /* - \ * Convince C not to perform an automatic conversion, which - \ * would truncate 0.5 to 0. - \ */ + * Convince C not to perform an automatic conversion, which + * would truncate 0.5 to 0. + */ XtArgVal * l_top = (XtArgVal *) &top; XtSetArg(args[0], XtNshown, *l_top); } diff --git a/lib/libXaw/specs/Simple.xml b/lib/libXaw/specs/Simple.xml index 0d32f744c..d2206978d 100644 --- a/lib/libXaw/specs/Simple.xml +++ b/lib/libXaw/specs/Simple.xml @@ -3,19 +3,19 @@ <!-- .XS --> <!-- Simple Widget --> <!-- .XE --> -<!-- .IN "Simple widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Simple widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <Xaw/Simple.h> -<!-- .IN "Simple.h" "" --> +<indexterm><primary>Simple.h</primary></indexterm> Class Header file <Xaw/SimpleP.h> -<!-- .IN "SimpleP.h" "" --> +<indexterm><primary>SimpleP.h</primary></indexterm> Class simpleWidgetClass -<!-- .IN "simpleWidgetClass" --> +<indexterm><primary>simpleWidgetClass</primary></indexterm> Class Name Simple -<!-- .IN "Simple widget" "class name" --> +<indexterm><primary>Simple widget</primary><secondary>class name</secondary></indexterm> Superclass Core <!-- .sp --> </literallayout> @@ -35,7 +35,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Simple widget" "resources" --> +<indexterm><primary>Simple widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> diff --git a/lib/libXaw/specs/SimpleMenu.xml b/lib/libXaw/specs/SimpleMenu.xml index a99608d67..a9572dd7b 100644 --- a/lib/libXaw/specs/SimpleMenu.xml +++ b/lib/libXaw/specs/SimpleMenu.xml @@ -1,21 +1,21 @@ -<sect2 id="SimpleMenu_Widget"> +<sect1 id="SimpleMenu_Widget"> <title>SimpleMenu Widget</title> <!-- .XS --> <!-- SimpleMenu Widget --> <!-- .XE --> -<!-- .IN "SimpleMenu widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>SimpleMenu widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/SimpleMenu.h> -<!-- .IN "SimpleMenu.h" "" --> +<indexterm><primary>SimpleMenu.h</primary></indexterm> Class Header file <X11/Xaw/SimpleMenP.h> -<!-- .IN "SimpleMenP.h" "" --> +<indexterm><primary>SimpleMenP.h</primary></indexterm> Class simpleMenuWidgetClass -<!-- .IN "simpleMenuWidgetClass" "" --> +<indexterm><primary>simpleMenuWidgetClass</primary></indexterm> Class Name SimpleMenu -<!-- .IN "SimpleMenu widget" "class name" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>class name</secondary></indexterm> Superclass OverrideShell <!-- .sp --> </literallayout> @@ -28,11 +28,11 @@ only part of the menu that actually is associated with a window. The SimpleMenu serves as the glue to bind the individual menu entries together into a menu. </para> -<sect3 id="Resources"> +<sect2 id="SimpleMenu::Resources"> <title>Resources</title> <para> <!-- .LP --> -<!-- .IN "SimpleMenu widget" "resources" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>resources</secondary></indexterm> </para> <para> <!-- .LP --> @@ -326,7 +326,7 @@ that will affect the entire menu. </term> <listitem> <para> -<!-- .IN "conversions" "BackingStore" --> +<indexterm><primary>conversions</primary><secondary>BackingStore</secondary></indexterm> Determines what type of backing store will be used for the menu. Legal values for this resource are <function>NotUseful</function>, <function>WhenMapped</function>, and <function>Always</function>. These values are the backing-store integers defined in @@ -440,7 +440,8 @@ Determines the value of the override_redirect attribute of the SimpleMenu's window. The override_redirect attribute of a window determines whether or not a window manager may interpose itself between this window and the root window of the display. For more information -see the <emphasis remap='I'>Interclient Communications Conventions Manual</emphasis>. +see the <olink targetdoc='icccm' targetptr='icccm' +><citetitle>Interclient Communications Conventions Manual</citetitle></olink>. </para> </listitem> </varlistentry> @@ -510,10 +511,10 @@ If this is <function>True</function> then save unders will be active on the menu </varlistentry> </variablelist> </para> -</sect3> -<sect3 id="SimpleMenu_Actions"> +</sect2> +<sect2 id="SimpleMenu_Actions"> <title>SimpleMenu Actions</title> -<!-- .IN "SimpleMenu widget" "actions" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>actions</secondary></indexterm> <para> <!-- .LP --> The SimpleMenu widget supports the following actions: @@ -535,7 +536,7 @@ Processing menu entry callbacks with <function>notify</function> </itemizedlist> <para> <!-- .LP --> -<!-- .IN "SimpleMenu widget" "default translations" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>default translations</secondary></indexterm> The following are the default translation bindings used by the SimpleMenu widget: </para> @@ -545,16 +546,16 @@ by the SimpleMenu widget: <literallayout class="monospaced"> <!-- .TA .5i 2.25i --> <!-- .ta .5i 2.25i --> - <EnterWindow>: highlight(\|) - <LeaveWindow>: unhighlight(\|) - <BtnMotion>: highlight(\|) - <BtnUp>: MenuPopdown(\|) notify(\|) unhighlight(\|) + <EnterWindow>: highlight( ) + <LeaveWindow>: unhighlight( ) + <BtnMotion>: highlight( ) + <BtnUp>: MenuPopdown( ) notify( ) unhighlight( ) </literallayout> <!-- .sp --> </para> <para> <!-- .LP --> -<!-- .IN "SimpleMenu widget" "MenuPopdown routine" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>MenuPopdown routine</secondary></indexterm> The user can pop down the menu without activating any of the callback functions by releasing the pointer button when no menu item is highlighted. @@ -579,7 +580,7 @@ the menu entry. </varlistentry> <varlistentry> <term> - <function>unhighlight</function>(\|) + <function>unhighlight</function>( ) </term> <listitem> <para> @@ -590,7 +591,7 @@ its normal look. </varlistentry> <varlistentry> <term> - <function>notify</function>(\|) + <function>notify</function>( ) </term> <listitem> <para> @@ -607,17 +608,17 @@ appropriate action. <listitem> <para> This action is defined in <emphasis remap='I'>(xT</emphasis>. -<!-- .IN "SimpleMenu widget" "MenuPopdown routine" --> +<indexterm><primary>SimpleMenu widget</primary><secondary>MenuPopdown routine</secondary></indexterm> </para> </listitem> </varlistentry> </variablelist> </para> -</sect3> -<sect3 id="Positioning_the_SimpleMenu"> +</sect2> +<sect2 id="Positioning_the_SimpleMenu"> <title>Positioning the SimpleMenu</title> -<!-- .IN "XawPositionSimpleMenu" "" "@DEF@" --> -<!-- .IN "SimpleMenu widget" "positioning" "@DEF@" --> +<indexterm significance="preferred"><primary>XawPositionSimpleMenu</primary></indexterm> +<indexterm significance="preferred"><primary>SimpleMenu widget</primary><secondary>positioning</secondary></indexterm> <para> <!-- .LP --> If the SimpleMenu widget is to be used as a pulldown menu then the @@ -637,7 +638,7 @@ routine <xref linkend='XawSimpleMenuAddGlobalActions' xrefstyle='select: title'/ <para> <!-- .LP --> Translation writers should be aware that Xt does not register grabs on -``don't care'' modifiers, and therefore the left hand side of the +<quote>don't care</quote> modifiers, and therefore the left hand side of the production should be written to exclude unspecified modifiers. For example these are the translations needed to popup some of <function>xterm's</function> menus: @@ -677,20 +678,20 @@ placed so that the pointer cursor is centered on the entry named by the </varlistentry> </variablelist> </para> -</sect3> -<sect3 id="Convenience_Routines"> +</sect2> +<sect2 id="SimpleMenu::Convenience_Routines"> <title>Convenience Routines</title> -<sect4 id="Registering_the_Global_Action_Routines"> +<sect3 id="Registering_the_Global_Action_Routines"> <title>Registering the Global Action Routines</title> <para> <!-- .LP --> -<!-- .IN "XawPositionSimpleMenu" "" --> +<indexterm><primary>XawPositionSimpleMenu</primary></indexterm> The <function>XawPositionSimpleMenu</function> action routine may often be invoked before any menus have been created. This can occur when an application uses dynamic menu creation. In these cases an application will need to register this global action routine by calling <xref linkend='XawSimpleMenuAddGlobalActions' xrefstyle='select: title'/>: -<!-- .IN "XawSimpleMenuAddGlobalActions" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawSimpleMenuAddGlobalActions</primary></indexterm> <funcsynopsis id='XawSimpleMenuAddGlobalActions'> <funcprototype> <funcdef>void<function> XawSimpleMenuAddGlobalActions</function></funcdef> @@ -717,14 +718,14 @@ This function need only be called once per application and must be called before any widget that uses <function>XawPositionSimpleMenu</function> action is realized. </para> -</sect4> -<sect4 id="Getting_and_Clearing_the_Current_Menu_Entry"> +</sect3> +<sect3 id="Getting_and_Clearing_the_Current_Menu_Entry"> <title>Getting and Clearing the Current Menu Entry</title> <para> <!-- .LP --> To get the currently highlighted menu entry use <xref linkend='XawSimpleMenuGetActiveEntry' xrefstyle='select: title'/>: -<!-- .IN "XawSimpleMenuGetActiveEntry" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawSimpleMenuGetActiveEntry</primary></indexterm> <funcsynopsis id='XawSimpleMenuGetActiveEntry'> <funcprototype> <funcdef>Widget<function> XawSimpleMenuGetActiveEntry</function></funcdef> @@ -756,7 +757,7 @@ currently highlighted, or NULL if no entry is highlighted. To clear the SimpleMenu widget's internal information about the currently highlighted menu entry use <xref linkend='XawSimpleMenuClearActiveEntry' xrefstyle='select: title'/>: -<!-- .IN "XawSimpleMenuClearActiveEntry" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawSimpleMenuClearActiveEntry</primary></indexterm> <funcsynopsis id='XawSimpleMenuClearActiveEntry'> <funcprototype> <funcdef>Widget<function> XawSimpleMenuClearActiveEntry</function></funcdef> @@ -785,6 +786,6 @@ alter the appearance of the active entry. This function is primarily for use by implementors of menu entries. </para> -</sect4> </sect3> </sect2> +</sect1> diff --git a/lib/libXaw/specs/Sme.xml b/lib/libXaw/specs/Sme.xml index da3c4d15f..1e0d0e559 100644 --- a/lib/libXaw/specs/Sme.xml +++ b/lib/libXaw/specs/Sme.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Sme Object --> <!-- .XE --> -<!-- .IN "Sme object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Sme object</primary></indexterm> <!-- .sp --> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/Sme.h> -<!-- .IN "Sme.h" "" --> +<indexterm><primary>Sme.h</primary></indexterm> Class Header file <X11/Xaw/SmeP.h> -<!-- .IN "SmeP.h" "" --> +<indexterm><primary>SmeP.h</primary></indexterm> Class smeObjectClass -<!-- .IN "smeObjectClass" "" --> +<indexterm><primary>smeObjectClass</primary></indexterm> Class Name Sme -<!-- .IN "Sme object" "class name" --> +<indexterm><primary>Sme object</primary><secondary>class name</secondary></indexterm> Superclass RectObj </literallayout> <!-- .sp --> @@ -30,7 +30,7 @@ add blank space between menu entries. </para> <sect2 id='Sme::Resources'> <title>Resources</title> -<!-- .IN "SmeLine object" "resources" --> +<indexterm><primary>SmeLine object</primary><secondary>resources</secondary></indexterm> <para> <!-- .LP --> The resources associated with the SmeLine object are defined in this @@ -120,7 +120,7 @@ be the width of the widest entry. </sect2> <sect2 id="Subclassing_the_Sme_Object"> <title>Subclassing the Sme Object</title> -<!-- .IN "Sme object" "subclassing" "@DEF" --> +<indexterm significance="preferred"><primary>Sme object</primary><secondary>subclassing</secondary></indexterm> <para> <!-- .LP --> <!-- .sp --> @@ -135,33 +135,33 @@ semantics are not very interesting. <variablelist> <varlistentry> <term> - <function>Highlight</function>(\|) + <function>Highlight</function>( ) </term> <listitem> <para> -<!-- .IN "Sme object" "Highlight method" --> +<indexterm><primary>Sme object</primary><secondary>Highlight method</secondary></indexterm> Called to put the menu entry into the highlighted state. </para> </listitem> </varlistentry> <varlistentry> <term> - <function>Unhighlight</function>(\|) + <function>Unhighlight</function>( ) </term> <listitem> <para> -<!-- .IN "Sme object" "Unhighlight method" --> +<indexterm><primary>Sme object</primary><secondary>Unhighlight method</secondary></indexterm> Called to return the widget to its normal (unhighlighted) state. </para> </listitem> </varlistentry> <varlistentry> <term> - <function>Notify</function>(\|) + <function>Notify</function>( ) </term> <listitem> <para> -<!-- .IN "Sme object" "Notify method" --> +<indexterm><primary>Sme object</primary><secondary>Notify method</secondary></indexterm> Called when the user selects this menu entry. </para> </listitem> diff --git a/lib/libXaw/specs/SmeBSB.xml b/lib/libXaw/specs/SmeBSB.xml index 3636e2e02..c8168fa5f 100644 --- a/lib/libXaw/specs/SmeBSB.xml +++ b/lib/libXaw/specs/SmeBSB.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- SmeBSB Object --> <!-- .XE --> -<!-- .IN "SmeBSB object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>SmeBSB object</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/SmeBSB.h> -<!-- .IN "SmeBSB.h" "" --> +<indexterm><primary>SmeBSB.h</primary></indexterm> Class Header file <X11/Xaw/SmeBSBP.h> -<!-- .IN "SmeBSBP.h" "" --> +<indexterm><primary>SmeBSBP.h</primary></indexterm> Class smeBSBObjectClass -<!-- .IN "smeBSBObjectClass" "" --> +<indexterm><primary>smeBSBObjectClass</primary></indexterm> Class Name SmeBSB -<!-- .IN "SmeBSB object" "class name" --> +<indexterm><primary>SmeBSB object</primary><secondary>class name</secondary></indexterm> Superclass Sme <!-- .sp --> </literallayout> @@ -34,7 +34,7 @@ of the 8 bit <function>font</function> utilized, or in a multi-byte encoding for </para> <sect2 id='SmeBSB::Resources'> <title>Resources</title> -<!-- .IN "SmeBSB object" "resources" --> +<indexterm><primary>SmeBSB object</primary><secondary>resources</secondary></indexterm> <para> <!-- .LP --> The resources associated with the SmeBSB object are defined in this section, diff --git a/lib/libXaw/specs/SmeLine.xml b/lib/libXaw/specs/SmeLine.xml index 96c920b70..433bc0f4d 100644 --- a/lib/libXaw/specs/SmeLine.xml +++ b/lib/libXaw/specs/SmeLine.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- SmeLine Object --> <!-- .XE --> -<!-- .IN "SmeLine object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>SmeLine object</primary></indexterm> <!-- .sp --> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/SmeLine.h> -<!-- .IN "SmeLine.h" "" --> +<indexterm><primary>SmeLine.h</primary></indexterm> Class Header file <X11/Xaw/SmeLineP.h> -<!-- .IN "SmeLineP.h" "" --> +<indexterm><primary>SmeLineP.h</primary></indexterm> Class smeLineObjectClass -<!-- .IN "smeLineObjectClass" "" --> +<indexterm><primary>smeLineObjectClass</primary></indexterm> Class Name SmeLine -<!-- .IN "SmeLine object" "class name" --> +<indexterm><primary>SmeLine object</primary><secondary>class name</secondary></indexterm> Superclass Sme </literallayout> <!-- .sp --> @@ -32,7 +32,7 @@ will not highlight when the pointer cursor is over it. </para> <sect2 id='SmeLine::Resources'> <title>Resources</title> -<!-- .IN "SmeLine object" "resources" --> +<indexterm><primary>SmeLine object</primary><secondary>resources</secondary></indexterm> <para> <!-- .LP --> The resources associated with the SmeLine object are defined in this section, diff --git a/lib/libXaw/specs/StripChart.xml b/lib/libXaw/specs/StripChart.xml index 8d5c0648a..d892acebb 100644 --- a/lib/libXaw/specs/StripChart.xml +++ b/lib/libXaw/specs/StripChart.xml @@ -3,19 +3,19 @@ <!-- .XS --> <!-- StripChart Widget --> <!-- .XE --> -<!-- .IN "StripChart widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>StripChart widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <Xaw/StripChart.h> -<!-- .IN "StripChart.h" "" --> +<indexterm><primary>StripChart.h</primary></indexterm> Class Header file <Xaw/StripCharP.h> -<!-- .IN "StripCharP.h" "" --> +<indexterm><primary>StripCharP.h</primary></indexterm> Class stripChartWidgetClass -<!-- .IN "stripChartWidgetClass" "" --> +<indexterm><primary>stripChartWidgetClass</primary></indexterm> Class Name StripChart -<!-- .IN "StripChart widget" "class name" --> +<indexterm><primary>StripChart widget</primary><secondary>class name</secondary></indexterm> Superclass Simple <!-- .sp --> </literallayout> @@ -37,7 +37,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "StripChart widget" "resources" --> +<indexterm><primary>StripChart widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -369,7 +369,7 @@ and this point will be added to the right end of the StripChart. </sect2> <sect2 id="Getting_the_StripChart_Value"> <title>Getting the StripChart Value</title> -<!-- .IN "StripChart widget" "getting the value" --> +<indexterm><primary>StripChart widget</primary><secondary>getting the value</secondary></indexterm> <para> <!-- .LP --> The StripChart widget will call the application routine passed to it @@ -379,7 +379,7 @@ obtain another point for the StripChart graph. <para> <!-- .LP --> The calling interface for the <function>getValue</function> callback is: -<!-- .IN "StripChart widget" "getValue callback" "@DEF@" --> +<indexterm significance="preferred"><primary>StripChart widget</primary><secondary>getValue callback</secondary></indexterm> <funcsynopsis> <funcprototype> <funcdef><function> void</function>(*getValueProc)</funcdef> diff --git a/lib/libXaw/specs/TPage_Credits.xml b/lib/libXaw/specs/TPage_Credits.xml index bc07351ab..b141ad2eb 100644 --- a/lib/libXaw/specs/TPage_Credits.xml +++ b/lib/libXaw/specs/TPage_Credits.xml @@ -87,4 +87,12 @@ Frank Sheeran Omron Corporation 1994 </literallayout> +<para> +This document is made available to you in modern formats such as HTML and PDF +thanks to the efforts of Matt Dew, who converted the original troff sources to +DocBook/XML and edited them into shape; along with Gaetan Nadon and +Alan Coopersmith, who set up the formatting machinery in the libXaw builds and +performed further editing of the DocBook markup. +</para> + </chapter> diff --git a/lib/libXaw/specs/Template.xml b/lib/libXaw/specs/Template.xml index d9e2fc53d..6809acb08 100644 --- a/lib/libXaw/specs/Template.xml +++ b/lib/libXaw/specs/Template.xml @@ -10,7 +10,7 @@ operation, or to call a public routine implemented by the widget class. <para> <!-- .LP --> The contents of the Template public header file, -<function>< X11/Xaw/Template.h >, </function> +<filename class="headerfile"><X11/Xaw/Template.h></filename>, are: </para> <literallayout class="monospaced"> @@ -96,9 +96,9 @@ convenience procedures, so we need to add #define XtNdrawingColor2 "drawingColor2" #define XtNexposeCallback "exposeCallback" -extern Pixel WindowColor1(\|/* Widget */\|); -extern Pixel WindowColor2(\|/* Widget */\|); -extern Font\ \ WindowFont(\|/* Widget */\|); +extern Pixel WindowColor1( /* Widget */ ); +extern Pixel WindowColor2( /* Widget */ ); +extern Font WindowFont( /* Widget */ ); <!-- .CE --> </literallayout> <para> @@ -120,12 +120,12 @@ that will be required by anticipated subclasses of the widget. Information in the private header file is normally hidden from the application and is designed to be accessed only through other public procedures; e.g. -<function>XtSetValues .</function> +<function>XtSetValues</function>. </para> <para> <!-- .LP --> The contents of the Template private header file, -<function>< X11/Xaw/TemplateP.h >, </function> +<filename class="headerfile"><X11/Xaw/TemplateP.h></filename>, are: </para> <!-- .CB --> @@ -209,7 +209,7 @@ action routines added by the widget class. <para> <!-- .LP --> The contents of the Template implementation file, -<function>< X11/Xaw/Template.c >,</function> +<filename class="headerfile"><X11/Xaw/Template.c></filename>, are: </para> <!-- .CB --> @@ -239,46 +239,46 @@ static XtActionsRec actions[] = }; static char translations[] = -" <Key>: template(\|) \\n\\ +" <Key>: template( ) \\n\\ "; TemplateClassRec templateClassRec = { { /* core fields */ - /* superclass */ (WidgetClass) &widgetClassRec, - /* class_name */ "Template", - /* widget_size */ sizeof(TemplateRec), - /* class_initialize */ NULL, - /* class_part_initialize */ NULL, - /* class_inited */ FALSE, - /* initialize */ NULL, - /* initialize_hook */ NULL, - /* realize */ XtInheritRealize, - /* actions */ actions, - /* num_actions */ XtNumber(actions), - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ TRUE, - /* compress_exposure */ TRUE, - /* compress_enterleave */ TRUE, - /* visible_interest */ FALSE, - /* destroy */ NULL, - /* resize */ NULL, - /* expose */ NULL, - /* set_values */ NULL, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, - /* callback_private */ NULL, - /* tm_table */ translations, - /* query_geometry */ XtInheritQueryGeometry, - /* display_accelerator */ XtInheritDisplayAccelerator, - /* extension */ NULL + /* superclass */ (WidgetClass) &widgetClassRec, + /* class_name */ "Template", + /* widget_size */ sizeof(TemplateRec), + /* class_initialize */ NULL, + /* class_part_initialize */ NULL, + /* class_inited */ FALSE, + /* initialize */ NULL, + /* initialize_hook */ NULL, + /* realize */ XtInheritRealize, + /* actions */ actions, + /* num_actions */ XtNumber(actions), + /* resources */ resources, + /* num_resources */ XtNumber(resources), + /* xrm_class */ NULLQUARK, + /* compress_motion */ TRUE, + /* compress_exposure */ TRUE, + /* compress_enterleave */ TRUE, + /* visible_interest */ FALSE, + /* destroy */ NULL, + /* resize */ NULL, + /* expose */ NULL, + /* set_values */ NULL, + /* set_values_hook */ NULL, + /* set_values_almost */ XtInheritSetValuesAlmost, + /* get_values_hook */ NULL, + /* accept_focus */ NULL, + /* version */ XtVersion, + /* callback_private */ NULL, + /* tm_table */ translations, + /* query_geometry */ XtInheritQueryGeometry, + /* display_accelerator */ XtInheritDisplayAccelerator, + /* extension */ NULL }, { /* template fields */ - /* empty */ 0 + /* empty */ 0 } }; @@ -339,8 +339,8 @@ and the default input binding will be to execute the input callbacks on </para> <literallayout class="monospaced"> static char translations[] = -" <Key>: input(\|) \\n\\ - <BtnDown>: input(\|) \\ +" <Key>: input( ) \\n\\ + <BtnDown>: input( ) \\ "; </literallayout> <!-- .CE --> @@ -399,7 +399,7 @@ Font WindowFont(w) <para> The "WindowWidget" is now complete. The application can retrieve the two drawing colors from the widget instance by calling either -<function>XtGetValues ,</function> +<function>XtGetValues</function>, or the <function>WindowColor</function> functions. The actual window created for the "WindowWidget" is available by calling the <function>XtWindow</function> function. diff --git a/lib/libXaw/specs/Template_private_header_file.xml b/lib/libXaw/specs/Template_private_header_file.xml index a26e92eef..b5f004254 100644 --- a/lib/libXaw/specs/Template_private_header_file.xml +++ b/lib/libXaw/specs/Template_private_header_file.xml @@ -8,12 +8,12 @@ that will be required by anticipated subclasses of the widget. Information in the private header file is normally hidden from the application and is designed to be accessed only through other public procedures; e.g. -<function>XtSetValues .</function> +<function>XtSetValues</function>. </para> <para> <!-- .LP --> The contents of the Template private header file, -<function>< X11/Xaw/TemplateP.h >, </function> +<filename class="headerfile"><X11/Xaw/TemplateP.h></filename>, are: </para> <!-- .CB --> diff --git a/lib/libXaw/specs/Template_public_header_file.xml b/lib/libXaw/specs/Template_public_header_file.xml index 6e8d609bc..eced84090 100644 --- a/lib/libXaw/specs/Template_public_header_file.xml +++ b/lib/libXaw/specs/Template_public_header_file.xml @@ -10,7 +10,7 @@ operation, or to call a public routine implemented by the widget class. <para> <!-- .LP --> The contents of the Template public header file, -<function>< X11/Xaw/Template.h >, </function> +<filename class="headerfile"><X11/Xaw/Template.h></filename>, are: </para> <literallayout class="monospaced"> @@ -30,18 +30,18 @@ are: /* Resources: - Name Class RepType Default Value - ---- ----- ------- ------------- - background Background Pixel XtDefaultBackground - border BorderColor Pixel XtDefaultForeground - borderWidth BorderWidth Dimension 1 - destroyCallback Callback Pointer NULL - height Height Dimension 0 - mappedWhenManaged MappedWhenManaged Boolean True - sensitive Sensitive Boolean True - width Width Dimension 0 - x Position Position 0 - y Position Position 0 + Name Class RepType Default Value + ---- ----- ------- ------------- + background Background Pixel XtDefaultBackground + border BorderColor Pixel XtDefaultForeground + borderWidth BorderWidth Dimension 1 + destroyCallback Callback Pointer NULL + height Height Dimension 0 + mappedWhenManaged MappedWhenManaged Boolean True + sensitive Sensitive Boolean True + width Width Dimension 0 + x Position Position 0 + y Position Position 0 */ @@ -84,11 +84,11 @@ convenience procedures, so we need to add <!-- .CB --> /* Resources: ... - callback Callback Callback NULL - drawingColor1 Color Pixel XtDefaultForeground - drawingColor2 Color Pixel XtDefaultForeground - exposeCallback Callback Callback NULL - font Font XFontStruct* XtDefaultFont + callback Callback Callback NULL + drawingColor1 Color Pixel XtDefaultForeground + drawingColor2 Color Pixel XtDefaultForeground + exposeCallback Callback Callback NULL + font Font XFontStruct* XtDefaultFont ... */ @@ -96,9 +96,9 @@ convenience procedures, so we need to add #define XtNdrawingColor2 "drawingColor2" #define XtNexposeCallback "exposeCallback" -extern Pixel WindowColor1(\|/* Widget */\|); -extern Pixel WindowColor2(\|/* Widget */\|); -extern Font\ \ WindowFont(\|/* Widget */\|); +extern Pixel WindowColor1( /* Widget */ ); +extern Pixel WindowColor2( /* Widget */ ); +extern Font WindowFont( /* Widget */ ); <!-- .CE --> </literallayout> <para> diff --git a/lib/libXaw/specs/Template_widget_source_file.xml b/lib/libXaw/specs/Template_widget_source_file.xml index 62ad1b69c..d446eee35 100644 --- a/lib/libXaw/specs/Template_widget_source_file.xml +++ b/lib/libXaw/specs/Template_widget_source_file.xml @@ -10,7 +10,7 @@ action routines added by the widget class. <para> <!-- .LP --> The contents of the Template implementation file, -<function>< X11/Xaw/Template.c >,</function> +<filename class="headerfile"><X11/Xaw/Template.c></filename>, are: </para> <!-- .CB --> @@ -40,46 +40,46 @@ static XtActionsRec actions[] = }; static char translations[] = -" <Key>: template(\|) \\n\\ +" <Key>: template( ) \\n\\ "; TemplateClassRec templateClassRec = { { /* core fields */ - /* superclass */ (WidgetClass) &widgetClassRec, - /* class_name */ "Template", - /* widget_size */ sizeof(TemplateRec), + /* superclass */ (WidgetClass) &widgetClassRec, + /* class_name */ "Template", + /* widget_size */ sizeof(TemplateRec), /* class_initialize */ NULL, - /* class_part_initialize */ NULL, - /* class_inited */ FALSE, - /* initialize */ NULL, + /* class_part_initialize */ NULL, + /* class_inited */ FALSE, + /* initialize */ NULL, /* initialize_hook */ NULL, - /* realize */ XtInheritRealize, - /* actions */ actions, - /* num_actions */ XtNumber(actions), - /* resources */ resources, + /* realize */ XtInheritRealize, + /* actions */ actions, + /* num_actions */ XtNumber(actions), + /* resources */ resources, /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, + /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, - /* compress_enterleave */ TRUE, + /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, - /* destroy */ NULL, - /* resize */ NULL, - /* expose */ NULL, - /* set_values */ NULL, + /* destroy */ NULL, + /* resize */ NULL, + /* expose */ NULL, + /* set_values */ NULL, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, + /* accept_focus */ NULL, + /* version */ XtVersion, /* callback_private */ NULL, - /* tm_table */ translations, + /* tm_table */ translations, /* query_geometry */ XtInheritQueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, - /* extension */ NULL + /* extension */ NULL }, { /* template fields */ - /* empty */ 0 + /* empty */ 0 } }; @@ -140,8 +140,8 @@ and the default input binding will be to execute the input callbacks on </para> <literallayout class="monospaced"> static char translations[] = -" <Key>: input(\|) \\n\\ - <BtnDown>: input(\|) \\ +" <Key>: input( ) \\n\\ + <BtnDown>: input( ) \\ "; </literallayout> <!-- .CE --> @@ -200,7 +200,7 @@ Font WindowFont(w) <para> The "WindowWidget" is now complete. The application can retrieve the two drawing colors from the widget instance by calling either -<function>XtGetValues ,</function> +<function>XtGetValues</function>, or the <function>WindowColor</function> functions. The actual window created for the "WindowWidget" is available by calling the <function>XtWindow</function> function. diff --git a/lib/libXaw/specs/TextActions.xml b/lib/libXaw/specs/TextActions.xml index 0e54582df..cfa8ca655 100644 --- a/lib/libXaw/specs/TextActions.xml +++ b/lib/libXaw/specs/TextActions.xml @@ -2,11 +2,11 @@ <title>Text Widget Actions</title> <para> <!-- .LP --> -<!-- .IN "Text widget" "actions" --> +<indexterm><primary>Text widget</primary><secondary>actions</secondary></indexterm> <!-- .XS --> <!-- Actions Supported by all Text Widgets --> <!-- .XE --> -<!-- .IN "Text widget" "actions" "@DEF@" --> +<indexterm significance="preferred"><primary>Text widget</primary><secondary>actions</secondary></indexterm> All editing functions are performed by translation manager actions that may be specified through the <function>translations</function> resource in the Text widget. @@ -64,7 +64,7 @@ may assume this to be the case. <!-- .LP --> </para> <sect3 id='Cursor_Movement_Actions'> -<title>Cursor Movement Actions\fP</title> +<title>Cursor Movement Actions</title> <para> <!-- .LP --> <!-- .sp --> @@ -363,8 +363,8 @@ triggered by a button event) or text cursor location (if triggered by a key event). It will then begin a selection at this location. If many of these selection actions occur quickly in succession then the selection count -mechanism will be invoked (see the section titled \fBText Selections for -Application Programmers\fP for details). <!-- xref --> +mechanism will be invoked (see +<xref linkend="Text_Selections_for_Application_Programmers"/> for details). </para> </listitem> </varlistentry> @@ -711,10 +711,11 @@ The multiply action allows the user to multiply the effects of many of the text actions. Thus the following action sequence <emphasis remap='I'>multiply(10) delete-next-word()</emphasis> will delete 10 words. It does not matter whether these actions take place in one event or many events. -Using the default translations the key sequence \fIControl-u, -Control-d\fP will delete 4 characters. -Multiply actions can be chained, thus \fImultiply(5) -multiply(5)\fP is the same as <emphasis remap='I'>multiply(25)</emphasis>. If the string +Using the default translations the key sequence +<emphasis remap='I'>Control-u, Control-d</emphasis> will delete 4 characters. +Multiply actions can be chained, thus +<emphasis remap='I'>multiply(5) multiply(5)</emphasis> is the same as +<emphasis remap='I'>multiply(25)</emphasis>. If the string <function>reset</function> is passed to the multiply action the effects of all previous multiplies are removed and a beep is sent to the display. </para> @@ -764,7 +765,7 @@ this argument is <emphasis remap='I'>RingBell</emphasis> then a beep is sent to </term> <listitem> <para> -<!-- .IN "XawWMProtocols" --> +<indexterm><primary>XawWMProtocols</primary></indexterm> <!-- .sp --> This action is written specifically for the file insertion and the search and replace @@ -775,7 +776,7 @@ popups, and may support other window manager protocols if necessary in the future. The popup will be dismissed if the window manager sends a WM_DELETE_WINDOW request and there are no parameters in the action call, which is the default. The popup will also be dismissed if the -parameters include the string ``wm_delete_window,'' and the event is a +parameters include the string <quote>wm_delete_window,</quote> and the event is a ClientMessage event requesting dismissal or is not a ClientMessage event. This action is not sensitive to the case of the strings passed as parameters. </para> @@ -787,7 +788,7 @@ This action is not sensitive to the case of the strings passed as parameters. </term> <listitem> <para> -<!-- .IN "Input Method" --> +<indexterm><primary>Input Method</primary></indexterm> When the <function>international</function> resource is <function>true</function>, input is usually passed to an input method, a separate process, for composing. Sometimes the connection to @@ -805,7 +806,7 @@ started before the input method. </sect3> <sect3 id="Text_Selections_for_Application_Programmers"> <title>Text Selections for Application Programmers</title> -<!-- .IN "Text widget" "Text Selections for Application Programmers" --> +<indexterm><primary>Text widget</primary><secondary>Text Selections for Application Programmers</secondary></indexterm> <para> <!-- .LP --> The default behavior of the text selection array is described in the @@ -814,7 +815,7 @@ a programmer must construct a <function>XawTextSelectType</function> array (call selection array), containing the selections desired, and pass this as the new value for the <function>selectionTypes</function> resource. The selection array may also be modified using the <xref linkend='XawTextSetSelectionArray' xrefstyle='select: title'/> -<!-- .IN "XawTextSetSelectionArray" "" --> +<indexterm><primary>XawTextSetSelectionArray</primary></indexterm> function. All selection arrays must end with the value <function>XawselectNull</function>. The <function>selectionTypes</function> resource has no converter registered and cannot be modified through the resource manager. @@ -896,7 +897,7 @@ array is set. <!-- .XS --> <!-- Default Translation Bindings --> <!-- .XE --> -<!-- .IN "Text widget" "default translations" --> +<indexterm><primary>Text widget</primary><secondary>default translations</secondary></indexterm> The following translations are defaults built into every Text widget. They can be overridden, or replaced by specifying a new value for the Text widget's <function>translations</function> resource. @@ -947,9 +948,9 @@ Text widget's <function>translations</function> resource. :Meta<Key>]: forward-paragraph() \\n\\ :Meta<Key>[: backward-paragraph() \\n\\ ~Shift Meta<Key>Delete: delete-previous-word() \\n\\ - \ Shift Meta<Key>Delete: backward-kill-word() \\n\\ + Shift Meta<Key>Delete: backward-kill-word() \\n\\ ~Shift Meta<Key>Backspace: delete-previous-word() \\n\\ - \ Shift Meta<Key>Backspace: backward-kill-word() \\n\\ + Shift Meta<Key>Backspace: backward-kill-word() \\n\\ <Key>Right: forward-character() \\n\\ <Key>Left: backward-character() \\n\\ <Key>Down: next-line() \\n\\ diff --git a/lib/libXaw/specs/TextActions_default_translation_bindings.xml b/lib/libXaw/specs/TextActions_default_translation_bindings.xml index 731881104..ae4e56c75 100644 --- a/lib/libXaw/specs/TextActions_default_translation_bindings.xml +++ b/lib/libXaw/specs/TextActions_default_translation_bindings.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- Default Translation Bindings --> <!-- .XE --> -<!-- .IN "Text widget" "default translations" --> +<indexterm><primary>Text widget</primary><secondary>default translations</secondary></indexterm> The following translations are defaults built into every Text widget. They can be overridden, or replaced by specifying a new value for the Text widget's <function>translations</function> resource. @@ -56,9 +56,9 @@ Text widget's <function>translations</function> resource. :Meta<Key>]: forward-paragraph() \\n\\ :Meta<Key>[: backward-paragraph() \\n\\ ~Shift Meta<Key>Delete: delete-previous-word() \\n\\ - \ Shift Meta<Key>Delete: backward-kill-word() \\n\\ + Shift Meta<Key>Delete: backward-kill-word() \\n\\ ~Shift Meta<Key>Backspace: delete-previous-word() \\n\\ - \ Shift Meta<Key>Backspace: backward-kill-word() \\n\\ + Shift Meta<Key>Backspace: backward-kill-word() \\n\\ <Key>Right: forward-character() \\n\\ <Key>Left: backward-character() \\n\\ <Key>Down: next-line() \\n\\ diff --git a/lib/libXaw/specs/TextActions_text_widget_actions.xml b/lib/libXaw/specs/TextActions_text_widget_actions.xml index af7705204..215783f89 100644 --- a/lib/libXaw/specs/TextActions_text_widget_actions.xml +++ b/lib/libXaw/specs/TextActions_text_widget_actions.xml @@ -2,11 +2,11 @@ <title>Text Widget Actions</title> <para> <!-- .LP --> -<!-- .IN "Text widget" "actions" --> +<indexterm><primary>Text widget</primary><secondary>actions</secondary></indexterm> <!-- .XS --> <!-- Actions Supported by all Text Widgets --> <!-- .XE --> -<!-- .IN "Text widget" "actions" "@DEF@" --> +<indexterm significance="preferred"><primary>Text widget</primary><secondary>actions</secondary></indexterm> All editing functions are performed by translation manager actions that may be specified through the <function>translations</function> resource in the Text widget. @@ -64,7 +64,7 @@ may assume this to be the case. <!-- .LP --> </para> <sect2 id='Cursor_Movement_Actions'> -<title>Cursor Movement Actions\fP</title> +<title>Cursor Movement Actions</title> <para> <!-- .LP --> <!-- .sp --> @@ -363,8 +363,9 @@ triggered by a button event) or text cursor location (if triggered by a key event). It will then begin a selection at this location. If many of these selection actions occur quickly in succession then the selection count -mechanism will be invoked (see the section titled \fBText Selections for -Application Programmers\fP for details). <!-- xref --> +mechanism will be invoked (see +<xref linkend="Text_Selections_for_Application_Programmers"/> +for details). </para> </listitem> </varlistentry> @@ -711,10 +712,11 @@ The multiply action allows the user to multiply the effects of many of the text actions. Thus the following action sequence <emphasis remap='I'>multiply(10) delete-next-word()</emphasis> will delete 10 words. It does not matter whether these actions take place in one event or many events. -Using the default translations the key sequence \fIControl-u, -Control-d\fP will delete 4 characters. -Multiply actions can be chained, thus \fImultiply(5) -multiply(5)\fP is the same as <emphasis remap='I'>multiply(25)</emphasis>. If the string +Using the default translations the key sequence +<emphasis remap='I'>Control-u, Control-d</emphasis> will delete 4 characters. +Multiply actions can be chained, thus +<emphasis remap='I'>multiply(5) multiply(5)</emphasis> is the same as +<emphasis remap='I'>multiply(25)</emphasis>. If the string <function>reset</function> is passed to the multiply action the effects of all previous multiplies are removed and a beep is sent to the display. </para> @@ -764,7 +766,7 @@ this argument is <emphasis remap='I'>RingBell</emphasis> then a beep is sent to </term> <listitem> <para> -<!-- .IN "XawWMProtocols" --> +<indexterm><primary>XawWMProtocols</primary></indexterm> <!-- .sp --> This action is written specifically for the file insertion and the search and replace @@ -775,7 +777,7 @@ popups, and may support other window manager protocols if necessary in the future. The popup will be dismissed if the window manager sends a WM_DELETE_WINDOW request and there are no parameters in the action call, which is the default. The popup will also be dismissed if the -parameters include the string ``wm_delete_window,'' and the event is a +parameters include the string <quote>wm_delete_window,</quote> and the event is a ClientMessage event requesting dismissal or is not a ClientMessage event. This action is not sensitive to the case of the strings passed as parameters. </para> @@ -787,7 +789,7 @@ This action is not sensitive to the case of the strings passed as parameters. </term> <listitem> <para> -<!-- .IN "Input Method" --> +<indexterm><primary>Input Method</primary></indexterm> When the <function>international</function> resource is <function>true</function>, input is usually passed to an input method, a separate process, for composing. Sometimes the connection to @@ -805,7 +807,7 @@ started before the input method. </sect2> <sect2 id="Text_Selections_for_Application_Programmers"> <title>Text Selections for Application Programmers</title> -<!-- .IN "Text widget" "Text Selections for Application Programmers" --> +<indexterm><primary>Text widget</primary><secondary>Text Selections for Application Programmers</secondary></indexterm> <para> <!-- .LP --> The default behavior of the text selection array is described in the @@ -814,7 +816,7 @@ a programmer must construct a <function>XawTextSelectType</function> array (call selection array), containing the selections desired, and pass this as the new value for the <function>selectionTypes</function> resource. The selection array may also be modified using the <xref linkend='XawTextSetSelectionArray' xrefstyle='select: title'/> -<!-- .IN "XawTextSetSelectionArray" "" --> +<indexterm><primary>XawTextSetSelectionArray</primary></indexterm> function. All selection arrays must end with the value <function>XawselectNull</function>. The <function>selectionTypes</function> resource has no converter registered and cannot be modified through the resource manager. diff --git a/lib/libXaw/specs/TextCustom.xml b/lib/libXaw/specs/TextCustom.xml index 7ca2d5f78..647dba914 100644 --- a/lib/libXaw/specs/TextCustom.xml +++ b/lib/libXaw/specs/TextCustom.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- Customizing the Text Widget --> <!-- .XE --> -<!-- .IN "Text widget" "customizing" "@DEF@" --> +<indexterm significance="preferred"><primary>Text widget</primary><secondary>customizing</secondary></indexterm> </para> <para> <!-- .LP --> @@ -29,7 +29,7 @@ a Text widget. <!-- .LP --> Each of the following pieces of the Text widget has a specific purpose, and will be, or has been, discussed in detail in this chapter: -<!-- .IN "Text widget" "" --> +<indexterm><primary>Text widget</primary></indexterm> </para> <para> <variablelist> @@ -43,11 +43,11 @@ All translations and actions are handled in the Text widget itself. </para> </listitem> </varlistentry> -<!-- .IN "TextSink object" "" --> <varlistentry> <term><function>TextSink</function></term> <listitem> <para> +<indexterm><primary>TextSink object</primary></indexterm> This object is responsible for displaying and clearing the drawing area. It also reports the configuration of the window that contains the drawing area. The TextSink does not have its own window; instead it does @@ -55,62 +55,62 @@ its drawing on the Text widget's window. </para> </listitem> </varlistentry> -<!-- .IN "TextSrc object" "" --> <varlistentry> <term><function>TextSrc</function></term> <listitem> <para> +<indexterm><primary>TextSrc object</primary></indexterm> This object is responsible for reading, editing and searching through the text buffer. </para> </listitem> </varlistentry> -<!-- .IN "AsciiSink object" "" --> <varlistentry> <term><function>AsciiSink</function></term> <listitem> <para> +<indexterm><primary>AsciiSink object</primary></indexterm> This object is a subclass of the TextSink and knows how to display ASCII text. Support has been added to display any 8-bit character set, given the font. </para> </listitem> </varlistentry> -<!-- .IN "MultiSink object" "" --> <varlistentry> <term><function>MultiSink</function></term> <listitem> <para> +<indexterm><primary>MultiSink object</primary></indexterm> This object is a subclass of the TextSink and knows how to display font sets. </para> </listitem> </varlistentry> -<!-- .IN "AsciiSrc object" "" --> <varlistentry> <term><function>AsciiSrc</function></term> <listitem> <para> +<indexterm><primary>AsciiSrc object</primary></indexterm> This object is a subclass of the TextSrc and knows how to read strings and files. </para> </listitem> </varlistentry> -<!-- .IN "MultiSrc object" "" --> <varlistentry> <term><function>MultiSrc</function></term> <listitem> <para> +<indexterm><primary>MultiSrc object</primary></indexterm> This object is a subclass of the TextSrc and knows how to read strings and multibyte files, converting them to wide characters based on locale. </para> </listitem> </varlistentry> -<!-- .IN "AsciiText widget" "" --> <varlistentry> <term><function>AsciiText</function></term> <listitem> <para> +<indexterm><primary>AsciiText widget</primary></indexterm> This widget is a subclass of the Text widget. When created, the AsciiText automatically creates and attaches either an AsciiSrc and AsciiSink, or a MultiSrc and MultiSink, to itself. The AsciiText provides the simplest diff --git a/lib/libXaw/specs/TextFuncs.xml b/lib/libXaw/specs/TextFuncs.xml index d7d3580b7..f566660c5 100644 --- a/lib/libXaw/specs/TextFuncs.xml +++ b/lib/libXaw/specs/TextFuncs.xml @@ -16,7 +16,7 @@ These data structures are defined in the Text widget's public header file, </para> <para> <!-- .LP --> -<!-- .IN "XawTextPosition" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextPosition</primary></indexterm> typedef long XawTextPosition; <!-- .sp --> </para> @@ -27,7 +27,7 @@ n is the number of characters in the Text source widget. </para> <para> <!-- .LP --> -<!-- .IN "XawTextBlock" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextBlock</primary></indexterm> <literallayout class="monospaced"> <!-- .TA .5i 1.5i 2.25i --> <!-- .ta .5i 1.5i 2.25i --> @@ -41,7 +41,7 @@ typedef struct { </para> <para> <!-- .LP --> -<!-- .IN "XawTextBlockPtr" "" --> +<indexterm><primary>XawTextBlockPtr</primary></indexterm> <variablelist> <varlistentry> <term> @@ -97,7 +97,7 @@ either XawFmt8Bit or XawFmtWide. <para> <!-- .LP --> Note: Previous versions of Xaw used -<function>FMT8BIT ,</function> +<function>FMT8BIT</function>, which has been retained for backwards compatibility. <function>FMT8BIT</function> is deprecated and will eventually be removed from the implementation. </para> @@ -108,7 +108,7 @@ deprecated and will eventually be removed from the implementation. <!-- .LP --> To select a piece of text, use <function>XawTextSetSelection : </function> -<!-- .IN "XawTextSetSelection" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextSetSelection</primary></indexterm> <funcsynopsis id='XawTextSetSelection'> <funcprototype> <funcdef>void<function> XawTextSetSelection</function></funcdef> @@ -152,7 +152,8 @@ Specifies the character position at which the selection ends. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. If redisplay is enabled, this function highlights the text and makes it the <function>PRIMARY</function> selection. This function does not have any effect on <function>CUT_BUFFER0</function>. @@ -167,7 +168,7 @@ effect on <function>CUT_BUFFER0</function>. <!-- .LP --> To unhighlight previously highlighted text in a widget, use <xref linkend='XawTextUnsetSelection' xrefstyle='select: title'/>: -<!-- .IN "XawTextUnsetSelection" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextUnsetSelection</primary></indexterm> <funcsynopsis id='XawTextUnsetSelection'> <funcprototype> <funcdef>void<function> XawTextUnsetSelection</function></funcdef> @@ -195,7 +196,7 @@ Specifies the Text widget. <!-- .LP --> To retrieve the text that has been selected by this text widget use <xref linkend='XawTextGetSelectionPos' xrefstyle='select: title'/>: -<!-- .IN "XawTextGetSelectionPos" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextGetSelectionPos</primary></indexterm> <funcsynopsis id='XawTextGetSelectionPos'> <funcprototype> <funcdef>void<function> XawTextGetSelectionPos</function></funcdef> @@ -239,7 +240,8 @@ Returns the end of the text selection. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. If the returned values are equal, no text is currently selected. </para> </sect2> @@ -248,7 +250,7 @@ If the returned values are equal, no text is currently selected. <para> <!-- .LP --> To modify the text in an editable Text widget use <xref linkend='XawTextReplace' xrefstyle='select: title'/>: -<!-- .IN "XawTextReplace" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextReplace</primary></indexterm> <funcsynopsis id='XawTextReplace'> <funcprototype> <funcdef>int<function> XawTextReplace</function></funcdef> @@ -309,7 +311,8 @@ be able to append text to an append-only text widget. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function> and <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function> and <function>XawTextBlock</function>. </para> <para> @@ -322,7 +325,7 @@ This function may return the following values: </term> <listitem> <para> -<!-- .IN "XawEditDone" "" --> +<indexterm><primary>XawEditDone</primary></indexterm> The text replacement was successful. </para> </listitem> @@ -333,7 +336,7 @@ The text replacement was successful. </term> <listitem> <para> -<!-- .IN "XawPositionError" "" --> +<indexterm><primary>XawPositionError</primary></indexterm> The edit mode is <function>XawtextAppend</function> and <function>start</function> is not the position of the last character of the source. </para> @@ -345,7 +348,7 @@ the last character of the source. </term> <listitem> <para> -<!-- .IN "XawEditError" "" --> +<indexterm><primary>XawEditError</primary></indexterm> Either the Source was read-only or the range to be deleted is larger than the length of the Source. @@ -372,7 +375,7 @@ text is inserted after <emphasis remap='I'>start</emphasis>. <!-- .LP --> To search for a string in the Text widget, use <xref linkend='XawTextSearch' xrefstyle='select: title'/>: -<!-- .IN "XawTextSearch" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextSearch</primary></indexterm> <funcsynopsis id='XawTextSearch'> <funcprototype> <funcdef>XawTextPosition<function> XawTextSearch</function></funcdef> @@ -418,7 +421,8 @@ Specifies a text block structure that contains the text to search for. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function> and <function>XawTextBlock</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> for a description of +<function>XawTextPosition</function> and <function>XawTextBlock</function>. The <xref linkend='XawTextSearch' xrefstyle='select: title'/> function will begin at the insertion point and search in the direction specified for a string that matches the one passed in @@ -432,7 +436,7 @@ found then the value <function>XawTextSearchError</function> is returned. <para> <!-- .LP --> To redisplay a range of characters, use <xref linkend='XawTextInvalidate' xrefstyle='select: title'/>: -<!-- .IN "XawTextInvalidate" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextInvalidate</primary></indexterm> <funcsynopsis id='XawTextInvalidate'> <funcprototype> <funcdef>void<function> XawTextInvalidate</function></funcdef> @@ -476,7 +480,8 @@ Specifies the end of the text to redisplay. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. The <xref linkend='XawTextInvalidate' xrefstyle='select: title'/> function causes the specified range of characters to be redisplayed immediately if redisplay is enabled or the next time that redisplay is @@ -486,7 +491,7 @@ enabled. <!-- .LP --> <!-- .sp 1 --> To enable redisplay, use <xref linkend='XawTextEnableRedisplay' xrefstyle='select: title'/>: -<!-- .IN "XawTextEnableRedisplay" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextEnableRedisplay</primary></indexterm> <funcsynopsis id='XawTextEnableRedisplay'> <funcprototype> <funcdef>void<function> XawTextEnableRedisplay</function></funcdef> @@ -518,7 +523,7 @@ was called and allows future changes to be reflected immediately. <!-- .sp 1 --> To disable redisplay while making several changes, use <xref linkend='XawTextDisableRedisplay' xrefstyle='select: title'/>. -<!-- .IN "XawTextDisableRedisplay" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextDisableRedisplay</primary></indexterm> <funcsynopsis id='XawTextDisableRedisplay'> <funcprototype> <funcdef>void<function> XawTextDisableRedisplay</function></funcdef> @@ -549,7 +554,7 @@ is called. <!-- .LP --> <!-- .sp 1 --> To display batched updates, use <xref linkend='XawTextDisplay' xrefstyle='select: title'/>: -<!-- .IN "XawTextDisplay" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextDisplay</primary></indexterm> <funcsynopsis id='XawTextDisplay'> <funcprototype> <funcdef>void<function> XawTextDisplay</function></funcdef> @@ -583,7 +588,7 @@ displayed. To obtain the character position of the left-most character on the first line displayed in the widget (the value of the <function>displayPosition</function> resource), use <xref linkend='XawTextTopPosition' xrefstyle='select: title'/>. -<!-- .IN "XawTextTopPosition" "" @DEF@" --> +<indexterm significance="preferred"><primary>XawTextTopPosition</primary></indexterm> <funcsynopsis id='XawTextTopPosition'> <funcprototype> <funcdef>XawTextPosition<function> XawTextTopPosition</function></funcdef> @@ -609,7 +614,7 @@ Specifies the Text widget. <!-- .sp 1 --> To assign a new selection array to a text widget use <xref linkend='XawTextSetSelectionArray' xrefstyle='select: title'/>: -<!-- .IN "XawTextSetSelectionArray" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextSetSelectionArray</primary></indexterm> <funcsynopsis id='XawTextSetSelectionArray'> <funcprototype> <funcdef>void<function> XawTextSetSelectionArray</function></funcdef> @@ -635,8 +640,8 @@ Specifies the Text widget. </term> <listitem> <para> -Specifies a selection array as defined in the section called \fBText -Selections for Application Programmers\fP. +Specifies a selection array as defined in +<xref linkend="Text_Selections_for_Application_Programmers"/>. </para> </listitem> </varlistentry> @@ -652,7 +657,7 @@ Calling this function is equivalent to setting the value of the <!-- .sp 1 --> To move the insertion point to the specified source position, use <xref linkend='XawTextSetInsertionPoint' xrefstyle='select: title'/>: -<!-- .IN "XawTextSetInsertionPoint" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextSetInsertionPoint</primary></indexterm> <funcsynopsis id='XawTextSetInsertionPoint'> <funcprototype> <funcdef>void<function> XawTextSetInsertionPoint</function></funcdef> @@ -686,7 +691,8 @@ Specifies the new position for the insertion point. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. The text will be scrolled vertically if necessary to make the line containing the insertion point visible. Calling this function is equivalent to setting the <function>insertPosition</function> resource. @@ -696,7 +702,7 @@ equivalent to setting the <function>insertPosition</function> resource. <!-- .sp 1 --> To obtain the current position of the insertion point, use <xref linkend='XawTextGetInsertionPoint' xrefstyle='select: title'/>: -<!-- .IN "XawTextGetInsertionPoint" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextGetInsertionPoint</primary></indexterm> <funcsynopsis id='XawTextGetInsertionPoint'> <funcprototype> <funcdef>XawTextPosition<function> XawTextGetInsertionPoint</function></funcdef> @@ -719,7 +725,8 @@ Specifies the Text widget. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. The result is equivalent to retrieving the value of the <function>insertPosition</function> resource. </para> @@ -728,7 +735,7 @@ The result is equivalent to retrieving the value of the <!-- .sp 1 --> To replace the text source in the specified widget, use <xref linkend='XawTextSetSource' xrefstyle='select: title'/>: -<!-- .IN "XawTextSetSource" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextSetSource</primary></indexterm> <funcsynopsis id='XawTextSetSource'> <funcprototype> <funcdef>void<function> XawTextSetSource</function></funcdef> @@ -774,7 +781,8 @@ of the displayed text. This is usually set to zero. </para> <para> <!-- .LP --> -See section 5.4 for a description of <function>XawTextPosition</function>. <!-- xref --> +<link linkend="Text_Functions">See section 5.4</link> +for a description of <function>XawTextPosition</function>. A display update will be performed if redisplay is enabled. </para> <para> @@ -782,7 +790,7 @@ A display update will be performed if redisplay is enabled. <!-- .sp 1 --> To obtain the current text source for the specified widget, use <xref linkend='XawTextGetSource' xrefstyle='select: title'/>: -<!-- .IN "XawTextGetSource" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextGetSource</primary></indexterm> <funcsynopsis id='XawTextGetSource'> <funcprototype> <funcdef>Widget<function> XawTextGetSource</function></funcdef> @@ -813,7 +821,7 @@ using. <!-- .sp --> To enable and disable the insertion point, use <xref linkend='XawTextDisplayCaret' xrefstyle='select: title'/>: -<!-- .IN "XawTextDisplayCaret" "" "@DEF@" --> +<indexterm significance="preferred"><primary>XawTextDisplayCaret</primary></indexterm> <funcsynopsis id='XawTextDisplayCaret'> <funcprototype> <funcdef>void<function> XawTextDisplayCaret</function></funcdef> diff --git a/lib/libXaw/specs/TextSink.xml b/lib/libXaw/specs/TextSink.xml index 93a2e0ef6..78218b260 100644 --- a/lib/libXaw/specs/TextSink.xml +++ b/lib/libXaw/specs/TextSink.xml @@ -5,7 +5,7 @@ <!-- .XS --> <!-- TextSink Object --> <!-- .XE --> -<!-- .IN "TextSink object" "" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary></indexterm> </para> <para> <!-- .LP --> @@ -13,13 +13,13 @@ <!-- .TA 2.0i --> <!-- .ta 2.0i --> Application Header file <X11/Xaw/TextSink.h> -<!-- .IN "TextSink.h" "" --> +<indexterm><primary>TextSink.h</primary></indexterm> Class Header file <X11/Xaw/TextSinkP.h> -<!-- .IN "TextSinkP.h" "" --> +<indexterm><primary>TextSinkP.h</primary></indexterm> Class textSinkObjectClass -<!-- .IN "textSinkObjectClass" "" --> +<indexterm><primary>textSinkObjectClass</primary></indexterm> Class Name TextSink -<!-- .IN "TextSink object" "class name" --> +<indexterm><primary>TextSink object</primary><secondary>class name</secondary></indexterm> Superclass Object </literallayout> </para> @@ -44,7 +44,7 @@ retrieved from the argument list or from the resource database: </para> <para> <!-- .LP --> -<!-- .IN "AsciiSink object" "resources" --> +<indexterm><primary>AsciiSink object</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -96,7 +96,7 @@ retrieved from the argument list or from the resource database: </sect2> <sect2 id="Subclassing_the_TextSink"> <title>Subclassing the TextSink</title> -<!-- .IN "TextSink object" "subclassing" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>subclassing</secondary></indexterm> <para> <!-- .LP --> The only purpose of the TextSink Object is to be subclassed. It @@ -191,7 +191,7 @@ to be used as a sink by itself. <!-- .LP --> To display a section of the text buffer contained in the text source use the function <xref linkend='DisplayText' xrefstyle='select: title'/>: -<!-- .IN "TextSink object" "DisplayText" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>DisplayText</secondary></indexterm> <funcsynopsis id='DisplayText'> <funcprototype> <funcdef>void<function> DisplayText</function></funcdef> @@ -352,8 +352,8 @@ defines this function as calling on the region passed. This behavior will be used if you specify <function>XtInheritClearToBackground</function> for this method. -<!-- .IN "XtInheritClearToBackground" "" --> -<!-- .IN "TextSink object" "ClearToBackground" "@DEF@" --> +<indexterm><primary>XtInheritClearToBackground</primary></indexterm> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>ClearToBackground</secondary></indexterm> <funcsynopsis id='ClearToBackground'> <funcprototype> <funcdef>void<function> ClearToBackground</function></funcdef> @@ -427,7 +427,7 @@ Specifies the height, in pixels, of the Region to clear. <!-- .LP --> To find the text character position that will be rendered at a given x location the Text widget uses the function <xref linkend='FindPosition' xrefstyle='select: title'/>: -<!-- .IN "TextSink object" "FindPosition" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>FindPosition</secondary></indexterm> <funcsynopsis id='FindPosition'> <funcprototype> <funcdef>void<function> FindPosition</function></funcdef> @@ -541,7 +541,7 @@ widget will only call it one line at a time. <!-- .sp --> Another means of finding a text position is provided by the <xref linkend='Resolve' xrefstyle='select: title'/> function: -<!-- .IN "TextSink object" "Resolve" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>Resolve</secondary></indexterm> <funcsynopsis id='Resolve'> <funcprototype> <funcdef>void<function> Resolve</function></funcdef> @@ -617,7 +617,7 @@ This function need make no attempt to deal with line feeds. The text widget will only call it one line at a time. This is a more convenient interface to the <xref linkend='FindPosition' xrefstyle='select: title'/> function, and provides a subset of its functionality. -<!-- .IN "FindPosition" "" --> +<indexterm><primary>FindPosition</primary></indexterm> </para> </sect3> <sect3 id="Finding_the_Distance_Between_two_Text_Positions"> @@ -626,7 +626,7 @@ functionality. <!-- .LP --> To find the distance in pixels between two text positions on the same line use the function <xref linkend='FindDistance' xrefstyle='select: title'/>. -<!-- .IN "TextSink object" "FindDistance" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>FindDistance</secondary></indexterm> <funcsynopsis id='FindDistance'> <funcprototype> <funcdef>void<function> FindDistance</function></funcdef> @@ -732,7 +732,7 @@ To find the maximum number of lines that will fit into the current Text widget, use the function <xref linkend='MaxLines' xrefstyle='select: title'/>. The TextSink already defines this function to compute the maximum number of lines by using the height of <function>font</function>. -<!-- .IN "TextSink object" "MaxLines" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>MaxLines</secondary></indexterm> <funcsynopsis id='MaxLines'> <funcprototype> <funcdef>int<function> MaxLines</function></funcdef> @@ -775,7 +775,7 @@ To find the height required for a given number of text lines, use the function <xref linkend='MaxHeight' xrefstyle='select: title'/>. The TextSink already defines this function to compute the maximum height of the window by using the height of <function>font</function>. -<!-- .IN "TextSink object" "MaxHeight" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>MaxHeight</secondary></indexterm> <funcsynopsis id='MaxHeight'> <funcprototype> <funcdef>int<function> MaxHeight</function></funcdef> @@ -820,7 +820,7 @@ To set the tab stops for a text sink use the <xref linkend='SetTabs' xrefstyle=' The TextSink already defines this function to set the tab x location in pixels to be the number of characters times the figure width of <function>font</function>. -<!-- .IN "TextSink object" "SetTabs" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>SetTabs</secondary></indexterm> <funcsynopsis id='SetTabs'> <funcprototype> <funcdef>void<function> SetTabs</function></funcdef> @@ -874,7 +874,7 @@ to it into whatever internal positions the TextSink uses for tab placement. <!-- .LP --> To get the size and location of the insert point use the <xref linkend='GetCursorBounds' xrefstyle='select: title'/> function. -<!-- .IN "TextSink object" "GetCursorBounds" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSink object</primary><secondary>GetCursorBounds</secondary></indexterm> <funcsynopsis id='GetCursorBounds'> <funcprototype> <funcdef>void<function> GetCursorBounds</function></funcdef> diff --git a/lib/libXaw/specs/TextSource.xml b/lib/libXaw/specs/TextSource.xml index c90ae2960..4c49720e2 100644 --- a/lib/libXaw/specs/TextSource.xml +++ b/lib/libXaw/specs/TextSource.xml @@ -138,7 +138,7 @@ used as a source by itself and bad things will probably happen. <para> <!-- .LP --> To read the text in a text source use the <xref linkend='Read' xrefstyle='select: title'/> function: -<!-- .IN "TextSrc object" "Read" "@DEF@" --> +<indexterm significance="preferred"><primary>TextSrc object</primary><secondary>Read</secondary></indexterm> </para> <funcsynopsis id='Read'> <funcprototype> @@ -273,7 +273,7 @@ The text replacement was successful. <term><function>XawPositionError</function></term> <listitem> <para> -<!-- .IN "XawPositionError" "" --> +<indexterm><primary>XawPositionError</primary></indexterm> The edit mode is <function>XawtextAppend</function> and <function>start</function> is not the last character of the source. </para> @@ -283,7 +283,7 @@ character of the source. <term><function>XawEditError</function></term> <listitem> <para> -<!-- .IN "XawEditError" "" --> +<indexterm><primary>XawEditError</primary></indexterm> Either the Source was read-only or the range to be deleted is larger than the length of the Source. </para> @@ -356,9 +356,9 @@ boundaries is left up to the individual text source. <listitem> <para> Specifies the direction to scan, may be either <function>XawsdLeft</function> to search -<!-- .IN "XawsdLeft" "" --> +<indexterm><primary>XawsdLeft</primary></indexterm> backward, or <function>XawsdRight</function> to search forward. -<!-- .IN "XawsdRight" "" --> +<indexterm><primary>XawsdRight</primary></indexterm> </para> </listitem> </varlistentry> @@ -428,9 +428,9 @@ Specifies the position to begin the search. <listitem> <para> Specifies the direction to search, may be either <function>XawsdLeft</function> to search -<!-- .IN "XawsdLeft" "" --> +<indexterm><primary>XawsdLeft</primary></indexterm> backward, or <function>XawsdRight</function> to search forward. -<!-- .IN "XawsdRight" "" --> +<indexterm><primary>XawsdRight</primary></indexterm> </para> </listitem> </varlistentry> diff --git a/lib/libXaw/specs/Toggle.xml b/lib/libXaw/specs/Toggle.xml index 227aba2dc..a7944fa65 100644 --- a/lib/libXaw/specs/Toggle.xml +++ b/lib/libXaw/specs/Toggle.xml @@ -34,7 +34,7 @@ the user to cancel the operation. </para> <para> -Toggle widgets may also be part of a ``radio group.'' A radio group is a +Toggle widgets may also be part of a <quote>radio group.</quote> A radio group is a list of at least two Toggle widgets in which no more than one Toggle may be set at any time. A radio group is identified by the widget ID of any one of @@ -566,7 +566,7 @@ multi-plane pixmap. <para> There are typically two types of radio groups desired by applications. The default translations for the Toggle widget implement a "zero or one -<!-- .IN "Radio groups" "zero or one of many" --> +<indexterm><primary>Radio groups</primary><secondary>zero or one of many</secondary></indexterm> of many" radio group. This means that there may be no more than one Toggle widget active, but there need not be any Toggle widgets active. </para> diff --git a/lib/libXaw/specs/Tree.xml b/lib/libXaw/specs/Tree.xml index 71cadd126..65bc94493 100644 --- a/lib/libXaw/specs/Tree.xml +++ b/lib/libXaw/specs/Tree.xml @@ -152,7 +152,7 @@ retrieved from the argument list or from the resource database: <entry>Height</entry> <entry>Dimension</entry> <entry>A</entry> - <entry>see <function>Layout Semantics</function></entry> <!-- xref --> + <entry>see <xref linkend='Tree::Layout_Semantics'/></entry> </row> <row> <entry>hSpace</entry> @@ -215,7 +215,7 @@ retrieved from the argument list or from the resource database: <entry>Width</entry> <entry>Dimension</entry> <entry>A</entry> - <entry>see <function>Layout Semantics</function></entry> <!-- xref --> + <entry>see <xref linkend='Tree::Layout_Semantics'/></entry> </row> <row> <entry>x</entry> diff --git a/lib/libXaw/specs/Viewport.xml b/lib/libXaw/specs/Viewport.xml index 767dc07a3..1f4aeb61e 100644 --- a/lib/libXaw/specs/Viewport.xml +++ b/lib/libXaw/specs/Viewport.xml @@ -5,19 +5,19 @@ <!-- .XS --> <!-- Viewport Widget --> <!-- .XE --> -<!-- .IN "Viewport widget" "" "@DEF@" --> +<indexterm significance="preferred"><primary>Viewport widget</primary></indexterm> <literallayout class="monospaced"> <!-- .TA 2.0i --> <!-- .ta 2.0i --> <!-- .sp --> Application Header file <X11/Xaw/Viewport.h> -<!-- .IN "Viewport.h" "" --> +<indexterm><primary>Viewport.h</primary></indexterm> Class Header file <X11/Xaw/ViewportP.h> -<!-- .IN "ViewportP.h" "" --> +<indexterm><primary>ViewportP.h</primary></indexterm> Class viewportWidgetClass -<!-- .IN "viewportWidgetClass" "" --> +<indexterm><primary>viewportWidgetClass</primary></indexterm> Class Name Viewport -<!-- .IN "Viewport widget" "class name" --> +<indexterm><primary>Viewport widget</primary><secondary>class name</secondary></indexterm> Superclass Form <!-- .sp --> </literallayout> @@ -48,7 +48,7 @@ retrieved from the argument list or the resource database: </para> <para> <!-- .LP --> -<!-- .IN "Viewport widget" "resources" --> +<indexterm><primary>Viewport widget</primary><secondary>resources</secondary></indexterm> <informaltable> <tgroup cols='5' align='center'> <colspec colname='c1'/> @@ -351,7 +351,7 @@ the Viewport. <title>Layout Semantics</title> <para> <!-- .LP --> -<!-- .IN "Viewport widget" "layout semantics" --> +<indexterm><primary>Viewport widget</primary><secondary>layout semantics</secondary></indexterm> The Viewport widget manages a single child widget. When the size of the child is larger than the size of the Viewport, the user can interactively move the child within the Viewport by repositioning the scrollbars. @@ -377,7 +377,7 @@ The scrollbar children of the Viewport are named <function>horizontal</function> for the individual scrollbars. <xref linkend='XtSetValues' xrefstyle='select: title'/> can be used to modify the resources dynamically once the widget ID has been obtained with <function>XtNameToWidget</function>. -<!-- .IN "XtNameToWidget" "" --> +<indexterm><primary>XtNameToWidget</primary></indexterm> <!-- .NT --> </para> <note><para> diff --git a/lib/libXaw/specs/libXaw.ent.in b/lib/libXaw/specs/libXaw.ent.in new file mode 100644 index 000000000..ea4326fd4 --- /dev/null +++ b/lib/libXaw/specs/libXaw.ent.in @@ -0,0 +1,2 @@ +<!-- define version entity for libXaw documentation via configure.ac --> +<!ENTITY xawvers "@PACKAGE_VERSION@"> diff --git a/lib/libXaw/specs/libXaw.xml b/lib/libXaw/specs/libXaw.xml index 75880ad55..2def204a0 100644 --- a/lib/libXaw/specs/libXaw.xml +++ b/lib/libXaw/specs/libXaw.xml @@ -3,6 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ <!ENTITY % defs SYSTEM "defs.ent"> %defs; +<!ENTITY % xawdefs SYSTEM "libXaw.ent"> %xawdefs; ]> <book id="libXaw"> @@ -10,7 +11,7 @@ <bookinfo> <title>Athena Widget Set - C Language Interface</title> <subtitle>X Consortium Standard</subtitle> - <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo> + <releaseinfo>libXaw Version &xawvers;</releaseinfo> <authorgroup> <author> <firstname>Chris</firstname><othername>D.</othername><surname>Peterson</surname> @@ -85,5 +86,6 @@ It is provided “as is” without express or implied warranty. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH6.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH7.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="TPage_Credits.xml"/> +<index /> </book> diff --git a/lib/libXaw/src/Actions.c b/lib/libXaw/src/Actions.c index cec9bdd5e..eceb1f92e 100644 --- a/lib/libXaw/src/Actions.c +++ b/lib/libXaw/src/Actions.c @@ -110,8 +110,8 @@ static Bool prim(XawEvalInfo*); /* resources */ static String XawConvertActionRes(XawActionResList*, Widget w, String); -static String _XawEscapeActionVarValue(String); -static String _XawUnescapeActionVarValue(String); +static char * _XawEscapeActionVarValue(String); +static char * _XawUnescapeActionVarValue(String); static XawActionResList *_XawCreateActionResList(WidgetClass); static XawActionResList *_XawFindActionResList(WidgetClass); static void _XawBindActionResList(XawActionResList*); @@ -151,7 +151,7 @@ static Cardinal num_variable_list; Bool XawParseBoolean(Widget w, String param, XEvent *event, Bool *succed) { - char *tmp = param; + char *tmp = (char *)param; int value; if (!param) @@ -206,7 +206,7 @@ XawBooleanExpression(Widget w, String param, XEvent *event) info.parse_proc = XawParseBoolean; info.event = event; - info.cp = info.lp = param; + info.cp = info.lp = (char *)param; #ifdef DIAGNOSTIC fprintf(stderr, "(*) Parsing expression \"%s\"\n", param); @@ -423,7 +423,7 @@ XawSetValuesAction(Widget w, XEvent *event, vlist = XawGetActionVarList(w); num_args = 0; - arglist = (Arg *)XtMalloc(sizeof(Arg) * ((*num_params) >> 1)); + arglist = (Arg *)XtMalloc((Cardinal)sizeof(Arg) * ((*num_params) >> 1)); for (count = 1; count < *num_params; count += 2) { @@ -437,8 +437,8 @@ XawSetValuesAction(Widget w, XEvent *event, continue; } value = XawConvertActionVar(vlist, params[count + 1]); - from.size = strlen(value) + 1; - from.addr = value; + from.size = (Cardinal) strlen(value) + 1; + from.addr = (char *)value; to.size = resource->size; switch (to.size) { @@ -646,13 +646,15 @@ XawPrintActionErrorMsg(String action_name, Widget w, char msg[1024]; unsigned int size, idx; - size = snprintf(msg, sizeof(msg), "%s(): bad number of parameters.\n\t(", - action_name); + size = (unsigned)snprintf(msg, + sizeof(msg), + "%s(): bad number of parameters.\n\t(", + action_name); idx = 0; while (idx < *num_params - 1 && size < sizeof(msg)) - size += snprintf(&msg[size], sizeof(msg) - size, "%s, ", - params[idx++]); + size += (unsigned)snprintf(&msg[size], sizeof(msg) - size, "%s, ", + params[idx++]); if (*num_params) snprintf(&msg[size], sizeof(msg) - size, "%s)", params[idx]); else @@ -677,8 +679,8 @@ static int qcmp_action_resource_list(register _Xconst void *left, register _Xconst void *right) { - return ((char *)((*(XawActionResList **)left)->widget_class) - - (char *)((*(XawActionResList **)right)->widget_class)); + return (int)((char *)((*(XawActionResList **)left)->widget_class) - + (char *)((*(XawActionResList **)right)->widget_class)); } static XawActionResList * @@ -686,7 +688,7 @@ _XawCreateActionResList(WidgetClass wc) { XawActionResList *list; - list = (XawActionResList *)XtMalloc(sizeof(XawActionResList)); + list = (XawActionResList *)XtMalloc((Cardinal)sizeof(XawActionResList)); list->widget_class = wc; list->num_common_resources = list->num_constraint_resources = 0; list->resources = NULL; @@ -694,14 +696,14 @@ _XawCreateActionResList(WidgetClass wc) if (!resource_list) { num_resource_list = 1; - resource_list = (XawActionResList **)XtMalloc(sizeof(XawActionResList*)); + resource_list = (XawActionResList **)XtMalloc((Cardinal)sizeof(XawActionResList*)); resource_list[0] = list; } else { ++num_resource_list; resource_list = (XawActionResList **)XtRealloc((char *)resource_list, - sizeof(XawActionResList*) + (Cardinal) sizeof(XawActionResList*) * num_resource_list); resource_list[num_resource_list - 1] = list; qsort(resource_list, num_resource_list, sizeof(XawActionResList*), @@ -717,7 +719,8 @@ static int bcmp_action_resource_list(register _Xconst void *wc, register _Xconst void *list) { - return ((char *)wc - (char *)((*(XawActionResList **)list)->widget_class)); + return (int)((char *)wc + - (char *)((*(XawActionResList **)list)->widget_class)); } static XawActionResList * @@ -761,7 +764,7 @@ _XawBindActionResList(XawActionResList *list) list->num_constraint_resources = num_cons; list->resources = (XawActionRes **) - XtMalloc(sizeof(XawActionRes*) * (num_xt + num_cons)); + XtMalloc((Cardinal)sizeof(XawActionRes*) * (num_xt + num_cons)); #ifdef DIAGNOSTIC fprintf(stderr, "Common resources\n---\n"); @@ -769,7 +772,7 @@ _XawBindActionResList(XawActionResList *list) for (i = 0; i < num_xt; i++) { - list->resources[i] = (XawActionRes *)XtMalloc(sizeof(XawActionRes)); + list->resources[i] = (XawActionRes *)XtMalloc((Cardinal)sizeof(XawActionRes)); list->resources[i]->qname = XrmPermStringToQuark(xt_list[i].resource_name); list->resources[i]->qtype = @@ -790,7 +793,7 @@ _XawBindActionResList(XawActionResList *list) for (; i < num_xt + num_cons; i++) { - list->resources[i] = (XawActionRes *)XtMalloc(sizeof(XawActionRes)); + list->resources[i] = (XawActionRes *)XtMalloc((Cardinal)sizeof(XawActionRes)); list->resources[i]->qname = XrmPermStringToQuark(cons_list[i - num_xt].resource_name); list->resources[i]->qtype = @@ -859,14 +862,14 @@ _XawFindActionRes(XawActionResList *list, Widget detail, String name) * Start of Variables Implementation Code */ /* For speed, only does memory allocation when really required */ -static String +static char * _XawEscapeActionVarValue(String value) { - String escape; + char * escape; if (value[0] == '$' || value[0] == '\\') { - escape = XtMalloc(strlen(value) + 2); + escape = XtMalloc((Cardinal)strlen(value) + 2); escape[0] = '\\'; strcpy(escape + 1, value); return (escape); @@ -875,14 +878,14 @@ _XawEscapeActionVarValue(String value) } /* For speed, only does memory allocation when really required */ -static String +static char * _XawUnescapeActionVarValue(String value) { - String unescape; + char * unescape; if (value[0] == '\\') { - unescape = XtMalloc(strlen(value)); + unescape = XtMalloc((Cardinal)strlen(value)); strcpy(unescape, value + 1); return (unescape); } @@ -893,7 +896,7 @@ static void XawDeclareActionVar(XawActionVarList *list, String name, String value) { XawActionVar *variable; - String escape = NULL; + char * escape = NULL; if (name[0] != XAW_PRIV_VAR_PREFIX) { @@ -932,7 +935,7 @@ static String XawConvertActionVar(XawActionVarList *list, String name) { XawActionVar *variable; - String unescape; + char * unescape; XrmQuark quark; if (name[0] != XAW_PRIV_VAR_PREFIX) @@ -969,8 +972,8 @@ static int qcmp_action_variable_list(register _Xconst void *left, register _Xconst void *right) { - return ((char *)((*(XawActionVarList **)left)->widget) - - (char *)((*(XawActionVarList **)right)->widget)); + return (int)((char *)((*(XawActionVarList **)left)->widget) - + (char *)((*(XawActionVarList **)right)->widget)); } static XawActionVarList * @@ -983,7 +986,7 @@ _XawCreateActionVarList(Widget w) XtName(w), w); #endif - list = (XawActionVarList *)XtMalloc(sizeof(XawActionVarList)); + list = (XawActionVarList *)XtMalloc((Cardinal)sizeof(XawActionVarList)); list->widget = w; list->num_variables = 0; list->variables = NULL; @@ -991,7 +994,7 @@ _XawCreateActionVarList(Widget w) if (!variable_list) { num_variable_list = 1; - variable_list = (XawActionVarList **)XtMalloc(sizeof(XawActionVarList*)); + variable_list = (XawActionVarList **)XtMalloc((Cardinal)sizeof(XawActionVarList*)); variable_list[0] = list; } else @@ -999,7 +1002,7 @@ _XawCreateActionVarList(Widget w) ++num_variable_list; variable_list = (XawActionVarList **) XtRealloc((char *)variable_list, - sizeof(XawActionVarList *) * num_variable_list); + (Cardinal)sizeof(XawActionVarList *) * num_variable_list); variable_list[num_variable_list - 1] = list; qsort(variable_list, num_variable_list, sizeof(XawActionVarList*), qcmp_action_variable_list); @@ -1015,7 +1018,8 @@ static int bcmp_action_variable_list(register _Xconst void *widget, register _Xconst void *list) { - return ((char *)widget - (char *)((*(XawActionVarList **)list)->widget)); + return (int)((char *)widget + - (char *)((*(XawActionVarList **)list)->widget)); } static XawActionVarList * @@ -1051,21 +1055,21 @@ _XawCreateActionVar(XawActionVarList *list, String name) name, XtName(list->widget), list->widget); #endif - variable = (XawActionVar *)XtMalloc(sizeof(XawActionVar)); + variable = (XawActionVar *)XtMalloc((Cardinal)sizeof(XawActionVar)); variable->qname = XrmStringToQuark(name); variable->qvalue = NULLQUARK; if (!list->variables) { list->num_variables = 1; - list->variables = (XawActionVar **)XtMalloc(sizeof(XawActionVar*)); + list->variables = (XawActionVar **)XtMalloc((Cardinal)sizeof(XawActionVar*)); list->variables[0] = variable; } else { ++list->num_variables; list->variables = (XawActionVar **)XtRealloc((char *)list->variables, - sizeof(XawActionVar *) * + (Cardinal) sizeof(XawActionVar *) * list->num_variables); list->variables[list->num_variables - 1] = variable; qsort(list->variables, list->num_variables, sizeof(XawActionVar*), @@ -1098,7 +1102,7 @@ _XawFindActionVar(XawActionVarList *list, String name) /*ARGSUSED*/ static void -_XawDestroyActionVarList(Widget w, XtPointer client_data, XtPointer call_data) +_XawDestroyActionVarList(Widget w, XtPointer client_data, XtPointer call_data _X_UNUSED) { XawActionVarList *list = (XawActionVarList *)client_data; Cardinal i; @@ -1117,7 +1121,7 @@ _XawDestroyActionVarList(Widget w, XtPointer client_data, XtPointer call_data) memmove(&variable_list[i], &variable_list[i + 1], (num_variable_list - i) * sizeof(XawActionVarList *)); variable_list = (XawActionVarList **) - XtRealloc((char *)variable_list, sizeof(XawActionVarList *) * + XtRealloc((char *)variable_list, (Cardinal) sizeof(XawActionVarList *) * num_variable_list); } else diff --git a/lib/libXaw/src/AllWidgets.c b/lib/libXaw/src/AllWidgets.c index 3b1343877..8a7490f73 100644 --- a/lib/libXaw/src/AllWidgets.c +++ b/lib/libXaw/src/AllWidgets.c @@ -60,50 +60,52 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xaw/Tree.h> #include <X11/Xaw/Viewport.h> +#define DATA(name,class) { (char *)name, class } XmuWidgetNode XawWidgetArray[] = { -{ "applicationShell", &applicationShellWidgetClass }, -{ "asciiSink", &asciiSinkObjectClass }, -{ "asciiSrc", &asciiSrcObjectClass }, -{ "asciiText", &asciiTextWidgetClass }, -{ "box", &boxWidgetClass }, -{ "command", &commandWidgetClass }, -{ "composite", &compositeWidgetClass }, -{ "constraint", &constraintWidgetClass }, -{ "core", &coreWidgetClass }, -{ "dialog", &dialogWidgetClass }, -{ "form", &formWidgetClass }, -{ "grip", &gripWidgetClass }, -{ "label", &labelWidgetClass }, -{ "list", &listWidgetClass }, -{ "menuButton", &menuButtonWidgetClass }, -{ "multiSink", &multiSinkObjectClass }, -{ "multiSrc", &multiSrcObjectClass }, -{ "object", &objectClass }, -{ "overrideShell", &overrideShellWidgetClass }, -{ "paned", &panedWidgetClass }, -{ "panner", &pannerWidgetClass }, -{ "porthole", &portholeWidgetClass }, -{ "rect", &rectObjClass }, -{ "repeater", &repeaterWidgetClass }, -{ "scrollbar", &scrollbarWidgetClass }, -{ "shell", &shellWidgetClass }, -{ "simpleMenu", &simpleMenuWidgetClass }, -{ "simple", &simpleWidgetClass }, -{ "smeBSB", &smeBSBObjectClass }, -{ "smeLine", &smeLineObjectClass }, -{ "sme", &smeObjectClass }, -{ "stripChart", &stripChartWidgetClass }, -{ "textSink", &textSinkObjectClass }, -{ "textSrc", &textSrcObjectClass }, -{ "text", &textWidgetClass }, -{ "toggle", &toggleWidgetClass }, -{ "topLevelShell", &topLevelShellWidgetClass }, -{ "transientShell", &transientShellWidgetClass }, -{ "tree", &treeWidgetClass }, -{ "vendorShell", &vendorShellWidgetClass }, -{ "viewport", &viewportWidgetClass }, -{ "wmShell", &wmShellWidgetClass }, +DATA( "applicationShell", &applicationShellWidgetClass ), +DATA( "asciiSink", &asciiSinkObjectClass ), +DATA( "asciiSrc", &asciiSrcObjectClass ), +DATA( "asciiText", &asciiTextWidgetClass ), +DATA( "box", &boxWidgetClass ), +DATA( "command", &commandWidgetClass ), +DATA( "composite", &compositeWidgetClass ), +DATA( "constraint", &constraintWidgetClass ), +DATA( "core", &coreWidgetClass ), +DATA( "dialog", &dialogWidgetClass ), +DATA( "form", &formWidgetClass ), +DATA( "grip", &gripWidgetClass ), +DATA( "label", &labelWidgetClass ), +DATA( "list", &listWidgetClass ), +DATA( "menuButton", &menuButtonWidgetClass ), +DATA( "multiSink", &multiSinkObjectClass ), +DATA( "multiSrc", &multiSrcObjectClass ), +DATA( "object", &objectClass ), +DATA( "overrideShell", &overrideShellWidgetClass ), +DATA( "paned", &panedWidgetClass ), +DATA( "panner", &pannerWidgetClass ), +DATA( "porthole", &portholeWidgetClass ), +DATA( "rect", &rectObjClass ), +DATA( "repeater", &repeaterWidgetClass ), +DATA( "scrollbar", &scrollbarWidgetClass ), +DATA( "shell", &shellWidgetClass ), +DATA( "simpleMenu", &simpleMenuWidgetClass ), +DATA( "simple", &simpleWidgetClass ), +DATA( "smeBSB", &smeBSBObjectClass ), +DATA( "smeLine", &smeLineObjectClass ), +DATA( "sme", &smeObjectClass ), +DATA( "stripChart", &stripChartWidgetClass ), +DATA( "textSink", &textSinkObjectClass ), +DATA( "textSrc", &textSrcObjectClass ), +DATA( "text", &textWidgetClass ), +DATA( "toggle", &toggleWidgetClass ), +DATA( "topLevelShell", &topLevelShellWidgetClass ), +DATA( "transientShell", &transientShellWidgetClass ), +DATA( "tree", &treeWidgetClass ), +DATA( "vendorShell", &vendorShellWidgetClass ), +DATA( "viewport", &viewportWidgetClass ), +DATA( "wmShell", &wmShellWidgetClass ), }; +#undef DATA int XawWidgetCount = XtNumber(XawWidgetArray); diff --git a/lib/libXaw/src/AsciiSink.c b/lib/libXaw/src/AsciiSink.c index d77689518..af715f00b 100644 --- a/lib/libXaw/src/AsciiSink.c +++ b/lib/libXaw/src/AsciiSink.c @@ -118,7 +118,7 @@ static XtResource resources[] = { sizeof(XFontStruct*), offset(font), XtRString, - XtDefaultFont + (XtPointer)XtDefaultFont }, { XtNecho, @@ -207,7 +207,7 @@ WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec; * Implementation */ static void -XawAsciiSinkClassPartInitialize(WidgetClass wc) +XawAsciiSinkClassPartInitialize(WidgetClass wc _X_UNUSED) { #ifndef OLDXAW AsciiSinkObjectClass cclass = (AsciiSinkObjectClass)wc; @@ -302,7 +302,7 @@ GetTextWidth(TextWidget ctx, int current_width, XFontStruct *font, while (length > 0) { pos = XawTextSourceRead(ctx->text.source, from, &block, length); - length -= pos - from; + length = (int)(length - (pos - from)); from = pos; for (i = 0; i < block.length; i++) width += CharWidth((AsciiSinkObject)ctx->text.sink, font, @@ -364,7 +364,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, c = ' '; else if ((c & 0177) < XawSP || c == 0177) { if (sink->ascii_sink.display_nonprinting) - c = c > 0177 ? (c & 7) + '0' : c + '@'; + c = (unsigned char)(c > 0177 ? (c & 7) + '0' : c + '@'); else c = ' '; } @@ -382,10 +382,10 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, paint->max_ascent = ascent; paint->max_descent = descent; paint->backtabs = NULL; - paint->highlight = highlight; + paint->highlight = (Boolean)highlight; paint->length = 1; paint->text = XtMalloc(1); - paint->text[0] = c; + paint->text[0] = (char)c; } } } @@ -400,7 +400,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, c = ' '; else if ((c & 0177) < XawSP || c == 0177) { if (sink->ascii_sink.display_nonprinting) - c = c > 0177 ? '\\' : c + '^'; + c = (unsigned char)(c > 0177 ? '\\' : c + '^'); else c = ' '; } @@ -418,10 +418,10 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, paint->max_ascent = ascent; paint->max_descent = descent; paint->backtabs = NULL; - paint->highlight = highlight; + paint->highlight = (Boolean)highlight; paint->length = 1; paint->text = XtMalloc(1); - paint->text[0] = c; + paint->text[0] = (char)c; } } } @@ -470,7 +470,7 @@ AsciiPreparePaint(Widget w, int y, int line, tmp = pos; pos = anchor->position + entity->offset + entity->length; if ((length = XawMin(from, pos) - tmp) > 0) - x += GetTextWidth(ctx, x, font, tmp, length); + x += GetTextWidth(ctx, x, font, tmp, (int)length); ascent = XawMax(font->ascent, ascent); descent = XawMax(font->descent, descent); } @@ -484,7 +484,7 @@ AsciiPreparePaint(Widget w, int y, int line, else { if ((length = XawMin(from, pos) - tmp) > 0) { x += GetTextWidth(ctx, x, sink->ascii_sink.font, tmp, - length); + (int)length); tmp += length; } if (pos < right) { @@ -496,7 +496,7 @@ AsciiPreparePaint(Widget w, int y, int line, else font = sink->ascii_sink.font; if ((length = XawMin(from, pos) - tmp) > 0) - x += GetTextWidth(ctx, x, font, tmp, length); + x += GetTextWidth(ctx, x, font, tmp, (int)length); ascent = XawMax(font->ascent, ascent); descent = XawMax(font->descent, descent); } @@ -507,14 +507,14 @@ AsciiPreparePaint(Widget w, int y, int line, if (anchor->entities == NULL) { tmp = XawMin(pos, from); if ((length = from - tmp) > 0) - x += GetTextWidth(ctx, x, sink->ascii_sink.font, tmp, length); + x += GetTextWidth(ctx, x, sink->ascii_sink.font, tmp, (int)length); break; } } else { tmp = XawMin(pos, from); if ((length = from - tmp) > 0) - x += GetTextWidth(ctx, x, sink->ascii_sink.font, tmp, length); + x += GetTextWidth(ctx, x, sink->ascii_sink.font, tmp, (int)length); ascent = XawMax(sink->ascii_sink.font->ascent, ascent); descent = XawMax(sink->ascii_sink.font->descent, descent); break; @@ -539,7 +539,7 @@ AsciiPreparePaint(Widget w, int y, int line, paint->max_ascent = ascent; paint->max_descent = descent; paint->backtabs = NULL; - paint->highlight = highlight; + paint->highlight = (Boolean)highlight; tmp = pos; if (XawTextSourceAnchorAndEntity(ctx->text.source, pos, @@ -568,27 +568,27 @@ AsciiPreparePaint(Widget w, int y, int line, pos = XawMin(pos, to); length = pos - tmp; - paint->text = XtMalloc(bufsiz = pos - tmp + 4); + paint->text = XtMalloc((Cardinal)(bufsiz = (int)(pos - tmp + 4))); paint->length = 0; segment.x1 = x; pos2 = tmp; while (length > 0) { - pos2 = XawTextSourceRead(ctx->text.source, tmp, &block, length); + pos2 = XawTextSourceRead(ctx->text.source, tmp, &block, (int)length); length = pos - pos2; tmp = pos2; for (i = 0; i < block.length; i++) { unsigned char c = (unsigned char)block.ptr[i]; - if (paint->length + 4 > bufsiz) - paint->text = XtRealloc(paint->text, bufsiz += 32); - paint->text[paint->length] = c; + if ((paint->length + 4) > (unsigned)bufsiz) + paint->text = XtRealloc(paint->text, (Cardinal)(bufsiz += 32)); + paint->text[paint->length] = (char)c; if (c == '\n') { x += CharWidth(sink, font, 0, ' '); continue; } if (c == '\t') { - x += XTextWidth(font, paint->text, paint->length); + x += XTextWidth(font, paint->text, (int)paint->length); segment.x2 = x + CharWidth(sink, font, x, '\t'); if (XmuValidSegment(&segment)) { @@ -642,9 +642,9 @@ AsciiPreparePaint(Widget w, int y, int line, paint->max_ascent = ascent; paint->max_descent = descent; paint->backtabs = NULL; - paint->highlight = highlight; - paint->text = XtMalloc(bufsiz = pos - tmp - length + - block.length - i + 4); + paint->highlight = (Boolean)highlight; + paint->text = XtMalloc((Cardinal)(bufsiz = (int)(pos - tmp - length + + block.length - i + 4))); paint->length = 0; continue; } @@ -652,14 +652,14 @@ AsciiPreparePaint(Widget w, int y, int line, if (sink->ascii_sink.display_nonprinting) { if (c > 0177) { paint->text[paint->length++] = '\\'; - paint->text[paint->length++] = ((c >> 6) & 7) + '0'; - paint->text[paint->length++] = ((c >> 3) & 7) + '0'; - paint->text[paint->length] = (c & 7) + '0'; + paint->text[paint->length++] = (char)(((c >> 6) & 7) + '0'); + paint->text[paint->length++] = (char)(((c >> 3) & 7) + '0'); + paint->text[paint->length] = (char)((c & 7) + '0'); } else { c |= 0100; paint->text[paint->length++] = '^'; - paint->text[paint->length] = c == 0177 ? '?' : c; + paint->text[paint->length] = (char)(c == 0177 ? '?' : c); } } else @@ -669,7 +669,7 @@ AsciiPreparePaint(Widget w, int y, int line, } } - x += XTextWidth(font, paint->text, paint->length); + x += XTextWidth(font, paint->text, (int)paint->length); segment.x2 = x; if (XmuValidSegment(&segment)) { /* erase only what really is needed */ @@ -724,8 +724,8 @@ AsciiPreparePaint(Widget w, int y, int line, static int qcmp_paint_struct(_Xconst void *left, _Xconst void *right) { - return ((*(XawTextPaintStruct**)left)->property - - (*(XawTextPaintStruct**)right)->property); + return (int)((*(XawTextPaintStruct* _Xconst *)left)->property - + (*(XawTextPaintStruct* _Xconst *)right)->property); } static void @@ -759,8 +759,8 @@ AsciiDoPaint(Widget w) for (seg = scan->segment; seg; seg = seg->next) _XawTextSinkClearToBackground(ctx->text.sink, seg->x1, scan->y, - seg->x2 - seg->x1, - scan->next->y - scan->y); + (unsigned)(seg->x2 - seg->x1), + (unsigned)(scan->next->y - scan->y)); /* pass 2: optimize drawing list to avoid too much GC change requests */ /* XXX this assumes there will not exist entities drawn over other @@ -791,13 +791,13 @@ AsciiDoPaint(Widget w) ++n_paints; } paints = (XawTextPaintStruct**) - XtMalloc(n_paints * sizeof(XawTextPaintStruct)); + XtMalloc((Cardinal)((size_t)n_paints * sizeof(XawTextPaintStruct))); paint = list->paint; while (paint) { paints[i++] = paint; paint = paint->next; } - qsort((void*)paints, n_paints, sizeof(XawTextPaintStruct*), + qsort((void*)paints, (size_t)n_paints, sizeof(XawTextPaintStruct*), qcmp_paint_struct); list->paint = paints[0]; for (i = 0; i < n_paints - 1; i++) @@ -813,8 +813,8 @@ AsciiDoPaint(Widget w) rect.y = ctx->text.r_margin.top; width = (int)XtWidth(ctx) - RHMargins(ctx); height = (int)XtHeight(ctx) - RVMargins(ctx); - rect.width = width; - rect.height = height; + rect.width = (unsigned short)width; + rect.height = (unsigned short)height; if (width >= 0 && height >= 0) XSetClipRectangles(XtDisplay((Widget)ctx), gc, 0, 0, &rect, 1, Unsorted); @@ -842,12 +842,12 @@ AsciiDoPaint(Widget w) } if (i_rects <= n_rects) rects = (XRectangle*) - XtRealloc((XtPointer)rects, sizeof(XRectangle) * - ++n_rects); - rects[i_rects].x = paint->x; - rects[i_rects].y = paint->y - font->ascent; - rects[i_rects].width = paint->width; - rects[i_rects++].height = font->ascent + font->descent; + XtRealloc((XtPointer)rects, (Cardinal)(sizeof(XRectangle) * + (size_t)++n_rects)); + rects[i_rects].x = (short)paint->x; + rects[i_rects].y = (short)(paint->y - font->ascent); + rects[i_rects].width = (unsigned short)paint->width; + rects[i_rects++].height = (unsigned short)(font->ascent + font->descent); if (paint->backtabs) { for (scan = paint->backtabs->scanline; scan && scan->next; @@ -855,12 +855,12 @@ AsciiDoPaint(Widget w) for (seg = scan->segment; seg; seg = seg->next) { if (i_rects <= n_rects) rects = (XRectangle*) - XtRealloc((XtPointer)rects, sizeof(XRectangle) * - ++n_rects); - rects[i_rects].x = seg->x1; - rects[i_rects].y = scan->y; - rects[i_rects].width = seg->x2 - seg->x1; - rects[i_rects++].height = scan->next->y - scan->y; + XtRealloc((XtPointer)rects, (Cardinal)(sizeof(XRectangle) * + (size_t)++n_rects)); + rects[i_rects].x = (short)seg->x1; + rects[i_rects].y = (short)scan->y; + rects[i_rects].width = (unsigned short)(seg->x2 - seg->x1); + rects[i_rects++].height = (unsigned short)(scan->next->y - scan->y); } } @@ -879,12 +879,12 @@ AsciiDoPaint(Widget w) XSetForeground(XtDisplay(ctx), gc, sink->text_sink.cursor_color); if (i_rects <= n_rects) rects = (XRectangle*) - XtRealloc((XtPointer)rects, sizeof(XRectangle) * - ++n_rects); - rects[i_rects].x = paint->x; - rects[i_rects].y = paint->y - paint->max_ascent; - rects[i_rects].width = paint->width; - rects[i_rects++].height = paint->max_ascent + paint->max_descent + 1; + XtRealloc((XtPointer)rects, (Cardinal)(sizeof(XRectangle) * + (size_t)++n_rects)); + rects[i_rects].x = (short)paint->x; + rects[i_rects].y = (short)(paint->y - paint->max_ascent); + rects[i_rects].width = (unsigned short)paint->width; + rects[i_rects++].height = (unsigned short)(paint->max_ascent + paint->max_descent + 1); } paint = paint->next; } @@ -897,12 +897,12 @@ AsciiDoPaint(Widget w) sink->text_sink.cursor_color); if (i_rects <= n_rects) rects = (XRectangle*) - XtRealloc((XtPointer)rects, sizeof(XRectangle) * - ++n_rects); - rects[i_rects].x = seg->x1; - rects[i_rects].y = scan->y; - rects[i_rects].width = seg->x2 - seg->x1; - rects[i_rects++].height = scan->next->y - scan->y; + XtRealloc((XtPointer)rects, (Cardinal)(sizeof(XRectangle) * + (size_t)++n_rects)); + rects[i_rects].x = (short)seg->x1; + rects[i_rects].y = (short)scan->y; + rects[i_rects].width = (unsigned short)(seg->x2 - seg->x1); + rects[i_rects++].height = (unsigned short)(scan->next->y - scan->y); } } @@ -946,7 +946,7 @@ AsciiDoPaint(Widget w) if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) { XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y, - paint->text, paint->length); + paint->text, (int)paint->length); if (property) { if (property->mask & XAW_TPROP_UNDERLINE) { if (line_width != property->underline_thickness) { @@ -982,7 +982,7 @@ AsciiDoPaint(Widget w) /* dont care on order of drawing or caching of state (by now) */ paint = list->bearings; while (paint) { - XRectangle rect; + XRectangle rect2; if (paint->highlight) XSetForeground(XtDisplay(ctx), gc, sink->text_sink.background); @@ -999,14 +999,14 @@ AsciiDoPaint(Widget w) XSetForeground(XtDisplay(ctx), gc, paint->property->foreground); } if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) { - rect.x = paint->x + paint->width; - rect.width = XawAbs(paint->width); /* more than enough */ - rect.y = paint->y - font->ascent; - rect.height = rect.y + font->ascent + font->descent; + rect2.x = (short)(paint->x + paint->width); + rect2.width = (XawAbs(paint->width)); /* more than enough */ + rect2.y = (short)(paint->y - font->ascent); + rect2.height = (unsigned short)(rect2.y + font->ascent + font->descent); XSetClipRectangles(XtDisplay((Widget)ctx), gc, - 0, 0, &rect, 1, Unsorted); + 0, 0, &rect2, 1, Unsorted); XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y, - paint->text, paint->length); + paint->text, (int)paint->length); } paint = paint->next; } @@ -1040,18 +1040,19 @@ PaintText(Widget w, GC gc, int x, int y, char *buf, int len, Bool clear_bg) int width = XTextWidth(sink->ascii_sink.font, buf, len); if ((x > XtWidth(ctx)) || width <= -x) /* Don't draw if we can't see it */ - return (width); + return (unsigned)(width); if (clear_bg) { _XawTextSinkClearToBackground(w, x, y - sink->ascii_sink.font->ascent, - width, sink->ascii_sink.font->ascent - + sink->ascii_sink.font->descent); + (unsigned)width, + (unsigned)(sink->ascii_sink.font->ascent + + sink->ascii_sink.font->descent)); XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, x, y, buf, len); } else XDrawImageString(XtDisplay(ctx), XtWindow(ctx), gc, x, y, buf, len); - return (width); + return (unsigned)(width); } static void @@ -1085,15 +1086,15 @@ DisplayText(Widget w, int x, int y, y += sink->ascii_sink.font->ascent; for (j = 0; pos1 < pos2;) { - pos1 = XawTextSourceRead(source, pos1, &blk, pos2 - pos1); + pos1 = XawTextSourceRead(source, pos1, &blk, (int)(pos2 - pos1)); for (k = 0; k < blk.length; k++) { - if (j >= sizeof(buf) - 4) { /* buffer full, dump the text */ - if ((x += PaintText(w, gc, x, y, (char*)buf, j, clear_bg)) + if ((unsigned)j >= sizeof(buf) - 4) { /* buffer full, dump the text */ + if ((x = (int)((unsigned)x + PaintText(w, gc, x, y, (char*)buf, j, clear_bg))) >= max_x) return; j = 0; } - buf[j] = blk.ptr[k]; + buf[j] = (unsigned char)blk.ptr[k]; if (buf[j] == XawLF) /* line feeds ('\n') are not printed */ continue; @@ -1101,18 +1102,18 @@ DisplayText(Widget w, int x, int y, int width; if (j != 0 - && (x += PaintText(w, gc, x, y, (char*)buf, j, clear_bg)) + && (x = (int)((unsigned)x + PaintText(w, gc, x, y, (char*)buf, j, clear_bg))) >= max_x) return; if ((width = CharWidth(sink, font, x, '\t')) > -x) { if (clear_bg) - _XawTextSinkClearToBackground(w, x, y-font->ascent, width, - font->ascent+font->descent); + _XawTextSinkClearToBackground(w, x, y-font->ascent, (unsigned)width, + (unsigned)(font->ascent+font->descent)); else XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), - tabgc, x, y - font->ascent, width, - font->ascent + font->descent); + tabgc, x, y - font->ascent, (unsigned)width, + (unsigned)(font->ascent + font->descent)); } if ((x += width) >= max_x) @@ -1126,9 +1127,9 @@ DisplayText(Widget w, int x, int y, if (c > 0177) { buf[j++] = '\\'; - buf[j++] = ((c >> 6) & 7) + '0'; - buf[j++] = ((c >> 3) & 7) + '0'; - buf[j] = (c & 7) + '0'; + buf[j++] = (unsigned char)(((c >> 6) & 7) + '0'); + buf[j++] = (unsigned char)(((c >> 3) & 7) + '0'); + buf[j] = (unsigned char)((c & 7) + '0'); } else { c |= 0100; @@ -1196,14 +1197,14 @@ GetCursorBounds(Widget w, XRectangle *rect) ch = ' '; #endif - rect->width = CharWidth(sink, font, 0, ch); - rect->height = font->descent + font->ascent + 1; + rect->width = (unsigned short)(CharWidth(sink, font, 0, ch)); + rect->height = (unsigned short)(font->descent + font->ascent + 1); rect->x = sink->ascii_sink.cursor_x; - rect->y = sink->ascii_sink.cursor_y - font->ascent; + rect->y = (short)(sink->ascii_sink.cursor_y - font->ascent); } -/* this function is required to support diferent fonts and correctly place +/* this function is required to support different fonts and correctly place * the cursor. There are better ways to calculate the base line, but there is * no place/code (yet) to store this information. */ @@ -1280,7 +1281,7 @@ InsertCursor(Widget w, int x, int y, XawTextInsertState state) XFontStruct *font = sink->ascii_sink.font; TextWidget ctx = (TextWidget)XtParent(w); XawTextPosition position = XawTextGetInsertionPoint((Widget)ctx); - Boolean overflow = (x & 0xffff8000) != 0; + Boolean overflow = ((unsigned)x & 0xffff8000) != 0; #ifndef OLDXAW XawTextAnchor *anchor; XawTextEntity *entity; @@ -1305,19 +1306,19 @@ InsertCursor(Widget w, int x, int y, XawTextInsertState state) if (ctx->text.hasfocus) XFillRectangle(XtDisplay(ctx), XtWindow(ctx), sink->ascii_sink.xorgc, x, y, - width + 1, fheight + 1); + (unsigned)(width + 1), (unsigned)(fheight + 1)); else XDrawRectangle(XtDisplay(ctx), XtWindow(ctx), sink->ascii_sink.xorgc, x, y, - width, fheight); + (unsigned)width, (unsigned)fheight); } else _XawTextSinkClearToBackground(w, x, y, - width + 1, fheight + 1); + (unsigned)(width + 1), (unsigned)(fheight + 1)); } - sink->ascii_sink.cursor_x = x; - sink->ascii_sink.cursor_y = y; + sink->ascii_sink.cursor_x = (short)x; + sink->ascii_sink.cursor_y = (short)y; sink->ascii_sink.laststate = state; return; } @@ -1359,16 +1360,18 @@ InsertCursor(Widget w, int x, int y, XawTextInsertState state) if (ctx->text.hasfocus && !has_selection) XFillRectangle(XtDisplay(ctx), XtWindow(ctx), sink->ascii_sink.xorgc, x, y - font->ascent, - CharWidth(sink, font, 0, ch), fheight + 1); + (unsigned)CharWidth(sink, font, 0, ch), + (unsigned)(fheight + 1)); else XDrawRectangle(XtDisplay(ctx), XtWindow(ctx), sink->ascii_sink.xorgc, x, y - font->ascent, - CharWidth(sink, font, 0, ch) - 1, fheight); + (unsigned)(CharWidth(sink, font, 0, ch) - 1), + (unsigned)fheight); } } - sink->ascii_sink.cursor_x = overflow ? -16384 : x; - sink->ascii_sink.cursor_y = y; + sink->ascii_sink.cursor_x = (short)(overflow ? -16384 : x); + sink->ascii_sink.cursor_y = (short)y; sink->ascii_sink.laststate = state; sink->ascii_sink.cursor_position = position; } @@ -1402,8 +1405,8 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, while (!done) { if (XawTextSourceAnchorAndEntity(source, pos, &anchor, &entity)) { - length = anchor->position + entity->offset + entity->length; - length = XawMin(toPos, length) - pos; + length = (Cardinal)(anchor->position + entity->offset + entity->length); + length = (XawMin(toPos, length) - pos); if ((property = XawTextSinkGetProperty((Widget)sink, entity->property)) != NULL && (property->mask & XAW_TPROP_FONT)) @@ -1416,21 +1419,21 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, while (entity && anchor->position + entity->offset < pos) entity = entity->next; if (entity) { - length = anchor->position + entity->offset; - length = XawMin(toPos, length) - pos; + length = (Cardinal)(anchor->position + entity->offset); + length = (XawMin(toPos, length) - pos); } else - length = XawMin(toPos - pos, 4096); + length = (XawMin(toPos - pos, 4096)); } else - length = XawMin(toPos - pos, 4096); + length = (XawMin(toPos - pos, 4096)); font = sink->ascii_sink.font; } ascent = XawMax(font->ascent, ascent); descent = XawMax(font->descent, descent); - pos = XawTextSourceRead(source, pos, &blk, length); + pos = XawTextSourceRead(source, pos, &blk, (int)length); if (blk.length == 0 && pos == idx) /* eof reached */ break; @@ -1438,7 +1441,7 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, for (i = 0; idx < toPos; i++, idx++) { if (i >= blk.length) break; - c = blk.ptr[i]; + c = (unsigned char)blk.ptr[i]; rWidth += CharWidth(sink, font, fromx + rWidth, c); if (c == XawLF) { idx++; @@ -1472,7 +1475,7 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, if (blk.length == 0) break; } - c = blk.ptr[i]; + c = (unsigned char)blk.ptr[i]; rWidth += CharWidth(sink, font, fromx + rWidth, c); if (c == XawLF) { idx++; @@ -1515,7 +1518,7 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, while (!done) { font = sink->ascii_sink.font; if (XawTextSourceAnchorAndEntity(source, pos, &anchor, &entity)) { - length = anchor->position + entity->offset + entity->length - pos; + length = (Cardinal)(anchor->position + entity->offset + entity->length - pos); if ((property = XawTextSinkGetProperty((Widget)sink, entity->property)) != NULL && (property->mask & XAW_TPROP_FONT)) @@ -1526,7 +1529,7 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, while (entity && anchor->position + entity->offset < pos) entity = entity->next; if (entity) - length = anchor->position + entity->offset - pos; + length = (Cardinal)(anchor->position + entity->offset - pos); else length = 4096; } @@ -1537,13 +1540,13 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, ascent = XawMax(font->ascent, ascent); descent = XawMax(font->descent, descent); - pos = XawTextSourceRead(source, pos, &blk, length); + pos = XawTextSourceRead(source, pos, &blk, (int)length); if (blk.length == 0 && pos == idx) /* eof reached */ break; idx = blk.firstPos; for (i = 0; rWidth <= width && i < blk.length; i++, idx++) { - c = blk.ptr[i]; + c = (unsigned char)blk.ptr[i]; lastWidth = rWidth; rWidth += CharWidth(sink, font, fromx + rWidth, c); @@ -1600,7 +1603,7 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, if (blk.length == 0) break; } - c = blk.ptr[i]; + c = (unsigned char)blk.ptr[i]; lastWidth = rWidth; rWidth += CharWidth(sink, font, fromx + rWidth, c); @@ -1653,7 +1656,7 @@ GetGC(AsciiSinkObject sink) XGCValues values; /* XXX We dont want do share a gc that will change the clip-mask */ - values.clip_x_origin = (long)sink; + values.clip_x_origin = (int)(long)sink; values.clip_mask = None; values.font = sink->ascii_sink.font->fid; values.graphics_exposures = False; @@ -1699,15 +1702,15 @@ GetGC(AsciiSinkObject sink) */ /*ARGSUSED*/ static void -XawAsciiSinkInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawAsciiSinkInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { AsciiSinkObject sink = (AsciiSinkObject)cnew; - GetGC(sink); - if (!sink->ascii_sink.font) XtError("Aborting: no font found\n"); + GetGC(sink); + sink->ascii_sink.cursor_position = 0; sink->ascii_sink.laststate = XawisOff; sink->ascii_sink.cursor_x = sink->ascii_sink.cursor_y = 0; @@ -1752,8 +1755,8 @@ XawAsciiSinkResize(Widget w) rect.y = ctx->text.r_margin.top; width = (int)XtWidth(ctx) - RHMargins(ctx); height = (int)XtHeight(ctx) - RVMargins(ctx); - rect.width = width; - rect.height = height; + rect.width = (unsigned short)width; + rect.height = (unsigned short)height; if (sink->ascii_sink.normgc) { if (width >= 0 && height >= 0) @@ -1795,8 +1798,8 @@ XawAsciiSinkResize(Widget w) */ /*ARGSUSED*/ static Boolean -XawAsciiSinkSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawAsciiSinkSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { AsciiSinkObject w = (AsciiSinkObject)cnew; AsciiSinkObject old_w = (AsciiSinkObject)current; @@ -1919,20 +1922,20 @@ SetTabs(Widget w, int tab_count, short *tabs) || figure_width == 0)) { if (font->per_char && font->min_char_or_byte2 <= '$' && font->max_char_or_byte2 >= '$') - figure_width = font->per_char['$' - font->min_char_or_byte2].width; + figure_width = (unsigned long)font->per_char['$' - font->min_char_or_byte2].width; else - figure_width = font->max_bounds.width; + figure_width = (unsigned long)font->max_bounds.width; } if (tab_count > sink->text_sink.tab_count) { sink->text_sink.tabs = (Position *) - XtRealloc((char*)sink->text_sink.tabs, tab_count * sizeof(Position)); + XtRealloc((char*)sink->text_sink.tabs, (Cardinal)((size_t)tab_count * sizeof(Position))); sink->text_sink.char_tabs = (short *) - XtRealloc((char*)sink->text_sink.char_tabs, tab_count * sizeof(short)); + XtRealloc((char*)sink->text_sink.char_tabs, (Cardinal)((size_t)tab_count * sizeof(short))); } for (i = 0 ; i < tab_count ; i++) { - sink->text_sink.tabs[i] = tabs[i] * figure_width; + sink->text_sink.tabs[i] = (Position)((size_t)tabs[i] * figure_width); sink->text_sink.char_tabs[i] = tabs[i]; } diff --git a/lib/libXaw/src/AsciiSrc.c b/lib/libXaw/src/AsciiSrc.c index 9e5fa5ec7..875b97c6c 100644 --- a/lib/libXaw/src/AsciiSrc.c +++ b/lib/libXaw/src/AsciiSrc.c @@ -94,7 +94,7 @@ static FILE *InitStringOrFile(AsciiSrcObject, Bool); static void LoadPieces(AsciiSrcObject, FILE*, char*); static void RemoveOldStringOrFile(AsciiSrcObject, Bool); static void RemovePiece(AsciiSrcObject, Piece*); -static String StorePiecesInString(AsciiSrcObject); +static char * StorePiecesInString(AsciiSrcObject); static Bool WriteToFile(String, String, unsigned); static Bool WritePiecesToFile(AsciiSrcObject, String); static void GetDefaultPieceSize(Widget, int, XrmValue*); @@ -288,8 +288,8 @@ XawAsciiSrcClassInitialize(void) */ /*ARGSUSED*/ static void -XawAsciiSrcInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawAsciiSrcInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { AsciiSrcObject src = (AsciiSrcObject)cnew; FILE *file; @@ -297,7 +297,7 @@ XawAsciiSrcInitialize(Widget request, Widget cnew, /* * Set correct flags (override resources) depending upon widget class */ - src->text_src.text_format = XawFmt8Bit; + src->text_src.text_format = (XrmQuark)XawFmt8Bit; #ifdef ASCII_DISK if (XtIsSubclass(XtParent(cnew), asciiDiskWidgetClass)) { @@ -383,16 +383,16 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) offset = anchor->position + entity->offset; end = XawMin(end, offset + block->length); - if ((length = end - pos) < 0) + if ((length = (int)(end - pos)) < 0) length = 0; text->length = length; text->format = XawFmt8Bit; if (length == 0) { - text->firstPos = end = offset + entity->length; + text->firstPos = (int)(end = (offset + entity->length)); text->ptr = ""; } else { - text->firstPos = pos; + text->firstPos = (int)pos; text->ptr = block->ptr + (pos - offset); if (pos + length < offset + block->length) end = pos + length; /* there is data left to be read */ @@ -403,15 +403,15 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) return (end); } - if ((length = end - pos) < 0) + if ((length = (int)(end - pos)) < 0) length = 0; #endif piece = FindPiece(src, pos, &start); - text->firstPos = pos; + text->firstPos = (int)pos; text->ptr = piece->text + (pos - start); count = piece->used - (pos - start); - text->length = Max(0, (length > count) ? count : length); + text->length = (Max(0, (length > count) ? count : length)); text->format = XawFmt8Bit; return (pos + text->length); @@ -493,7 +493,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, c = ' '; else if ((c & 0177) < XawSP || c == 0177) { if (sink->ascii_sink.display_nonprinting) - c = c > 0177 ? '\\' : c + '^'; + c = (unsigned char)(c > 0177 ? '\\' : c + '^'); else c = ' '; } @@ -678,7 +678,7 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type, lim = piece->text + piece->used; } - c = *ptr++; + c = (unsigned char)*ptr++; ++position; if (type == XawstEOL) { @@ -752,7 +752,7 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type, lim = piece->text; } - c = *ptr--; + c = (unsigned char)*ptr--; --position; if (type == XawstEOL) { @@ -845,7 +845,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, position--; } - buf = XtMalloc((unsigned)sizeof(unsigned char) * text->length); + buf = XtMalloc((unsigned)sizeof(unsigned char) * (unsigned)text->length); memcpy(buf, text->ptr, (unsigned)text->length); piece = FindPiece(src, position, &first); ptr = (position - first) + piece->text; @@ -872,7 +872,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, if (ptr < piece->text) { do { - cnt = piece->text - ptr; + cnt = (int)(piece->text - ptr); piece = piece->prev; if (piece == NULL) { XtFree(buf); @@ -885,7 +885,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, position++; if (ptr >= (piece->text + piece->used)) { do { - cnt = ptr - (piece->text + piece->used); + cnt = (int)(ptr - (piece->text + piece->used)); piece = piece->next; if (piece == NULL) { XtFree(buf); @@ -919,7 +919,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, if (ptr >= (piece->text + piece->used)) { do { - cnt = ptr - (piece->text + piece->used); + cnt = (int)(ptr - (piece->text + piece->used)); piece = piece->next; if (piece == NULL) { XtFree(buf); @@ -932,7 +932,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, position--; if (ptr < piece->text) { do { - cnt = piece->text - ptr; + cnt = (int)(piece->text - ptr); piece = piece->prev; if (piece == NULL) { XtFree(buf); @@ -967,7 +967,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, * True if redisplay is needed */ static Boolean -XawAsciiSrcSetValues(Widget current, Widget request, Widget cnew, +XawAsciiSrcSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, ArgList args, Cardinal *num_args) { AsciiSrcObject src = (AsciiSrcObject)cnew; @@ -1012,7 +1012,7 @@ XawAsciiSrcSetValues(Widget current, Widget request, Widget cnew, if (!total_reset && old_src->ascii_src.piece_size != src->ascii_src.piece_size) { - String string = StorePiecesInString(old_src); + char * string = StorePiecesInString(old_src); FreeAllPieces(old_src); LoadPieces(src, NULL, string); @@ -1203,9 +1203,9 @@ XawAsciiSaveAsFile(Widget w, _Xconst char *name) if (src->ascii_src.type == XawAsciiFile) ret = WritePiecesToFile(src, (String)name); else { - String string = StorePiecesInString(src); + char * string = StorePiecesInString(src); - ret = WriteToFile(string, (String)name, src->ascii_src.length); + ret = WriteToFile(string, (String)name, (unsigned)src->ascii_src.length); XtFree(string); } @@ -1321,12 +1321,12 @@ WritePiecesToFile(AsciiSrcObject src, String name) piece = src->ascii_src.first_piece; while (piece) { - int bytes = src->ascii_src.piece_size - piece->used; + int bytes = (int)(src->ascii_src.piece_size - piece->used); if (bytes > 0 && (tmp = piece->next) != NULL) { - bytes = XawMin(bytes, tmp->used); - memcpy(piece->text + piece->used, tmp->text, bytes); - memmove(tmp->text, tmp->text + bytes, tmp->used - bytes); + bytes = (XawMin(bytes, tmp->used)); + memcpy(piece->text + piece->used, tmp->text, (size_t)bytes); + memmove(tmp->text, tmp->text + bytes, (size_t)(tmp->used - bytes)); piece->used += bytes; if ((tmp->used -= bytes) == 0) { RemovePiece(src, tmp); @@ -1341,7 +1341,7 @@ WritePiecesToFile(AsciiSrcObject src, String name) return (False); for (piece = src->ascii_src.first_piece; piece; piece = piece->next) - if (write(fd, piece->text, piece->used) == -1) { + if (write(fd, piece->text, (size_t)piece->used) == -1) { close(fd); return (False); } @@ -1362,10 +1362,10 @@ WritePiecesToFile(AsciiSrcObject src, String name) * Description: * Store the pieces in memory into a standard ascii string. */ -static String +static char * StorePiecesInString(AsciiSrcObject src) { - String string; + char * string; XawTextPosition first; Piece *piece; @@ -1413,15 +1413,15 @@ InitStringOrFile(AsciiSrcObject src, Bool newString) else if (!src->ascii_src.use_string_in_place) { src->ascii_src.string = XtNewString(src->ascii_src.string); src->ascii_src.allocated_string = True; - src->ascii_src.length = strlen(src->ascii_src.string); + src->ascii_src.length = (XawTextPosition)strlen(src->ascii_src.string); } if (src->ascii_src.use_string_in_place) { if (src->ascii_src.string != NULL) - src->ascii_src.length = strlen(src->ascii_src.string); + src->ascii_src.length = (XawTextPosition)strlen(src->ascii_src.string); /* In case the length resource is incorrectly set */ if (src->ascii_src.length > src->ascii_src.ascii_length) - src->ascii_src.ascii_length = src->ascii_src.length; + src->ascii_src.ascii_length = (int)src->ascii_src.length; if (src->ascii_src.ascii_length == MAGIC_VALUE) src->ascii_src.piece_size = src->ascii_src.length; @@ -1477,7 +1477,7 @@ InitStringOrFile(AsciiSrcObject src, Bool newString) } if (!src->ascii_src.is_tempfile) { - if ((fd = open(src->ascii_src.string, open_mode, 0666)) != -1) { + if ((fd = open(src->ascii_src.string, (int)open_mode, 0666)) != -1) { if ((file = fdopen(fd, fdopen_mode))) { (void)fseek(file, 0, SEEK_END); src->ascii_src.length = (XawTextPosition)ftell(file); @@ -1517,7 +1517,7 @@ LoadPieces(AsciiSrcObject src, FILE *file, char *string) fseek(file, 0, SEEK_SET); while (left < src->ascii_src.length) { ptr = XtMalloc((unsigned)src->ascii_src.piece_size); - if ((len = fread(ptr, sizeof(unsigned char), + if ((len = (int)fread(ptr, sizeof(unsigned char), (size_t)src->ascii_src.piece_size, file)) < 0) XtErrorMsg("readError", "asciiSourceCreate", "XawError", "fread returned error.", NULL, NULL); @@ -1707,7 +1707,7 @@ BreakPiece(AsciiSrcObject src, Piece *piece) /*ARGSUSED*/ static void -CvtStringToAsciiType(XrmValuePtr args, Cardinal *num_args, +CvtStringToAsciiType(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawAsciiType type; @@ -1733,9 +1733,9 @@ CvtStringToAsciiType(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtAsciiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, +CvtAsciiTypeToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal, - XtPointer *data) + XtPointer *data _X_UNUSED) { static String buffer; Cardinal size; @@ -1754,7 +1754,7 @@ CvtAsciiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -1771,7 +1771,7 @@ CvtAsciiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static void -GetDefaultPieceSize(Widget w, int offset, XrmValue *value) +GetDefaultPieceSize(Widget w _X_UNUSED, int offset _X_UNUSED, XrmValue *value) { static XPointer pagesize; diff --git a/lib/libXaw/src/AsciiText.c b/lib/libXaw/src/AsciiText.c index 8e2f0aa66..65a2323f7 100644 --- a/lib/libXaw/src/AsciiText.c +++ b/lib/libXaw/src/AsciiText.c @@ -310,7 +310,7 @@ XawAsciiInitialize(Widget request, Widget cnew, } if (XtHeight(w) == DEFAULT_TEXT_HEIGHT) - XtHeight(w) = VMargins(w) + XawTextSinkMaxHeight(w->text.sink, 1); + XtHeight(w) = (Dimension)(VMargins(w) + XawTextSinkMaxHeight(w->text.sink, 1)); for (i = 0, tab = 0; i < TAB_COUNT; i++) tabs[i] = (tab += 8); diff --git a/lib/libXaw/src/Box.c b/lib/libXaw/src/Box.c index 266fb08ab..2a1bc688e 100644 --- a/lib/libXaw/src/Box.c +++ b/lib/libXaw/src/Box.c @@ -220,7 +220,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, && bbw->composite.children[i]->core.width > w) w = bbw->composite.children[i]->core.width; } - w += h_space; + w = (Dimension)(w + h_space); if (w > width) width = w; h = bbw->box.v_space; @@ -235,7 +235,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (widget->core.mapped_when_managed) num_mapped_children++; /* Compute widget width */ - bw = XtWidth(widget) + (XtBorderWidth(widget)<<1) + h_space; + bw = (Dimension)(XtWidth(widget) + (XtBorderWidth(widget)<<1) + h_space); if ((Dimension)(lw + bw) > width) { if (lw > h_space) { /* At least one widget on this line, and @@ -243,7 +243,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, */ AssignMax(w, lw); if (vbox) { - h += lh + bbw->box.v_space; + h = (Dimension)(h + (lh + bbw->box.v_space)); lh = 0; lw = h_space; } @@ -270,10 +270,10 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, */ if (XtIsRealized(widget) && widget->core.mapped_when_managed) XUnmapWindow( XtDisplay(widget), XtWindow(widget)); - XtMoveWidget(widget, (int)lw, (int)h); + XtMoveWidget(widget, (Position)lw, (Position)h); } - lw += bw; - bh = XtHeight(widget) + (XtBorderWidth(widget) << 1); + lw = (Dimension)(lw + bw); + bh = (Dimension)(XtHeight(widget) + (XtBorderWidth(widget) << 1)); AssignMax(lh, bh); } } @@ -281,7 +281,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (!vbox && width && lw > width && lh < height) { /* reduce width if too wide and height not filled */ Dimension sw = lw, sh = lh; - Dimension width_needed = width; + Dimension width_needed = (Dimension)width; XtOrientation orientation = bbw->box.orientation; bbw->box.orientation = XtorientVertical; @@ -308,7 +308,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (bbw->composite.num_children == num_mapped_children) XMapSubwindows(XtDisplay((Widget)bbw), XtWindow((Widget)bbw)); else { - int ii = bbw->composite.num_children; + int ii = (int)bbw->composite.num_children; Widget *childP = bbw->composite.children; for (; ii > 0; childP++, ii--) @@ -321,7 +321,7 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, /* Finish off last line */ if (lw > h_space) { AssignMax(w, lw); - h += lh + bbw->box.v_space; + h = (Dimension)(h + (lh + bbw->box.v_space)); } *reply_width = Max(w, 1); @@ -395,7 +395,7 @@ XawBoxQueryGeometry(Widget widget, XtWidgetGeometry *constraint, if (width > (constraint->width >> 1)) /* avoid short int overflow */ width = constraint->width; else - width <<= 1; + width = (Dimension)(width << 1); DoLayout(w, width, 0, &preferred_width, &preferred_height, False); } while (preferred_height > constraint->height && width < constraint->width); @@ -523,7 +523,7 @@ TryNewLayout(BoxWidget bbw) /*ARGSUSED*/ static XtGeometryResult XawBoxGeometryManager(Widget w, XtWidgetGeometry *request, - XtWidgetGeometry *reply) + XtWidgetGeometry *reply _X_UNUSED) { Dimension width, height, borderWidth; BoxWidget bbw; @@ -597,8 +597,8 @@ XawBoxClassInitialize(void) /*ARGSUSED*/ static void -XawBoxInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawBoxInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { BoxWidget newbbw = (BoxWidget)cnew; @@ -627,7 +627,7 @@ XawBoxRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) #ifndef OLDXAW if (w->core.background_pixmap > XtUnspecifiedPixmap) { pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), - w->core.colormap, w->core.depth); + w->core.colormap, (int)w->core.depth); if (pixmap && pixmap->mask) XawReshapeWidget(w, pixmap); } @@ -636,8 +636,8 @@ XawBoxRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) /*ARGSUSED*/ static Boolean -XawBoxSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawBoxSetValues(Widget current _X_UNUSED, Widget request _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { /* need to relayout if h_space or v_space change */ #ifndef OLDXAW @@ -649,10 +649,10 @@ XawBoxSetValues(Widget current, Widget request, Widget cnew, opix = XawPixmapFromXPixmap(b_old->core.background_pixmap, XtScreen(b_old), b_old->core.colormap, - b_old->core.depth); + (int)b_old->core.depth); npix = XawPixmapFromXPixmap(b_new->core.background_pixmap, XtScreen(b_new), b_new->core.colormap, - b_new->core.depth); + (int)b_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); } diff --git a/lib/libXaw/src/Command.c b/lib/libXaw/src/Command.c index 4535423a0..d9db81a69 100644 --- a/lib/libXaw/src/Command.c +++ b/lib/libXaw/src/Command.c @@ -243,8 +243,8 @@ Get_GC(CommandWidget cbw, Pixel fg, Pixel bg) /*ARGSUSED*/ static void -XawCommandInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawCommandInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { CommandWidget cbw = (CommandWidget)cnew; int shape_event_base, shape_error_base; @@ -295,9 +295,9 @@ HighlightRegion(CommandWidget cbw) rect.width = XtWidth(cbw); rect.height = XtHeight(cbw); XUnionRectWithRegion(&rect, emptyRegion, outerRegion); - rect.x = rect.y = cbw->command.highlight_thickness; - rect.width -= cbw->command.highlight_thickness * 2; - rect.height -= cbw->command.highlight_thickness * 2; + rect.x = rect.y = (short)cbw->command.highlight_thickness; + rect.width = (rect.width - cbw->command.highlight_thickness * 2); + rect.height = (rect.height - cbw->command.highlight_thickness * 2); XUnionRectWithRegion(&rect, emptyRegion, innerRegion); XSubtractRegion(outerRegion, innerRegion, outerRegion); @@ -324,7 +324,7 @@ XawCommandToggle(Widget w) /*ARGSUSED*/ static void -Set(Widget w, XEvent *event, String *params, Cardinal *num_params) +Set(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CommandWidget cbw = (CommandWidget)w; @@ -337,7 +337,7 @@ Set(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -Unset(Widget w, XEvent *event, String *params, Cardinal *num_params) +Unset(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CommandWidget cbw = (CommandWidget)w; @@ -390,7 +390,7 @@ Highlight(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) +Unhighlight(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CommandWidget cbw = (CommandWidget)w; @@ -401,7 +401,7 @@ Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) +Notify(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CommandWidget cbw = (CommandWidget)w; @@ -469,13 +469,13 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change) XClearArea(XtDisplay(w), XtWindow(w), 0, cbw->command.highlight_thickness, cbw->command.highlight_thickness, - XtHeight(cbw) - (cbw->command.highlight_thickness<<1), + (unsigned)(XtHeight(cbw) - (cbw->command.highlight_thickness<<1)), False); XClearArea(XtDisplay(w), XtWindow(w), XtWidth(cbw) - cbw->command.highlight_thickness, cbw->command.highlight_thickness, cbw->command.highlight_thickness, - XtHeight(cbw) - (cbw->command.highlight_thickness<<1), + (unsigned)(XtHeight(cbw) - (cbw->command.highlight_thickness<<1)), False); XClearArea(XtDisplay(w), XtWindow(w), 0, XtHeight(cbw) - cbw->command.highlight_thickness, @@ -486,8 +486,8 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change) int offset = cbw->command.highlight_thickness / 2; XDrawRectangle(XtDisplay(w),XtWindow(w), rev_gc, offset, offset, - XtWidth(cbw) - cbw->command.highlight_thickness, - XtHeight(cbw) - cbw->command.highlight_thickness); + (unsigned)(XtWidth(cbw) - cbw->command.highlight_thickness), + (unsigned)(XtHeight(cbw) - cbw->command.highlight_thickness)); } } } @@ -506,7 +506,7 @@ XawCommandDestroy(Widget w) /*ARGSUSED*/ static Boolean -XawCommandSetValues(Widget current, Widget request, Widget cnew, +XawCommandSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, ArgList args, Cardinal *num_args) { CommandWidget oldcbw = (CommandWidget)current; @@ -593,7 +593,7 @@ ShapeButton(CommandWidget cbw, Bool checkRectangular) if (cbw->command.shape_style == XawShapeRoundedRectangle) { corner_size = XtWidth(cbw) < XtHeight(cbw) ? XtWidth(cbw) : XtHeight(cbw); - corner_size = (corner_size * cbw->command.corner_round) / 100; + corner_size = (Dimension)((corner_size * cbw->command.corner_round) / 100); } if (checkRectangular || cbw->command.shape_style != XawShapeRectangle) { diff --git a/lib/libXaw/src/Converters.c b/lib/libXaw/src/Converters.c index 9795671cd..cc3efcbb0 100644 --- a/lib/libXaw/src/Converters.c +++ b/lib/libXaw/src/Converters.c @@ -247,9 +247,9 @@ TypeToStringNoArgsWarning(Display *dpy, String type) /*ARGSUSED*/ static Boolean -_XawCvtBooleanToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtBooleanToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[6]; Cardinal size; @@ -259,16 +259,16 @@ _XawCvtBooleanToString(Display *dpy, XrmValue *args, Cardinal *num_args, snprintf(buffer, sizeof(buffer), "%s", *(Boolean *)fromVal->addr ? XtEtrue : XtEfalse); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtBoolToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtBoolToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[6]; Cardinal size; @@ -278,16 +278,16 @@ _XawCvtBoolToString(Display *dpy, XrmValue *args, Cardinal *num_args, snprintf(buffer, sizeof(buffer), "%s", *(Bool *)fromVal->addr ? XtEtrue : XtEfalse); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtPositionToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtPositionToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[7]; Cardinal size; @@ -296,16 +296,16 @@ _XawCvtPositionToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XtRPosition); snprintf(buffer, sizeof(buffer), "%d", *(Position *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtShortToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtShortToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[7]; Cardinal size; @@ -314,16 +314,16 @@ _XawCvtShortToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XtRShort); snprintf(buffer, sizeof(buffer), "%d", *(short *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtDimensionToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtDimensionToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[6]; Cardinal size; @@ -332,16 +332,16 @@ _XawCvtDimensionToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XtRDimension); snprintf(buffer, sizeof(buffer), "%u", *(Dimension *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtCARD32ToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtCARD32ToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[11]; Cardinal size; @@ -350,16 +350,16 @@ _XawCvtCARD32ToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, "CARD32"); snprintf(buffer, sizeof(buffer), "0x%08hx", *(int *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtIntToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtIntToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[12]; Cardinal size; @@ -368,16 +368,16 @@ _XawCvtIntToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XtRInt); snprintf(buffer, sizeof(buffer), "%d", *(int *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtCardinalToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtCardinalToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[11]; Cardinal size; @@ -386,19 +386,19 @@ _XawCvtCardinalToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XtRCardinal); snprintf(buffer, sizeof(buffer), "%u", *(Cardinal *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtAtomToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtAtomToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char *buffer = NULL; - static char *nullatom = "NULL"; + static char *nullatom = (char *)"NULL"; Cardinal size; Atom atom; @@ -419,7 +419,7 @@ _XawCvtAtomToString(Display *dpy, XrmValue *args, Cardinal *num_args, return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } @@ -428,7 +428,7 @@ _XawCvtAtomToString(Display *dpy, XrmValue *args, Cardinal *num_args, static Boolean _XawCvtPixelToString(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[19]; Cardinal size; @@ -455,16 +455,16 @@ _XawCvtPixelToString(Display *dpy, XrmValue *args, Cardinal *num_args, XQueryColor(dpy, colormap, &color); snprintf(buffer, sizeof(buffer), "rgb:%04hx/%04hx/%04hx", color.red, color.green, color.blue); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } /*ARGSUSED*/ static Boolean -_XawCvtFontStructToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtFontStructToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[128]; Cardinal size; @@ -486,7 +486,7 @@ _XawCvtFontStructToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (tmp) { snprintf(buffer, sizeof(buffer), "%s", tmp); - size = strlen(tmp); + size = (Cardinal)strlen(tmp); XFree(tmp); } } @@ -504,9 +504,9 @@ _XawCvtFontStructToString(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -_XawCvtUnsignedCharToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtUnsignedCharToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char buffer[4]; Cardinal size; @@ -516,7 +516,7 @@ _XawCvtUnsignedCharToString(Display *dpy, XrmValue *args, Cardinal *num_args, snprintf(buffer, sizeof(buffer), "%u", *(unsigned char *)fromVal->addr); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } @@ -525,7 +525,7 @@ _XawCvtUnsignedCharToString(Display *dpy, XrmValue *args, Cardinal *num_args, static Boolean _XawCvtStringToDisplayList(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { XawDisplayList *dlist; Screen *screen; @@ -566,9 +566,9 @@ _XawCvtStringToDisplayList(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -_XawCvtDisplayListToString(Display *dpy, XrmValue *args, Cardinal *num_args, +_XawCvtDisplayListToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { String buffer; Cardinal size; @@ -577,7 +577,7 @@ _XawCvtDisplayListToString(Display *dpy, XrmValue *args, Cardinal *num_args, TypeToStringNoArgsWarning(dpy, XawRDisplayList); buffer = XawDisplayListString(*(XawDisplayList **)(fromVal[0].addr)); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } @@ -586,7 +586,7 @@ _XawCvtDisplayListToString(Display *dpy, XrmValue *args, Cardinal *num_args, static Boolean _XawCvtStringToPixmap(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { XawPixmap *xaw_pixmap; Pixmap pixmap; @@ -690,7 +690,7 @@ _XawCvtPixmapToString(Display *dpy, XrmValue *args, Cardinal *num_args, return (_XawCvtCARD32ToString(dpy, args, num_args, fromVal, toVal, converter_data)); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); string_done(buffer); } diff --git a/lib/libXaw/src/Dialog.c b/lib/libXaw/src/Dialog.c index 9c98d3696..925c975d1 100644 --- a/lib/libXaw/src/Dialog.c +++ b/lib/libXaw/src/Dialog.c @@ -188,8 +188,8 @@ WidgetClass dialogWidgetClass = (WidgetClass)&dialogClassRec; */ /*ARGSUSED*/ static void -XawDialogInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawDialogInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { DialogWidget dw = (DialogWidget)cnew; Arg arglist[9]; @@ -228,8 +228,8 @@ XawDialogInitialize(Widget request, Widget cnew, /*ARGSUSED*/ static void -XawDialogConstraintInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawDialogConstraintInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { DialogWidget dw = (DialogWidget)cnew->core.parent; DialogConstraints constraint = (DialogConstraints)cnew->core.constraints; @@ -265,7 +265,7 @@ XawDialogConstraintInitialize(Widget request, Widget cnew, #define NUM_CHECKS 2 /*ARGSUSED*/ static Boolean -XawDialogSetValues(Widget current, Widget request, Widget cnew, +XawDialogSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, ArgList in_args, Cardinal *in_num_args) { DialogWidget w = (DialogWidget)cnew; @@ -357,7 +357,7 @@ static void XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args) { Arg a[1]; - String s; + char * s; DialogWidget src = (DialogWidget)w; unsigned int i; diff --git a/lib/libXaw/src/DisplayList.c b/lib/libXaw/src/DisplayList.c index 0581bf708..540cc1e78 100644 --- a/lib/libXaw/src/DisplayList.c +++ b/lib/libXaw/src/DisplayList.c @@ -140,8 +140,8 @@ XawRunDisplayList(Widget w, _XawDisplayList *list, #define DLEND 1 #define DLNAME 2 #define DLARG 3 -static char * -read_token(char *src, char *dst, Cardinal size, int *status) +static String +read_token(String src, char *dst, Cardinal size, int *status) { int ch; Bool esc, quote; @@ -177,7 +177,7 @@ read_token(char *src, char *dst, Cardinal size, int *status) { if (esc) { - dst[i++] = ch; + dst[i++] = (char)ch; esc = False; continue; } @@ -216,7 +216,7 @@ read_token(char *src, char *dst, Cardinal size, int *status) } else esc = False; - dst[i++] = ch; + dst[i++] = (char)ch; } *status = DLERR; @@ -235,7 +235,9 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, XawDLProc *proc; char cname[64], fname[64], aname[1024]; Cardinal i; - char *cp, *fp, *lp; + String cp; + String fp; + String lp; int status; xlibc = XawGetDisplayListClass(xlib); @@ -287,7 +289,7 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, } if (fp) { - snprintf(cname, fp - fname + 1, "%s", fname); + snprintf(cname, (size_t)(fp - fname + 1), "%s", fname); memmove(fname, fp + 1, strlen(fp)); lc = cname[0] ? XawGetDisplayListClass(cname) : xlibc; if (!lc) @@ -337,8 +339,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++dlist->num_procs; dlist->procs = (XawDLProc**) - XtRealloc((char *)dlist->procs, sizeof(XawDLProc*) * - dlist->num_procs); + XtRealloc((char *)dlist->procs, (Cardinal)(sizeof(XawDLProc*) * + dlist->num_procs)); } dlist->procs[dlist->num_procs - 1] = proc; @@ -368,8 +370,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++proc->num_params; proc->params = (String *)XtRealloc((char *)proc->params, - sizeof(String) * - proc->num_params); + (Cardinal)(sizeof(String) * + proc->num_params)); } proc->params[proc->num_params - 1] = XtNewString(aname); } @@ -401,8 +403,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++dlist->num_data; dlist->data = (XawDLData **) - XtRealloc((char *)dlist->data, sizeof(XawDLData*) * - dlist->num_data); + XtRealloc((char *)dlist->data, (Cardinal)(sizeof(XawDLData*) * + dlist->num_data)); } dlist->data[dlist->num_data - 1] = data; } @@ -478,7 +480,7 @@ XawDestroyDisplayList(_XawDisplayList *dlist) } for (j = 0; j < proc->num_params; j++) - XtFree(proc->params[j]); + XtFree((char *)proc->params[j]); if (proc->num_params) XtFree((char *)proc->params); XtFree((char *)proc); @@ -544,12 +546,12 @@ typedef struct _XawDLImageArgs { int depth; } XawDLImageArgs; -#define X_ARG(x) (Position)(((x).denom != 0) ? \ +#define X_ARG(x) ((Position)(((x).denom != 0) ? \ ((float)XtWidth(w) * ((float)(x).pos / (float)(x).denom)) : \ - ((x).high ? XtWidth(w) - (x).pos : (x).pos)) -#define Y_ARG(x) (Position)(((x).denom != 0) ? \ + (float)((x).high ? XtWidth(w) - (x).pos : (x).pos))) +#define Y_ARG(x) ((Position)(((x).denom != 0) ? \ ((float)XtHeight(w) * ((float)(x).pos / (float)(x).denom)): \ - ((x).high ? XtHeight(w) - (x).pos : (x).pos)) + (float)((x).high ? XtHeight(w) - (x).pos : (x).pos))) #define DRECT 0 #define FRECT 1 #define LINE 2 @@ -600,17 +602,17 @@ Dl1Point(Widget w, XtPointer args, XtPointer data, int id) Window window; Position x, y; - x = X_ARG(pos[0]); - y = Y_ARG(pos[1]); + x = (Position)(X_ARG(pos[0])); + y = (Position)(Y_ARG(pos[1])); if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x += xpad; - y += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x = (Position)(x + xpad); + y = (Position)(y + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -656,10 +658,10 @@ Dl2Points(Widget w, XtPointer args, XtPointer data, int id) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x1 += xpad; y1 += ypad; - x2 += xpad; y2 += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x1 = (Position)(x1 + xpad); y1 = (Position)(y1 + ypad); + x2 = (Position)(x2 + xpad); y2 = (Position)(y2 + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -670,16 +672,16 @@ Dl2Points(Widget w, XtPointer args, XtPointer data, int id) } if (id == DRECT) - XDrawRectangle(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1); + XDrawRectangle(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1)); else if (id == FRECT) - XFillRectangle(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1); + XFillRectangle(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1)); else if (id == LINE) XDrawLine(display, window, xdata->gc, x1, y1, x2, y2); } /* ARGSUSED */ static void -DlLine(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) +DlLine(Widget w, XtPointer args, XtPointer data, XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl2Points(w, args, data, LINE); } @@ -687,7 +689,7 @@ DlLine(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) /* ARGSUSED */ static void DlDrawRectangle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl2Points(w, args, data, DRECT); } @@ -695,7 +697,7 @@ DlDrawRectangle(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlFillRectangle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl2Points(w, args, data, FRECT); } @@ -726,20 +728,20 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); if (xdata->mode != CoordModePrevious) { for (i = 0; i < num_points; i++) { - points[i].x += xpad; - points[i].y += ypad; + points[i].x = (short)(points[i].x + xpad); + points[i].y = (short)(points[i].y + ypad); } } else { - points[0].x += xpad; - points[0].y += ypad; + points[0].x = (short)(points[0].x + xpad); + points[0].y = (short)(points[0].y + ypad); } display = XtDisplayOfObject(w); window = XtWindowOfObject(w); @@ -751,12 +753,12 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id) } if (id == FPOLY) - XFillPolygon(display, window, xdata->gc, points, num_points, + XFillPolygon(display, window, xdata->gc, points, (int)num_points, xdata->shape, xdata->mode); else if (id == DLINES) - XDrawLines(display, window, xdata->gc, points, num_points, xdata->mode); + XDrawLines(display, window, xdata->gc, points, (int)num_points, xdata->mode); else if (id == POINTS) - XDrawPoints(display, window, xdata->gc, points, num_points, xdata->mode); + XDrawPoints(display, window, xdata->gc, points, (int)num_points, xdata->mode); XawStackFree(points, points_buf); } @@ -764,7 +766,7 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id) /* ARGSUSED */ static void DlFillPolygon(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlXPoints(w, args, data, FPOLY); } @@ -772,7 +774,7 @@ DlFillPolygon(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlDrawLines(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlXPoints(w, args, data, DLINES); } @@ -780,7 +782,7 @@ DlDrawLines(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlDrawPoints(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlXPoints(w, args, data, POINTS); } @@ -788,7 +790,7 @@ DlDrawPoints(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlForeground(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; Pixel foreground = (Pixel)args; @@ -804,7 +806,7 @@ DlForeground(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlBackground(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; Pixel background = (Pixel)args; @@ -835,12 +837,12 @@ DlArc(Widget w, XtPointer args, XtPointer data, Bool fill) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x1 += xpad; - y1 += ypad; - x2 += xpad; - y2 += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x1 = (Position)(x1 + xpad); + y1 = (Position)(y1 + ypad); + x2 = (Position)(x2 + xpad); + y2 = (Position)(y2 + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -851,17 +853,17 @@ DlArc(Widget w, XtPointer args, XtPointer data, Bool fill) } if (fill) - XFillArc(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1, + XFillArc(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1), arc->angle1, arc->angle2); else - XDrawArc(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1, + XDrawArc(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1), arc->angle1, arc->angle2); } /* ARGSUSED */ static void DlDrawArc(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlArc(w, args, data, False); } @@ -869,14 +871,14 @@ DlDrawArc(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlFillArc(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlArc(w, args, data, True); } /*ARGSUSED*/ static void -DlMask(Widget w, XtPointer args, XtPointer data, +DlMask(Widget w, XtPointer args _X_UNUSED, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; @@ -888,18 +890,18 @@ DlMask(Widget w, XtPointer args, XtPointer data, { XRectangle rect; - rect.x = event->xexpose.x; - rect.y = event->xexpose.y; - rect.width = event->xexpose.width; - rect.height = event->xexpose.height; + rect.x = (short)event->xexpose.x; + rect.y = (short)event->xexpose.y; + rect.width = (unsigned short)event->xexpose.width; + rect.height = (unsigned short)event->xexpose.height; XSetClipRectangles(display, xdata->gc, 0, 0, &rect, 1, Unsorted); } } /* ARGSUSED */ static void -DlUmask(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) +DlUmask(Widget w, XtPointer args _X_UNUSED, XtPointer data, + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; @@ -909,22 +911,22 @@ DlUmask(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlLineWidth(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - unsigned line_width = (unsigned long)args; + unsigned line_width = (unsigned)(unsigned long)args; if (xdata->values.line_width != line_width) { xdata->mask |= GCLineWidth; - xdata->values.line_width = line_width; + xdata->values.line_width = (int)line_width; XChangeGC(XtDisplayOfObject(w), xdata->gc, GCLineWidth, &xdata->values); } } /* ARGSUSED */ static void -DlDrawPoint(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) +DlDrawPoint(Widget w, XtPointer args, XtPointer data, XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl1Point(w, args, data, POINT); } @@ -932,7 +934,7 @@ DlDrawPoint(Widget w, XtPointer args, XtPointer data, XEvent *event, Region regi /* ARGSUSED */ static void DlDrawSegments(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args; XawXlibData *xdata = (XawXlibData *)data; @@ -959,14 +961,14 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data, { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); for (i = 0; i < num_segments; i++) { - segments[i].x1 += xpad; - segments[i].y1 += ypad; - segments[i].x2 += xpad; - segments[i].y2 += ypad; + segments[i].x1 = (short)(segments[i].x1 + xpad); + segments[i].y1 = (short)(segments[i].y1 + ypad); + segments[i].x2 = (short)(segments[i].x2 + xpad); + segments[i].y2 = (short)(segments[i].y2 + ypad); } display = XtDisplayOfObject(w); window = XtWindowOfObject(w); @@ -977,7 +979,7 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data, window = XtWindow(w); } - XDrawSegments(display, window, xdata->gc, segments, num_segments); + XDrawSegments(display, window, xdata->gc, segments, (int)num_segments); XawStackFree(segments, segments_buf); } @@ -985,10 +987,10 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlArcMode(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int arc_mode = (long)args; + int arc_mode = (int)(long)args; if (xdata->values.arc_mode != arc_mode) { @@ -1000,22 +1002,22 @@ DlArcMode(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void -DlCoordMode(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) +DlCoordMode(Widget w _X_UNUSED, XtPointer args, XtPointer data, + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int mode = (long)args; + int mode = (int)(long)args; xdata->mode = mode; } /* ARGSUSED */ static void -DlShapeMode(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) +DlShapeMode(Widget w _X_UNUSED, XtPointer args, XtPointer data, + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int shape = (long)args; + int shape = (int)(long)args; xdata->shape = shape; } @@ -1023,10 +1025,10 @@ DlShapeMode(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlLineStyle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int line_style = (long)args; + int line_style = (int)(long)args; if (xdata->values.line_style != line_style) { @@ -1039,10 +1041,10 @@ DlLineStyle(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlCapStyle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int cap_style = (long)args; + int cap_style = (int)(long)args; if (xdata->values.cap_style != cap_style) { @@ -1055,10 +1057,10 @@ DlCapStyle(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlJoinStyle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int join_style = (long)args; + int join_style = (int)(long)args; if (xdata->values.join_style != join_style) { @@ -1071,10 +1073,10 @@ DlJoinStyle(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlFillStyle(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int fill_style = (long)args; + int fill_style = (int)(long)args; if (xdata->values.fill_style != fill_style) { @@ -1087,10 +1089,10 @@ DlFillStyle(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlFillRule(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int fill_rule = (long)args; + int fill_rule = (int)(long)args; if (xdata->values.fill_rule != fill_rule) { @@ -1103,7 +1105,7 @@ DlFillRule(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlTile(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; XawPixmap *pixmap = (XawPixmap *)args; @@ -1119,7 +1121,7 @@ DlTile(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlStipple(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; XawPixmap *pixmap = (XawPixmap *)args; @@ -1134,7 +1136,7 @@ DlStipple(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void -DlTSOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) +DlTSOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl1Point(w, args, data, TSORIGIN); } @@ -1142,10 +1144,10 @@ DlTSOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event, Region regio /* ARGSUSED */ static void DlFunction(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int function = (long)args; + int function = (int)(long)args; if (function != xdata->values.function) { @@ -1158,7 +1160,7 @@ DlFunction(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlPlaneMask(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; unsigned long plane_mask = (unsigned long)args; @@ -1180,17 +1182,17 @@ DlString(Widget w, XtPointer args, XtPointer data, Bool image) Window window; Position x, y; - x = X_ARG(string->pos[0]); - y = Y_ARG(string->pos[1]); + x = (Position)(X_ARG(string->pos[0])); + y = (Position)(Y_ARG(string->pos[1])); if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x += xpad; - y += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x = (Position)(x + xpad); + y = (Position)(y + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -1209,7 +1211,7 @@ DlString(Widget w, XtPointer args, XtPointer data, Bool image) /* ARGSUSED */ static void DlDrawString(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlString(w, args, data, False); } @@ -1217,7 +1219,7 @@ DlDrawString(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlPaintString(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlString(w, args, data, True); } @@ -1225,7 +1227,7 @@ DlPaintString(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlFont(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; Font font = (Font)args; @@ -1241,7 +1243,7 @@ DlFont(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlDashes(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; char *dashes = args; @@ -1257,10 +1259,10 @@ DlDashes(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlSubwindowMode(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; - int subwindow_mode = (long)args; + int subwindow_mode = (int)(long)args; if (xdata->values.subwindow_mode != subwindow_mode) { @@ -1273,7 +1275,7 @@ DlSubwindowMode(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlExposures(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; Bool graphics_exposures = (Bool)(long)args; @@ -1288,7 +1290,7 @@ DlExposures(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void -DlClipOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) +DlClipOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event _X_UNUSED, Region region _X_UNUSED) { Dl1Point(w, args, data, CLIPORIGIN); } @@ -1296,7 +1298,7 @@ DlClipOrigin(Widget w, XtPointer args, XtPointer data, XEvent *event, Region reg /* ARGSUSED */ static void DlClipMask(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawXlibData *xdata = (XawXlibData *)data; XawPixmap *pixmap = (XawPixmap *)args; @@ -1317,7 +1319,7 @@ DlClipMask(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlClipRectangles(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawDLPositionPtr *pos_ptr = (XawDLPositionPtr *)args; XawXlibData *xdata = (XawXlibData *)data; @@ -1339,24 +1341,24 @@ DlClipRectangles(Widget w, XtPointer args, XtPointer data, y2 = Y_ARG(pos[3]); rects[i].x = XawMin(x1, x2); rects[i].y = XawMin(y1, y2); - rects[i].width = XawMax(x1, x2) - rects[i].x; - rects[i].height = XawMax(y1, y2) - rects[i].y; + rects[i].width = (unsigned short)(XawMax(x1, x2) - rects[i].x); + rects[i].height = (unsigned short)(XawMax(y1, y2) - rects[i].y); } if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); for (i = 0; i < num_rects; i++) { - rects[i].x += xpad; - rects[i].y += ypad; + rects[i].x = (short)(rects[i].x + xpad); + rects[i].y = (short)(rects[i].y + ypad); } } - XSetClipRectangles(XtDisplayOfObject(w), xdata->gc, 0, 0, rects, num_rects, Unsorted); + XSetClipRectangles(XtDisplayOfObject(w), xdata->gc, 0, 0, rects, (int)num_rects, Unsorted); XawStackFree(rects, rects_buf); } @@ -1406,8 +1408,8 @@ DlCopy(Widget w, XtPointer args, XtPointer data, Bool plane) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); src_x += xpad; src_y += ypad; dst_x += xpad; @@ -1417,18 +1419,18 @@ DlCopy(Widget w, XtPointer args, XtPointer data, Bool plane) if (plane) XCopyPlane(XtDisplayOfObject(w), XtWindowOfObject(w), copy->pixmap ? copy->pixmap->pixmap : XtWindowOfObject(w), - xdata->gc, src_x, src_y, width, height, dst_x, dst_y, - copy->plane ? copy->plane : 1); + xdata->gc, src_x, src_y, (unsigned)width, (unsigned)height, dst_x, dst_y, + (unsigned long)(copy->plane ? copy->plane : 1)); else XCopyArea(XtDisplayOfObject(w), copy->pixmap ? copy->pixmap->pixmap : XtWindowOfObject(w), - XtWindowOfObject(w), xdata->gc, src_x, src_y, width, height, dst_x, dst_y); + XtWindowOfObject(w), xdata->gc, src_x, src_y, (unsigned)width, (unsigned)height, dst_x, dst_y); } /* ARGSUSED */ static void DlCopyArea(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlCopy(w, args, data, False); } @@ -1436,7 +1438,7 @@ DlCopyArea(Widget w, XtPointer args, XtPointer data, /* ARGSUSED */ static void DlCopyPlane(Widget w, XtPointer args, XtPointer data, - XEvent *event, Region region) + XEvent *event _X_UNUSED, Region region _X_UNUSED) { DlCopy(w, args, data, True); } @@ -1449,7 +1451,7 @@ DlCopyPlane(Widget w, XtPointer args, XtPointer data, * set them after calling this function. */ static void -DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) +DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event _X_UNUSED, Region region _X_UNUSED) { XawDLImageArgs *image = (XawDLImageArgs *)args; XawXlibData *xdata = (XawXlibData *)data; @@ -1473,8 +1475,8 @@ DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); xe += xpad; ye += ypad; xe += xpad; @@ -1496,11 +1498,11 @@ DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) XSetClipMask(display, xdata->gc, image->pixmap->mask); if (image->depth == 1) XCopyPlane(display, image->pixmap->pixmap, window, xdata->gc, - 0, 0, XawMin(width, xe - x), XawMin(height, ye - y), + 0, 0, (unsigned)XawMin(width, xe - x), (unsigned)XawMin(height, ye - y), x, y, 1L); else XCopyArea(display, image->pixmap->pixmap, window, xdata->gc, 0, 0, - XawMin(width, xe - x), XawMin(height, ye - y), x, y); + (unsigned)XawMin(width, xe - x), (unsigned)XawMin(height, ye - y), x, y); } XSetClipMask(display, xdata->gc, None); @@ -1631,14 +1633,14 @@ read_position(char *arg, XawDLPosition *pos) ++str; if (ch == '-') pos->high = True; - pos->pos = read_int(str, NULL); + pos->pos = (Position)read_int(str, NULL); } else if (isdigit(ch)) { - pos->pos = read_int(str, &str); + pos->pos = (Position)read_int(str, &str); ch = *str++; if (ch == '/') - pos->denom = read_int(str, NULL); + pos->denom = (Position)read_int(str, NULL); } } @@ -1668,7 +1670,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, XawDLPosition *pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * 4); for (i = 0; i < 4; i++) - read_position(params[i], &pos[i]); + read_position((char *)params[i], &pos[i]); retval = (void *)pos; } break; @@ -1679,8 +1681,8 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPosition *pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * 2); - read_position(params[0], &pos[0]); - read_position(params[1], &pos[1]); + read_position((char *)params[0], &pos[0]); + read_position((char *)params[1], &pos[1]); retval = (void *)pos; } break; @@ -1691,11 +1693,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPositionPtr *pos = XtNew(XawDLPositionPtr); - pos->pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * - *num_params); + pos->pos = (XawDLPosition *)XtCalloc(1, (Cardinal)(sizeof(XawDLPosition) * + (size_t)*num_params)); pos->num_pos = *num_params; for (i = 0; i < *num_params; i++) - read_position(params[i], &pos->pos[i]); + read_position((char *)params[i], &pos->pos[i]); retval = (void *)pos; } break; @@ -1705,11 +1707,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPositionPtr *pos = XtNew(XawDLPositionPtr); - pos->pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * - *num_params); + pos->pos = (XawDLPosition *)XtCalloc(1, (Cardinal)(sizeof(XawDLPosition) * + (size_t)*num_params)); pos->num_pos = *num_params; for (i = 0; i < *num_params; i++) - read_position(params[i], &pos->pos[i]); + read_position((char *)params[i], &pos->pos[i]); retval = (void *)pos; } break; @@ -1722,11 +1724,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, args->angle1 = 0; args->angle2 = 360; for (i = 0; i < 4; i++) - read_position(params[i], &args->pos[i]); + read_position((char *)params[i], &args->pos[i]); if (*num_params > 4) - args->angle1 = read_int(params[4], NULL); + args->angle1 = (int)read_int((char *)params[4], NULL); if (*num_params > 5) - args->angle2 = read_int(params[5], NULL); + args->angle2 = (int)read_int((char *)params[5], NULL); args->angle1 *= 64; args->angle2 *= 64; retval = (void *)args; @@ -1749,7 +1751,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, break; case LWIDTH: if (*num_params == 1) - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); break; case ARCMODE: if (*num_params == 1) @@ -1894,7 +1896,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, break; case PLANEMASK: if (*num_params == 1) - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); break; case DSTRING: case PSTRING: @@ -1903,10 +1905,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, XawDLStringArgs *string = (XawDLStringArgs *) XtCalloc(1, sizeof(XawDLStringArgs)); - read_position(params[0], &string->pos[0]); - read_position(params[1], &string->pos[1]); + read_position((char *)params[0], &string->pos[0]); + read_position((char *)params[1], &string->pos[1]); string->string = XtNewString(params[2]); - string->length = strlen(string->string); + string->length = (int)strlen(string->string); retval = string; } break; @@ -1922,8 +1924,8 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, dashes = XtMalloc(*num_params + 1); for (i = 0; i < *num_params; i++) - dashes[i + 1] = read_int(params[i], NULL); - *dashes = *num_params; + dashes[i + 1] = (char)read_int((char *)params[i], NULL); + *dashes = (char)*num_params; retval = dashes; } break; @@ -1940,7 +1942,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, if (*num_params == 1) { if (isdigit(params[0][0]) || params[0][0] == '+' || params[0][0] == '-') - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); else if (XmuCompareISOLatin1(params[0], "true") == 0 || XmuCompareISOLatin1(params[0], "on") == 0) retval = (void *)True; @@ -1983,9 +1985,9 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, if (retval != XAWDL_CONVERT_ERROR) { for (i = 1; i < *num_params && i < 7; i++) - read_position(params[i], &args->pos[i - 1]); + read_position((char *)params[i], &args->pos[i - 1]); if (*num_params > 7) - args->plane = read_int(params[7], NULL); + args->plane = (int)read_int((char *)params[7], NULL); } } break; @@ -2008,7 +2010,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { args->depth = depth; for (i = 1; i < *num_params && i < 5; i++) - read_position(params[i], &args->pos[i - 1]); + read_position((char *)params[i], &args->pos[i - 1]); } } break; @@ -2019,8 +2021,8 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, /* ARGSUSED */ static void * -_Xaw_Xlib_DataInitProc(String class_name, - Screen *screen, Colormap colormap, int depth) +_Xaw_Xlib_DataInitProc(String class_name _X_UNUSED, + Screen *screen _X_UNUSED, Colormap colormap _X_UNUSED, int depth) { XawXlibData *data; Window tmp_win; @@ -2043,8 +2045,8 @@ _Xaw_Xlib_DataInitProc(String class_name, /* ARGSUSED */ static void -_Xaw_Xlib_ArgsDestructor(Display *display, String proc_name, XtPointer args, - String *params, Cardinal *num_params) +_Xaw_Xlib_ArgsDestructor(Display *display _X_UNUSED, String proc_name, XtPointer args, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { Cardinal id; Dl_init *init; @@ -2095,7 +2097,7 @@ _Xaw_Xlib_ArgsDestructor(Display *display, String proc_name, XtPointer args, /* ARGSUSED */ static void -_Xaw_Xlib_DataDestructor(Display *display, String class_name, XtPointer data) +_Xaw_Xlib_DataDestructor(Display *display, String class_name _X_UNUSED, XtPointer data) { if (data) { @@ -2144,7 +2146,7 @@ Bool XawDeclareDisplayListProc(XawDLClass *lc, String name, { ++lc->num_infos; lc->infos = (XawDLInfo **) - XtRealloc((char *)lc->infos, sizeof(XawDLInfo*) * lc->num_infos); + XtRealloc((char *)lc->infos, (Cardinal)(sizeof(XawDLInfo*) * (size_t)lc->num_infos)); } lc->infos[lc->num_infos - 1] = info; @@ -2218,7 +2220,7 @@ XawCreateDisplayListClass(String name, { ++num_classes; classes = (XawDLClass **)XtRealloc((char *)classes, - sizeof(XawDLClass) * num_classes); + (Cardinal)(sizeof(XawDLClass) * (size_t)num_classes)); } classes[num_classes - 1] = lc; diff --git a/lib/libXaw/src/Form.c b/lib/libXaw/src/Form.c index dcc26f3a6..ea33cbcf6 100644 --- a/lib/libXaw/src/Form.c +++ b/lib/libXaw/src/Form.c @@ -286,6 +286,9 @@ FormClassRec formClassRec = { /* form */ { Layout, /* layout */ +#ifndef OLDXAW + NULL, +#endif }, }; @@ -304,7 +307,7 @@ XawFormRealize(Widget w, Mask *mask, XSetWindowAttributes *attr) if (w->core.background_pixmap > XtUnspecifiedPixmap) { pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), - w->core.colormap, w->core.depth); + w->core.colormap, (int)w->core.depth); if (pixmap && pixmap->mask) XawReshapeWidget(w, pixmap); } @@ -322,7 +325,7 @@ XawFormRedisplay(Widget w, XEvent *event, Region region) /*ARGSUSED*/ static void -_CvtStringToEdgeType(XrmValuePtr args, Cardinal *num_args, +_CvtStringToEdgeType(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XtEdgeType edgeType; @@ -355,8 +358,8 @@ _CvtStringToEdgeType(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ Boolean -CvtEdgeTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, - XrmValuePtr fromVal, XrmValuePtr toVal, XtPointer *data) +CvtEdgeTypeToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, + XrmValuePtr fromVal, XrmValuePtr toVal, XtPointer *data _X_UNUSED) { static String buffer; Cardinal size; @@ -384,7 +387,7 @@ CvtEdgeTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)strlen(buffer) + 1; if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -443,8 +446,8 @@ XawFormClassPartInitialize(WidgetClass cclass) /*ARGSUSED*/ static void -XawFormInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawFormInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { FormWidget fw = (FormWidget)cnew; @@ -490,8 +493,8 @@ ChangeFormGeometry(Widget w, Bool query_only, if (width == XtWidth(fw) && height == XtHeight(fw)) return (True); - request.width = width; - request.height = height; + request.width = (Dimension)width; + request.height = (Dimension)height; request.request_mode = CWWidth | CWHeight; if (query_only) request.request_mode |= XtCWQueryOnly; @@ -540,10 +543,10 @@ ChangeFormGeometry(Widget w, Bool query_only, */ /*ARGSUSED*/ static Boolean -Layout(FormWidget fw, unsigned int width, unsigned int height, +Layout(FormWidget fw, unsigned int width _X_UNUSED, unsigned int height _X_UNUSED, Bool force_relayout) { - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; WidgetList children = fw->composite.children; Widget *childP; Dimension maxx, maxy; @@ -564,26 +567,26 @@ Layout(FormWidget fw, unsigned int width, unsigned int height, LayoutChild(*childP); - x = form->form.new_x + XtWidth(*childP) - + (XtBorderWidth(*childP) << 1); + x = (Position)(form->form.new_x + XtWidth(*childP) + + (XtBorderWidth(*childP) << 1)); if (x > (int)maxx) - maxx = x; + maxx = (Dimension)x; - y = form->form.new_y + XtHeight(*childP) - + (XtBorderWidth(*childP) << 1); + y = (Position)(form->form.new_y + XtHeight(*childP) + + (XtBorderWidth(*childP) << 1)); if (y > (int)maxy) - maxy = y; + maxy = (Dimension)y; } } - fw->form.preferred_width = (maxx += fw->form.default_spacing); - fw->form.preferred_height = (maxy += fw->form.default_spacing); + fw->form.preferred_width = (maxx = (Dimension)(maxx + fw->form.default_spacing)); + fw->form.preferred_height = (maxy = (Dimension)(maxy + fw->form.default_spacing)); if (fw->form.resize_in_layout) { Boolean always_resize_children; always_resize_children = - ChangeFormGeometry((Widget)fw, False, maxx, maxy, NULL, NULL); + (Boolean)ChangeFormGeometry((Widget)fw, False, maxx, maxy, NULL, NULL); #ifdef OLDXAW fw->form.old_width = fw->core.width; @@ -621,7 +624,7 @@ static void ResizeChildren(Widget w) { FormWidget fw = (FormWidget)w; - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; WidgetList children = fw->composite.children; Widget *childP; @@ -635,9 +638,9 @@ ResizeChildren(Widget w) form = (FormConstraints)(*childP)->core.constraints; if (fw->form.old_width && fw->form.old_height) { - x = TransformCoord(form->form.new_x, fw->form.old_width, + x = (Position)TransformCoord(form->form.new_x, fw->form.old_width, XtWidth(fw), form->form.left); - y = TransformCoord(form->form.new_y, fw->form.old_height, + y = (Position)TransformCoord(form->form.new_y, fw->form.old_height, XtHeight(fw), form->form.top); } else { @@ -687,21 +690,25 @@ LayoutChild(Widget w) } return; } - form->form.new_x = form->form.dx; - form->form.new_y = form->form.dy; + form->form.new_x = (Position)form->form.dx; + form->form.new_y = (Position)form->form.dy; if ((ref = form->form.horiz_base) != NULL) { FormConstraints ref_form = (FormConstraints)ref->core.constraints; LayoutChild(ref); - form->form.new_x += ref_form->form.new_x + XtWidth(ref) + - (XtBorderWidth(ref) << 1); + form->form.new_x = (Position)(form->form.new_x + + (ref_form->form.new_x + + XtWidth(ref) + + (XtBorderWidth(ref) << 1))); } if ((ref = form->form.vert_base) != NULL) { FormConstraints ref_form = (FormConstraints)ref->core.constraints; LayoutChild(ref); - form->form.new_y += ref_form->form.new_y + XtHeight(ref) + - (XtBorderWidth(ref) << 1); + form->form.new_y = (Position)(form->form.new_y + + (ref_form->form.new_y + + XtHeight(ref) + + (XtBorderWidth(ref) << 1))); } form->form.layout_state = LayoutDone; @@ -725,7 +732,7 @@ XawFormResize(Widget w) { FormWidget fw = (FormWidget)w; WidgetList children = fw->composite.children; - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; Widget *childP; int x, y; int width, height; @@ -781,7 +788,9 @@ XawFormResize(Widget w) width = width < 1 ? 1 : width; height = height < 1 ? 1 : height; - XtConfigureWidget(*childP, x, y, width, height, + XtConfigureWidget(*childP, + (Position)x, (Position)y, + (Dimension)width, (Dimension)height, XtBorderWidth(*childP)); } @@ -797,7 +806,7 @@ XawFormResize(Widget w) /*ARGSUSED*/ static XtGeometryResult XawFormGeometryManager(Widget w, XtWidgetGeometry *request, - XtWidgetGeometry *reply) + XtWidgetGeometry *reply _X_UNUSED) { Dimension old_width, old_height; FormWidget fw = (FormWidget)XtParent(w); @@ -863,7 +872,7 @@ XawFormGeometryManager(Widget w, XtWidgetGeometry *request, fw->form.resize_in_layout = True; - always_resize_children = ChangeFormGeometry(w, True, + always_resize_children = (Boolean)ChangeFormGeometry(w, True, fw->form.preferred_width, fw->form.preferred_height, &ret_width, &ret_height); @@ -879,7 +888,7 @@ XawFormGeometryManager(Widget w, XtWidgetGeometry *request, if ((*((FormWidgetClass)fw->core.widget_class)->form_class.layout) (fw, XtWidth(w), XtHeight(w), False)) { Widget *childP; - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; WidgetList children = fw->composite.children; if (fw->form.no_refigure) { @@ -913,8 +922,8 @@ XawFormGeometryManager(Widget w, XtWidgetGeometry *request, nform->form.virtual_x = XtX(nw); nform->form.virtual_y = XtY(nw); #endif - nform->form.virtual_width = XtWidth(nw); - nform->form.virtual_height = XtHeight(nw); + nform->form.virtual_width = (short)XtWidth(nw); + nform->form.virtual_height = (short)XtHeight(nw); } } } @@ -930,8 +939,8 @@ XawFormGeometryManager(Widget w, XtWidgetGeometry *request, /*ARGSUSED*/ static Boolean -XawFormSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawFormSetValues(Widget current _X_UNUSED, Widget request _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { #ifndef OLDXAW FormWidget f_old = (FormWidget)current; @@ -941,9 +950,9 @@ XawFormSetValues(Widget current, Widget request, Widget cnew, XawPixmap *opix, *npix; opix = XawPixmapFromXPixmap(f_old->core.background_pixmap, XtScreen(f_old), - f_old->core.colormap, f_old->core.depth); + f_old->core.colormap, (int)f_old->core.depth); npix = XawPixmapFromXPixmap(f_new->core.background_pixmap, XtScreen(f_new), - f_new->core.colormap, f_new->core.depth); + f_new->core.colormap, (int)f_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); } @@ -954,8 +963,8 @@ XawFormSetValues(Widget current, Widget request, Widget cnew, /* ARGSUSED */ static void -XawFormConstraintInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawFormConstraintInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { FormConstraints form = (FormConstraints)cnew->core.constraints; FormWidget fw = (FormWidget)cnew->core.parent; @@ -964,8 +973,8 @@ XawFormConstraintInitialize(Widget request, Widget cnew, form->form.virtual_x = XtX(cnew); form->form.virtual_y = XtY(cnew); #endif - form->form.virtual_width = XtWidth(cnew); - form->form.virtual_height = XtHeight(cnew); + form->form.virtual_width = (short)XtWidth(cnew); + form->form.virtual_height = (short)XtHeight(cnew); if (form->form.dx == default_value) form->form.dx = fw->form.default_spacing; @@ -978,8 +987,8 @@ XawFormConstraintInitialize(Widget request, Widget cnew, /*ARGSUSED*/ static Boolean -XawFormConstraintSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawFormConstraintSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { FormConstraints cfc = (FormConstraints)current->core.constraints; FormConstraints nfc = (FormConstraints)cnew->core.constraints; @@ -1015,7 +1024,7 @@ XawFormChangeManaged(Widget w) FormWidget fw = (FormWidget)w; FormConstraints form; WidgetList children, childP; - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; Widget child; (*((FormWidgetClass)w->core.widget_class)->form_class.layout) @@ -1034,8 +1043,8 @@ XawFormChangeManaged(Widget w) form->form.virtual_x = XtX(child); form->form.virtual_y = XtY(child); #endif - form->form.virtual_width = XtWidth(child); - form->form.virtual_height = XtHeight(child); + form->form.virtual_width = (short)XtWidth(child); + form->form.virtual_height = (short)XtHeight(child); } } @@ -1076,7 +1085,7 @@ XawFormDoLayout(Widget w, { Widget *childP; FormWidget fw = (FormWidget)w; - int num_children = fw->composite.num_children; + int num_children = (int)fw->composite.num_children; WidgetList children = fw->composite.children; if ((fw->form.no_refigure = !force) == True || !XtIsRealized(w)) diff --git a/lib/libXaw/src/Grip.c b/lib/libXaw/src/Grip.c index 85f021b9c..1682a757b 100644 --- a/lib/libXaw/src/Grip.c +++ b/lib/libXaw/src/Grip.c @@ -92,7 +92,7 @@ static XtResource resources[] = { sizeof(Pixel), XtOffsetOf(GripRec, core.background_pixel), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNborderWidth, diff --git a/lib/libXaw/src/Label.c b/lib/libXaw/src/Label.c index 024d01aa8..4c95d4261 100644 --- a/lib/libXaw/src/Label.c +++ b/lib/libXaw/src/Label.c @@ -100,7 +100,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(label.foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNfont, @@ -109,7 +109,7 @@ static XtResource resources[] = { sizeof(XFontStruct*), offset(label.font), XtRString, - XtDefaultFont + (XtPointer)XtDefaultFont }, { XtNfontSet, @@ -118,7 +118,7 @@ static XtResource resources[] = { sizeof(XFontSet), offset(label.fontset), XtRString, - XtDefaultFontSet + (XtPointer)XtDefaultFontSet }, { XtNlabel, @@ -290,9 +290,9 @@ SetTextWidthAndHeight(LabelWidget lw) if (XGetGeometry(XtDisplay(lw), lw->label.pixmap, &root, &x, &y, &width, &height, &bw, &depth)) { - lw->label.label_height = height; - lw->label.label_width = width; - lw->label.label_len = depth; + lw->label.label_height = (Dimension)height; + lw->label.label_width = (Dimension)width; + lw->label.label_len = (Dimension)depth; return; } } @@ -314,26 +314,26 @@ SetTextWidthAndHeight(LabelWidget lw) int width = XmbTextEscapement(fset, label, (int)(nl - label)); if (width > (int)lw->label.label_width) - lw->label.label_width = width; + lw->label.label_width = (Dimension)width; label = nl + 1; if (*label) - lw->label.label_height += ext->max_ink_extent.height; + lw->label.label_height = (Dimension)(lw->label.label_height + ext->max_ink_extent.height); } if (*label) { - int width = XmbTextEscapement(fset, label, strlen(label)); + int width = XmbTextEscapement(fset, label, (int)strlen(label)); if (width > (int)lw->label.label_width) - lw->label.label_width = width; + lw->label.label_width = (Dimension)width; } } else { - lw->label.label_len = strlen(lw->label.label); + lw->label.label_len = (Dimension)strlen(lw->label.label); lw->label.label_width = - XmbTextEscapement(fset, lw->label.label, lw->label.label_len); + (Dimension)XmbTextEscapement(fset, lw->label.label, lw->label.label_len); } } else { - lw->label.label_height = fs->max_bounds.ascent + fs->max_bounds.descent; + lw->label.label_height = (Dimension)(fs->max_bounds.ascent + fs->max_bounds.descent); if (lw->label.label == NULL) { lw->label.label_len = 0; lw->label.label_width = 0; @@ -351,32 +351,32 @@ SetTextWidthAndHeight(LabelWidget lw) else width = XTextWidth(fs, label, (int)(nl - label)); if (width > (int)lw->label.label_width) - lw->label.label_width = width; + lw->label.label_width = (Dimension)width; label = nl + 1; if (*label) lw->label.label_height += fs->max_bounds.ascent + fs->max_bounds.descent; } if (*label) { - int width = XTextWidth(fs, label, strlen(label)); + int width = XTextWidth(fs, label, (int)strlen(label)); if (lw->label.encoding) - width = XTextWidth16(fs, (XChar2b *)label, strlen(label) / 2); + width = XTextWidth16(fs, (XChar2b *)label, (int)(strlen(label) / 2)); else - width = XTextWidth(fs, label, strlen(label)); + width = XTextWidth(fs, label, (int)strlen(label)); if (width > (int) lw->label.label_width) - lw->label.label_width = width; + lw->label.label_width = (Dimension)width; } } else { - lw->label.label_len = strlen(lw->label.label); + lw->label.label_len = (Dimension)strlen(lw->label.label); if (lw->label.encoding) lw->label.label_width = - XTextWidth16(fs, (XChar2b *)lw->label.label, + (Dimension)XTextWidth16(fs, (XChar2b *)lw->label.label, (int)lw->label.label_len / 2); else lw->label.label_width = - XTextWidth(fs, lw->label.label, (int)lw->label.label_len); + (Dimension)XTextWidth(fs, lw->label.label, (int)lw->label.label_len); } } } @@ -442,8 +442,9 @@ compute_bitmap_offsets(LabelWidget lw) * (internal_width, internal_height + lbm_y) */ if (lw->label.lbm_height != 0) - lw->label.lbm_y = (XtHeight(lw) - (lw->label.internal_height * 2 + - lw->label.lbm_height)) / 2; + lw->label.lbm_y = (int)((XtHeight(lw) + - ((lw->label.internal_height * 2) + + lw->label.lbm_height)) / 2); else lw->label.lbm_y = 0; } @@ -466,8 +467,8 @@ set_bitmap_info(LabelWidget lw) /*ARGSUSED*/ static void -XawLabelInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawLabelInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { LabelWidget lw = (LabelWidget)cnew; @@ -486,13 +487,14 @@ XawLabelInitialize(Widget request, Widget cnew, SetTextWidthAndHeight(lw); if (XtHeight(lw) == 0) - XtHeight(lw) = lw->label.label_height + 2 * lw->label.internal_height; + XtHeight(lw) = (Dimension)(lw->label.label_height + 2 * lw->label.internal_height); set_bitmap_info(lw); /* need core.height */ if (XtWidth(lw) == 0) /* need label.lbm_width */ - XtWidth(lw) = lw->label.label_width + 2 * lw->label.internal_width + - LEFT_OFFSET(lw); + XtWidth(lw) = (lw->label.label_width + + (2 * lw->label.internal_width) + + LEFT_OFFSET(lw)); lw->label.label_x = lw->label.label_y = 0; (*XtClass(cnew)->core_class.resize)((Widget)lw); @@ -517,7 +519,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region) if (w->label.pixmap == None) { int len = w->label.label_len; char *label = w->label.label; - Position y = w->label.label_y + w->label.font->max_bounds.ascent; + Position y = (Position)(w->label.label_y + w->label.font->max_bounds.ascent); Position ksy = w->label.label_y; /* display left bitmap */ @@ -530,7 +532,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region) if (w->simple.international == True) { XFontSetExtents *ext = XExtentsOfFontSet(w->label.fontset); - ksy += XawAbs(ext->max_ink_extent.y); + ksy = (ksy + XawAbs(ext->max_ink_extent.y)); if (len == MULTI_LINE_LABEL) { char *nl; @@ -539,10 +541,10 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region) XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset, gc, w->label.label_x, ksy, label, (int)(nl - label)); - ksy += ext->max_ink_extent.height; + ksy = (ksy + ext->max_ink_extent.height); label = nl + 1; } - len = strlen(label); + len = (int)strlen(label); } if (len) XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset, gc, @@ -560,11 +562,11 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region) else XDrawString(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, label, (int)(nl - label)); - y += w->label.font->max_bounds.ascent + - w->label.font->max_bounds.descent; + y += (w->label.font->max_bounds.ascent + + w->label.font->max_bounds.descent); label = nl + 1; } - len = strlen(label); + len = (int)strlen(label); } if (len) { if (w->label.encoding) @@ -596,28 +598,28 @@ _Reposition(LabelWidget lw, unsigned int width, unsigned int height, Position *dx, Position *dy) { Position newPos; - Position leftedge = lw->label.internal_width + LEFT_OFFSET(lw); + Position leftedge = (lw->label.internal_width + LEFT_OFFSET(lw)); switch (lw->label.justify) { case XtJustifyLeft: newPos = leftedge; break; case XtJustifyRight: - newPos = width - (lw->label.label_width + lw->label.internal_width); + newPos = (Position)(width - (unsigned)(lw->label.label_width + lw->label.internal_width)); break; case XtJustifyCenter: /*FALLTRHOUGH*/ default: - newPos = (int)(width - lw->label.label_width) >> 1; + newPos = (Position)((int)(width - lw->label.label_width) >> 1); break; } if (newPos < (Position)leftedge) newPos = leftedge; - *dx = newPos - lw->label.label_x; + *dx = (Position)(newPos - lw->label.label_x); lw->label.label_x = newPos; - newPos = (height - lw->label.label_height) >> 1; - *dy = newPos - lw->label.label_y; + newPos = (Position)((height - lw->label.label_height) >> 1); + *dy = (Position)(newPos - lw->label.label_y); lw->label.label_y = newPos; } @@ -658,7 +660,7 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew, } if (newlw->label.label == NULL) - newlw->label.label = newlw->core.name; + newlw->label.label = (char *)newlw->core.name; /* * resize on bitmap change @@ -692,14 +694,15 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew, /* recalculate the window size if something has changed */ if (newlw->label.resize && was_resized) { if (XtHeight(curlw) == XtHeight(reqlw) && !checks[HEIGHT]) - XtHeight(newlw) = newlw->label.label_height + - (newlw->label.internal_height << 1); + XtHeight(newlw) = (Dimension)(newlw->label.label_height + + (newlw->label.internal_height << 1)); set_bitmap_info(newlw); if (XtWidth(curlw) == XtWidth(reqlw) && !checks[WIDTH]) - XtWidth(newlw) = newlw->label.label_width + LEFT_OFFSET(newlw) + - (newlw->label.internal_width << 1); + XtWidth(newlw) = (newlw->label.label_width + + LEFT_OFFSET(newlw) + + (unsigned)(newlw->label.internal_width << 1)); } if (curlw->label.foreground != newlw->label.foreground @@ -750,10 +753,11 @@ XawLabelQueryGeometry(Widget w, XtWidgetGeometry *intended, LabelWidget lw = (LabelWidget)w; preferred->request_mode = CWWidth | CWHeight; - preferred->width = lw->label.label_width + - (lw->label.internal_width << 1) + LEFT_OFFSET(lw); - preferred->height = lw->label.label_height + - (lw->label.internal_height << 1); + preferred->width = (lw->label.label_width + + (unsigned)(lw->label.internal_width << 1) + + LEFT_OFFSET(lw)); + preferred->height = (Dimension)(lw->label.label_height + + (lw->label.internal_height << 1)); if (((intended->request_mode & (CWWidth | CWHeight)) == (CWWidth | CWHeight)) && intended->width == preferred->width diff --git a/lib/libXaw/src/List.c b/lib/libXaw/src/List.c index ce0ab5f23..a68a7bdd0 100644 --- a/lib/libXaw/src/List.c +++ b/lib/libXaw/src/List.c @@ -105,7 +105,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(list.foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNcursor, @@ -114,7 +114,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(simple.cursor), XtRString, - "left_ptr" + (XtPointer)"left_ptr" }, { XtNfont, @@ -123,7 +123,7 @@ static XtResource resources[] = { sizeof(XFontStruct*), offset(list.font), XtRString, - XtDefaultFont + (XtPointer)XtDefaultFont }, { XtNfontSet, @@ -132,7 +132,7 @@ static XtResource resources[] = { sizeof(XFontSet), offset(list.fontset), XtRString, - XtDefaultFontSet + (XtPointer)XtDefaultFontSet }, { XtNlist, @@ -374,10 +374,10 @@ CalculatedValues(Widget w) for (i = 0 ; i < lw->list.nitems; i++) { if (lw->simple.international == True) len = XmbTextEscapement(lw->list.fontset, lw->list.list[i], - strlen(lw->list.list[i])); + (int)strlen(lw->list.list[i])); else len = XTextWidth(lw->list.font, lw->list.list[i], - strlen(lw->list.list[i])); + (int)strlen(lw->list.list[i])); if (len > lw->list.longest) lw->list.longest = len; } @@ -435,8 +435,8 @@ ChangeSize(Widget w, unsigned int width, unsigned int height) XtWidgetGeometry request, reply; request.request_mode = CWWidth | CWHeight; - request.width = width; - request.height = height; + request.width = (Dimension)width; + request.height = (Dimension)height; switch (XtMakeGeometryRequest(w, &request, &reply)) { case XtGeometryYes: @@ -467,7 +467,7 @@ ChangeSize(Widget w, unsigned int width, unsigned int height) /*ARGSUSED*/ static void -XawListInitialize(Widget temp1, Widget cnew, ArgList args, Cardinal *num_args) +XawListInitialize(Widget temp1 _X_UNUSED, Widget cnew, ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ListWidget lw = (ListWidget)cnew; @@ -628,10 +628,10 @@ static void HighlightBackground(Widget w, int x, int y, GC gc) { ListWidget lw = (ListWidget)w; - Dimension width = lw->list.col_width; - Dimension height = lw->list.row_height; - Dimension frame_limited_width = XtWidth(w) - lw->list.internal_width - x; - Dimension frame_limited_height= XtHeight(w) - lw->list.internal_height - y; + Dimension width = (Dimension)lw->list.col_width; + Dimension height = (Dimension)lw->list.row_height; + Dimension frame_limited_width = (Dimension)(XtWidth(w) - lw->list.internal_width - x); + Dimension frame_limited_height= (Dimension)(XtHeight(w) - lw->list.internal_height - y); /* Clip the rectangle width and height to the edge of the drawable area */ if (width > frame_limited_width) @@ -641,11 +641,11 @@ HighlightBackground(Widget w, int x, int y, GC gc) /* Clip the rectangle x and y to the edge of the drawable area */ if (x < lw->list.internal_width) { - width = width - (lw->list.internal_width - x); + width = (Dimension)(width - (lw->list.internal_width - x)); x = lw->list.internal_width; } if (y < lw->list.internal_height) { - height = height - (lw->list.internal_height - y); + height = (Dimension)(height - (lw->list.internal_height - y)); y = lw->list.internal_height; } @@ -670,12 +670,12 @@ ClipToShadowInteriorAndLongest(ListWidget lw, GC *gc_p, unsigned int x) { XRectangle rect; - rect.x = x; - rect.y = lw->list.internal_height; - rect.height = XtHeight(lw) - (lw->list.internal_height << 1); - rect.width = XtWidth(lw) - lw->list.internal_width - x; + rect.x = (short)x; + rect.y = (short)lw->list.internal_height; + rect.height = (unsigned short)(XtHeight(lw) - (lw->list.internal_height << 1)); + rect.width = (unsigned short)(XtWidth(lw) - (unsigned)lw->list.internal_width - x); if (rect.width > lw->list.longest) - rect.width = lw->list.longest; + rect.width = (unsigned short)lw->list.longest; XSetClipRectangles(XtDisplay((Widget)lw), *gc_p, 0, 0, &rect, 1, YXBanded); } @@ -683,7 +683,7 @@ ClipToShadowInteriorAndLongest(ListWidget lw, GC *gc_p, unsigned int x) static void PaintItemName(Widget w, int item) { - char *str; + _Xconst char *str; GC gc; int x, y, str_y; ListWidget lw = (ListWidget)w; @@ -748,13 +748,13 @@ PaintItemName(Widget w, int item) str = lw->list.list[item]; /* draw it */ - ClipToShadowInteriorAndLongest(lw, &gc, x); + ClipToShadowInteriorAndLongest(lw, &gc, (unsigned)x); if (lw->simple.international == True) XmbDrawString(XtDisplay(w), XtWindow(w), lw->list.fontset, - gc, x, str_y, str, strlen(str)); + gc, x, str_y, str, (int)strlen(str)); else - XDrawString(XtDisplay(w), XtWindow(w), gc, x, str_y, str, strlen(str)); + XDrawString(XtDisplay(w), XtWindow(w), gc, x, str_y, str, (int)strlen(str)); XSetClipMask(XtDisplay(w), gc, None); } @@ -876,13 +876,13 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) /* this counts the same number of inter-column column_space 's as columns. There should thus be a half column_space margin on each side of each column...*/ - width2 = lw->list.ncols * lw->list.col_width + - (lw->list.internal_width << 1); + width2 = (unsigned long)(lw->list.ncols * lw->list.col_width + + (lw->list.internal_width << 1)); change = True; } if (yfree) { - height2 = lw->list.nrows * lw->list.row_height + - (lw->list.internal_height << 1); + height2 = (unsigned long)(lw->list.nrows * lw->list.row_height + + (lw->list.internal_height << 1)); change = True; } } @@ -902,10 +902,10 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) || (lw->list.ncols = wid / lw->list.col_width) <= 0) lw->list.ncols = 1; } - width2 = lw->list.ncols * lw->list.col_width - + (lw->list.internal_width << 1); - height2 = (lw->list.nrows * lw->list.row_height) - + (lw->list.internal_height << 1); + width2 = (unsigned long)((lw->list.ncols * lw->list.col_width) + + (lw->list.internal_width << 1)); + height2 = (unsigned long)((lw->list.nrows * lw->list.row_height) + + (lw->list.internal_height << 1)); change = True; } @@ -921,8 +921,8 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) lw->list.ncols = 1; lw->list.nrows = ((lw->list.nitems - 1) / lw->list.ncols) + 1; if (yfree) { - height2 = lw->list.nrows * lw->list.row_height + - (lw->list.internal_height << 1); + height2 = (unsigned long)((lw->list.nrows * lw->list.row_height) + + (lw->list.internal_height << 1)); change = True; } } @@ -938,8 +938,8 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) if (lw->list.nrows <= 0) lw->list.nrows = 1; lw->list.ncols = ((lw->list.nitems - 1) / lw->list.nrows) + 1; - width2 = lw->list.ncols * lw->list.col_width + - (lw->list.internal_width << 1); + width2 = (unsigned long)((lw->list.ncols * lw->list.col_width) + + (lw->list.internal_width << 1)); change = True; } @@ -947,10 +947,10 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) /*CONSTCOND*/ while (1) { lw->list.nrows = ((lw->list.nitems - 1) / lw->list.ncols) + 1; - width2 = lw->list.ncols * lw->list.col_width + - (lw->list.internal_width << 1); - height2 = lw->list.nrows * lw->list.row_height + - (lw->list.internal_height << 1); + width2 = (unsigned long)((lw->list.ncols * lw->list.col_width) + + (lw->list.internal_width << 1)); + height2 = (unsigned long)((lw->list.nrows * lw->list.row_height) + + (lw->list.internal_height << 1)); if (width2 >= MaxSize && height2 >= MaxSize) break; if (height2 > MaxSize) @@ -962,9 +962,9 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) } } if (width2) - *width = width2; + *width = (Dimension)width2; if (height2) - *height = height2; + *height = (Dimension)height2; return (change); } @@ -976,7 +976,7 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) * then the name of the item is also put in CUT_BUFFER0 */ /*ARGSUSED*/ static void -Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) +Notify(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ListWidget lw = (ListWidget)w; int item, item_len; @@ -1001,7 +1001,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) return; } - item_len = strlen(lw->list.list[item]); + item_len = (int)strlen(lw->list.list[item]); if (lw->list.paste) /* if XtNpasteBuffer set then paste it */ XStoreBytes(XtDisplay(w), lw->list.list[item], item_len); @@ -1023,7 +1023,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) * unhighlights the current element */ /*ARGSUSED*/ static void -Unset(Widget w, XEvent *event, String *params, Cardinal *num_params) +Unset(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { XawListUnhighlight(w); } @@ -1033,7 +1033,7 @@ Unset(Widget w, XEvent *event, String *params, Cardinal *num_params) * Highlights the current element */ /*ARGSUSED*/ static void -Set(Widget w, XEvent *event, String *params, Cardinal *num_params) +Set(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { int item; ListWidget lw = (ListWidget)w; @@ -1053,7 +1053,7 @@ Set(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static Boolean XawListSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ListWidget cl = (ListWidget)current; ListWidget rl = (ListWidget)request; @@ -1143,7 +1143,7 @@ XawListSetValues(Widget current, Widget request, Widget cnew, redraw = True; } - return (redraw); + return (Boolean)(redraw); } static void @@ -1178,7 +1178,7 @@ XawListDestroy(Widget w) * If nitems is <= 0 then the list needs to be NULL terminated */ void -XawListChange(Widget w, char **list, int nitems, int longest, +XawListChange(Widget w, _Xconst char **list, int nitems, int longest, #if NeedWidePrototypes int resize_it #else diff --git a/lib/libXaw/src/Makefile.am b/lib/libXaw/src/Makefile.am index befd850e9..b5f2bd145 100644 --- a/lib/libXaw/src/Makefile.am +++ b/lib/libXaw/src/Makefile.am @@ -55,10 +55,10 @@ COMMON_SOURCES = \ XawI18n.c \ XawI18n.h -COMMON_CFLAGS = \ +AM_CFLAGS = \ $(CWARNFLAGS) -COMMON_CPPFLAGS = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include \ -DPROJECT_ROOT=\"$(prefix)\" @@ -67,10 +67,10 @@ if BUILD_XAW6 lib_LTLIBRARIES += libXaw6.la libXaw6_la_CPPFLAGS = \ - $(COMMON_CPPFLAGS) + $(AM_CPPFLAGS) libXaw6_la_CFLAGS = \ - $(COMMON_CFLAGS) \ + $(AM_CFLAGS) \ -DOLDXAW \ $(XAW6_CFLAGS) @@ -105,15 +105,15 @@ if BUILD_XAW7 lib_LTLIBRARIES += libXaw7.la libXaw7_la_CPPFLAGS = \ - $(COMMON_CPPFLAGS) + $(AM_CPPFLAGS) libXaw7_la_CFLAGS = \ - $(COMMON_CFLAGS) \ + $(AM_CFLAGS) \ -DXAW7 \ $(XAW7_CFLAGS) -libXaw7_la_SOURCES = \ - $(COMMON_SOURCES) \ +libXaw7_la_SOURCES = \ + $(COMMON_SOURCES) \ Tip.c libXaw7_la_LDFLAGS = -version-info 7:0:0 -no-undefined diff --git a/lib/libXaw/src/Makefile.in b/lib/libXaw/src/Makefile.in index 278250fe0..65e499ec5 100644 --- a/lib/libXaw/src/Makefile.in +++ b/lib/libXaw/src/Makefile.in @@ -355,6 +355,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -419,18 +420,18 @@ COMMON_SOURCES = \ XawI18n.c \ XawI18n.h -COMMON_CFLAGS = \ +AM_CFLAGS = \ $(CWARNFLAGS) -COMMON_CPPFLAGS = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include \ -DPROJECT_ROOT=\"$(prefix)\" @BUILD_XAW6_TRUE@libXaw6_la_CPPFLAGS = \ -@BUILD_XAW6_TRUE@ $(COMMON_CPPFLAGS) +@BUILD_XAW6_TRUE@ $(AM_CPPFLAGS) @BUILD_XAW6_TRUE@libXaw6_la_CFLAGS = \ -@BUILD_XAW6_TRUE@ $(COMMON_CFLAGS) \ +@BUILD_XAW6_TRUE@ $(AM_CFLAGS) \ @BUILD_XAW6_TRUE@ -DOLDXAW \ @BUILD_XAW6_TRUE@ $(XAW6_CFLAGS) @@ -440,15 +441,15 @@ COMMON_CPPFLAGS = \ @BUILD_XAW6_TRUE@libXaw6_la_LDFLAGS = -version-info 6:1:0 -no-undefined @BUILD_XAW6_TRUE@libXaw6_la_LIBADD = $(XAW6_LIBS) @BUILD_XAW7_TRUE@libXaw7_la_CPPFLAGS = \ -@BUILD_XAW7_TRUE@ $(COMMON_CPPFLAGS) +@BUILD_XAW7_TRUE@ $(AM_CPPFLAGS) @BUILD_XAW7_TRUE@libXaw7_la_CFLAGS = \ -@BUILD_XAW7_TRUE@ $(COMMON_CFLAGS) \ +@BUILD_XAW7_TRUE@ $(AM_CFLAGS) \ @BUILD_XAW7_TRUE@ -DXAW7 \ @BUILD_XAW7_TRUE@ $(XAW7_CFLAGS) @BUILD_XAW7_TRUE@libXaw7_la_SOURCES = \ -@BUILD_XAW7_TRUE@ $(COMMON_SOURCES) \ +@BUILD_XAW7_TRUE@ $(COMMON_SOURCES) \ @BUILD_XAW7_TRUE@ Tip.c @BUILD_XAW7_TRUE@libXaw7_la_LDFLAGS = -version-info 7:0:0 -no-undefined diff --git a/lib/libXaw/src/MenuButton.c b/lib/libXaw/src/MenuButton.c index e1908512d..ff75d9002 100644 --- a/lib/libXaw/src/MenuButton.c +++ b/lib/libXaw/src/MenuButton.c @@ -160,8 +160,8 @@ XawMenuButtonClassInitialize(void) /*ARGSUSED*/ static void -XawMenuButtonInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawMenuButtonInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { MenuButtonWidget mbw = (MenuButtonWidget)cnew; @@ -180,8 +180,8 @@ XawMenuButtonDestroy(Widget w) /*ARGSUSED*/ static Boolean -XawMenuButtonSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawMenuButtonSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { MenuButtonWidget mbw_old = (MenuButtonWidget)current; MenuButtonWidget mbw_new = (MenuButtonWidget)cnew; @@ -199,7 +199,7 @@ XawMenuButtonSetValues(Widget current, Widget request, Widget cnew, /*ARGSUSED*/ static void -PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) +PopupMenu(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { MenuButtonWidget mbw = (MenuButtonWidget)w; Widget menu = NULL, temp; diff --git a/lib/libXaw/src/MultiSink.c b/lib/libXaw/src/MultiSink.c index 77eb42fd9..3e9a6f379 100644 --- a/lib/libXaw/src/MultiSink.c +++ b/lib/libXaw/src/MultiSink.c @@ -140,7 +140,7 @@ static XtResource resources[] = { sizeof(XFontSet), offset(fontset), XtRString, - XtDefaultFontSet + (XtPointer)XtDefaultFontSet }, { XtNecho, @@ -308,7 +308,7 @@ PaintText(Widget w, GC gc, int x, int y, wchar_t *buf, int len, Bool clear_bg) MultiSinkObject sink = (MultiSinkObject)w; TextWidget ctx = (TextWidget)XtParent(w); XFontSet fontset = sink->multi_sink.fontset; - unsigned int width = XwcTextEscapement(fontset, buf, len); + unsigned int width = (unsigned)XwcTextEscapement(fontset, buf, len); if (((int)width) <= -x) /* Don't draw if we can't see it */ return (width); @@ -363,11 +363,11 @@ DisplayText(Widget w, int x, int y, y += abs(ext->max_logical_extent.y); for (j = 0; pos1 < pos2;) { - pos1 = XawTextSourceRead(source, pos1, &blk, (int) pos2 - pos1); + pos1 = XawTextSourceRead(source, pos1, &blk, (int) (pos2 - pos1)); for (k = 0; k < blk.length; k++) { if ((unsigned) j >= (sizeof(buf) / sizeof(wchar_t)) - 1) { /* buffer full, dump the text */ - if ((x += PaintText(w, gc, x, y, buf, j, clear_bg)) >= max_x) + if ((x = (int)((unsigned)x + PaintText(w, gc, x, y, buf, j, clear_bg))) >= max_x) return; j = 0; } @@ -379,10 +379,10 @@ DisplayText(Widget w, int x, int y, unsigned int width; if (j != 0 && - (x += PaintText(w, gc, x, y, buf, j, clear_bg)) >= max_x) + (x = (int)((unsigned)x + PaintText(w, gc, x, y, buf, j, clear_bg))) >= max_x) return; - width = CharWidth(sink, fontset, x, _Xaw_atowc(XawTAB)); + width = (unsigned)CharWidth(sink, fontset, x, _Xaw_atowc(XawTAB)); if (clear_bg) _XawTextSinkClearToBackground(w, x, y - abs(ext->max_logical_extent.y), @@ -393,7 +393,7 @@ DisplayText(Widget w, int x, int y, y - abs(ext->max_logical_extent.y), width, ext->max_logical_extent.height); - x += width; + x = (int)((unsigned)x + width); j = -1; } else if (XwcTextEscapement(sink->multi_sink.fontset, &buf[j], 1) @@ -427,11 +427,11 @@ GetCursorBounds(Widget w, XRectangle *rect) { MultiSinkObject sink = (MultiSinkObject)w; - rect->width = CharWidth(sink, sink->multi_sink.fontset, 0, _Xaw_atowc(XawSP)); + rect->width = (unsigned short)CharWidth(sink, sink->multi_sink.fontset, 0, _Xaw_atowc(XawSP)); rect->height = (XExtentsOfFontSet(sink->multi_sink.fontset) ->max_logical_extent.height); rect->x = sink->multi_sink.cursor_x; - rect->y = sink->multi_sink.cursor_y - (short)rect->height; + rect->y = (short)(sink->multi_sink.cursor_y - (short)rect->height); } /* @@ -481,9 +481,9 @@ InsertCursor(Widget w, int x, int y, XawTextInsertState state) if (!ochar) _XawTextSinkClearToBackground(w, sink->multi_sink.cursor_x, (sink->multi_sink.cursor_y - 1 - - fheight), CharWidth(sink, fontset, - 0, wspace[0]), - fheight); + fheight), + (unsigned)CharWidth(sink, fontset, 0, wspace[0]), + (unsigned)fheight); else { if (XwcTextEscapement(sink->multi_sink.fontset, ochar, 1) != 0) DisplayText(w, sink->multi_sink.cursor_x, @@ -527,13 +527,13 @@ InsertCursor(Widget w, int x, int y, XawTextInsertState state) sink->multi_sink.xorgc ? sink->multi_sink.xorgc : sink->multi_sink.normgc, x, y - 1 - fheight, - CharWidth(sink, fontset, 0, *nchar) - 1, - fheight - 1); + (unsigned)(CharWidth(sink, fontset, 0, *nchar) - 1), + (unsigned)(fheight - 1)); } } - sink->multi_sink.cursor_x = x; - sink->multi_sink.cursor_y = y; + sink->multi_sink.cursor_x = (short)x; + sink->multi_sink.cursor_y = (short)y; sink->multi_sink.laststate = state; sink->multi_sink.cursor_position = position; } @@ -556,12 +556,12 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, XawTextBlock blk; int i, rWidth; - pos = XawTextSourceRead(source, fromPos, &blk, toPos - fromPos); + pos = XawTextSourceRead(source, fromPos, &blk, (int)(toPos - fromPos)); rWidth = 0; for (i = 0, idx = fromPos; idx < toPos; i++, idx++) { if (i >= blk.length) { i = 0; - XawTextSourceRead(source, pos, &blk, toPos - pos); + XawTextSourceRead(source, pos, &blk, (int)(toPos - pos)); if (blk.length == 0) break; } @@ -659,7 +659,7 @@ GetGC(MultiSinkObject sink) XGCValues values; /* XXX We dont want do share a gc that will change the clip-mask */ - values.clip_x_origin = (long)sink; + values.clip_x_origin = (int)(long)sink; values.clip_mask = None; values.graphics_exposures = False; @@ -711,8 +711,8 @@ XawMultiSinkClassInitialize(void) */ /* ARGSUSED */ static void -XawMultiSinkInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawMultiSinkInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { MultiSinkObject sink = (MultiSinkObject)cnew; @@ -766,8 +766,8 @@ XawMultiSinkResize(Widget w) (int)ctx->text.r_margin.right - (int)ctx->text.r_margin.left; height = (int)XtHeight(ctx) - (int)ctx->text.r_margin.top - (int)ctx->text.r_margin.bottom; - rect.width = width; - rect.height = height; + rect.width = (unsigned short)width; + rect.height = (unsigned short)height; if (sink->multi_sink.normgc) { if (width >= 0 && height >= 0) @@ -809,8 +809,8 @@ XawMultiSinkResize(Widget w) */ /*ARGSUSED*/ static Boolean -XawMultiSinkSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawMultiSinkSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { MultiSinkObject w = (MultiSinkObject)cnew; MultiSinkObject old_w = (MultiSinkObject)current; @@ -868,7 +868,7 @@ MaxLines(Widget w, unsigned int height) XFontSetExtents *ext = XExtentsOfFontSet(sink->multi_sink.fontset); font_height = ext->max_logical_extent.height; - return (height / font_height); + return (int)(height / (unsigned)font_height); } /* @@ -938,22 +938,22 @@ SetTabs(Widget w, int tab_count, short* tabs) || figure_width == 0)) { if (font->per_char && font->min_char_or_byte2 <= '$' && font->max_char_or_byte2 >= '$') - figure_width = font->per_char['$' - font->min_char_or_byte2].width; + figure_width = (unsigned long)font->per_char['$' - font->min_char_or_byte2].width; else - figure_width = font->max_bounds.width; + figure_width = (unsigned long)font->max_bounds.width; } if (tab_count > sink->text_sink.tab_count) { sink->text_sink.tabs = (Position *) XtRealloc((char *)sink->text_sink.tabs, - (Cardinal)(tab_count * sizeof(Position))); + (Cardinal)((unsigned long)tab_count * sizeof(Position))); sink->text_sink.char_tabs = (short *) XtRealloc((char *)sink->text_sink.char_tabs, - (Cardinal)(tab_count * sizeof(short))); + (Cardinal)((unsigned long)tab_count * sizeof(short))); } for (i = 0 ; i < tab_count ; i++) { - sink->text_sink.tabs[i] = tabs[i] * figure_width; + sink->text_sink.tabs[i] = (Position)((unsigned long)tabs[i] * figure_width); sink->text_sink.char_tabs[i] = tabs[i]; } @@ -971,5 +971,5 @@ _XawMultiSinkPosToXY(Widget w, XawTextPosition pos, Position *x, Position *y) XFontSetExtents *ext = XExtentsOfFontSet(sink->multi_sink.fontset); _XawTextPosToXY(w, pos, x, y); - *y += abs(ext->max_logical_extent.y); + *y = (Position)(*y + abs(ext->max_logical_extent.y)); } diff --git a/lib/libXaw/src/MultiSrc.c b/lib/libXaw/src/MultiSrc.c index 15bdaf8c7..b4a123c14 100644 --- a/lib/libXaw/src/MultiSrc.c +++ b/lib/libXaw/src/MultiSrc.c @@ -112,7 +112,7 @@ static FILE *InitStringOrFile(MultiSrcObject, Bool); static void LoadPieces(MultiSrcObject, FILE*, char*); static void RemovePiece(MultiSrcObject, MultiPiece*); static void RemoveOldStringOrFile(MultiSrcObject, Bool); -static String StorePiecesInString(MultiSrcObject); +static char * StorePiecesInString(MultiSrcObject); static Bool WriteToFile(String, String); static void GetDefaultPieceSize(Widget, int, XrmValue*); @@ -234,6 +234,9 @@ MultiSrcClassRec multiSrcClassRec = { Search, /* Search */ XtInheritSetSelection, /* SetSelection */ XtInheritConvertSelection, /* ConvertSelection */ +#ifndef OLDXAW + NULL +#endif }, /* multi_src */ { @@ -274,8 +277,8 @@ XawMultiSrcClassInitialize(void) */ /*ARGSUSED*/ static void -XawMultiSrcInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawMultiSrcInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { MultiSrcObject src = (MultiSrcObject)cnew; FILE *file; @@ -298,7 +301,7 @@ XawMultiSrcInitialize(Widget request, Widget cnew, if (file != NULL) fclose(file); - src->text_src.text_format = XawFmtWide; + src->text_src.text_format = (XrmQuark)XawFmtWide; } /* @@ -325,10 +328,10 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) MultiPiece *piece = FindPiece(src, pos, &start); text->format = XawFmtWide; - text->firstPos = pos; + text->firstPos = (int)pos; text->ptr = (char *)(piece->text + (pos - start)); count = piece->used - (pos - start); - text->length = Max(0, (length > count) ? count : length); + text->length = (Max(0, (length > count) ? count : length)); return (pos + text->length); } @@ -420,7 +423,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, end_piece->used -= endPos - end_first; if (end_piece->used != 0) memmove(end_piece->text, end_piece->text + endPos - end_first, - end_piece->used * sizeof(wchar_t)); + (size_t)end_piece->used * sizeof(wchar_t)); } else { /* We are fully in one piece */ if ((start_piece->used -= endPos - startPos) == 0) { @@ -430,7 +433,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, else { memmove(start_piece->text + (startPos - start_first), start_piece->text + (endPos - start_first), - (start_piece->used - (startPos - start_first)) * + (size_t)(start_piece->used - (startPos - start_first)) * sizeof(wchar_t)); if (src->multi_src.use_string_in_place && ((src->multi_src.length - (endPos - startPos)) @@ -475,10 +478,10 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, fill = Min((int)(src->multi_src.piece_size - start_piece->used), length); ptr = start_piece->text + (startPos - start_first); - memmove(ptr + fill, ptr, (start_piece->used - + memmove(ptr + fill, ptr, (size_t)(start_piece->used - (startPos - start_first)) * sizeof(wchar_t)); wptr =(wchar_t *)text.ptr; - (void)wcsncpy(ptr, wptr + firstPos, fill); + (void)wcsncpy(ptr, wptr + firstPos, (size_t)fill); startPos += fill; firstPos += fill; @@ -598,7 +601,7 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type, position += inc; if (type == XawstAlphaNumeric) { - if (!iswalnum(c)) { + if (!iswalnum((wint_t)c)) { if (non_space) break; } @@ -720,8 +723,8 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, effectively factored out of the following computations */ /* STEP 3: SEARCH! */ - buf = (wchar_t *)XtMalloc(sizeof(wchar_t) * wtarget_len); - (void)wcsncpy(buf, wtarget, wtarget_len); + buf = (wchar_t *)XtMalloc((Cardinal)(sizeof(wchar_t) * (size_t)wtarget_len)); + (void)wcsncpy(buf, wtarget, (size_t)wtarget_len); piece = FindPiece(src, position, &first); ptr = (position - first) + piece->text; @@ -746,7 +749,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, position += inc; while (ptr < piece->text) { - cnt = piece->text - ptr; + cnt = (int)(piece->text - ptr); piece = piece->prev; if (piece == NULL) { /* Begining of text */ @@ -757,7 +760,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, } while (ptr >= piece->text + piece->used) { - cnt = ptr - (piece->text + piece->used); + cnt = (int)(ptr - (piece->text + piece->used)); piece = piece->next; if (piece == NULL) { /* End of text */ @@ -793,7 +796,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, * True if redisplay is needed */ static Boolean -XawMultiSrcSetValues(Widget current, Widget request, Widget cnew, +XawMultiSrcSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, ArgList args, Cardinal *num_args) { MultiSrcObject src = (MultiSrcObject)cnew; @@ -841,7 +844,7 @@ XawMultiSrcSetValues(Widget current, Widget request, Widget cnew, if ( !total_reset && old_src->multi_src.piece_size != src->multi_src.piece_size) { - String mb_string = StorePiecesInString(old_src); + char * mb_string = StorePiecesInString(old_src); if (mb_string != 0) { FreeAllPieces(old_src); @@ -1031,13 +1034,13 @@ Bool _XawMultiSaveAsFile(Widget w, _Xconst char* name) { MultiSrcObject src = (MultiSrcObject)w; - String mb_string; + char * mb_string; Bool ret; mb_string = StorePiecesInString(src); if (mb_string != 0) { - ret = WriteToFile(mb_string, (char *)name); + ret = WriteToFile(mb_string, (String)name); XtFree(mb_string); return (ret); @@ -1114,21 +1117,21 @@ WriteToFile(String string, String name) * (or) * NULL: conversion error */ -static String +static char * StorePiecesInString(MultiSrcObject src) { wchar_t *wc_string; char *mb_string; - int char_count = src->multi_src.length; + int char_count = (int)src->multi_src.length; XawTextPosition first; MultiPiece *piece; /* I believe the char_count + 1 and the NULL termination are unneeded! FS */ - wc_string = (wchar_t*)XtMalloc((char_count + 1) * sizeof(wchar_t)); + wc_string = (wchar_t*)XtMalloc((Cardinal)((size_t)(char_count + 1) * sizeof(wchar_t))); for (first = 0, piece = src->multi_src.first_piece ; piece != NULL; first += piece->used, piece = piece->next) - (void)wcsncpy(wc_string + first, piece->text, piece->used); + (void)wcsncpy(wc_string + first, piece->text, (size_t)piece->used); wc_string[char_count] = 0; @@ -1173,24 +1176,24 @@ InitStringOrFile(MultiSrcObject src, Bool newString) else if (!src->multi_src.use_string_in_place) { int length; - String temp = XtNewString((char *)src->multi_src.string); + char * temp = XtNewString((char *)src->multi_src.string); if (src->multi_src.allocated_string) XtFree((char *)src->multi_src.string); src->multi_src.allocated_string = True; src->multi_src.string = temp; - length = strlen((char *)src->multi_src.string); + length = (int)strlen((char *)src->multi_src.string); /* Wasteful, throwing away the WC string, but need side effect! */ (void)_XawTextMBToWC(d, (char *)src->multi_src.string, &length); src->multi_src.length = (XawTextPosition)length; } else { - src->multi_src.length = strlen((char *)src->multi_src.string); + src->multi_src.length = (XawTextPosition)strlen((char *)src->multi_src.string); /* In case the length resource is incorrectly set */ if (src->multi_src.length > src->multi_src.multi_length) - src->multi_src.multi_length = src->multi_src.length; + src->multi_src.multi_length = (int)src->multi_src.length; if (src->multi_src.multi_length == MAGIC_VALUE) src->multi_src.piece_size = src->multi_src.length; @@ -1218,7 +1221,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString) case XawtextAppend: case XawtextEdit: if (src->multi_src.string == NULL) { - src->multi_src.string = "*multi-src*"; + src->multi_src.string = (char *)"*multi-src*"; src->multi_src.is_tempfile = True; } else { @@ -1240,7 +1243,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString) /* If is_tempfile, allocate a private copy of the text * Unlikely to be changed, just to set allocated_string */ if (newString || src->multi_src.is_tempfile) { - String temp = XtNewString((char *)src->multi_src.string); + char * temp = XtNewString((char *)src->multi_src.string); if (src->multi_src.allocated_string) XtFree((char *)src->multi_src.string); @@ -1249,7 +1252,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString) } if (!src->multi_src.is_tempfile) { - if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != -1) { + if ((fd = open((char *)src->multi_src.string, (int)open_mode, 0666)) != -1) { if ((file = fdopen(fd, fdopen_mode)) != NULL) { (void)fseek(file, 0, SEEK_END); src->multi_src.length = (XawTextPosition)ftell(file); @@ -1296,7 +1299,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) * in as MB length, out as WC length. We want local_length to be * WC count. */ - int local_length = src->multi_src.length; + int local_length = (int)src->multi_src.length; if (string != NULL) { /* @@ -1312,24 +1315,24 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) * here, we are not changing the contents, just reloading, * so don't change len... */ - local_length = src->multi_src.string ? - strlen((char *)src->multi_src.string) : 0; + local_length = (int)(src->multi_src.string ? + strlen((char *)src->multi_src.string) : 0); local_str = _XawTextMBToWC(d, (char *)src->multi_src.string, &local_length); } else { if (src->multi_src.length != 0) { temp_mb_holder = - XtMalloc((src->multi_src.length + 1) * sizeof(unsigned char)); + XtMalloc(((size_t)(src->multi_src.length + 1) * sizeof(unsigned char))); fseek(file, 0, SEEK_SET); - src->multi_src.length = fread(temp_mb_holder, + src->multi_src.length = (XawTextPosition)fread(temp_mb_holder, sizeof(unsigned char), (size_t)src->multi_src.length, file); if (src->multi_src.length <= 0) XtAppErrorMsg(XtWidgetToApplicationContext ((Widget) src), "readError", "multiSource", "XawError", "fread returned error.", NULL, NULL); - local_length = src->multi_src.length; + local_length = (int)src->multi_src.length; local_str = _XawTextMBToWC(d, temp_mb_holder, &local_length); src->multi_src.length = local_length; @@ -1349,7 +1352,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) "not representable in this locale.", params, &num_params); src->multi_src.length = sizeof err_text; - local_length = src->multi_src.length; + local_length = (int)src->multi_src.length; local_str = _XawTextMBToWC(d, err_text, &local_length); src->multi_src.length = local_length; } @@ -1378,7 +1381,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) * bytes)); piece->used = Min(left, src->multi_src.piece_size); if (piece->used != 0) - (void)wcsncpy(piece->text, ptr, piece->used); + (void)wcsncpy(piece->text, ptr, (size_t)piece->used); left -= piece->used; ptr += piece->used; @@ -1527,16 +1530,16 @@ BreakPiece(MultiSrcObject src, MultiPiece *piece) MultiPiece *cnew = AllocNewPiece(src, piece); cnew->text = (wchar_t *) - XtMalloc(src->multi_src.piece_size * sizeof(wchar_t)); + XtMalloc((Cardinal)((size_t)src->multi_src.piece_size * sizeof(wchar_t))); (void)wcsncpy(cnew->text, piece->text + HALF_PIECE, - src->multi_src.piece_size - HALF_PIECE); + (size_t)(src->multi_src.piece_size - HALF_PIECE)); piece->used = HALF_PIECE; cnew->used = src->multi_src.piece_size - HALF_PIECE; } /*ARGSUSED*/ static void -CvtStringToMultiType(XrmValuePtr args, Cardinal *num_args, +CvtStringToMultiType(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawAsciiType type = XawAsciiString; @@ -1562,9 +1565,9 @@ CvtStringToMultiType(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtMultiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, +CvtMultiTypeToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal, - XtPointer *data) + XtPointer *data _X_UNUSED) { static String buffer; Cardinal size; @@ -1583,7 +1586,7 @@ CvtMultiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)strlen(buffer) + 1; if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -1600,7 +1603,7 @@ CvtMultiTypeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static void -GetDefaultPieceSize(Widget w, int offset, XrmValue *value) +GetDefaultPieceSize(Widget w _X_UNUSED, int offset _X_UNUSED, XrmValue *value) { static XPointer pagesize; diff --git a/lib/libXaw/src/OS.c b/lib/libXaw/src/OS.c index 4c69005c8..bbd4079c6 100644 --- a/lib/libXaw/src/OS.c +++ b/lib/libXaw/src/OS.c @@ -11,6 +11,12 @@ #include <unistd.h> /* for sysconf(), and getpagesize() */ #endif +#if defined(_WIN32) && !defined(__CYGWIN__) +/* AC_CHECK_FUNCS([getpagesize]) may report a false positive for + getpagesize() when using MinGW gcc, since it's present in libgcc.a */ +#undef HAVE_GETPAGESIZE +#endif + #if defined(linux) /* kernel header doesn't work with -ansi */ /* #include <asm/page.h> *//* for PAGE_SIZE */ @@ -28,12 +34,12 @@ _XawGetPageSize(void) /* Try each supported method in the preferred order */ #if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE) - pagesize = sysconf(_SC_PAGESIZE); + pagesize = (int) sysconf(_SC_PAGESIZE); #endif #ifdef _SC_PAGE_SIZE if (pagesize == -1) - pagesize = sysconf(_SC_PAGE_SIZE); + pagesize = (int) sysconf(_SC_PAGE_SIZE); #endif #ifdef HAVE_GETPAGESIZE diff --git a/lib/libXaw/src/Paned.c b/lib/libXaw/src/Paned.c index 26ff81261..1cd5e4a9f 100644 --- a/lib/libXaw/src/Paned.c +++ b/lib/libXaw/src/Paned.c @@ -256,7 +256,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(v_grip_cursor), XtRString, - "sb_v_double_arrow" + (XtPointer)"sb_v_double_arrow" }, { XtNhorizontalGripCursor, @@ -265,7 +265,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(h_grip_cursor), XtRString, - "sb_h_double_arrow" + (XtPointer)"sb_h_double_arrow" }, { XtNbetweenCursor, @@ -283,7 +283,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(v_adjust_this_cursor), XtRString, - "sb_left_arrow" + (XtPointer)"sb_left_arrow" }, { XtNhorizontalBetweenCursor, @@ -292,7 +292,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(h_adjust_this_cursor), XtRString, - "sb_up_arrow" + (XtPointer)"sb_up_arrow" }, { XtNupperCursor, @@ -301,7 +301,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(adjust_upper_cursor), XtRString, - "sb_up_arrow" + (XtPointer)"sb_up_arrow" }, { XtNlowerCursor, @@ -310,7 +310,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(adjust_lower_cursor), XtRString, - "sb_down_arrow" + (XtPointer)"sb_down_arrow" }, { XtNleftCursor, @@ -319,7 +319,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(adjust_left_cursor), XtRString, - "sb_left_arrow" + (XtPointer)"sb_left_arrow" }, { XtNrightCursor, @@ -328,7 +328,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(adjust_right_cursor), XtRString, - "sb_right_arrow" + (XtPointer)"sb_right_arrow" }, }; #undef offset @@ -506,20 +506,20 @@ AdjustPanedSize(PanedWidget pw, unsigned int off_size, int size = Max(PaneInfo(*childP)->size, (int)PaneInfo(*childP)->min); AssignMin(size, (int)PaneInfo(*childP)->max); - newsize += size + pw->paned.internal_bw; + newsize = (newsize + (size + pw->paned.internal_bw)); } - newsize -= pw->paned.internal_bw; + newsize = (Dimension)(newsize - pw->paned.internal_bw); if (newsize < 1) newsize = 1; if (IsVert(pw)) { - request.width = off_size; + request.width = (Dimension)off_size; request.height = newsize; } else { request.width = newsize; - request.height = off_size; + request.height = (Dimension)off_size; } if (result_ret != NULL) { @@ -530,7 +530,7 @@ AdjustPanedSize(PanedWidget pw, unsigned int off_size, if (newsize == old_size || *result_ret == XtGeometryNo) { *on_size_ret = old_size; - *off_size_ret = off_size; + *off_size_ret = (Dimension)off_size; return; } if (*result_ret != XtGeometryAlmost) { @@ -679,7 +679,7 @@ LoopAndRefigureChildren(PanedWidget pw, int paneindex, Direction dir, * Try to resize this pane so that all panes will fit, take min and max * into account */ - old = pane->size; + old = (Dimension) pane->size; pane->size += pane_size - *sizeused; if (from_stack) { @@ -758,7 +758,7 @@ RefigureLocations(PanedWidget pw, int paneindex, Direction dir) */ if (paneindex != NO_INDEX && dir != AnyPane) { Pane pane = PaneInfo(*(pw->composite.children + paneindex)); - Dimension old = pane->size; + Dimension old = (Dimension)pane->size; pane->size += pane_size - sizeused; AssignMax(pane->size, (int) pane->min); @@ -774,7 +774,7 @@ RefigureLocations(PanedWidget pw, int paneindex, Direction dir) */ ForAllPanes(pw, childP) { PaneInfo(*childP)->delta = loc; - loc += PaneInfo(*childP)->size + pw->paned.internal_bw; + loc = (Position)(loc + (PaneInfo(*childP)->size + pw->paned.internal_bw)); } } @@ -802,7 +802,7 @@ CommitNewLocations(PanedWidget pw) if (IsVert(pw)) { XtMoveWidget(*childP, (Position) 0, pane->delta); - XtResizeWidget(*childP, XtWidth(pw), pane->size, 0); + XtResizeWidget(*childP, XtWidth(pw), (Dimension)pane->size, 0); if (HasGrip(*childP)) { /* Move and Display the Grip */ changes.x = XtWidth(pw) - pw->paned.grip_indent - @@ -814,7 +814,7 @@ CommitNewLocations(PanedWidget pw) } else { XtMoveWidget(*childP, pane->delta, 0); - XtResizeWidget(*childP, pane->size, XtHeight(pw), 0); + XtResizeWidget(*childP, (Dimension)pane->size, (Dimension)XtHeight(pw), 0); if (HasGrip(*childP)) { /* Move and Display the Grip */ changes.x = XtX(*childP) + XtWidth(*childP) - @@ -831,8 +831,8 @@ CommitNewLocations(PanedWidget pw) */ if (HasGrip(*childP)) { - XtX(grip) = changes.x; - XtY(grip) = changes.y; + XtX(grip) = (Position)changes.x; + XtY(grip) = (Position)changes.y; if (XtIsRealized(pane->grip)) XConfigureWindow(XtDisplay(pane->grip), XtWindow(pane->grip), @@ -1165,12 +1165,12 @@ CommitGripAdjustment(PanedWidget pw) if (pw->paned.whichadd) { Pane pane = PaneInfo(pw->paned.whichadd); - pane->wp_size = pane->size; + pane->wp_size = (Dimension)pane->size; } if (pw->paned.whichsub) { Pane pane = PaneInfo(pw->paned.whichsub); - pane->wp_size = pane->size; + pane->wp_size = (Dimension)pane->size; } } @@ -1188,7 +1188,7 @@ CommitGripAdjustment(PanedWidget pw) */ /*ARGSUSED*/ static void -HandleGrip(Widget grip, XtPointer temp, XtPointer callData) +HandleGrip(Widget grip, XtPointer temp _X_UNUSED, XtPointer callData) { XawGripCallData call_data = (XawGripCallData)callData; PanedWidget pw = (PanedWidget) XtParent(grip); @@ -1293,7 +1293,7 @@ ManageAndUnmanageGrips(PanedWidget pw) Widget *managedP, *unmanagedP, *childP; Cardinal alloc_size; - alloc_size = sizeof(Widget) * (pw->composite.num_children >> 1); + alloc_size = (Cardinal)(sizeof(Widget) * (pw->composite.num_children >> 1)); managedP = managed_grips = (WidgetList)XtMalloc(alloc_size); unmanagedP = unmanaged_grips = (WidgetList)XtMalloc(alloc_size); @@ -1307,11 +1307,11 @@ ManageAndUnmanageGrips(PanedWidget pw) if (managedP != managed_grips) { *unmanagedP++ = *--managedP; /* Last grip is never managed */ - XtManageChildren(managed_grips, managedP - managed_grips); + XtManageChildren(managed_grips, (Cardinal)(managedP - managed_grips)); } if (unmanagedP != unmanaged_grips) - XtUnmanageChildren(unmanaged_grips, unmanagedP - unmanaged_grips); + XtUnmanageChildren(unmanaged_grips, (Cardinal)(unmanagedP - unmanaged_grips)); XtFree((char *)managed_grips); XtFree((char *)unmanaged_grips); @@ -1417,11 +1417,11 @@ SetChildrenPrefSizes(PanedWidget pw, unsigned int off_size) else { if(vert) { request.request_mode = CWWidth; - request.width = off_size; + request.width = (Dimension) off_size; } else { request.request_mode = CWHeight; - request.height = off_size; + request.height = (Dimension) off_size; } if ((XtQueryGeometry(*childP, &request, &reply) @@ -1613,15 +1613,15 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, if ((XtIsRealized((Widget)pw) && !pane->allow_resize) || !(mask & (vert ? CWHeight : CWWidth)) - ||(mask & ~(CWWidth | CWHeight)) + || (mask & (XtGeometryMask)(~(CWWidth | CWHeight))) || GetRequestInfo(request, vert) == PaneSize(w, vert)) return (XtGeometryNo); old_paned_size = PaneSize((Widget)pw, vert); old_wpsize = pane->wp_size; - old_size = pane->size; + old_size = (Dimension)pane->size; - pane->wp_size = pane->size = GetRequestInfo(request, vert); + pane->wp_size = (Dimension)(pane->size = GetRequestInfo(request, vert)); AdjustPanedSize(pw, PaneSize((Widget)pw, !vert), &result, &on_size, &off_size); @@ -1645,13 +1645,13 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, */ if (vert) { XtHeight(pw) = old_paned_size; - reply->height = pane->size; + reply->height = (Dimension) pane->size; reply->width = off_size; } else { XtWidth(pw) = old_paned_size; reply->height = off_size; - reply->width = pane->size; + reply->width = (Dimension) pane->size; } /* @@ -1673,7 +1673,7 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, } almost = GetRequestInfo(request, !vert) != GetRequestInfo(reply, !vert); - almost |= (GetRequestInfo(request, vert) != GetRequestInfo(reply, vert)); + almost = (Boolean)(almost | (GetRequestInfo(request, vert) != GetRequestInfo(reply, vert))); if ((mask & XtCWQueryOnly) || almost) { pane->wp_size = old_wpsize; @@ -1693,8 +1693,8 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, /*ARGSUSED*/ static void -XawPanedInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawPanedInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { PanedWidget pw = (PanedWidget)cnew; @@ -1851,15 +1851,15 @@ XawPanedResize(Widget w) /*ARGSUSED*/ static void -XawPanedRedisplay(Widget w, XEvent *event, Region region) +XawPanedRedisplay(Widget w, XEvent *event _X_UNUSED, Region region _X_UNUSED) { DrawInternalBorders((PanedWidget)w); } /*ARGSUSED*/ static Boolean -XawPanedSetValues(Widget old, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawPanedSetValues(Widget old, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { PanedWidget old_pw = (PanedWidget)old; PanedWidget new_pw = (PanedWidget)cnew; @@ -1916,8 +1916,8 @@ XawPanedSetValues(Widget old, Widget request, Widget cnew, /*ARGSUSED*/ static Boolean -XawPanedPaneSetValues(Widget old, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawPanedPaneSetValues(Widget old, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { Pane old_pane = PaneInfo(old); Pane new_pane = PaneInfo(cnew); @@ -1970,8 +1970,8 @@ XawPanedSetMinMax(Widget widget, int min, int max) { Pane pane = PaneInfo(widget); - pane->min = min; - pane->max = max; + pane->min = (Dimension) min; + pane->max = (Dimension) max; RefigureLocationsAndCommit(widget->core.parent); } diff --git a/lib/libXaw/src/Panner.c b/lib/libXaw/src/Panner.c index aa902336e..eada8f9f8 100644 --- a/lib/libXaw/src/Panner.c +++ b/lib/libXaw/src/Panner.c @@ -67,7 +67,7 @@ static void check_knob(PannerWidget, Bool); static void get_default_size(PannerWidget, Dimension*, Dimension*); static Bool get_event_xy(PannerWidget, XEvent*, int*, int*); static void move_shadow(PannerWidget); -static int parse_page_string(char*, int, int, Bool*); +static int parse_page_string(String, int, int, Bool*); static void rescale(PannerWidget); static void reset_shadow_gc(PannerWidget); static void reset_slider_gc(PannerWidget); @@ -323,6 +323,9 @@ PannerClassRec pannerClassRec = { /* simple */ { XtInheritChangeSensitive, /* change_sensitive */ +#ifndef OLDXAW + NULL, +#endif }, /* panner */ { @@ -420,11 +423,9 @@ reset_xor_gc(PannerWidget pw) static void check_knob(PannerWidget pw, Bool knob) { - Position pad = pw->panner.internal_border << 1; - Position maxx = (Position)XtWidth(pw) - pad - - (Position)pw->panner.knob_width; - Position maxy = (Position)XtHeight(pw) - pad - - (Position)pw->panner.knob_height; + Position pad = (Position)(pw->panner.internal_border << 1); + Position maxx = (Position)(XtWidth(pw) - pad - pw->panner.knob_width); + Position maxy = (Position)(XtHeight(pw) - pad - pw->panner.knob_height); Position *x = knob ? &pw->panner.knob_x : &pw->panner.tmp.x; Position *y = knob ? &pw->panner.knob_y : &pw->panner.tmp.y; @@ -461,15 +462,15 @@ move_shadow(PannerWidget pw) if (pw->panner.knob_height > lw && pw->panner.knob_width > lw) { XRectangle *r = pw->panner.shadow_rects; - r->x = pw->panner.knob_x + pad + pw->panner.knob_width; - r->y = pw->panner.knob_y + pad + lw; - r->width = pw->panner.shadow_thickness; - r->height = pw->panner.knob_height - lw; + r->x = (short)(pw->panner.knob_x + pad + pw->panner.knob_width); + r->y = (short)(pw->panner.knob_y + pad + lw); + r->width = (unsigned short)(pw->panner.shadow_thickness); + r->height = (unsigned short)(pw->panner.knob_height - lw); r++; - r->x = pw->panner.knob_x + pad + lw; - r->y = pw->panner.knob_y + pad + pw->panner.knob_height; - r->width = pw->panner.knob_width - lw + pw->panner.shadow_thickness; - r->height = pw->panner.shadow_thickness; + r->x = (short)(pw->panner.knob_x + pad + lw); + r->y = (short)(pw->panner.knob_y + pad + pw->panner.knob_height); + r->width = (unsigned short)(pw->panner.knob_width - lw + pw->panner.shadow_thickness); + r->height = (unsigned short)(pw->panner.shadow_thickness); pw->panner.shadow_valid = True; return; } @@ -528,10 +529,10 @@ rescale(PannerWidget pw) static void get_default_size(PannerWidget pw, Dimension *wp, Dimension *hp) { - Dimension pad = pw->panner.internal_border << 1; + Dimension pad = (Dimension)(pw->panner.internal_border << 1); - *wp = PANNER_DSCALE(pw, pw->panner.canvas_width) + pad; - *hp = PANNER_DSCALE(pw, pw->panner.canvas_height) + pad; + *wp = (Dimension)(PANNER_DSCALE(pw, pw->panner.canvas_width) + pad); + *hp = (Dimension)(PANNER_DSCALE(pw, pw->panner.canvas_height) + pad); } static Bool @@ -565,9 +566,9 @@ get_event_xy(PannerWidget pw, XEvent *event, int *x, int *y) } static int -parse_page_string(char *s, int pagesize, int canvassize, Bool *relative) +parse_page_string(String s, int pagesize, int canvassize, Bool *relative) { - char *cp; + String cp; double val = 1.0; Bool rel = False; @@ -618,10 +619,10 @@ parse_page_string(char *s, int pagesize, int canvassize, Bool *relative) { \ XDrawRectangle(XtDisplay(pw), XtWindow(pw), \ pw->panner.xor_gc, \ - pw->panner.tmp.x + pw->panner.internal_border, \ - pw->panner.tmp.y + pw->panner.internal_border, \ - pw->panner.knob_width - 1, \ - pw->panner.knob_height - 1); \ + (pw->panner.tmp.x + pw->panner.internal_border), \ + (pw->panner.tmp.y + pw->panner.internal_border), \ + (unsigned)(pw->panner.knob_width - 1), \ + (unsigned)(pw->panner.knob_height - 1)); \ pw->panner.tmp.showing = !pw->panner.tmp.showing; \ } @@ -640,7 +641,7 @@ XmuLocatePixmapFile(pw->core.screen, pw->panner.stipple_name, \ /*ARGSUSED*/ static void -XawPannerInitialize(Widget greq, Widget gnew, ArgList args, Cardinal *num_args) +XawPannerInitialize(Widget greq, Widget gnew, ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { PannerWidget req = (PannerWidget)greq, cnew = (PannerWidget)gnew; Dimension defwidth, defheight; @@ -686,7 +687,7 @@ XawPannerRealize(Widget gw, XtValueMask *valuemaskp, if (PIXMAP_OKAY(pm)) { attr->background_pixmap = pm; *valuemaskp |= CWBackPixmap; - *valuemaskp &= ~CWBackPixel; + *valuemaskp &= (XtValueMask)(~CWBackPixel); gotpm = True; } } @@ -721,7 +722,7 @@ XawPannerRedisplay(Widget gw, XEvent *event, Region region) Window w = XtWindow(gw); int pad = pw->panner.internal_border; Dimension lw = pw->panner.line_width; - Dimension extra = pw->panner.shadow_thickness + (lw << 1); + Dimension extra = (Dimension)(pw->panner.shadow_thickness + (lw << 1)); int kx = pw->panner.knob_x + pad, ky = pw->panner.knob_y + pad; if (Superclass->core_class.expose) @@ -731,18 +732,20 @@ XawPannerRedisplay(Widget gw, XEvent *event, Region region) XClearArea(XtDisplay(pw), XtWindow(pw), (int)pw->panner.last_x - ((int)lw) + pad, (int)pw->panner.last_y - ((int)lw) + pad, - pw->panner.knob_width + extra, - pw->panner.knob_height + extra, + (unsigned)(pw->panner.knob_width + extra), + (unsigned)(pw->panner.knob_height + extra), False); pw->panner.last_x = pw->panner.knob_x; pw->panner.last_y = pw->panner.knob_y; XFillRectangle(dpy, w, pw->panner.slider_gc, kx, ky, - pw->panner.knob_width - 1, pw->panner.knob_height - 1); + (unsigned)(pw->panner.knob_width - 1), + (unsigned)(pw->panner.knob_height - 1)); if (lw) XDrawRectangle(dpy, w, pw->panner.shadow_gc, kx, ky, - pw->panner.knob_width - 1, pw->panner.knob_height - 1); + (unsigned)(pw->panner.knob_width - 1), + (unsigned)(pw->panner.knob_height - 1)); if (pw->panner.shadow_valid) XFillRectangles(dpy, w, pw->panner.shadow_gc, pw->panner.shadow_rects, 2); @@ -753,8 +756,8 @@ XawPannerRedisplay(Widget gw, XEvent *event, Region region) /*ARGSUSED*/ static Boolean -XawPannerSetValues(Widget gcur, Widget greq, Widget gnew, - ArgList args, Cardinal *num_args) +XawPannerSetValues(Widget gcur, Widget greq _X_UNUSED, Widget gnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { PannerWidget cur = (PannerWidget)gcur; PannerWidget cnew = (PannerWidget)gnew; @@ -830,7 +833,7 @@ XawPannerSetValues(Widget gcur, Widget greq, Widget gnew, } } - return (redisplay); + return (Boolean)(redisplay); } static void @@ -865,7 +868,7 @@ XawPannerQueryGeometry(Widget gw, XtWidgetGeometry *intended, /*ARGSUSED*/ static void -ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionStart(Widget gw, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { PannerWidget pw = (PannerWidget)gw; int x, y; @@ -878,8 +881,8 @@ ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) pw->panner.tmp.doing = True; pw->panner.tmp.startx = pw->panner.knob_x; pw->panner.tmp.starty = pw->panner.knob_y; - pw->panner.tmp.dx = x - pw->panner.knob_x; - pw->panner.tmp.dy = y - pw->panner.knob_y; + pw->panner.tmp.dx = (Position)(x - pw->panner.knob_x); + pw->panner.tmp.dy = (Position)(y - pw->panner.knob_y); pw->panner.tmp.x = pw->panner.knob_x; pw->panner.tmp.y = pw->panner.knob_y; if (pw->panner.rubber_band) @@ -888,14 +891,14 @@ ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -ActionStop(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionStop(Widget gw, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { PannerWidget pw = (PannerWidget)gw; int x, y; if (get_event_xy(pw, event, &x, &y)) { - pw->panner.tmp.x = x - pw->panner.tmp.dx; - pw->panner.tmp.y = y - pw->panner.tmp.dy; + pw->panner.tmp.x = (Position)(x - pw->panner.tmp.dx); + pw->panner.tmp.y = (Position)(y - pw->panner.tmp.dy); if (!pw->panner.allow_off) check_knob(pw, False); } @@ -939,8 +942,8 @@ ActionMove(Widget gw, XEvent *event, String *params, Cardinal *num_params) if (pw->panner.rubber_band) UNDRAW_TMP(pw); - pw->panner.tmp.x = x - pw->panner.tmp.dx; - pw->panner.tmp.y = y - pw->panner.tmp.dy; + pw->panner.tmp.x = (Position)(x - pw->panner.tmp.dx); + pw->panner.tmp.y = (Position)(y - pw->panner.tmp.dy); if (!pw->panner.rubber_band) ActionNotify(gw, event, params, num_params); @@ -987,8 +990,8 @@ ActionPage(Widget gw, XEvent *event, String *params, Cardinal *num_params) } else { pw->panner.tmp.doing = True; - pw->panner.tmp.x = x; - pw->panner.tmp.y = y; + pw->panner.tmp.x = (Position)x; + pw->panner.tmp.y = (Position)y; ActionNotify(gw, event, NULL, &zero); pw->panner.tmp.doing = False; } @@ -996,7 +999,7 @@ ActionPage(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -ActionNotify(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionNotify(Widget gw, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { PannerWidget pw = (PannerWidget)gw; @@ -1017,14 +1020,14 @@ ActionNotify(Widget gw, XEvent *event, String *params, Cardinal *num_params) Position tmp; if (pw->panner.slider_x - > (tmp = (Position)pw->panner.canvas_width - - (Position)pw->panner.slider_width)) + > (tmp = (Position)(pw->panner.canvas_width - + pw->panner.slider_width))) pw->panner.slider_x = tmp; if (pw->panner.slider_x < 0) pw->panner.slider_x = 0; if (pw->panner.slider_y - > (tmp = (Position)pw->panner.canvas_height - - (Position)pw->panner.slider_height)) + > (tmp = (Position)(pw->panner.canvas_height - + pw->panner.slider_height))) pw->panner.slider_y = tmp; if (pw->panner.slider_y < 0) pw->panner.slider_y = 0; @@ -1048,7 +1051,7 @@ ActionNotify(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -ActionSet(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionSet(Widget gw, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { PannerWidget pw = (PannerWidget)gw; Bool rb; diff --git a/lib/libXaw/src/Pixmap.c b/lib/libXaw/src/Pixmap.c index d2fa1ef02..9798c9c3b 100644 --- a/lib/libXaw/src/Pixmap.c +++ b/lib/libXaw/src/Pixmap.c @@ -213,7 +213,7 @@ XawParseParamsString(String name) ++xaw_params->num_args; xaw_params->args = (XawArgVal **) XtRealloc((char *)xaw_params->args, - sizeof(XawArgVal*) * xaw_params->num_args); + (Cardinal)(sizeof(XawArgVal*) * (size_t)xaw_params->num_args)); } xaw_params->args[xaw_params->num_args - 1] = xaw_arg; } @@ -238,9 +238,9 @@ XawFreeParamsStruct(XawParams *params) for (i = 0; i < params->num_args; i++) { - XtFree(params->args[i]->name); + XtFree((char *)params->args[i]->name); if (params->args[i]->value) - XtFree(params->args[i]->value); + XtFree((char *)params->args[i]->value); XtFree((char *)params->args[i]); } @@ -332,9 +332,9 @@ XawAddPixmapLoader(String type, String ext, XawPixmapLoader loader) { loader_info[i]->loader = loader; if (loader_info[i]->type) - XtFree(loader_info[i]->type); + XtFree((char *)loader_info[i]->type); if (loader_info[i]->ext) - XtFree(loader_info[i]->ext); + XtFree((char *)loader_info[i]->ext); loader_info[i]->type = type ? XtNewString(type) : NULL; loader_info[i]->ext = ext ? XtNewString(ext) : NULL; return (True); @@ -359,7 +359,7 @@ XawAddPixmapLoader(String type, String ext, XawPixmapLoader loader) ++num_loader_info; loader_info = (XawPixmapLoaderInfo**) XtRealloc((char *)loader_info, - sizeof(XawPixmapLoaderInfo) * num_loader_info); + (Cardinal)(sizeof(XawPixmapLoaderInfo) * (size_t)num_loader_info)); } loader_info[num_loader_info - 1] = info; @@ -401,8 +401,8 @@ bcmp_x_cache(register _Xconst void *pixmap, register _Xconst void *xaw) static int qcmp_long(register _Xconst void *left, register _Xconst void *right) { - return ((long)((*(XawCache **)left)->value) - - (long)((*(XawCache **)right)->value)); + return (int)((long)((*(XawCache **)left)->value) - + (long)((*(XawCache **)right)->value)); } static int @@ -415,7 +415,7 @@ qcmp_string(register _Xconst void *left, register _Xconst void *right) static int bcmp_long(register _Xconst void *value, register _Xconst void *cache) { - return ((long)value - (long)((*(XawCache **)cache)->value)); + return (int)((long)value - (long)((*(XawCache **)cache)->value)); } static int @@ -490,7 +490,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth) ++xaw->num_elems; xaw->elems = (XtPointer*) XtRealloc((char *)xaw->elems, - sizeof(XtPointer) * xaw->num_elems); + (Cardinal)(sizeof(XtPointer) * (size_t)xaw->num_elems)); } pcache->value = (long)screen; pcache->elems = NULL; @@ -516,7 +516,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth) ++s_cache->num_elems; s_cache->elems = (XtPointer*) XtRealloc((char *)s_cache->elems, - sizeof(XtPointer) * s_cache->num_elems); + (Cardinal)(sizeof(XtPointer) * s_cache->num_elems)); } pcache->value = (long)colormap; pcache->elems = NULL; @@ -543,7 +543,7 @@ _XawGetCache(XawCache *xaw, Screen *screen, Colormap colormap, int depth) ++c_cache->num_elems; c_cache->elems = (XtPointer*) XtRealloc((char *)c_cache->elems, - sizeof(XtPointer) * c_cache->num_elems); + (Cardinal)(sizeof(XtPointer) * c_cache->num_elems)); } pcache->value = (long)depth; pcache->elems = NULL; @@ -622,8 +622,8 @@ _XawCachePixmap(XawPixmap *pixmap, { ++xaw_cache->num_elems; xaw_cache->elems = (XtPointer*)XtRealloc((char *)xaw_cache->elems, - sizeof(XtPointer) * - xaw_cache->num_elems); + (Cardinal)(sizeof(XtPointer) * + xaw_cache->num_elems)); } xaw_cache->elems[xaw_cache->num_elems - 1] = (XtPointer)pixmap; @@ -641,8 +641,8 @@ _XawCachePixmap(XawPixmap *pixmap, { ++x_cache->num_elems; x_cache->elems = (XtPointer*)XtRealloc((char *)x_cache->elems, - sizeof(XtPointer) * - x_cache->num_elems); + (Cardinal)(sizeof(XtPointer) * + x_cache->num_elems)); } x_cache->elems[x_cache->num_elems - 1] = (XtPointer)pixmap; @@ -679,18 +679,18 @@ GetResourcePixmapPath(Display *display) char *tok, *buffer = XtNewString(value.addr); for (tok = strtok(buffer, ":"); tok; tok = strtok(NULL, ":")) { - int toklen = strlen(tok); + int toklen = (int)strlen(tok); if (toklen) { - pixmap_path = XtRealloc(pixmap_path, length + toklen + 5); + pixmap_path = XtRealloc(pixmap_path, (Cardinal)(length + toklen + 5)); strcpy(pixmap_path + length, tok); if (length) pixmap_path[length++] = ':'; sprintf(pixmap_path + length, "%s/%%N", tok); - length += strlen(tok) + 3; + length = (length + (int)strlen(tok) + 3); } } - pixmap_path = XtRealloc(pixmap_path, length + strlen(default_path) + 2); + pixmap_path = XtRealloc(pixmap_path, (Cardinal)((size_t)length + strlen(default_path) + 2)); if (length) pixmap_path[length++] = ':'; strcpy(pixmap_path + length, default_path); @@ -762,13 +762,13 @@ BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, pixmap = XCreatePixmapFromBitmapData(DisplayOfScreen(screen), RootWindowOfScreen(screen), (char *)data, - width, height, fg, bg, depth); + width, height, fg, bg, (unsigned)depth); if (data) XFree(data); *pixmap_return = pixmap; *mask_return = None; - *width_return = width; - *height_return = height; + *width_return = (Dimension)width; + *height_return = (Dimension)height; retval = True; } @@ -850,8 +850,8 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, if ((pixmap = XCreatePixmap(DisplayOfScreen(screen), RootWindowOfScreen(screen), - orientation == VERTICAL ? 1 : dimension, - orientation == VERTICAL ? dimension : 1, depth)) + (unsigned)(orientation == VERTICAL ? 1 : dimension), + (unsigned)(orientation == VERTICAL ? dimension : 1), (unsigned)depth)) == 0) return (False); @@ -916,8 +916,8 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, *pixmap_return = pixmap; *mask_return = None; - *width_return = orientation == VERTICAL ? 1 : dimension; - *height_return = orientation == VERTICAL ? dimension : 1; + *width_return = (Dimension)(orientation == VERTICAL ? 1 : dimension); + *height_return = (Dimension)(orientation == VERTICAL ? dimension : 1); XFreeGC(DisplayOfScreen(screen), gc); @@ -925,7 +925,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, } static Bool -XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, +XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth _X_UNUSED, Pixmap *pixmap_return, Pixmap *mask_return, Dimension *width_return, Dimension *height_return) { @@ -938,11 +938,11 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, {'T', "pixmaps"}, {'P', PROJECT_ROOT}, }; - char *filename; + const char *filename; if ((argval = XawFindArgVal(params, "closeness")) != NULL && argval->value) - closeness = atoi(argval->value); + closeness = (unsigned)atoi(argval->value); if (params->name[0] != '/' && params->name[0] != '.') { @@ -965,8 +965,8 @@ XPixmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, RootWindowOfScreen(screen), filename, pixmap_return, mask_return, &xpm_attributes) == XpmSuccess) { - *width_return = xpm_attributes.width; - *height_return = xpm_attributes.height; + *width_return = (Dimension)xpm_attributes.width; + *height_return = (Dimension)xpm_attributes.height; return (True); } diff --git a/lib/libXaw/src/Porthole.c b/lib/libXaw/src/Porthole.c index 4842e70d7..c87be98b5 100644 --- a/lib/libXaw/src/Porthole.c +++ b/lib/libXaw/src/Porthole.c @@ -156,8 +156,8 @@ SendReport(PortholeWidget pw, unsigned int changed) XawPannerReport prep; prep.changed = changed; - prep.slider_x = -XtX(child); /* porthole is "inner" */ - prep.slider_y = -XtY(child); /* child is outer since it is larger */ + prep.slider_x = (Position)(-XtX(child)); /* porthole is "inner" */ + prep.slider_y = (Position)(-XtY(child)); /* child is outer since it is larger */ prep.slider_width = XtWidth(pw); prep.slider_height = XtHeight(pw); prep.canvas_width = XtWidth(child); @@ -199,8 +199,8 @@ layout_child(PortholeWidget pw, Widget child, XtWidgetGeometry *geomp, * Make sure that the child is still on the screen. Note that this must * be done *after* the size computation so that we know where to put it */ - minx = (Position)XtWidth(pw) - (Position)*widthp; - miny = (Position)XtHeight(pw) - (Position)*heightp; + minx = (Position)(XtWidth(pw) - *widthp); + miny = (Position)(XtHeight(pw) - *heightp); if (*xp < minx) *xp = minx; diff --git a/lib/libXaw/src/Private.h b/lib/libXaw/src/Private.h index ca70d5f30..9067204de 100644 --- a/lib/libXaw/src/Private.h +++ b/lib/libXaw/src/Private.h @@ -35,7 +35,7 @@ #define XawStackAlloc(size, stk_buffer) \ ((size) <= sizeof(stk_buffer) \ ? (XtPointer)(stk_buffer) \ - : XtMalloc((unsigned)(size))) + : XtMalloc((Cardinal)(size))) #define XawStackFree(pointer, stk_buffer) \ do { \ diff --git a/lib/libXaw/src/Repeater.c b/lib/libXaw/src/Repeater.c index 9b16ced7c..19537b428 100644 --- a/lib/libXaw/src/Repeater.c +++ b/lib/libXaw/src/Repeater.c @@ -213,7 +213,7 @@ WidgetClass repeaterWidgetClass = (WidgetClass) &repeaterClassRec; */ /*ARGSUSED*/ static void -tic(XtPointer client_data, XtIntervalId *id) +tic(XtPointer client_data, XtIntervalId *id _X_UNUSED) { RepeaterWidget rw = (RepeaterWidget)client_data; @@ -228,7 +228,7 @@ tic(XtPointer client_data, XtIntervalId *id) } DO_CALLBACK(rw); - rw->repeater.timer = ADD_TIMEOUT(rw, rw->repeater.next_delay); + rw->repeater.timer = ADD_TIMEOUT(rw, (unsigned long)rw->repeater.next_delay); if (rw->repeater.decay) { rw->repeater.next_delay -= rw->repeater.decay; @@ -239,8 +239,8 @@ tic(XtPointer client_data, XtIntervalId *id) /*ARGSUSED*/ static void -XawRepeaterInitialize(Widget greq, Widget gnew, - ArgList args, Cardinal *num_args) +XawRepeaterInitialize(Widget greq _X_UNUSED, Widget gnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { RepeaterWidget cnew = (RepeaterWidget)gnew; @@ -257,8 +257,8 @@ XawRepeaterDestroy(Widget gw) /*ARGSUSED*/ static Boolean -XawRepeaterSetValues(Widget gcur, Widget greq, Widget gnew, - ArgList args, Cardinal *num_args) +XawRepeaterSetValues(Widget gcur, Widget greq _X_UNUSED, Widget gnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { RepeaterWidget cur = (RepeaterWidget)gcur; RepeaterWidget cnew = (RepeaterWidget)gnew; @@ -273,7 +273,7 @@ XawRepeaterSetValues(Widget gcur, Widget greq, Widget gnew, /*ARGSUSED*/ static void -ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionStart(Widget gw, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { RepeaterWidget rw = (RepeaterWidget)gw; @@ -282,13 +282,13 @@ ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) XtCallCallbackList(gw, rw->repeater.start_callbacks, NULL); DO_CALLBACK(rw); - rw->repeater.timer = ADD_TIMEOUT(rw, rw->repeater.initial_delay); + rw->repeater.timer = ADD_TIMEOUT(rw, (unsigned long)rw->repeater.initial_delay); rw->repeater.next_delay = rw->repeater.repeat_delay; } /*ARGSUSED*/ static void -ActionStop(Widget gw, XEvent *event, String *params, Cardinal *num_params) +ActionStop(Widget gw, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { RepeaterWidget rw = (RepeaterWidget)gw; diff --git a/lib/libXaw/src/Scrollbar.c b/lib/libXaw/src/Scrollbar.c index 894a945d2..855013db5 100644 --- a/lib/libXaw/src/Scrollbar.c +++ b/lib/libXaw/src/Scrollbar.c @@ -102,6 +102,8 @@ static char defaultTranslations[] = "<Btn1Down>:" "StartScroll(Forward)\n" "<Btn2Down>:" "StartScroll(Continuous) MoveThumb() NotifyThumb()\n" "<Btn3Down>:" "StartScroll(Backward)\n" +"<Btn4Down>:" "StartScroll(Backward)\n" +"<Btn5Down>:" "StartScroll(Forward)\n" "<Btn2Motion>:" "MoveThumb() NotifyThumb()\n" "<BtnUp>:" "NotifyScroll(Proportional) EndScroll()\n"; @@ -180,7 +182,7 @@ static XtResource resources[] = { sizeof(Pixel), Offset(scrollbar.foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNshown, @@ -207,7 +209,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.verCursor), XtRString, - "sb_v_double_arrow" + (XtPointer)"sb_v_double_arrow" }, { XtNscrollHCursor, @@ -216,7 +218,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.horCursor), XtRString, - "sb_h_double_arrow" + (XtPointer)"sb_h_double_arrow" }, { XtNscrollUCursor, @@ -225,7 +227,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.upCursor), XtRString, - "sb_up_arrow" + (XtPointer)"sb_up_arrow" }, { XtNscrollDCursor, @@ -234,7 +236,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.downCursor), XtRString, - "sb_down_arrow" + (XtPointer)"sb_down_arrow" }, { XtNscrollLCursor, @@ -243,7 +245,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.leftCursor), XtRString, - "sb_left_arrow" + (XtPointer)"sb_left_arrow" }, { XtNscrollRCursor, @@ -252,7 +254,7 @@ static XtResource resources[] = { sizeof(Cursor), Offset(scrollbar.rightCursor), XtRString, - "sb_right_arrow" + (XtPointer)"sb_right_arrow" }, { XtNminimumThumb, @@ -361,7 +363,7 @@ FractionLoc(ScrollbarWidget w, int x, int y) { float result; - result = PICKLENGTH(w, x / (float)XtWidth(w), y / (float)XtHeight(w)); + result = PICKLENGTH(w, (float)x / (float)XtWidth(w), (float)y / (float)XtHeight(w)); return (FloatInRange(result, 0.0, 1.0)); } @@ -380,26 +382,26 @@ FillArea(ScrollbarWidget w, int top, int bottom, int thumb) if (bottom <= top) return; - length = bottom - top; + length = (Dimension)(bottom - top); switch(thumb) { /* Fill the new Thumb location */ case 1: if (w->scrollbar.orientation == XtorientHorizontal) XFillRectangle(XtDisplay(w), XtWindow(w), w->scrollbar.gc, - top, 1, length, XtHeight(w) - 2); + top, 1, length, (unsigned)(XtHeight(w) - 2)); else XFillRectangle(XtDisplay(w), XtWindow(w), w->scrollbar.gc, - 1, top, XtWidth(w) - 2, length); + 1, top, (unsigned)(XtWidth(w) - 2), length); break; /* Clear the old Thumb location */ case 0: if (w->scrollbar.orientation == XtorientHorizontal) XClearArea(XtDisplay(w), XtWindow(w), - top, 1, length, XtHeight(w) - 2, False); + top, 1, length, (unsigned)(XtHeight(w) - 2), False); else XClearArea(XtDisplay(w), XtWindow(w), - 1, top, XtWidth(w) - 2, length, False); + 1, top, (unsigned)(XtWidth(w) - 2), length, False); break; } } @@ -414,13 +416,13 @@ PaintThumb(ScrollbarWidget w) Position oldtop, oldbot, newtop, newbot; oldtop = w->scrollbar.topLoc; - oldbot = oldtop + w->scrollbar.shownLength; - newtop = w->scrollbar.length * w->scrollbar.top; - newbot = newtop + (int)(w->scrollbar.length * w->scrollbar.shown); + oldbot = (Position)(oldtop + w->scrollbar.shownLength); + newtop = (Position)(w->scrollbar.length * w->scrollbar.top); + newbot = (Position)(newtop + (int)(w->scrollbar.length * w->scrollbar.shown)); if (newbot < newtop + (int)w->scrollbar.min_thumb) - newbot = newtop + w->scrollbar.min_thumb; + newbot = (Position)(newtop + w->scrollbar.min_thumb); w->scrollbar.topLoc = newtop; - w->scrollbar.shownLength = newbot - newtop; + w->scrollbar.shownLength = (Dimension)(newbot - newtop); if (XtIsRealized((Widget)w)) { if (newtop < oldtop) @@ -497,8 +499,8 @@ CreateGC(Widget w) /* ARGSUSED */ static void -XawScrollbarInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawScrollbarInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ScrollbarWidget w = (ScrollbarWidget)cnew; @@ -538,8 +540,8 @@ XawScrollbarRealize(Widget gw, Mask *valueMask, /*ARGSUSED*/ static Boolean -XawScrollbarSetValues(Widget current, Widget request, Widget desired, - ArgList args, Cardinal *num_args) +XawScrollbarSetValues(Widget current, Widget request _X_UNUSED, Widget desired, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ScrollbarWidget w = (ScrollbarWidget)current; ScrollbarWidget dw = (ScrollbarWidget)desired; @@ -593,27 +595,27 @@ XawScrollbarRedisplay(Widget gw, XEvent *event, Region region) if (w->scrollbar.orientation == XtorientHorizontal) { x = w->scrollbar.topLoc; y = 1; - width = w->scrollbar.shownLength; - height = XtHeight(w) - 2; + width = (unsigned)(w->scrollbar.shownLength); + height = (unsigned)(XtHeight(w) - 2); } else { x = 1; y = w->scrollbar.topLoc; - width = XtWidth(w) - 2; - height = w->scrollbar.shownLength; + width = (unsigned)(XtWidth(w) - 2); + height = (unsigned)(w->scrollbar.shownLength); } if (region == NULL || XRectInRegion(region, x, y, width, height) != RectangleOut) { /* Forces entire thumb to be painted */ - w->scrollbar.topLoc = -(w->scrollbar.length + 1); + w->scrollbar.topLoc = (Position)(-(w->scrollbar.length + 1)); PaintThumb(w); } } /*ARGSUSED*/ static void -StartScroll(Widget gw, XEvent *event, String *params, Cardinal *num_params) +StartScroll(Widget gw, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { ScrollbarWidget w = (ScrollbarWidget)gw; Cursor cursor; @@ -727,23 +729,23 @@ ExtractPosition(XEvent *event, Position *x, Position *y) { switch(event->type) { case MotionNotify: - *x = event->xmotion.x; - *y = event->xmotion.y; + *x = (Position)event->xmotion.x; + *y = (Position)event->xmotion.y; break; case ButtonPress: case ButtonRelease: - *x = event->xbutton.x; - *y = event->xbutton.y; + *x = (Position)event->xbutton.x; + *y = (Position)event->xbutton.y; break; case KeyPress: case KeyRelease: - *x = event->xkey.x; - *y = event->xkey.y; + *x = (Position)event->xkey.x; + *y = (Position)event->xkey.y; break; case EnterNotify: case LeaveNotify: - *x = event->xcrossing.x; - *y = event->xcrossing.y; + *x = (Position)event->xcrossing.x; + *y = (Position)event->xcrossing.y; break; default: *x = 0; @@ -800,7 +802,7 @@ NotifyScroll(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -EndScroll(Widget gw, XEvent *event, String *params, Cardinal *num_params) +EndScroll(Widget gw, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ScrollbarWidget w = (ScrollbarWidget)gw; @@ -812,7 +814,7 @@ EndScroll(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -MoveThumb(Widget gw, XEvent *event, String *params, Cardinal *num_params) +MoveThumb(Widget gw, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ScrollbarWidget w = (ScrollbarWidget)gw; Position x, y; @@ -832,7 +834,7 @@ MoveThumb(Widget gw, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -NotifyThumb(Widget gw, XEvent *event, String *params, Cardinal *num_params) +NotifyThumb(Widget gw, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ScrollbarWidget w = (ScrollbarWidget)gw; union { @@ -874,9 +876,16 @@ XawScrollbarSetThumb(Widget gw, if (w->scrollbar.direction == 'c') /* if still thumbing */ return; - w->scrollbar.top = top > 1.0 ? 1.0 : top >= 0.0 ? top : w->scrollbar.top; - - w->scrollbar.shown = shown > 1.0 ? 1.0 : shown >= 0.0 ? - shown : w->scrollbar.shown; + w->scrollbar.top = (float)((top > 1.0) + ? 1.0 + : ((top >= 0.0) + ? top + : w->scrollbar.top)); + + w->scrollbar.shown = (float)((shown > 1.0) + ? 1.0 + : (shown >= 0.0 + ? shown + : w->scrollbar.shown)); PaintThumb(w); } diff --git a/lib/libXaw/src/Simple.c b/lib/libXaw/src/Simple.c index be5597b2b..ae322cb48 100644 --- a/lib/libXaw/src/Simple.c +++ b/lib/libXaw/src/Simple.c @@ -117,7 +117,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(pointer_fg), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNpointerColorBackground, @@ -126,7 +126,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(pointer_bg), XtRString, - XtDefaultBackground + (XtPointer)XtDefaultBackground }, { XtNcursorName, @@ -286,8 +286,8 @@ XawSimpleClassPartInitialize(WidgetClass cclass) #ifndef OLDXAW /*ARGSUSED*/ static void -XawSimpleInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSimpleInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SimpleWidget simple = (SimpleWidget)cnew; @@ -328,7 +328,7 @@ XawSimpleRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) w->core.border_pixmap = ((SimpleWidget)w)->simple.insensitive_border; *valueMask |= CWBorderPixmap; - *valueMask &= ~CWBorderPixel; + *valueMask &= (Mask)(~CWBorderPixel); } ConvertCursor(w); @@ -345,7 +345,7 @@ XawSimpleRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) #ifndef OLDXAW if (w->core.background_pixmap > XtUnspecifiedPixmap) { pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), - w->core.colormap, w->core.depth); + w->core.colormap, (int)w->core.depth); if (pixmap && pixmap->mask) XawReshapeWidget(w, pixmap); } @@ -376,7 +376,7 @@ ConvertCursor(Widget w) return; from.addr = (XPointer)simple->simple.cursor_name; - from.size = strlen((char *)from.addr) + 1; + from.size = (unsigned)strlen((char *)from.addr) + 1; to.size = sizeof(Cursor); to.addr = (XPointer)&cursor; @@ -393,8 +393,8 @@ ConvertCursor(Widget w) /*ARGSUSED*/ static Boolean -XawSimpleSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSimpleSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SimpleWidget s_old = (SimpleWidget)current; SimpleWidget s_new = (SimpleWidget)cnew; @@ -434,10 +434,10 @@ XawSimpleSetValues(Widget current, Widget request, Widget cnew, opix = XawPixmapFromXPixmap(s_old->core.background_pixmap, XtScreen(s_old), s_old->core.colormap, - s_old->core.depth); + (int)s_old->core.depth); npix = XawPixmapFromXPixmap(s_new->core.background_pixmap, XtScreen(s_new), s_new->core.colormap, - s_new->core.depth); + (int)s_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); } diff --git a/lib/libXaw/src/SimpleMenu.c b/lib/libXaw/src/SimpleMenu.c index 8defdf7d3..89711b9a5 100644 --- a/lib/libXaw/src/SimpleMenu.c +++ b/lib/libXaw/src/SimpleMenu.c @@ -390,8 +390,8 @@ XawSimpleMenuClassPartInitialize(WidgetClass wc) */ /*ARGSUSED*/ static void -XawSimpleMenuInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSimpleMenuInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SimpleMenuWidget smw = (SimpleMenuWidget)cnew; Dimension width, height; @@ -451,7 +451,7 @@ XawSimpleMenuInitialize(Widget request, Widget cnew, */ /*ARGSUSED*/ static void -XawSimpleMenuRedisplay(Widget w, XEvent *event, Region region) +XawSimpleMenuRedisplay(Widget w, XEvent *event _X_UNUSED, Region region) { SimpleMenuWidget smw = (SimpleMenuWidget)w; SmeObject *entry; @@ -518,14 +518,14 @@ XawSimpleMenuRealize(Widget w, XtValueMask *mask, XSetWindowAttributes *attrs) attrs->backing_store = smw->simple_menu.backing_store; } else - *mask &= ~CWBackingStore; + *mask &= (XtValueMask)(~CWBackingStore); (*Superclass->core_class.realize)(w, mask, attrs); #ifndef OLDXAW if (w->core.background_pixmap > XtUnspecifiedPixmap) { pixmap = XawPixmapFromXPixmap(w->core.background_pixmap, XtScreen(w), - w->core.colormap, w->core.depth); + w->core.colormap, (int)w->core.depth); if (pixmap && pixmap->mask) XawReshapeWidget(w, pixmap); } @@ -567,8 +567,8 @@ XawSimpleMenuResize(Widget w) */ /*ARGSUSED*/ static Boolean -XawSimpleMenuSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSimpleMenuSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SimpleMenuWidget smw_old = (SimpleMenuWidget)current; SimpleMenuWidget smw_new = (SimpleMenuWidget)cnew; @@ -622,10 +622,10 @@ XawSimpleMenuSetValues(Widget current, Widget request, Widget cnew, opix = XawPixmapFromXPixmap(smw_old->core.background_pixmap, XtScreen(smw_old), smw_old->core.colormap, - smw_old->core.depth); + (int)smw_old->core.depth); npix = XawPixmapFromXPixmap(smw_new->core.background_pixmap, XtScreen(smw_new), smw_new->core.colormap, - smw_new->core.depth); + (int)smw_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); } @@ -814,19 +814,19 @@ PositionMenuAction(Widget w, XEvent *event, switch (event->type) { case ButtonPress: case ButtonRelease: - loc.x = event->xbutton.x_root; - loc.y = event->xbutton.y_root; + loc.x = (short)event->xbutton.x_root; + loc.y = (short)event->xbutton.y_root; PositionMenu(menu, &loc); break; case EnterNotify: case LeaveNotify: - loc.x = event->xcrossing.x_root; - loc.y = event->xcrossing.y_root; + loc.x = (short)event->xcrossing.x_root; + loc.y = (short)event->xcrossing.y_root; PositionMenu(menu, &loc); break; case MotionNotify: - loc.x = event->xmotion.x_root; - loc.y = event->xmotion.y_root; + loc.x = (short)event->xmotion.x_root; + loc.y = (short)event->xmotion.y_root; PositionMenu(menu, &loc); break; default: @@ -853,7 +853,7 @@ PositionMenuAction(Widget w, XEvent *event, */ /*ARGSUSED*/ static void -Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) +Unhighlight(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { SimpleMenuWidget smw = (SimpleMenuWidget)w; SmeObject entry = smw->simple_menu.entry_set; @@ -952,7 +952,7 @@ Highlight(Widget w, XEvent *event, String *params, Cardinal *num_params) */ /*ARGSUSED*/ static void -Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) +Notify(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { SmeObject entry; SmeObjectClass cclass; @@ -1065,7 +1065,7 @@ CreateLabel(Widget w) next_child = NULL; for (child = smw->composite.children + smw->composite.num_children, - i = smw->composite.num_children; i > 0; i--, child--) { + i = (int)smw->composite.num_children; i > 0; i--, child--) { if (next_child != NULL) *next_child = *child; next_child = child; @@ -1156,17 +1156,17 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) widths = (Dimension *)XtMalloc(sizeof(Dimension)); #ifndef OLDXAW - hadd = smw->simple_menu.left_margin; + hadd = (short)smw->simple_menu.left_margin; #else hadd = 0; #endif - vadd = smw->simple_menu.top_margin; + vadd = (short)smw->simple_menu.top_margin; if (smw->simple_menu.label) - vadd += XtHeight(smw->simple_menu.label); + vadd = (short)(vadd + XtHeight(smw->simple_menu.label)); count = 1; - width = tmp_w = tmp_h = n = 0; - height = vadd; + width = (Dimension)(tmp_w = tmp_h = (int)(n = 0)); + height = (Dimension)vadd; for (i = smw->simple_menu.label ? 1 : 0; i < smw->composite.num_children; @@ -1181,38 +1181,38 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) > XtHeight(smw))) { ++count; widths = (Dimension *)XtRealloc((char *)widths, - sizeof(Dimension) * count); - widths[count - 1] = width_kid; - width += tmp_w; + (Cardinal)(sizeof(Dimension) * count)); + widths[count - 1] = (Dimension)width_kid; + width = (Dimension)(width + tmp_w); tmp_w = width_kid; - height = height_kid + vadd; + height = (Dimension)(height_kid + vadd); } else - height += height_kid; + height = (Dimension)(height + height_kid); if (height > tmp_h) tmp_h = height; if (width_kid > tmp_w) - widths[count - 1] = tmp_w = width_kid; + widths[count - 1] = (Dimension)(tmp_w = width_kid); ++n; } - height = tmp_h + smw->simple_menu.bottom_margin; - width += tmp_w; + height = (tmp_h + smw->simple_menu.bottom_margin); + width = (Dimension)(width + tmp_w); if (smw->simple_menu.label && width < XtWidth(smw->simple_menu.label)) { float inc; - inc = (XtWidth(smw->simple_menu.label) - width) / (float)count; + inc = (float)(XtWidth(smw->simple_menu.label) - width) / (float)count; width = XtWidth(smw->simple_menu.label); for (n = 0; n < count; n++) - widths[n] += inc; + widths[n] = (Dimension)(widths[n] + inc); } #ifndef OLDXAW - width += hadd + smw->simple_menu.right_margin; + width = (Dimension)(width + (hadd + smw->simple_menu.right_margin)); #endif - x_ins = n = count = 0; + x_ins = (short)(n = count = 0); tmp_w = widths[0]; tmp_h = vadd; @@ -1227,19 +1227,19 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) if (n && (tmp_h + height_kid + smw->simple_menu.bottom_margin > XtHeight(smw))) { - x_ins = tmp_w; + x_ins = (short)tmp_w; y_ins = vadd; ++count; tmp_w += widths[count]; tmp_h = height_kid + vadd; } else { - y_ins = tmp_h; + y_ins = (short)tmp_h; tmp_h += height_kid; } ++n; - XtX(kid) = x_ins + hadd; + XtX(kid) = (Position)(x_ins + hadd); XtY(kid) = y_ins; XtWidth(kid) = widths[count]; } @@ -1251,12 +1251,12 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) if (smw->simple_menu.label) { XtX(smw->simple_menu.label) = 0; - XtY(smw->simple_menu.label) = smw->simple_menu.top_margin; - XtWidth(smw->simple_menu.label) = XtWidth(smw) + XtY(smw->simple_menu.label) = (Position)smw->simple_menu.top_margin; + XtWidth(smw->simple_menu.label) = (Dimension)(XtWidth(smw) #ifndef OLDXAW - (smw->simple_menu.left_margin + smw->simple_menu.right_margin) #endif - ; + ); } if (current_entry) { if (width_ret) @@ -1280,7 +1280,7 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) */ /*ARGSUSED*/ static void -AddPositionAction(XtAppContext app_con, XPointer data) +AddPositionAction(XtAppContext app_con, XPointer data _X_UNUSED) { static XtActionsRec pos_action[] = { {"XawPositionSimpleMenu", PositionMenuAction}, @@ -1355,7 +1355,7 @@ PositionMenu(Widget w, XPoint *location) */ XtRealizeWidget(w); - location->x -= XtWidth(w) >> 1; + location->x = (short)(location->x - (XtWidth(w) >> 1)); if (smw->simple_menu.popup_entry == NULL) entry = smw->simple_menu.label; @@ -1363,7 +1363,7 @@ PositionMenu(Widget w, XPoint *location) entry = smw->simple_menu.popup_entry; if (entry != NULL) - location->y -= XtY(entry) + (XtHeight(entry) >> 1); + location->y = (short)(location->y - (XtY(entry) + (XtHeight(entry) >> 1))); MoveMenu(w, location->x, location->y); } @@ -1431,7 +1431,7 @@ MoveMenu(Widget w, int x, int y) */ /*ARGSUSED*/ static void -ChangeCursorOnGrab(Widget w, XtPointer temp1, XtPointer temp2) +ChangeCursorOnGrab(Widget w, XtPointer temp1 _X_UNUSED, XtPointer temp2 _X_UNUSED) { SimpleMenuWidget smw = (SimpleMenuWidget)w; @@ -1596,7 +1596,7 @@ GetEventEntry(Widget w, XEvent *event) move = warp = 0; if (move) - XtMoveWidget(w, XtX(w) + move, XtY(w)); + XtMoveWidget(w, (Position)(XtX(w) + move), XtY(w)); if (warp) XWarpPointer(XtDisplay(w), None, None, 0, 0, 0, 0, warp, 0); @@ -1616,13 +1616,13 @@ CalculateNewSize(Widget w, Dimension *width_return, Dimension *height_return) Boolean try_layout = False; #ifndef OLDXAW - hadd = xaw->simple_menu.left_margin + xaw->simple_menu.right_margin; + hadd = (short)(xaw->simple_menu.left_margin + xaw->simple_menu.right_margin); #else hadd = 0; #endif - vadd = xaw->simple_menu.top_margin + xaw->simple_menu.bottom_margin; + vadd = (short)(xaw->simple_menu.top_margin + xaw->simple_menu.bottom_margin); if (xaw->simple_menu.label) - vadd += XtHeight(xaw->simple_menu.label); + vadd = (short)(vadd + XtHeight(xaw->simple_menu.label)); if (*height_return) max_dim = *height_return; @@ -1674,8 +1674,8 @@ CalculateNewSize(Widget w, Dimension *width_return, Dimension *height_return) if (xaw->simple_menu.label) width = XawMax(width, XtWidth(xaw->simple_menu.label) + hadd); - *width_return = width; - *height_return = height; + *width_return = (Dimension)width; + *height_return = (Dimension)height; if (try_layout && columns > 1 && num_children > 2) { int space; @@ -1690,7 +1690,7 @@ CalculateNewSize(Widget w, Dimension *width_return, Dimension *height_return) height = max_dim - space / columns; if (height % test_h) height += test_h - (height % test_h); - *height_return = height + vadd; + *height_return = (Dimension)(height + vadd); CalculateNewSize(w, width_return, height_return); } } @@ -1762,17 +1762,21 @@ PopupSubMenu(SimpleMenuWidget smw) popleft = (smw->simple_menu.state & SMW_POPLEFT) != 0; if (popleft) - XtTranslateCoords((Widget)smw, -(int)XtWidth(menu), - XtY(entry) - XtBorderWidth(menu), &menu_x, &menu_y); + XtTranslateCoords((Widget)smw, + (Position)(-(int)XtWidth(menu)), + (Position)(XtY(entry) - XtBorderWidth(menu)), + &menu_x, &menu_y); else - XtTranslateCoords((Widget)smw, XtWidth(smw), XtY(entry) - - XtBorderWidth(menu), &menu_x, &menu_y); + XtTranslateCoords((Widget)smw, + (Position)XtWidth(smw), + (Position)(XtY(entry) - XtBorderWidth(menu)), + &menu_x, &menu_y); if (!popleft && menu_x >= 0) { int scr_width = WidthOfScreen(XtScreen(menu)); if (menu_x + XtWidth(menu) > scr_width) { - menu_x -= XtWidth(menu) + XtWidth(smw); + menu_x = (Position)(menu_x - (XtWidth(menu) + XtWidth(smw))); popleft = True; } } @@ -1784,7 +1788,7 @@ PopupSubMenu(SimpleMenuWidget smw) int scr_height = HeightOfScreen(XtScreen(menu)); if (menu_y + XtHeight(menu) > scr_height) - menu_y = scr_height - XtHeight(menu) - XtBorderWidth(menu); + menu_y = (Position)(scr_height - XtHeight(menu) - XtBorderWidth(menu)); } if (menu_y < 0) menu_y = 0; @@ -1797,7 +1801,7 @@ PopupSubMenu(SimpleMenuWidget smw) if (popleft) ((SimpleMenuWidget)menu)->simple_menu.state |= SMW_POPLEFT; else - ((SimpleMenuWidget)menu)->simple_menu.state &= ~SMW_POPLEFT; + ((SimpleMenuWidget)menu)->simple_menu.state &= (unsigned char)(~SMW_POPLEFT); XtPopup(menu, XtGrabNone); } @@ -1820,10 +1824,10 @@ PopdownSubMenu(SimpleMenuWidget smw) /*ARGSUSED*/ static void -PopupCB(Widget w, XtPointer client_data, XtPointer call_data) +PopupCB(Widget w, XtPointer client_data _X_UNUSED, XtPointer call_data _X_UNUSED) { SimpleMenuWidget smw = (SimpleMenuWidget)w; - smw->simple_menu.state &= ~(SMW_UNMAPPING | SMW_POPLEFT); + smw->simple_menu.state &= (unsigned char)(~(SMW_UNMAPPING | SMW_POPLEFT)); } #endif /* OLDXAW */ diff --git a/lib/libXaw/src/Sme.c b/lib/libXaw/src/Sme.c index 24d4fedb2..7814eb8ba 100644 --- a/lib/libXaw/src/Sme.c +++ b/lib/libXaw/src/Sme.c @@ -170,8 +170,8 @@ XawSmeClassPartInitialize(WidgetClass cclass) */ /*ARGSUSED*/ static void -XawSmeInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSmeInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SmeObject entry = (SmeObject)cnew; @@ -190,7 +190,7 @@ XawSmeInitialize(Widget request, Widget cnew, */ /*ARGSUSED*/ static void -Highlight(Widget w) +Highlight(Widget w _X_UNUSED) { } @@ -206,7 +206,7 @@ Highlight(Widget w) */ /*ARGSUSED*/ static void -Unhighlight(Widget w) +Unhighlight(Widget w _X_UNUSED) { } diff --git a/lib/libXaw/src/SmeBSB.c b/lib/libXaw/src/SmeBSB.c index 52a789ae8..380a21555 100644 --- a/lib/libXaw/src/SmeBSB.c +++ b/lib/libXaw/src/SmeBSB.c @@ -145,7 +145,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNfont, @@ -154,7 +154,7 @@ static XtResource resources[] = { sizeof(XFontStruct*), offset(font), XtRString, - XtDefaultFont + (XtPointer)XtDefaultFont }, { XtNfontSet, @@ -163,7 +163,7 @@ static XtResource resources[] = { sizeof(XFontSet), offset(fontset), XtRString, - XtDefaultFontSet + (XtPointer)XtDefaultFontSet }, #ifndef OLDXAW { @@ -259,8 +259,8 @@ XawSmeBSBClassInitialize(void) */ /*ARGSUSED*/ static void -XawSmeBSBInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSmeBSBInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SmeBSBObject entry = (SmeBSBObject)cnew; @@ -295,7 +295,7 @@ XawSmeBSBDestroy(Widget w) DestroyGCs(w); if (entry->sme_bsb.label != XtName(w)) - XtFree(entry->sme_bsb.label); + XtFree((char *)entry->sme_bsb.label); } /* @@ -312,7 +312,7 @@ XawSmeBSBDestroy(Widget w) */ /* ARGSUSED */ static void -XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) +XawSmeBSBRedisplay(Widget w, XEvent *event _X_UNUSED, Region region _X_UNUSED) { GC gc; SmeBSBObject entry = (SmeBSBObject)w; @@ -348,8 +348,8 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) if (entry->sme_bsb.label != NULL) { int x_loc = entry->sme_bsb.left_margin; - int len = strlen(entry->sme_bsb.label); - char *label = entry->sme_bsb.label; + int len = (int)strlen(entry->sme_bsb.label); + _Xconst char *label = entry->sme_bsb.label; int width, t_width; switch(entry->sme_bsb.justify) { @@ -424,8 +424,8 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) /*ARGSUSED*/ static Boolean -XawSmeBSBSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSmeBSBSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SmeBSBObject entry = (SmeBSBObject)cnew; SmeBSBObject old_entry = (SmeBSBObject)current; @@ -573,28 +573,28 @@ GetDefaultSize(Widget w, Dimension *width, Dimension *height) if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XmbTextEscapement(entry->sme_bsb.fontset, + *width = (Dimension)XmbTextEscapement(entry->sme_bsb.fontset, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + (int)strlen(entry->sme_bsb.label)); + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); *height = ext->max_ink_extent.height; - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } else { if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); + *width = (Dimension)XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, + (int)strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); - *height = entry->sme_bsb.font->max_bounds.ascent + - entry->sme_bsb.font->max_bounds.descent; + *height = (Dimension)(entry->sme_bsb.font->max_bounds.ascent + + entry->sme_bsb.font->max_bounds.descent); - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } } @@ -678,16 +678,16 @@ GetBitmapInfo(Widget w, Bool is_left) XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.left_bitmap_width = width; - entry->sme_bsb.left_bitmap_height = height; + entry->sme_bsb.left_bitmap_width = (Dimension)width; + entry->sme_bsb.left_bitmap_height = (Dimension)height; } } else if (entry->sme_bsb.right_bitmap != None && XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.right_bitmap_width = width; - entry->sme_bsb.right_bitmap_height = height; + entry->sme_bsb.right_bitmap_width = (Dimension)width; + entry->sme_bsb.right_bitmap_height = (Dimension)height; } } diff --git a/lib/libXaw/src/SmeLine.c b/lib/libXaw/src/SmeLine.c index 801134267..350b3fd41 100644 --- a/lib/libXaw/src/SmeLine.c +++ b/lib/libXaw/src/SmeLine.c @@ -90,7 +90,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, }; #undef offset @@ -152,8 +152,8 @@ WidgetClass smeLineObjectClass = (WidgetClass)&smeLineClassRec; */ /*ARGSUSED*/ static void -XawSmeLineInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSmeLineInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SmeLineObject entry = (SmeLineObject)cnew; @@ -220,7 +220,7 @@ DestroyGC(Widget w) /*ARGSUSED*/ static void -XawSmeLineRedisplay(Widget w, XEvent *event, Region region) +XawSmeLineRedisplay(Widget w, XEvent *event _X_UNUSED, Region region _X_UNUSED) { SmeLineObject entry = (SmeLineObject)w; int y = XtY(w) + (((int)XtHeight(w) - entry->sme_line.line_width) >> 1); @@ -247,8 +247,8 @@ XawSmeLineRedisplay(Widget w, XEvent *event, Region region) */ /*ARGSUSED*/ static Boolean -XawSmeLineSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawSmeLineSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { SmeLineObject entry = (SmeLineObject)cnew; SmeLineObject old_entry = (SmeLineObject)current; diff --git a/lib/libXaw/src/StripChart.c b/lib/libXaw/src/StripChart.c index fa7357cea..96ae48dbc 100644 --- a/lib/libXaw/src/StripChart.c +++ b/lib/libXaw/src/StripChart.c @@ -57,6 +57,8 @@ SOFTWARE. #include "Private.h" #define MS_PER_SEC 1000 +#define NUM_VALUEDATA(w) (sizeof((w)->strip_chart.valuedata) / \ + sizeof((w)->strip_chart.valuedata[0])) /* * Class Methods @@ -126,7 +128,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(strip_chart.fgpixel), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNhighlight, @@ -135,7 +137,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(strip_chart.hipixel), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNgetValue, @@ -198,6 +200,13 @@ StripChartClassRec stripChartClassRec = { /* simple */ { XtInheritChangeSensitive, /* change_sensitive */ +#ifndef OLDXAW + NULL +#endif + }, + /* strip_chart_class */ + { + NULL } }; @@ -256,15 +265,15 @@ DestroyGC(StripChartWidget w, unsigned int which) /*ARGSUSED*/ static void -XawStripChartInitialize(Widget greq, Widget gnew, - ArgList args, Cardinal *num_args) +XawStripChartInitialize(Widget greq _X_UNUSED, Widget gnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { StripChartWidget w = (StripChartWidget)gnew; if (w->strip_chart.update > 0) w->strip_chart.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext(gnew), - w->strip_chart.update * MS_PER_SEC, + (unsigned long)(w->strip_chart.update * MS_PER_SEC), draw_it, (XtPointer)gnew); CreateGC(w, ALL_GCS); @@ -294,7 +303,7 @@ XawStripChartDestroy(Widget gw) */ /*ARGSUSED*/ static void -XawStripChartRedisplay(Widget w, XEvent *event, Region region) +XawStripChartRedisplay(Widget w, XEvent *event, Region region _X_UNUSED) { if (event->type == GraphicsExpose) (void)repaint_window((StripChartWidget)w, event->xgraphicsexpose.x, @@ -306,7 +315,7 @@ XawStripChartRedisplay(Widget w, XEvent *event, Region region) /*ARGSUSED*/ static void -draw_it(XtPointer client_data, XtIntervalId *id) +draw_it(XtPointer client_data, XtIntervalId *id _X_UNUSED) { StripChartWidget w = (StripChartWidget)client_data; double value; @@ -314,10 +323,11 @@ draw_it(XtPointer client_data, XtIntervalId *id) if (w->strip_chart.update > 0) w->strip_chart.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w), - w->strip_chart.update * MS_PER_SEC,draw_it, + (unsigned long)(w->strip_chart.update * MS_PER_SEC), draw_it, client_data); - if (w->strip_chart.interval >= XtWidth(w)) + if ((w->strip_chart.interval >= XtWidth(w)) || + ((Cardinal)w->strip_chart.interval >= NUM_VALUEDATA(w))) MoveChart((StripChartWidget)w, True); /* Get the value, stash the point and draw corresponding line */ @@ -346,13 +356,13 @@ draw_it(XtPointer client_data, XtIntervalId *id) XFillRectangle(XtDisplay(w), XtWindow(w), w->strip_chart.fgGC, w->strip_chart.interval, y, - 1, XtHeight(w) - y); + 1, (unsigned)(XtHeight(w) - y)); /* * Fill in the graph lines we just painted over */ if (w->strip_chart.points != NULL) { - w->strip_chart.points[0].x = w->strip_chart.interval; + w->strip_chart.points[0].x = (short)w->strip_chart.interval; XDrawPoints(XtDisplay(w), XtWindow(w), w->strip_chart.hiGC, w->strip_chart.points, w->strip_chart.scale - 1, CoordModePrevious); @@ -383,9 +393,9 @@ repaint_window(StripChartWidget w, int left, int width) /* Compute the minimum scale required to graph the data, but don't go lower than min_scale */ if (w->strip_chart.interval != 0 || scale <= w->strip_chart.max_value) - scale = w->strip_chart.max_value + 1; - if (scale < w->strip_chart.min_scale) - scale = w->strip_chart.min_scale; + scale = (int)(w->strip_chart.max_value + 1); + if (scale < w->strip_chart.min_scale) + scale = w->strip_chart.min_scale; if (scale != w->strip_chart.scale) { w->strip_chart.scale = scale; @@ -410,13 +420,16 @@ repaint_window(StripChartWidget w, int left, int width) if (next < ++width) width = next; + if ((Cardinal)width > NUM_VALUEDATA(w)) + width = NUM_VALUEDATA(w); + /* Draw data point lines */ for (i = left; i < width; i++) { - int y = XtHeight(w) - (XtHeight(w) * w->strip_chart.valuedata[i]) - / w->strip_chart.scale; + int y = (int)(XtHeight(w) - (XtHeight(w) * w->strip_chart.valuedata[i]) + / w->strip_chart.scale); XFillRectangle(dpy, win, w->strip_chart.fgGC, - i, y, 1, XtHeight(w) - y); + i, y, 1, (unsigned)(XtHeight(w) - y)); } /* Draw graph reference lines */ @@ -449,19 +462,23 @@ MoveChart(StripChartWidget w, Bool blit) if (!XtIsRealized((Widget)w)) return; + if (XtWidth(w) > NUM_VALUEDATA(w)) + j = (int) NUM_VALUEDATA(w); + else + j = (int) XtWidth(w); if (w->strip_chart.jump_val < 0) w->strip_chart.jump_val = DEFAULT_JUMP; if (w->strip_chart.jump_val == DEFAULT_JUMP) - j = XtWidth(w) >> 1; + j = j >> 1; else { - j = (int)XtWidth(w) - w->strip_chart.jump_val; + j -= w->strip_chart.jump_val; if (j < 0) j = 0; } (void)memmove((char *)w->strip_chart.valuedata, (char *)(w->strip_chart.valuedata + next - j), - j * sizeof(double)); + (size_t)j * sizeof(double)); next = w->strip_chart.interval = j; /* @@ -485,10 +502,10 @@ MoveChart(StripChartWidget w, Bool blit) } XCopyArea(XtDisplay((Widget)w), XtWindow((Widget)w), XtWindow((Widget)w), - w->strip_chart.hiGC, (int)XtWidth(w) - j, 0, j, XtHeight(w), 0, 0); + w->strip_chart.hiGC, (int)XtWidth(w) - j, 0, (unsigned)j, XtHeight(w), 0, 0); XClearArea(XtDisplay((Widget)w), XtWindow((Widget)w), - j, 0, XtWidth(w) - j, XtHeight(w), False); + j, 0, (unsigned)(XtWidth(w) - j), XtHeight(w), False); /* Draw graph reference lines */ left = j; @@ -501,8 +518,8 @@ MoveChart(StripChartWidget w, Bool blit) /*ARGSUSED*/ static Boolean -XawStripChartSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawStripChartSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { StripChartWidget old = (StripChartWidget)current; StripChartWidget w = (StripChartWidget)cnew; @@ -515,7 +532,7 @@ XawStripChartSetValues(Widget current, Widget request, Widget cnew, if (w->strip_chart.update > 0) w->strip_chart.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext(cnew), - w->strip_chart.update * MS_PER_SEC, + (unsigned long)(w->strip_chart.update * MS_PER_SEC), draw_it, (XtPointer)w); } @@ -535,7 +552,7 @@ XawStripChartSetValues(Widget current, Widget request, Widget cnew, DestroyGC(old, new_gc); CreateGC(w, new_gc); - return (ret_val); + return (Boolean)(ret_val); } /* @@ -562,7 +579,7 @@ XawStripChartResize(Widget widget) return; } - size = sizeof(XPoint) * (w->strip_chart.scale - 1); + size = (Cardinal)(sizeof(XPoint) * (size_t)(w->strip_chart.scale - 1)); points = (XPoint *)XtRealloc((XtPointer)w->strip_chart.points, size); w->strip_chart.points = points; @@ -571,6 +588,6 @@ XawStripChartResize(Widget widget) for (i = 1; i < w->strip_chart.scale; i++) { points[i - 1].x = 0; - points[i - 1].y = XtHeight(w) / w->strip_chart.scale; + points[i - 1].y = (short)(XtHeight(w) / w->strip_chart.scale); } } diff --git a/lib/libXaw/src/Text.c b/lib/libXaw/src/Text.c index 81001226d..9a2a2efc3 100644 --- a/lib/libXaw/src/Text.c +++ b/lib/libXaw/src/Text.c @@ -292,7 +292,7 @@ static XtResource resources[] = { sizeof(Cursor), offset(simple.cursor), XtRString, - "xterm" + (XtPointer)"xterm" }, { XtNheight, @@ -481,7 +481,7 @@ static XrmQuark QJustifyLeft, QJustifyRight, QJustifyCenter, QJustifyFull; /*ARGSUSED*/ static void -CvtStringToScrollMode(XrmValuePtr args, Cardinal *num_args, +CvtStringToScrollMode(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawTextScrollMode scrollMode = XawtextScrollNever; @@ -507,10 +507,10 @@ CvtStringToScrollMode(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtScrollModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, - XrmValue *fromVal, XrmValue *toVal, XtPointer *data) +CvtScrollModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED, + XrmValue *fromVal, XrmValue *toVal _X_UNUSED, XtPointer *data _X_UNUSED) { - static char *buffer; + static String buffer; Cardinal size; switch (*(XawTextScrollMode *)fromVal->addr) { @@ -527,7 +527,7 @@ CvtScrollModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, toVal->size = 0; return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)strlen(buffer) + 1; if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -544,7 +544,7 @@ CvtScrollModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static void -CvtStringToWrapMode(XrmValuePtr args, Cardinal *num_args, +CvtStringToWrapMode(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawTextWrapMode wrapMode = XawtextWrapNever; @@ -569,10 +569,10 @@ CvtStringToWrapMode(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtWrapModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, - XrmValue *fromVal, XrmValue *toVal, XtPointer *data) +CvtWrapModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED, + XrmValue *fromVal, XrmValue *toVal _X_UNUSED, XtPointer *data _X_UNUSED) { - static char *buffer; + static String buffer; Cardinal size; switch (*(XawTextWrapMode *)fromVal->addr) { @@ -591,7 +591,7 @@ CvtWrapModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, toVal->size = 0; return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)strlen(buffer) + 1; if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -608,8 +608,8 @@ CvtWrapModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtStringToJustifyMode(Display *dpy, XrmValue *args, Cardinal *num_args, - XrmValue *fromVal, XrmValue *toVal, XtPointer *data) +CvtStringToJustifyMode(Display *dpy _X_UNUSED, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED, + XrmValue *fromVal, XrmValue *toVal, XtPointer *data _X_UNUSED) { XawTextJustifyMode justify; XrmQuark q; @@ -641,10 +641,10 @@ CvtStringToJustifyMode(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtJustifyModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, - XrmValue *fromVal, XrmValue *toVal, XtPointer *data) +CvtJustifyModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED, + XrmValue *fromVal, XrmValue *toVal, XtPointer *data _X_UNUSED) { - static char *buffer; + static String buffer; Cardinal size; switch (*(XawTextJustifyMode *)fromVal->addr) { @@ -666,7 +666,7 @@ CvtJustifyModeToString(Display *dpy, XrmValue *args, Cardinal *num_args, toVal->size = 0; return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)strlen(buffer) + 1; if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -687,9 +687,9 @@ static void XawTextClassInitialize(void) { if (!XawFmt8Bit) - FMT8BIT = XawFmt8Bit = XrmPermStringToQuark("FMT8BIT"); + FMT8BIT = XawFmt8Bit = (unsigned long)XrmPermStringToQuark("FMT8BIT"); if (!XawFmtWide) - XawFmtWide = XrmPermStringToQuark("FMTWIDE"); + XawFmtWide = (unsigned long)XrmPermStringToQuark("FMTWIDE"); XawInitializeWidgetSet(); @@ -739,12 +739,12 @@ PositionHScrollBar(TextWidget ctx) return; if (vbar != NULL) - x = XtWidth(vbar); + x = (Position)XtWidth(vbar); else - x = -XtBorderWidth(hbar); - y = XtHeight(ctx) - XtHeight(hbar) - XtBorderWidth(hbar); + x = (Position)(-XtBorderWidth(hbar)); + y = (Position)(XtHeight(ctx) - XtHeight(hbar) - XtBorderWidth(hbar)); if (vbar != NULL) { - width = XtWidth(ctx) - XtWidth(vbar) - XtBorderWidth(vbar); + width = (Dimension)(XtWidth(ctx) - XtWidth(vbar) - XtBorderWidth(vbar)); if (width > XtWidth(ctx)) width = XtWidth(ctx); } @@ -775,7 +775,7 @@ PositionVScrollBar(TextWidget ctx) if (vbar == NULL) return; - x = y = -XtBorderWidth(vbar); + x = y = (Position)(-XtBorderWidth(vbar)); height = XtHeight(ctx); width = XtWidth(vbar); @@ -795,7 +795,7 @@ CreateVScrollBar(TextWidget ctx) XtAddCallback(vbar, XtNscrollProc, VScroll, (XtPointer)ctx); XtAddCallback(vbar, XtNjumpProc, VJump, (XtPointer)ctx); - ctx->text.r_margin.left += XtWidth(vbar) + XtBorderWidth(vbar); + ctx->text.r_margin.left += (XtWidth(vbar) + XtBorderWidth(vbar)); ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left; PositionVScrollBar(ctx); @@ -827,7 +827,7 @@ DestroyVScrollBar(TextWidget ctx) if (vbar == NULL) return; - ctx->text.r_margin.left -= XtWidth(vbar) + XtBorderWidth(vbar); + ctx->text.r_margin.left = (Position)(ctx->text.r_margin.left - (XtWidth(vbar) + XtBorderWidth(vbar))); ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left; XtDestroyWidget(vbar); @@ -856,7 +856,7 @@ CreateHScrollBar(TextWidget ctx) bottom = ctx->text.r_margin.bottom + XtHeight(hbar) + XtBorderWidth(hbar); - ctx->text.margin.bottom = ctx->text.r_margin.bottom = bottom; + ctx->text.margin.bottom = ctx->text.r_margin.bottom = (Position)bottom; PositionHScrollBar(ctx); TextSinkResize(ctx->text.sink); @@ -886,7 +886,9 @@ DestroyHScrollBar(TextWidget ctx) if (hbar == NULL) return; - ctx->text.r_margin.bottom -= XtHeight(hbar) + XtBorderWidth(hbar); + ctx->text.r_margin.bottom = (Position)(ctx->text.r_margin.bottom + - (XtHeight(hbar) + + XtBorderWidth(hbar))); ctx->text.margin.bottom = ctx->text.r_margin.bottom; XtDestroyWidget(hbar); @@ -897,8 +899,8 @@ DestroyHScrollBar(TextWidget ctx) /*ARGSUSED*/ static void -XawTextInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTextInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TextWidget ctx = (TextWidget)cnew; @@ -946,7 +948,7 @@ XawTextInitialize(Widget request, Widget cnew, #endif if (XtHeight(ctx) == DEFAULT_TEXT_HEIGHT) { - XtHeight(ctx) = VMargins(ctx); + XtHeight(ctx) = (Dimension)VMargins(ctx); if (ctx->text.sink != NULL) XtHeight(ctx) += XawTextSinkMaxHeight(ctx->text.sink, 1); } @@ -1046,7 +1048,7 @@ InsertCursor(Widget w, XawTextInsertState state) else y += (ctx->text.lt.info[line].y - ctx->text.lt.info[line - 1].y) + 1; - XawTextSinkInsertCursor(ctx->text.sink, x, y, state); + XawTextSinkInsertCursor(ctx->text.sink, (Position)x, (Position)y, state); } /* Keep Input Method up to speed */ @@ -1097,7 +1099,7 @@ _XawTextGetText(TextWidget ctx, XawTextPosition left, XawTextPosition right) bytes = 1; /* leave space for ZERO */ - tempResult = result = XtMalloc((unsigned)(right - left + ONE) * bytes); + tempResult = result = XtMalloc((unsigned)(right - left + ONE) * (unsigned)bytes); while (left < right) { left = SrcRead(ctx->text.source, left, &text, (int)(right - left)); @@ -1131,7 +1133,7 @@ _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right) if (XawTextFormat(ctx, XawFmtWide)) { MultiSinkObject sink = (MultiSinkObject)ctx->text.sink; ws = (wchar_t *)_XawTextGetText(ctx, left, right); - n = wcslen(ws); + n = (long)wcslen(ws); for (j = 0, i = 0; j < n; j++) { wc = ws[j]; if (XwcTextEscapement (sink->multi_sink.fontset, &wc, 1) @@ -1145,7 +1147,7 @@ _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right) else { s = (unsigned char *)_XawTextGetText(ctx, left, right); /* only HT and NL control chars are allowed, strip out others */ - n = strlen((char *)s); + n = (long)strlen((char *)s); i = 0; for (j = 0; j < n; j++) { c = s[j]; @@ -1255,10 +1257,10 @@ _XawTextBuildLineTable(TextWidget ctx, XawTextPosition position, Cardinal size; if ((int)XtHeight(ctx) > VMargins(ctx)) { - height = XtHeight(ctx) - VMargins(ctx); + height = (Dimension)(XtHeight(ctx) - VMargins(ctx)); lines = XawTextSinkMaxLines(ctx->text.sink, height); } - size = sizeof(XawTextLineTableEntry) * (lines + 1); + size = (Cardinal)(sizeof(XawTextLineTableEntry) * (size_t)(lines + 1)); if (lines != ctx->text.lt.lines || ctx->text.lt.info == NULL) { ctx->text.lt.info = (XawTextLineTableEntry *) @@ -1380,12 +1382,12 @@ _BuildLineTable(TextWidget ctx, XawTextPosition position, int line) lt->y = y; ctx->text.clear_to_eol = True; } - if (lt->textWidth != width) { - if (lt->textWidth > width) + if (lt->textWidth != (Cardinal)width) { + if (lt->textWidth > (Cardinal)width) ctx->text.clear_to_eol = True; - lt->textWidth = width; + lt->textWidth = (unsigned)width; } - y += height; + y = (Position)(y + height); if (end > ctx->text.lastPos) { position = end; @@ -1406,7 +1408,7 @@ _BuildLineTable(TextWidget ctx, XawTextPosition position, int line) } lt->position = ++position; lt->textWidth = 0; - y += height; + y = (Position)(y + height); } if (update_from >= 0) _XawTextNeedsUpdating(ctx, update_from, @@ -1424,7 +1426,7 @@ _BuildLineTable(TextWidget ctx, XawTextPosition position, int line) /* grow the line table */ ctx->text.lt.info = (XawTextLineTableEntry *) XtRealloc((char *)ctx->text.lt.info, - sizeof(XawTextLineTableEntry) * (line + 1)); + (Cardinal)(sizeof(XawTextLineTableEntry) * (size_t)(line + 1))); lt = ctx->text.lt.info + line; bzero(lt, sizeof(XawTextLineTableEntry)); ++ctx->text.lt.lines; @@ -1490,10 +1492,10 @@ _XawTextSetScrollBars(TextWidget ctx) if (ctx->text.lastPos == 0) first = 0.0; else - first = ctx->text.lt.top / (float)ctx->text.lastPos; + first = (float)ctx->text.lt.top / (float)ctx->text.lastPos; if (ctx->text.lt.info[ctx->text.lt.lines].position < ctx->text.lastPos) - last = ctx->text.lt.info[ctx->text.lt.lines].position / + last = (float)ctx->text.lt.info[ctx->text.lt.lines].position / (float)ctx->text.lastPos; else last = 1.0; @@ -1502,13 +1504,13 @@ _XawTextSetScrollBars(TextWidget ctx) } if (ctx->text.scroll_horiz == XawtextScrollAlways) { - denom = GetWidestLine(ctx); + denom = (float)GetWidestLine(ctx); if (denom <= 0) - denom = (int)XtWidth(ctx) - RHMargins(ctx); + denom = (float)((int)XtWidth(ctx) - RHMargins(ctx)); if (denom <= 0) denom = 1; - widest = ((int)XtWidth(ctx) - RHMargins(ctx)) / denom; - first = ctx->text.r_margin.left - ctx->text.left_margin; + widest = (float)((int)XtWidth(ctx) - RHMargins(ctx)) / denom; + first = (float)(ctx->text.r_margin.left - ctx->text.left_margin); first /= denom; XawScrollbarSetThumb(ctx->text.hbar, first, widest); @@ -1533,8 +1535,8 @@ DoCopyArea(TextWidget ctx, int src_x, int src_y, src_y = XawMax(y1, XawMin(src_y, y2)); dst_x = XawMax(x1, XawMin(dst_x, x2)); dst_y = XawMax(y1, XawMin(dst_y, y2)); - width = XawMax(0, XawMin(x2 - dst_x, (int)width)); - height = XawMax(0, XawMin(y2 - dst_y, (int)height)); + width = (unsigned)XawMax(0, XawMin(x2 - dst_x, (int)width)); + height = (unsigned)XawMax(0, XawMin(y2 - dst_y, (int)height)); XCopyArea(XtDisplay(ctx), XtWindow(ctx), XtWindow(ctx), ctx->text.gc, src_x, src_y, width, height, dst_x, dst_y); @@ -1703,8 +1705,8 @@ XawTextScroll(TextWidget ctx, int vlines, int hpixels) update_to = lt->info[-vlines + 1].position - 1; y1 = lt->info[lt->lines + vlines].y; y2 = lt->info[-vlines].y; - DoCopyArea(ctx, ctx->text.r_margin.left, y0, vwidth, - y1 - y0, + DoCopyArea(ctx, ctx->text.r_margin.left, y0, (unsigned)vwidth, + (unsigned)(y1 - y0), ctx->text.r_margin.left, y2); } else { @@ -1713,7 +1715,7 @@ XawTextScroll(TextWidget ctx, int vlines, int hpixels) y1 = lt->info[lt->lines - vlines].y; y2 = lt->info[vlines].y; DoCopyArea(ctx, ctx->text.r_margin.left, y2, - vwidth, lt->info[lt->lines].y - y2, + (unsigned)vwidth, (unsigned)(lt->info[lt->lines].y - y2), ctx->text.r_margin.left, y0); } _XawTextNeedsUpdating(ctx, update_from, update_to); @@ -1733,7 +1735,7 @@ _XawTextVScroll(TextWidget ctx, int n) /*ARGSUSED*/ static void -HScroll(Widget w, XtPointer closure, XtPointer callData) +HScroll(Widget w _X_UNUSED, XtPointer closure, XtPointer callData) { TextWidget ctx = (TextWidget)closure; long pixels = (long)callData; @@ -1749,7 +1751,7 @@ HScroll(Widget w, XtPointer closure, XtPointer callData) if (pixels) { _XawTextPrepareToUpdate(ctx); - XawTextScroll(ctx, 0, pixels); + XawTextScroll(ctx, 0, (int)pixels); _XawTextExecuteUpdate(ctx); } } @@ -1763,7 +1765,7 @@ HJump(Widget w, XtPointer closure, XtPointer callData) long pixels; pixels = ctx->text.left_margin - - (ctx->text.r_margin.left - (int)(percent * GetWidestLine(ctx))); + (ctx->text.r_margin.left - (int)(percent * (float)GetWidestLine(ctx))); HScroll(w, (XtPointer)ctx, (XtPointer)pixels); } @@ -1803,7 +1805,7 @@ UpdateTextInLine(TextWidget ctx, int line, int x1, int x2) False, &left, &width, &height); if (line == ctx->text.lt.lines) right = -1; - else if (x2 >= lt->textWidth - from_x) + else if ((Cardinal)x2 >= (lt->textWidth - (unsigned)from_x)) right = lt[1].position - 1; else { from_x += width; @@ -1825,7 +1827,7 @@ UpdateTextInLine(TextWidget ctx, int line, int x1, int x2) */ /*ARGSUSED*/ static void -VScroll(Widget w, XtPointer closure, XtPointer callData) +VScroll(Widget w _X_UNUSED, XtPointer closure, XtPointer callData) { TextWidget ctx = (TextWidget)closure; long height, lines = (long)callData; @@ -1835,13 +1837,13 @@ VScroll(Widget w, XtPointer closure, XtPointer callData) height = 1; lines = (lines * ctx->text.lt.lines) / height; _XawTextPrepareToUpdate(ctx); - XawTextScroll(ctx, lines, 0); + XawTextScroll(ctx, (int)lines, 0); _XawTextExecuteUpdate(ctx); } /*ARGSUSED*/ static void -VJump(Widget w, XtPointer closure, XtPointer callData) +VJump(Widget w _X_UNUSED, XtPointer closure, XtPointer callData) { float percent = *(float *)callData; TextWidget ctx = (TextWidget)closure; @@ -1850,7 +1852,7 @@ VJump(Widget w, XtPointer closure, XtPointer callData) int dim, vlines = 0, wwidth = GetMaxTextWidth(ctx); Bool scroll = True; - position = percent * ctx->text.lastPos; + position = (XawTextPosition)(percent * (float)ctx->text.lastPos); top = lt->top; if (!lt->lines || (position >= lt->top && position < lt->info[1].position)) { @@ -1972,8 +1974,8 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, target, type, (XPointer*)&std_targets, &std_length, format); - *length = 7 + (edit_mode == XawtextEdit) + std_length; - *value = XtMalloc((unsigned)sizeof(Atom)*(*length)); + *length = 7 + (unsigned long)(edit_mode == XawtextEdit) + std_length; + *value = XtMalloc((Cardinal)(sizeof(Atom)*(*length))); targetP = *(Atom**)value; *targetP++ = XA_STRING; *targetP++ = XA_TEXT(d); @@ -2043,9 +2045,9 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, *length = strlen((char *)*value); } else { - *value = XtMalloc((salt->length + 1) * sizeof(unsigned char)); + *value = XtMalloc(((size_t)(salt->length + 1) * sizeof(unsigned char))); strcpy ((char *)*value, salt->contents); - *length = salt->length; + *length = (unsigned long)salt->length; } /* Got *value,*length, now in COMPOUND_TEXT format. */ if (XawTextFormat(ctx, XawFmtWide) && *type == XA_STRING) { @@ -2256,7 +2258,7 @@ _XawTextSaltAwaySelection(TextWidget ctx, Atom *selections, int num_atoms) XtMalloc((unsigned)sizeof(XawTextSelectionSalt)); if (!salt) return; - salt->s.selections = (Atom *)XtMalloc((unsigned)(num_atoms * sizeof(Atom))); + salt->s.selections = (Atom *)XtMalloc((Cardinal)((size_t)num_atoms * sizeof(Atom))); if (!salt->s.selections) { XtFree((char *)salt); return; @@ -2277,10 +2279,10 @@ _XawTextSaltAwaySelection(TextWidget ctx, Atom *selections, int num_atoms) } XtFree(salt->contents); salt->contents = (char *)textprop.value; - salt->length = textprop.nitems; + salt->length = (int)textprop.nitems; } else - salt->length = strlen (salt->contents); + salt->length = (int)strlen (salt->contents); salt->next = ctx->text.salt; ctx->text.salt = salt; j = 0; @@ -2340,7 +2342,7 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right, #ifndef OLDXAW if (needs_updating) { _XawTextExecuteUpdate(tw); - tw->text.showposition = showposition; + tw->text.showposition = (Boolean)showposition; } } #endif /* OLDXAW */ @@ -2360,7 +2362,7 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right, */ if ((buffer = GetCutBufferNumber(selection)) != NOT_A_CUT_BUFFER) { unsigned char *ptr, *tptr; - unsigned int amount, max_len = MAX_CUT_LEN(XtDisplay(w)); + unsigned int amount, max_len = (unsigned)MAX_CUT_LEN(XtDisplay(w)); unsigned long len; tptr= ptr= (unsigned char *)_XawTextGetSTRING(ctx, @@ -2386,10 +2388,10 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right, _CreateCutBuffers(XtDisplay(w)); XRotateBuffers(XtDisplay(w), 1); } - amount = Min ((len = strlen((char *)ptr)), max_len); + amount = (unsigned)Min ((len = strlen((char *)ptr)), max_len); XChangeProperty(XtDisplay(w), RootWindow(XtDisplay(w), 0), selection, XA_STRING, 8, PropModeReplace, - ptr, amount); + ptr, (int)amount); while (len > max_len) { len -= max_len; @@ -2397,7 +2399,7 @@ _SetSelection(TextWidget ctx, XawTextPosition left, XawTextPosition right, amount = Min (len, max_len); XChangeProperty(XtDisplay(w), RootWindow(XtDisplay(w), 0), selection, XA_STRING, 8, PropModeAppend, - tptr, amount); + tptr, (int)amount); } XtFree ((char *)ptr); } @@ -2430,7 +2432,7 @@ _XawTextSetLineAndColumnNumber(TextWidget ctx, Bool force) XawTextPositionInfo info; ctx->text.line_number = info.line_number = line_number; - ctx->text.column_number = info.column_number = column_number; + ctx->text.column_number = (short)(info.column_number = column_number); info.insert_position = ctx->text.insertPos; info.last_position = ctx->text.lastPos; info.overwrite_mode = ctx->text.overwrite; @@ -2446,7 +2448,7 @@ ResolveColumnNumber(TextWidget ctx) short column_number = 0; XawTextPosition position; XawTextBlock block; - unsigned long format = _XawTextFormat(ctx); + unsigned long format = (unsigned long)_XawTextFormat(ctx); TextSinkObject sink = (TextSinkObject)ctx->text.sink; short *char_tabs = sink->text_sink.char_tabs; int tab_count = sink->text_sink.tab_count; @@ -2456,11 +2458,11 @@ ResolveColumnNumber(TextWidget ctx) return (ctx->text.column_number); position = SrcScan(src, ctx->text.insertPos, XawstEOL, XawsdLeft, 1, False); - XawTextSourceRead(src, position, &block, ctx->text.insertPos - position); + XawTextSourceRead(src, position, &block, (int)(ctx->text.insertPos - position)); for (; position < ctx->text.insertPos; position++) { if (position - block.firstPos >= block.length) - XawTextSourceRead(src, position, &block, ctx->text.insertPos - position); + XawTextSourceRead(src, position, &block, (int)(ctx->text.insertPos - position)); if ((format == XawFmt8Bit && block.ptr[position - block.firstPos] == '\t') || (format == XawFmtWide && ((wchar_t*)block.ptr)[position - block.firstPos] == _Xaw_atowc(XawTAB))) { while (tab_base + tab_column <= column_number) { @@ -2478,7 +2480,7 @@ ResolveColumnNumber(TextWidget ctx) else tab_column += DEFAULT_TAB_SIZE; } - column_number = tab_base + tab_column; + column_number = (short)(tab_base + tab_column); } else ++column_number; @@ -2494,7 +2496,7 @@ ResolveColumnNumber(TextWidget ctx) void _XawTextSourceChanged(Widget w, XawTextPosition left, XawTextPosition right, - XawTextBlock *block, int lines) + XawTextBlock *block, int lines _X_UNUSED) { TextWidget ctx = (TextWidget)w; Widget src = ctx->text.source; @@ -2528,7 +2530,7 @@ _XawTextSourceChanged(Widget w, XawTextPosition left, XawTextPosition right, update_from = left; update_to = left + block->length; update_to = SrcScan(src, update_to, XawstEOL, XawsdRight, 1, False); - delta = block->length - (right - left); + delta = (int)(block->length - (right - left)); if (delta < 0) ctx->text.clear_to_eol = True; if (update_to == update_from) @@ -2719,7 +2721,7 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right) x = ctx->text.left_margin; if (cleol) { - segment.x1 = ctx->text.lt.info[line].textWidth + x; + segment.x1 = (int)(ctx->text.lt.info[line].textWidth + (unsigned)x); if (XmuValidSegment(&segment)) { scanline.y = y; next.y = ctx->text.lt.info[line + 1].y; @@ -2736,7 +2738,8 @@ OldDisplayText(Widget w, XawTextPosition left, XawTextPosition right) for (seg = scan->segment; seg; seg = seg->next) SinkClearToBG(ctx->text.sink, seg->x1, scan->y, - seg->x2 - seg->x1, scan->next->y - scan->y); + (unsigned)(seg->x2 - seg->x1), + (unsigned)(scan->next->y - scan->y)); XmuDestroyArea(clip); } } @@ -2795,7 +2798,7 @@ DisplayText(Widget w, XawTextPosition left, XawTextPosition right) } if (cleol) { - segment.x1 = ctx->text.lt.info[line].textWidth + ctx->text.left_margin; + segment.x1 = (int)(ctx->text.lt.info[line].textWidth + (unsigned)ctx->text.left_margin); if (XmuValidSegment(&segment)) { scanline.y = y; next.y = ctx->text.lt.info[line + 1].y; @@ -3093,7 +3096,7 @@ TextSinkResize(Widget w) /* ARGSUSED */ void -_XawTextCheckResize(TextWidget ctx) +_XawTextCheckResize(TextWidget ctx _X_UNUSED) { return; } @@ -3110,13 +3113,13 @@ _XawTextSelectionList(TextWidget ctx, String *list, Cardinal nelems) int n; if (nelems > (Cardinal)ctx->text.s.array_size) { - sel = (Atom *)XtRealloc((char *)sel, sizeof(Atom) * nelems); - ctx->text.s.array_size = nelems; + sel = (Atom *)XtRealloc((char *)sel, (Cardinal)(sizeof(Atom) * (size_t)nelems)); + ctx->text.s.array_size = (int)nelems; ctx->text.s.selections = sel; } - for (n = nelems; --n >= 0; sel++, list++) + for (n = (int)nelems; --n >= 0; sel++, list++) *sel = XInternAtom(dpy, *list, False); - ctx->text.s.atom_count = nelems; + ctx->text.s.atom_count = (int)nelems; return (ctx->text.s.selections); } @@ -3254,16 +3257,16 @@ XawTextExpose(Widget w, XEvent *event, Region region) XRectangle expose; if (event->type == Expose) { - expose.x = event->xexpose.x; - expose.y = event->xexpose.y; - expose.width = event->xexpose.width; - expose.height = event->xexpose.height; + expose.x = (short)event->xexpose.x; + expose.y = (short)event->xexpose.y; + expose.width = (unsigned short)event->xexpose.width; + expose.height = (unsigned short)event->xexpose.height; } else if (event->type == GraphicsExpose) { - expose.x = event->xgraphicsexpose.x; - expose.y = event->xgraphicsexpose.y; - expose.width = event->xgraphicsexpose.width; - expose.height = event->xgraphicsexpose.height; + expose.x = (short)event->xgraphicsexpose.x; + expose.y = (short)event->xgraphicsexpose.y; + expose.width = (unsigned short)event->xgraphicsexpose.width; + expose.height = (unsigned short)event->xgraphicsexpose.height; } else return; @@ -3642,7 +3645,7 @@ XawTextResize(Widget w) */ /*ARGSUSED*/ static Boolean -XawTextSetValues(Widget current, Widget request, Widget cnew, +XawTextSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, ArgList args, Cardinal *num_args) { TextWidget oldtw = (TextWidget)current; @@ -3679,8 +3682,9 @@ XawTextSetValues(Widget current, Widget request, Widget cnew, if (oldtw->text.r_margin.bottom != newtw->text.r_margin.bottom) { newtw->text.margin.bottom = newtw->text.r_margin.bottom; if (newtw->text.hbar != NULL) - newtw->text.margin.bottom += newtw->text.hbar->core.height + - newtw->text.hbar->core.border_width; + newtw->text.margin.bottom = (Position)(newtw->text.margin.bottom + + (newtw->text.hbar->core.height + + newtw->text.hbar->core.border_width)); redisplay = True; } @@ -3818,8 +3822,8 @@ _XawTextPosToXY(Widget w, XawTextPosition pos, Position *x, Position *y) int line, ix, iy; LineAndXYForPosition((TextWidget)w, pos, &line, &ix, &iy); - *x = ix; - *y = iy; + *x = (Position)ix; + *y = (Position)iy; } /******************************************************************* @@ -4147,6 +4151,9 @@ TextClassRec textClassRec = { /* simple */ { XawTextChangeSensitive, /* change_sensitive */ +#ifndef OLDXAW + NULL, +#endif }, /* text */ { diff --git a/lib/libXaw/src/TextAction.c b/lib/libXaw/src/TextAction.c index 6363259d1..43d1d3258 100644 --- a/lib/libXaw/src/TextAction.c +++ b/lib/libXaw/src/TextAction.c @@ -245,7 +245,7 @@ void _XawSourceSetUndoMerge(TextSrcObject, Bool); #ifndef OLDXAW #define MAX_KILL_RINGS 1024 XawTextKillRing *xaw_text_kill_ring; -static XawTextKillRing kill_ring_prev, kill_ring_null = { &kill_ring_prev, }; +static XawTextKillRing kill_ring_prev, kill_ring_null = { &kill_ring_prev, NULL, 0, 0, 0 }; static unsigned num_kill_rings; #endif @@ -307,24 +307,24 @@ NotePosition(TextWidget ctx, XEvent *event) switch (event->type) { case ButtonPress: case ButtonRelease: - ctx->text.ev_x = event->xbutton.x; - ctx->text.ev_y = event->xbutton.y; + ctx->text.ev_x = (Position)event->xbutton.x; + ctx->text.ev_y = (Position)event->xbutton.y; break; case KeyPress: case KeyRelease: { XRectangle cursor; XawTextSinkGetCursorBounds(ctx->text.sink, &cursor); - ctx->text.ev_x = cursor.x + cursor.width / 2; - ctx->text.ev_y = cursor.y + cursor.height / 2; + ctx->text.ev_x = (Position)(cursor.x + cursor.width / 2); + ctx->text.ev_y = (Position)(cursor.y + cursor.height / 2); } break; case MotionNotify: - ctx->text.ev_x = event->xmotion.x; - ctx->text.ev_y = event->xmotion.y; + ctx->text.ev_x = (Position)(event->xmotion.x); + ctx->text.ev_y = (Position)(event->xmotion.y); break; case EnterNotify: case LeaveNotify: - ctx->text.ev_x = event->xcrossing.x; - ctx->text.ev_y = event->xcrossing.y; + ctx->text.ev_x = (Position)(event->xcrossing.x); + ctx->text.ev_y = (Position)(event->xcrossing.y); } } @@ -365,9 +365,9 @@ struct _SelectionList { /*ARGSUSED*/ static void -_SelectionReceived(Widget w, XtPointer client_data, Atom *selection, +_SelectionReceived(Widget w, XtPointer client_data, Atom *selection _X_UNUSED, Atom *type, XtPointer value, unsigned long *length, - int *format) + int *format _X_UNUSED) { Display *d = XtDisplay(w); TextWidget ctx = (TextWidget)w; @@ -421,7 +421,7 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection, fprintf(stderr, "Xaw Text Widget: An attempt was made to insert " "an illegal selection.\n"); - textprop.value = (unsigned char *)" >> ILLEGAL SELECTION << "; + textprop.value = (const unsigned char *)" >> ILLEGAL SELECTION << "; textprop.nitems = strlen((char *) textprop.value); if (XwcTextPropertyToTextList(d, &textprop, &wlist, &count) != Success @@ -438,7 +438,7 @@ _SelectionReceived(Widget w, XtPointer client_data, Atom *selection, } text.ptr = (char*)value; text.firstPos = 0; - text.length = *length; + text.length = (int)*length; if (_XawTextReplace(ctx, ctx->text.insertPos, ctx->text.insertPos, &text)) { XBell(XtDisplay(ctx), 0); EndAction(ctx); @@ -481,7 +481,7 @@ GetSelection(Widget w, Time timev, String *params, Cardinal num_params) Atom type = XA_STRING; char *line = XFetchBuffer(XtDisplay(w), &nbytes, buffer); - if ((length = nbytes) != 0L) + if ((length = (unsigned long)nbytes) != 0L) _SelectionReceived(w, NULL, &selection, &type, line, &length, &fmt8); else if (num_params > 1) GetSelection(w, timev, params+1, num_params-1); @@ -524,12 +524,12 @@ Move(TextWidget ctx, XEvent *event, XawTextScanDirection dir, short mult = MULT(ctx); if (mult < 0) { - mult = -mult; + mult = (short)(-mult); dir = dir == XawsdLeft ? XawsdRight : XawsdLeft; } insertPos = SrcScan(ctx->text.source, ctx->text.insertPos, - type, dir, mult, include); + type, dir, mult, (Boolean)include); StartAction(ctx, event); @@ -548,14 +548,14 @@ Move(TextWidget ctx, XEvent *event, XawTextScanDirection dir, /*ARGSUSED*/ static void -MoveForwardChar(Widget w, XEvent *event, String *p, Cardinal *n) +MoveForwardChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdRight, XawstPositions, True); } /*ARGSUSED*/ static void -MoveBackwardChar(Widget w, XEvent *event, String *p, Cardinal *n) +MoveBackwardChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdLeft, XawstPositions, True); } @@ -586,7 +586,7 @@ MoveForwardParagraph(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MoveBackwardParagraph(w, event, p, n); return; } @@ -632,7 +632,7 @@ MoveBackwardParagraph(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MoveForwardParagraph(w, event, p, n); return; } @@ -670,14 +670,14 @@ MoveBackwardParagraph(Widget w, XEvent *event, String *p, Cardinal *n) /*ARGSUSED*/ static void -MoveToLineEnd(Widget w, XEvent *event, String *p, Cardinal *n) +MoveToLineEnd(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdRight, XawstEOL, False); } /*ARGSUSED*/ static void -MoveToLineStart(Widget w, XEvent *event, String *p, Cardinal *n) +MoveToLineStart(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdLeft, XawstEOL, False); } @@ -694,7 +694,7 @@ MoveLine(TextWidget ctx, XEvent *event, XawTextScanDirection dir) XawTextUnsetSelection((Widget)ctx); if (dir == XawsdLeft) - mult = mult == 0 ? 5 : mult + 1; + mult = (short)((mult == 0) ? 5 : mult + 1); cnew = SrcScan(ctx->text.source, ctx->text.insertPos, XawstEOL, XawsdLeft, 1, False); @@ -738,7 +738,7 @@ MoveNextLine(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MovePreviousLine(w, event, p, n); return; } @@ -756,7 +756,7 @@ MovePreviousLine(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MoveNextLine(w, event, p, n); return; } @@ -770,14 +770,14 @@ MovePreviousLine(Widget w, XEvent *event, String *p, Cardinal *n) /*ARGSUSED*/ static void -MoveBeginningOfFile(Widget w, XEvent *event, String *p, Cardinal *n) +MoveBeginningOfFile(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdLeft, XawstAll, True); } /*ARGSUSED*/ static void -MoveEndOfFile(Widget w, XEvent *event, String *p, Cardinal *n) +MoveEndOfFile(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Move((TextWidget)w, event, XawsdRight, XawstAll, True); } @@ -788,7 +788,7 @@ Scroll(TextWidget ctx, XEvent *event, XawTextScanDirection dir) short mult = MULT(ctx); if (mult < 0) { - mult = -mult; + mult = (short)(-mult); dir = dir == XawsdLeft ? XawsdRight : XawsdLeft; } @@ -814,20 +814,20 @@ Scroll(TextWidget ctx, XEvent *event, XawTextScanDirection dir) /*ARGSUSED*/ static void -ScrollOneLineUp(Widget w, XEvent *event, String *p, Cardinal *n) +ScrollOneLineUp(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Scroll((TextWidget)w, event, XawsdLeft); } /*ARGSUSED*/ static void -ScrollOneLineDown(Widget w, XEvent *event, String *p, Cardinal *n) +ScrollOneLineDown(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { Scroll((TextWidget)w, event, XawsdRight); } static void -MovePage(TextWidget ctx, XEvent *event, XawTextScanDirection dir) +MovePage(TextWidget ctx, XEvent *event _X_UNUSED, XawTextScanDirection dir) { int scroll_val = 0; XawTextPosition old_pos; @@ -837,7 +837,7 @@ MovePage(TextWidget ctx, XEvent *event, XawTextScanDirection dir) case XawsdLeft: if (ctx->text.lt.top != 0) scroll_val = -Max(1, ctx->text.lt.lines - 1); - break; + break; case XawsdRight: if (!IsPositionVisible(ctx, Max(0, ctx->text.lastPos))) scroll_val = Max(1, ctx->text.lt.lines - 1); @@ -881,7 +881,7 @@ MoveNextPage(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MovePreviousPage(w, event, p, n); return; } @@ -906,7 +906,7 @@ MovePreviousPage(Widget w, XEvent *event, String *p, Cardinal *n) short mult = MULT(ctx); if (mult < 0) { - ctx->text.mult = -mult; + ctx->text.mult = (short)(-mult); MoveNextPage(w, event, p, n); return; } @@ -968,8 +968,8 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, target, type, (XPointer *)&std_targets, &std_length, format); - *length = 7 + (edit_mode == XawtextEdit) + std_length; - *value = XtMalloc((unsigned)sizeof(Atom)*(*length)); + *length = (7 + (unsigned long)(edit_mode == XawtextEdit) + std_length); + *value = XtMalloc((Cardinal)((unsigned)sizeof(Atom)*(*length))); targetP = *(Atom**)value; *targetP++ = XA_STRING; *targetP++ = XA_TEXT(d); @@ -1035,9 +1035,9 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, *length = strlen(*value); } else { - *value = XtMalloc((salt->length + 1) * sizeof(unsigned char)); + *value = XtMalloc(((size_t)(salt->length + 1) * sizeof(unsigned char))); strcpy (*value, salt->contents); - *length = salt->length; + *length = (unsigned long)salt->length; } /* Got *value,*length, now in COMPOUND_TEXT format. */ if (XawTextFormat(ctx, XawFmtWide)) { @@ -1144,7 +1144,7 @@ LoseSelection(Widget w, Atom *selection) } static void -_LoseSelection(Widget w, Atom *selection, char **contents, int *length) +_LoseSelection(Widget w, Atom *selection, char **contents _X_UNUSED, int *length _X_UNUSED) { TextWidget ctx = (TextWidget)w; Atom *atomP; @@ -1278,10 +1278,10 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to, } XtFree(string); string = (char *)textprop.value; - length = textprop.nitems; + length = (int)textprop.nitems; } else - length = strlen(string); + length = (int)strlen(string); salt->length = length + size; @@ -1289,16 +1289,16 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to, if (!append) salt->contents = string; else { - salt->contents = XtMalloc(length + size + 1); + salt->contents = XtMalloc((length + size + 1)); if (from >= old_from) { - strncpy(salt->contents, ring, size); + strncpy(salt->contents, ring, (size_t)size); salt->contents[size] = '\0'; - strncat(salt->contents, string, length); + strncat(salt->contents, string, (size_t)length); } else { - strncpy(salt->contents, string, length); + strncpy(salt->contents, string, (size_t)length); salt->contents[length] = '\0'; - strncat(salt->contents, ring, size); + strncat(salt->contents, ring, (size_t)size); } salt->contents[length + size] = '\0'; XtFree(ring); @@ -1329,7 +1329,7 @@ _DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to, text.length = 0; text.firstPos = 0; - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); text.ptr = ""; if (_XawTextReplace(ctx, from, to, &text)) { @@ -1349,7 +1349,7 @@ DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir, short mult = MULT(ctx); if (mult < 0) { - mult = -mult; + mult = (short)(-mult); dir = dir == XawsdLeft ? XawsdRight : XawsdLeft; } @@ -1359,7 +1359,7 @@ DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir, _XawSourceSetUndoMerge((TextSrcObject)ctx->text.source, True); #endif to = SrcScan(ctx->text.source, ctx->text.insertPos, - type, dir, mult, include); + type, dir, mult, (Boolean)include); /* * If no movement actually happened, then bump the count and try again. @@ -1368,7 +1368,7 @@ DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir, */ if (to == ctx->text.insertPos) to = SrcScan(ctx->text.source, ctx->text.insertPos, - type, dir, mult + 1, include); + type, dir, mult + 1, (Boolean)include); if (dir == XawsdLeft) { from = to; @@ -1399,7 +1399,7 @@ DeleteChar(Widget w, XEvent *event, XawTextScanDirection dir) short mul = MULT(ctx); if (mul < 0) { - ctx->text.mult = mul = -mul; + ctx->text.mult = mul = (short)(-mul); dir = dir == XawsdLeft ? XawsdRight : XawsdLeft; } DeleteOrKill(ctx, event, dir, XawstPositions, True, False); @@ -1412,14 +1412,14 @@ DeleteChar(Widget w, XEvent *event, XawTextScanDirection dir) /*ARGSUSED*/ static void -DeleteForwardChar(Widget w, XEvent *event, String *p, Cardinal *n) +DeleteForwardChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { DeleteChar(w, event, XawsdRight); } /*ARGSUSED*/ static void -DeleteBackwardChar(Widget w, XEvent *event, String *p, Cardinal *n) +DeleteBackwardChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { DeleteChar(w, event, XawsdLeft); } @@ -1478,7 +1478,7 @@ KillBackwardWord(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -KillToEndOfLine(Widget w, XEvent *event, String *p, Cardinal *n) +KillToEndOfLine(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { TextWidget ctx = (TextWidget)w; XawTextPosition end_of_line; @@ -1487,7 +1487,7 @@ KillToEndOfLine(Widget w, XEvent *event, String *p, Cardinal *n) if (mult < 0) { dir = XawsdLeft; - mult = -mult; + mult = (short)(-mult); } StartAction(ctx, event); @@ -1506,7 +1506,7 @@ KillToEndOfLine(Widget w, XEvent *event, String *p, Cardinal *n) /*ARGSUSED*/ static void -KillToEndOfParagraph(Widget w, XEvent *event, String *p, Cardinal *n) +KillToEndOfParagraph(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { DeleteOrKill((TextWidget)w, event, XawsdRight, XawstParagraph, False, True); } @@ -1521,7 +1521,7 @@ _XawTextZapSelection(TextWidget ctx, XEvent *event, Bool kill) /*ARGSUSED*/ static void -KillCurrentSelection(Widget w, XEvent *event, String *p, Cardinal *n) +KillCurrentSelection(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { _XawTextZapSelection((TextWidget) w, event, True); } @@ -1529,7 +1529,7 @@ KillCurrentSelection(Widget w, XEvent *event, String *p, Cardinal *n) #ifndef OLDXAW /*ARGSUSED*/ static void -KillRingYank(Widget w, XEvent *event, String *params, Cardinal *num_params) +KillRingYank(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; XawTextPosition insertPos = ctx->text.insertPos; @@ -1579,7 +1579,7 @@ KillRingYank(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -DeleteCurrentSelection(Widget w, XEvent *event, String *p, Cardinal *n) +DeleteCurrentSelection(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { _XawTextZapSelection((TextWidget)w, event, False); } @@ -1604,7 +1604,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right, text.length = 1; position = XawTextSourceRead(ctx->text.source, position, - &block, right - left); + &block, (int)(right - left)); done = False; space = False; /* convert tabs and returns to spaces */ @@ -1632,7 +1632,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right, } tmp += i; position = XawTextSourceRead(ctx->text.source, tmp, - &block, right - tmp); + &block, (int)(right - tmp)); if (block.length == 0 || tmp == position || tmp >= right) done = True; } @@ -1641,7 +1641,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right, text.length = 0; position = tmp = left; position = XawTextSourceRead(ctx->text.source, position, - &block, right - left); + &block, (int)(right - left)); ipos = ctx->text.insertPos; done = False; while (!done) { @@ -1693,7 +1693,7 @@ StripSpaces(TextWidget ctx, XawTextPosition left, XawTextPosition right, tmp += i + 1; count = 0; position = XawTextSourceRead(ctx->text.source, tmp, - &block, right - tmp); + &block, (int)(right - tmp)); if (block.length == 0 || tmp == position || tmp >= right) done = True; } @@ -1722,7 +1722,7 @@ Tabify(TextWidget ctx, XawTextPosition left, XawTextPosition right, text.length = 1; position = XawTextSourceRead(ctx->text.source, position, - &block, right - left); + &block, (int)(right - left)); ipos = ctx->text.insertPos; done = zero = False; if (tab_count) @@ -1837,7 +1837,7 @@ Tabify(TextWidget ctx, XawTextPosition left, XawTextPosition right, count = 0; tmp = left + offset; position = XawTextSourceRead(ctx->text.source, tmp, - &block, right - tmp); + &block, (int)(right - tmp)); if (tmp == position || tmp >= right) done = True; } @@ -1866,7 +1866,7 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right, text.ptr = tabs; position = XawTextSourceRead(ctx->text.source, position, - &block, right - left); + &block, (int)(right - left)); ipos = ctx->text.insertPos; done = False; zero = False; @@ -1913,7 +1913,7 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right, if (text.length > 8) { int j; - text.ptr = XtMalloc(text.length); + text.ptr = XtMalloc((Cardinal)text.length); for (j = 0; j < text.length; j++) text.ptr[j] = ' '; } @@ -1962,7 +1962,7 @@ Untabify(TextWidget ctx, XawTextPosition left, XawTextPosition right, tab_base = tab_column = tab_index = 0; } position = XawTextSourceRead(ctx->text.source, tmp, - &block, right - tmp); + &block, (int)(right - tmp)); if (tmp == position || tmp >= right) done = True; } @@ -1988,8 +1988,8 @@ FormatText(TextWidget ctx, XawTextPosition left, Bool force, undo = src->textSrc.enable_undo && src->textSrc.undo_state == False; if (undo) { if (!pos) { - num_pos = src->textSrc.num_text; - pos = XawStackAlloc(sizeof(XawTextPosition) * num_pos, buf); + num_pos = (int)src->textSrc.num_text; + pos = (XawStackAlloc(sizeof(XawTextPosition) * (size_t)num_pos, buf)); for (i = 0; i < num_pos; i++) pos[i] = ((TextWidget)src->textSrc.text[i])->text.insertPos; freepos = True; @@ -1998,8 +1998,8 @@ FormatText(TextWidget ctx, XawTextPosition left, Bool force, freepos = False; src->textSrc.undo_state = True; block.ptr = NULL; - block.firstPos = left; - block.length = right - left; + block.firstPos = (int)left; + block.length = (int)(right - left); text = █ } else @@ -2011,23 +2011,23 @@ FormatText(TextWidget ctx, XawTextPosition left, Bool force, unsigned llen, rlen, size; ptr = lbuf = block.ptr; - llen = block.length; - rlen = llen + (ctx->text.lastPos - end); + llen = (unsigned)block.length; + rlen = (unsigned)(llen + (ctx->text.lastPos - end)); block.firstPos = 0; - block.format = _XawTextFormat(ctx); + block.format = (unsigned long)_XawTextFormat(ctx); rbuf = _XawTextGetText(ctx, left, left + rlen); size = XawTextFormat(ctx, XawFmtWide) ? sizeof(wchar_t) : sizeof(char); if (llen != rlen || memcmp(lbuf, rbuf, llen * size)) { block.ptr = lbuf; - block.length = llen; + block.length = (int)llen; _XawTextReplace(ctx, left, left + rlen, &block); src->textSrc.undo_state = False; block.ptr = rbuf; - block.length = rlen; + block.length = (int)rlen; _XawTextReplace(ctx, left, left + llen, &block); } else @@ -2064,7 +2064,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, int i, count, cpos; Bool done, force2 = force, recurse = False; - position = XawTextSourceRead(ctx->text.source, left, &block, right - left); + position = XawTextSourceRead(ctx->text.source, left, &block, (int)(right - left)); if (block.length == 0 || left >= right || (level == 1 && ((XawTextFormat(ctx, XawFmt8Bit) && block.ptr[0] != ' ' && @@ -2073,7 +2073,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, (XawTextFormat(ctx, XawFmtWide) && _Xaw_atowc(XawSP) != *(wchar_t*)block.ptr && _Xaw_atowc(XawTAB) != *(wchar_t*)block.ptr && - !iswalnum(*(wchar_t*)block.ptr))))) + !iswalnum((wint_t)*(wchar_t*)block.ptr))))) return (XawEditDone); if (level == 1 && !paragraph) { @@ -2082,7 +2082,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, return (XawEditError); right += ctx->text.lastPos - tmp; position = XawTextSourceRead(ctx->text.source, left, &block, - right - left); + (int)(right - left)); } text.firstPos = 0; @@ -2113,7 +2113,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, } tmp = position; position = XawTextSourceRead(ctx->text.source, position, - &block, right - position); + &block, (int)(right - position)); if (tmp == position) done = True; } @@ -2121,7 +2121,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, if (count < ctx->text.left_column) { int bytes = ctx->text.left_column - count; - text.ptr = XawStackAlloc(bytes, buf); + text.ptr = XawStackAlloc((unsigned)bytes, buf); text.length = bytes; for (i = 0; i < bytes; i++) text.ptr[i] = ' '; @@ -2199,7 +2199,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, else count = ctx->text.right_column; if (count > right - left) - count -= right - left; + count = (int)(count - (right - left)); else count = 0; } @@ -2219,12 +2219,12 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, if ((XawTextFormat(ctx, XawFmt8Bit) && isalnum(*(unsigned char*)block.ptr)) || (XawTextFormat(ctx, XawFmtWide) - && iswalnum(*(wchar_t*)block.ptr))) + && iswalnum((wint_t)*(wchar_t*)block.ptr))) alnum = 1; } count = (count + alnum) >> 1; } - text.ptr = XawStackAlloc(count, buf); + text.ptr = XawStackAlloc((unsigned)count, buf); text.length = count; for (i = 0; i < count; i++) text.ptr[i] = ' '; @@ -2264,7 +2264,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, inc = ii = (count + .5) / (double)i; steps = count; - text.ptr = XawStackAlloc(steps, buf); + text.ptr = XawStackAlloc((unsigned)steps, buf); for (i = 0; i < steps; i++) text.ptr[i] = ' '; tmp = left; @@ -2317,7 +2317,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, /*ARGSUSED*/ static void -Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) +Indent(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; TextSrcObject src = (TextSrcObject)ctx->text.source; @@ -2338,7 +2338,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) StartAction(ctx, event); pos = XawStackAlloc(sizeof(XawTextPosition) * src->textSrc.num_text, posbuf); - for (i = 0; i < src->textSrc.num_text; i++) + for (i = 0; (Cardinal)i < src->textSrc.num_text; i++) pos[i] = ((TextWidget)src->textSrc.text[i])->text.insertPos; if (!GetBlockBoundaries(ctx, &from, &to)) { @@ -2348,14 +2348,14 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) } if (undo) { - llen = to - from; + llen = (unsigned)(to - from); end = ctx->text.lastPos; lbuf = _XawTextGetText(ctx, from, to); src->textSrc.undo_state = True; } tmp = ctx->text.lastPos; - if (!Untabify(ctx, from, to, pos, src->textSrc.num_text, NULL)) { + if (!Untabify(ctx, from, to, pos, (int)src->textSrc.num_text, NULL)) { XBell(XtDisplay(ctx), 0); EndAction(ctx); XawStackFree(pos, posbuf); @@ -2370,7 +2370,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) tmp = from; if (spaces > 0) { - text.ptr = XawStackAlloc(spaces, buf); + text.ptr = XawStackAlloc((unsigned)spaces, buf); for (i = 0; i < spaces; i++) text.ptr[i] = ' '; @@ -2378,7 +2378,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) while (tmp < to) { _XawTextReplace(ctx, tmp, tmp, &text); - for (i = 0; i < src->textSrc.num_text; i++) + for (i = 0; (Cardinal)i < src->textSrc.num_text; i++) if (tmp < pos[i]) pos[i] += spaces; @@ -2407,7 +2407,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) while (tmp < to) { _XawTextReplace(ctx, tmp, tmp + spaces, &text); - for (i = 0; i < src->textSrc.num_text; i++) + for (i = 0; (Cardinal)i < src->textSrc.num_text; i++) if (tmp < pos[i]) { if (tmp + spaces < pos[i]) pos[i] -= spaces; @@ -2421,22 +2421,22 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) } if (!format) - Tabify(ctx, from, to, pos, src->textSrc.num_text, NULL); + Tabify(ctx, from, to, pos, (int)src->textSrc.num_text, NULL); if (undo) { - rlen = llen + (ctx->text.lastPos - end); + rlen = (unsigned)(llen + (ctx->text.lastPos - end)); rbuf = _XawTextGetText(ctx, from, from + rlen); - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); size = XawTextFormat(ctx, XawFmtWide) ? sizeof(wchar_t) : sizeof(char); if (llen != rlen || memcmp(lbuf, rbuf, llen * size)) { text.ptr = lbuf; - text.length = llen; + text.length = (int)llen; _XawTextReplace(ctx, from, from + rlen, &text); src->textSrc.undo_state = False; text.ptr = rbuf; - text.length = rlen; + text.length = (int)rlen; _XawTextReplace(ctx, from, from + llen, &text); } else @@ -2445,7 +2445,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) XtFree(rbuf); } - for (i = 0; i < src->textSrc.num_text; i++) { + for (i = 0; (Cardinal)i < src->textSrc.num_text; i++) { TextWidget tw = (TextWidget)src->textSrc.text[i]; tw->text.insertPos = XawMin(XawMax(0, pos[i]), tw->text.lastPos); @@ -2458,7 +2458,7 @@ Indent(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -ToggleOverwrite(Widget w, XEvent *event, String *params, Cardinal *num_params) +ToggleOverwrite(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; @@ -2487,20 +2487,20 @@ InsertNewLineAndBackupInternal(TextWidget ctx) return (XawEditError); } - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); text.length = mult; text.firstPos = 0; if (text.format == XawFmtWide) { wchar_t *wptr; - text.ptr = XawStackAlloc(sizeof(wchar_t) * mult, buf); + text.ptr = (XawStackAlloc(sizeof(wchar_t) * (size_t)mult, buf)); wptr = (wchar_t *)text.ptr; for (count = 0; count < mult; count++) wptr[count] = _Xaw_atowc(XawLF); } else { - text.ptr = XawStackAlloc(sizeof(char) * mult, buf); + text.ptr = (XawStackAlloc(sizeof(char) * (size_t)mult, buf)); for (count = 0; count < mult; count++) text.ptr[count] = XawLF; } @@ -2531,7 +2531,7 @@ InsertNewLineAndBackupInternal(TextWidget ctx) /*ARGSUSED*/ static void -InsertNewLineAndBackup(Widget w, XEvent *event, String *p, Cardinal *n) +InsertNewLineAndBackup(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { TextWidget ctx = (TextWidget)w; XawTextPosition insertPos = ctx->text.insertPos; @@ -2558,20 +2558,20 @@ LocalInsertNewLine(TextWidget ctx, XEvent *event) /*ARGSUSED*/ static void -InsertNewLine(Widget w, XEvent *event, String *p, Cardinal *n) +InsertNewLine(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { (void)LocalInsertNewLine((TextWidget)w, event); } /*ARGSUSED*/ static void -InsertNewLineAndIndent(Widget w, XEvent *event, String *p, Cardinal *n) +InsertNewLineAndIndent(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { XawTextBlock text; XawTextPosition pos1; int length; TextWidget ctx = (TextWidget)w; - String line_to_ip; + char * line_to_ip; StartAction(ctx, event); pos1 = SrcScan(ctx->text.source, ctx->text.insertPos, @@ -2579,29 +2579,29 @@ InsertNewLineAndIndent(Widget w, XEvent *event, String *p, Cardinal *n) line_to_ip = _XawTextGetText(ctx, pos1, ctx->text.insertPos); - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); text.firstPos = 0; if (text.format == XawFmtWide) { wchar_t *ptr; - text.ptr = XtMalloc((2 + wcslen((wchar_t*)line_to_ip)) - * sizeof(wchar_t)); + text.ptr = XtMalloc((Cardinal)((2 + wcslen((wchar_t*)line_to_ip)) + * sizeof(wchar_t))); ptr = (wchar_t*)text.ptr; ptr[0] = _Xaw_atowc(XawLF); wcscpy((wchar_t*)++ptr, (wchar_t*)line_to_ip); - length = wcslen((wchar_t*)text.ptr); + length = (int)wcslen((wchar_t*)text.ptr); while (length && (iswspace(*ptr) || *ptr == _Xaw_atowc(XawTAB))) ptr++, length--; *ptr = (wchar_t)0; - text.length = wcslen((wchar_t*)text.ptr); + text.length = (int)wcslen((wchar_t*)text.ptr); } else { char *ptr; - length = strlen(line_to_ip); - text.ptr = XtMalloc((2 + length) * sizeof(char)); + length = (int)strlen(line_to_ip); + text.ptr = XtMalloc(((size_t)(2 + length) * sizeof(char))); ptr = text.ptr; ptr[0] = XawLF; strcpy(++ptr, line_to_ip); @@ -2610,7 +2610,7 @@ InsertNewLineAndIndent(Widget w, XEvent *event, String *p, Cardinal *n) while (length && (isspace(*ptr) || (*ptr == XawTAB))) ptr++, length--; *ptr = '\0'; - text.length = strlen(text.ptr); + text.length = (int)strlen(text.ptr); } XtFree(line_to_ip); @@ -2778,18 +2778,17 @@ ExtendEnd(Widget w, XEvent *event, String *params, Cardinal *num_params) static void SelectSave(Widget w, XEvent *event, String *params, Cardinal *num_params) { - int num_atoms; + int num_atoms, n; Atom *sel; Display *dpy = XtDisplay(w); Atom selections[256]; StartAction((TextWidget)w, event); - num_atoms = *num_params; + num_atoms = (int)*num_params; if (num_atoms > 256) num_atoms = 256; - for (sel=selections; --num_atoms >= 0; sel++, params++) + for (sel = selections, n = 0; n < num_atoms; n++, sel++, params++) *sel = XInternAtom(dpy, *params, False); - num_atoms = *num_params; _XawTextSaltAwaySelection((TextWidget)w, selections, num_atoms); EndAction((TextWidget)w); } @@ -2799,7 +2798,7 @@ SelectSave(Widget w, XEvent *event, String *params, Cardinal *num_params) */ /*ARGSUSED*/ static void -SetKeyboardFocus(Widget w, XEvent *event, String *params, Cardinal *num_params) +SetKeyboardFocus(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { Widget shell, parent; @@ -2814,7 +2813,7 @@ SetKeyboardFocus(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -RedrawDisplay(Widget w, XEvent *event, String *p, Cardinal *n) +RedrawDisplay(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { StartAction((TextWidget)w, event); _XawTextClearAndCenterDisplay((TextWidget)w); @@ -2834,7 +2833,7 @@ static Cardinal num_focus; /*ARGSUSED*/ static void -DestroyFocusCallback(Widget w, XtPointer user_data, XtPointer call_data) +DestroyFocusCallback(Widget w, XtPointer user_data, XtPointer call_data _X_UNUSED) { struct _focus *f = (struct _focus*)(user_data); @@ -2877,13 +2876,13 @@ TextFocusIn(Widget w, XEvent *event, String *p, Cardinal *n) if (display_caret) EndAction(ctx); - for (i = 0; i < num_focus; i++) + for (i = 0; (Cardinal)i < num_focus; i++) if (focus[i].display == XtDisplay(w)) break; - if (i >= num_focus) { + if ((Cardinal)i >= num_focus) { focus = (struct _focus*) - XtRealloc((XtPointer)focus, sizeof(struct _focus) * (num_focus + 1)); - i = num_focus; + XtRealloc((XtPointer)focus, (Cardinal)(sizeof(struct _focus) * (num_focus + 1))); + i = (int)num_focus; focus[i].widget = NULL; focus[i].display = XtDisplay(w); num_focus++; @@ -2904,7 +2903,7 @@ TextFocusIn(Widget w, XEvent *event, String *p, Cardinal *n) /*ARGSUSED*/ static void -TextFocusOut(Widget w, XEvent *event, String *p, Cardinal *n) +TextFocusOut(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { TextWidget ctx = (TextWidget)w; Bool display_caret = ctx->text.display_caret; @@ -2919,16 +2918,16 @@ TextFocusOut(Widget w, XEvent *event, String *p, Cardinal *n) shell = XtParent(shell); } - for (i = 0; i < num_focus; i++) + for (i = 0; (Cardinal)i < num_focus; i++) if (focus[i].display == XtDisplay(w)) break; XGetInputFocus(XtDisplay(w), &window, &revert); if ((XtWindow(shell) == window && - (i < num_focus && focus[i].widget == w)) + ((Cardinal)i < num_focus && focus[i].widget == w)) || event->xfocus.detail == NotifyPointer) return; - if (i < num_focus && focus[i].widget) { + if ((Cardinal)i < num_focus && focus[i].widget) { XtRemoveCallback(focus[i].widget, XtNdestroyCallback, DestroyFocusCallback, (XtPointer)&focus[i]); focus[i].widget = NULL; @@ -2946,7 +2945,7 @@ TextFocusOut(Widget w, XEvent *event, String *p, Cardinal *n) /*ARGSUSED*/ static void -TextEnterWindow(Widget w, XEvent *event, String *params, Cardinal *num_params) +TextEnterWindow(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; @@ -2957,7 +2956,7 @@ TextEnterWindow(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -TextLeaveWindow(Widget w, XEvent *event, String *params, Cardinal *num_params) +TextLeaveWindow(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; @@ -3035,7 +3034,7 @@ AutoFill(TextWidget ctx) /*ARGSUSED*/ static void -InsertChar(Widget w, XEvent *event, String *p, Cardinal *n) +InsertChar(Widget w, XEvent *event, String *p _X_UNUSED, Cardinal *n _X_UNUSED) { TextWidget ctx = (TextWidget)w; char *ptr, strbuf[128], ptrbuf[512]; @@ -3062,13 +3061,13 @@ InsertChar(Widget w, XEvent *event, String *p, Cardinal *n) return; } - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); if (text.format == XawFmtWide) { - text.ptr = ptr = XawStackAlloc(sizeof(wchar_t) * text.length - * mult, ptrbuf); + text.ptr = ptr = XawStackAlloc(sizeof(wchar_t) * (size_t)text.length + * (size_t)mult, ptrbuf); for (count = 0; count < mult; count++) { - memcpy((char*)ptr, (char *)strbuf, sizeof(wchar_t) * text.length); - ptr += sizeof(wchar_t) * text.length; + memcpy((char*)ptr, (char *)strbuf, sizeof(wchar_t) * (size_t)text.length); + ptr += sizeof(wchar_t) * (size_t)text.length; } #ifndef OLDXAW if (mult == 1) @@ -3076,9 +3075,9 @@ InsertChar(Widget w, XEvent *event, String *p, Cardinal *n) #endif } else { /* == XawFmt8Bit */ - text.ptr = ptr = XawStackAlloc(text.length * mult, ptrbuf); + text.ptr = ptr = XawStackAlloc((unsigned)(text.length * mult), ptrbuf); for (count = 0; count < mult; count++) { - strncpy(ptr, strbuf, text.length); + strncpy(ptr, strbuf, (size_t)text.length); ptr += text.length; } #ifndef OLDXAW @@ -3226,7 +3225,7 @@ IfHexConvertHexElseReturnParam(char *param, int *len_return) /* reject if it doesn't begin with 0x and at least one more character. */ if ((param[0] != '0') || (param[1] != 'x') || (param[2] == '\0')) { - *len_return = strlen(param); + *len_return = (int)strlen(param); return(param); } @@ -3236,13 +3235,13 @@ IfHexConvertHexElseReturnParam(char *param, int *len_return) hexval[ind] = '\0'; for (p = param+2; (c = *p) != '\0'; p++) { - hexval[ind] *= 16; + hexval[ind] = (char)(hexval[ind] * 16); if (c >= '0' && c <= '9') - hexval[ind] += c - '0'; + hexval[ind] = (char)(hexval[ind] + (c - '0')); else if (c >= 'a' && c <= 'f') - hexval[ind] += c - 'a' + 10; + hexval[ind] = (char)(hexval[ind] + (c - 'a' + 10)); else if (c >= 'A' && c <= 'F') - hexval[ind] += c - 'A' + 10; + hexval[ind] = (char)(hexval[ind] + (c - 'A' + 10)); else break; @@ -3254,7 +3253,7 @@ IfHexConvertHexElseReturnParam(char *param, int *len_return) if (++ind < XawTextActionMaxHexChars) hexval[ind] = '\0'; else { - *len_return = strlen(param); + *len_return = (int)strlen(param); return(param); } } @@ -3262,13 +3261,13 @@ IfHexConvertHexElseReturnParam(char *param, int *len_return) /* We quit the above loop becasue we hit a non hex. If that char is \0... */ if ((c == '\0') && first_digit) { - *len_return = strlen(hexval); + *len_return = (int)strlen(hexval); return (hexval); /* ...it was a legal hex string, so return it */ } /* Else, there were non-hex chars or odd digit count, so... */ - *len_return = strlen(param); + *len_return = (int)strlen(param); return (param); /* ...return the verbatim string. */ } @@ -3292,10 +3291,10 @@ InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params) int i; text.firstPos = 0; - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); StartAction(ctx, event); - for (i = *num_params; i; i--, params++) { /* DO FOR EACH PARAMETER */ + for (i = (int)*num_params; i; i--, params++) { /* DO FOR EACH PARAMETER */ text.ptr = IfHexConvertHexElseReturnParam(*params, &text.length); if (text.length == 0) @@ -3371,7 +3370,7 @@ DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params) if (*num_params > 0) { /* default arg is "True" */ XrmValue from, to; - from.size = strlen(from.addr = params[0]); + from.size = (unsigned)strlen(from.addr = params[0]); XtConvert(w, XtRString, &from, XtRBoolean, &to); if (to.addr != NULL) @@ -3380,7 +3379,7 @@ DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params) return; } StartAction(ctx, event); - ctx->text.display_caret = display_caret; + ctx->text.display_caret = (Boolean)display_caret; EndAction(ctx); } @@ -3417,13 +3416,13 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params) return; } else if (mult == 32767) { - mult = ctx->text.mult = - (params[0][0] - '0'); + mult = ctx->text.mult = (short)(- (params[0][0] - '0')); return; } else { mult = mult * 10 + (params[0][0] - '0') * (mult < 0 ? -1 : 1); - ctx->text.mult = ctx->text.mult * 10 + (params[0][0] - '0') * - (mult < 0 ? -1 : 1); + ctx->text.mult = (short)(ctx->text.mult * 10 + (params[0][0] - '0') * + (mult < 0 ? -1 : 1)); } if (mult != ctx->text.mult || mult >= 32767) { /* checks for overflow */ XBell(XtDisplay(w), 0); @@ -3438,7 +3437,7 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -KeyboardReset(Widget w, XEvent *event, String *params, Cardinal *num_params) +KeyboardReset(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; @@ -3468,7 +3467,7 @@ KeyboardReset(Widget w, XEvent *event, String *params, Cardinal *num_params) * The string reset will reset the mutiplication factor to 1. */ /*ARGSUSED*/ static void -Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) +Multiply(Widget w, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { TextWidget ctx = (TextWidget)w; int mult; @@ -3508,7 +3507,7 @@ Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) return; } - ctx->text.mult *= mult; + ctx->text.mult = (short)(ctx->text.mult * mult); } /* StripOutOldCRs() - called from FormRegion @@ -3530,7 +3529,7 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, /* Initialize our TextBlock with two spaces. */ text.firstPos = 0; - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); if (text.format == XawFmt8Bit) text.ptr= " "; else { @@ -3572,7 +3571,7 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, next_word = SrcScan(src, endPos, XawstWhiteSpace, XawsdRight, 1, False); - len = next_word - periodPos; + len = (int)(next_word - periodPos); text.length = 1; buf = _XawTextGetText(ctx, periodPos, next_word); @@ -3635,7 +3634,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, text.firstPos = 0; text.length = 1; - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); if (text.format == XawFmt8Bit) text.ptr = "\n"; @@ -3771,7 +3770,7 @@ BlankLine(Widget w, XawTextPosition pos, int *blanks_return) XawTextPosition r = SrcScan(src, pos, XawstEOL, XawsdRight, 1, False); while (l < r) { - l = XawTextSourceRead(src, l, &block, r - l); + l = XawTextSourceRead(src, l, &block, (int)(r - l)); if (block.length == 0) { if (blanks_return) *blanks_return = blanks; @@ -3837,7 +3836,7 @@ GetBlockBoundaries(TextWidget ctx, (XawTextFormat(ctx, XawFmtWide) && _Xaw_atowc(XawSP) != *(wchar_t*)block.ptr && _Xaw_atowc(XawTAB) != *(wchar_t*)block.ptr && - !iswalnum(*(wchar_t*)block.ptr)) || + !iswalnum((wint_t)*(wchar_t*)block.ptr)) || BlankLine((Widget)ctx, from, NULL)) { from = tmp; break; @@ -3865,7 +3864,7 @@ GetBlockBoundaries(TextWidget ctx, (XawTextFormat(ctx, XawFmtWide) && _Xaw_atowc(XawSP) != *(wchar_t*)block.ptr && _Xaw_atowc(XawTAB) != *(wchar_t*)block.ptr && - !iswalnum(*(wchar_t*)block.ptr)) || + !iswalnum((wint_t)*(wchar_t*)block.ptr)) || BlankLine((Widget)ctx, to, NULL)) break; if (to == tmp && !first) @@ -3903,7 +3902,7 @@ GetBlockBoundaries(TextWidget ctx, * removes and reinserts CRs to maximize line length without clipping */ /*ARGSUSED*/ static void -FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) +FormParagraph(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; XawTextPosition from, to, buf[32], *pos; @@ -3939,7 +3938,7 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) endPos = ctx->text.lastPos; } - if (FormRegion(ctx, from, to, pos, src->textSrc.num_text) == XawReplaceError) { + if (FormRegion(ctx, from, to, pos, (int)src->textSrc.num_text) == XawReplaceError) { XawStackFree(pos, buf); pos = buf; #else @@ -3964,23 +3963,23 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) unsigned llen, rlen, size; XawTextBlock block; - llen = to - from; - rlen = llen + (ctx->text.lastPos - endPos); + llen = (unsigned)(to - from); + rlen = (unsigned)(llen + (ctx->text.lastPos - endPos)); block.firstPos = 0; - block.format = _XawTextFormat(ctx); + block.format = (unsigned long)_XawTextFormat(ctx); rbuf = _XawTextGetText(ctx, from, from + rlen); size = XawTextFormat(ctx, XawFmtWide) ? sizeof(wchar_t) : sizeof(char); if (llen != rlen || memcmp(lbuf, rbuf, llen * size)) { block.ptr = lbuf; - block.length = llen; + block.length = (int)llen; _XawTextReplace(ctx, from, from + rlen, &block); src->textSrc.undo_state = False; block.ptr = rbuf; - block.length = rlen; + block.length = (int)rlen; _XawTextReplace(ctx, from, from + llen, &block); } else @@ -4016,7 +4015,7 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void TransposeCharacters(Widget w, XEvent *event, - String *params, Cardinal *num_params) + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; XawTextPosition start, end; @@ -4050,7 +4049,7 @@ TransposeCharacters(Widget w, XEvent *event, ctx->text.insertPos = end; text.firstPos = 0; - text.format = _XawTextFormat(ctx); + text.format = (unsigned long)_XawTextFormat(ctx); /* Retrieve text and swap the characters. */ if (text.format == XawFmtWide) { @@ -4058,7 +4057,7 @@ TransposeCharacters(Widget w, XEvent *event, wchar_t *wbuf; wbuf = (wchar_t*)_XawTextGetText(ctx, start, end); - text.length = wcslen(wbuf); + text.length = (int)wcslen(wbuf); wc = wbuf[0]; for (i = 1; i < text.length; i++) wbuf[i - 1] = wbuf[i]; @@ -4069,7 +4068,7 @@ TransposeCharacters(Widget w, XEvent *event, char c; buf = _XawTextGetText(ctx, start, end); - text.length = strlen(buf); + text.length = (int)strlen(buf); c = buf[0]; for (i = 1; i < text.length; i++) buf[i - 1] = buf[i]; @@ -4089,7 +4088,7 @@ TransposeCharacters(Widget w, XEvent *event, #ifndef OLDXAW /*ARGSUSED*/ static void -Undo(Widget w, XEvent *event, String *params, Cardinal *num_params) +Undo(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget ctx = (TextWidget)w; int mul = MULT(ctx); @@ -4098,7 +4097,7 @@ Undo(Widget w, XEvent *event, String *params, Cardinal *num_params) if (mul < 0) { toggle = True; _XawTextSrcToggleUndo((TextSrcObject)ctx->text.source); - ctx->text.mult = mul = -mul; + ctx->text.mult = (short)(mul = -mul); } StartAction(ctx, event); @@ -4122,7 +4121,7 @@ Undo(Widget w, XEvent *event, String *params, Cardinal *num_params) */ /*ARGSUSED*/ static void -NoOp(Widget w, XEvent *event, String *params, Cardinal *num_params) +NoOp(Widget w, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { if (*num_params != 1) return; @@ -4144,7 +4143,7 @@ NoOp(Widget w, XEvent *event, String *params, Cardinal *num_params) */ /*ARGSUSED*/ static void -Reconnect(Widget w, XEvent *event, String *params, Cardinal *num_params) +Reconnect(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { _XawImReconnect(w); } @@ -4233,8 +4232,8 @@ CaseProc(Widget w, XEvent *event, int cmd) left = SrcScan(ctx->text.source, right = ctx->text.insertPos, XawstAlphaNumeric, XawsdLeft, 1 + -mul, False); block.firstPos = 0; - block.format = _XawTextFormat(ctx); - block.length = right - left; + block.format = (unsigned long)_XawTextFormat(ctx); + block.length = (int)(right - left); block.ptr = _XawTextGetText(ctx, left, right); count = 0; @@ -4243,16 +4242,16 @@ CaseProc(Widget w, XEvent *event, int cmd) if (!IsAlnum(*mb = (unsigned char)block.ptr[i])) count = 0; else if (++count == 1 || cmd != CAPITALIZE) { - ch = cmd == DOWNCASE ? ToLower(*mb) : ToUpper(*mb); + ch = (unsigned char)((cmd == DOWNCASE) ? ToLower(*mb) : ToUpper(*mb)); if (ch != *mb) { changed = True; - block.ptr[i] = ch; + block.ptr[i] = (char)ch; } } else if (cmd == CAPITALIZE) { - if ((ch = ToLower(*mb)) != *mb) { + if ((ch = (unsigned char)(ToLower(*mb))) != *mb) { changed = True; - block.ptr[i] = ch; + block.ptr[i] = (char)ch; } } } @@ -4262,14 +4261,14 @@ CaseProc(Widget w, XEvent *event, int cmd) if (!IsAlnum(*mb)) count = 0; else if (++count == 1 || cmd != CAPITALIZE) { - ch = cmd == DOWNCASE ? ToLower(*mb) : ToUpper(*mb); + ch = (unsigned char)((cmd == DOWNCASE) ? ToLower(*mb) : ToUpper(*mb)); if (ch != *mb) { changed = True; ((wchar_t*)block.ptr)[i] = _Xaw_atowc(ch); } } else if (cmd == CAPITALIZE) { - if ((ch = ToLower(*mb)) != *mb) { + if ((ch = (unsigned char)(ToLower(*mb))) != *mb) { changed = True; ((wchar_t*)block.ptr)[i] = _Xaw_atowc(ch); } @@ -4287,21 +4286,21 @@ CaseProc(Widget w, XEvent *event, int cmd) /*ARGSUSED*/ static void -CapitalizeWord(Widget w, XEvent *event, String *params, Cardinal *num_params) +CapitalizeWord(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CaseProc(w, event, CAPITALIZE); } /*ARGSUSED*/ static void -DowncaseWord(Widget w, XEvent *event, String *params, Cardinal *num_params) +DowncaseWord(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CaseProc(w, event, DOWNCASE); } /*ARGSUSED*/ static void -UpcaseWord(Widget w, XEvent *event, String *params, Cardinal *num_params) +UpcaseWord(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { CaseProc(w, event, UPCASE); } diff --git a/lib/libXaw/src/TextPop.c b/lib/libXaw/src/TextPop.c index 3ff29b953..3f942aa4d 100644 --- a/lib/libXaw/src/TextPop.c +++ b/lib/libXaw/src/TextPop.c @@ -61,25 +61,25 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xaw/Toggle.h> #include "XawI18n.h" -static char* INSERT_FILE = "Enter Filename:"; -static char* SEARCH_LABEL_1 = "Use <Tab> to change fields."; -static char* SEARCH_LABEL_2 = "Use ^q<Tab> for <Tab>."; -static char* DISMISS_NAME = "cancel"; +static _Xconst char* INSERT_FILE = "Enter Filename:"; +static _Xconst char* SEARCH_LABEL_1 = "Use <Tab> to change fields."; +static _Xconst char* SEARCH_LABEL_2 = "Use ^q<Tab> for <Tab>."; +static _Xconst char* DISMISS_NAME = "cancel"; #define DISMISS_NAME_LEN 6 -static char* FORM_NAME = "form"; -static char* LABEL_NAME = "label"; -static char* TEXT_NAME = "text"; +static _Xconst char* FORM_NAME = "form"; +static _Xconst char* LABEL_NAME = "label"; +static _Xconst char* TEXT_NAME = "text"; #define R_OFFSET 1 -typedef void (*AddFunc)(Widget, char*, Widget); +typedef void (*AddFunc)(Widget, String, Widget); /* * Prototypes */ static void _SetField(Widget, Widget); -static void AddSearchChildren(Widget, char*, Widget); -static void AddInsertFileChildren(Widget, char*, Widget); +static void AddSearchChildren(Widget, String, Widget); +static void AddInsertFileChildren(Widget, String, Widget); static void CenterWidgetOnPoint(Widget, XEvent*); static Widget CreateDialog(Widget, String, String, AddFunc); static void DoInsert(Widget, XtPointer, XtPointer); @@ -88,17 +88,17 @@ static void DoReplaceOne(Widget, XtPointer, XtPointer); static Bool DoSearch(struct SearchAndReplace*); static Widget GetShell(Widget); static String GetString(Widget); -static String GetStringRaw(Widget); +static _XtString GetStringRaw(Widget); static void InitializeSearchWidget(struct SearchAndReplace*, XawTextScanDirection, Bool); static Bool InParams(String, String*, unsigned int); -static Bool InsertFileNamed(Widget, char*); +static Bool InsertFileNamed(Widget, String); static void PopdownFileInsert(Widget, XtPointer, XtPointer); static void PopdownSearch(Widget, XtPointer, XtPointer); static Bool Replace(struct SearchAndReplace*, Bool, Bool); static void SearchButton(Widget, XtPointer, XtPointer); -static void SetResource(Widget, char*, XtArgVal); -static Bool SetResourceByName(Widget, char*, char*, XtArgVal); +static void SetResource(Widget, String, XtArgVal); +static Bool SetResourceByName(Widget, String, String, XtArgVal); static void SetSearchLabels(struct SearchAndReplace*, String, String, Bool); static void SetWMProtocolTranslations(Widget); @@ -165,8 +165,8 @@ static char rep_text_trans[] = */ /*ARGSUSED*/ void -_XawTextInsertFileAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) +_XawTextInsertFileAction(Widget w, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { DoInsert(w, (XtPointer)XtParent(XtParent(XtParent(w))), NULL); } @@ -197,7 +197,7 @@ _XawTextInsertFile(Widget w, XEvent *event, String *params, Cardinal *num_params) { TextWidget ctx = (TextWidget)w; - char *ptr; + String ptr; XawTextEditType edit_mode; Arg args[1]; @@ -239,7 +239,7 @@ _XawTextInsertFile(Widget w, XEvent *event, */ /*ARGSUSED*/ static void -PopdownFileInsert(Widget w, XtPointer closure, XtPointer call_data) +PopdownFileInsert(Widget w _X_UNUSED, XtPointer closure, XtPointer call_data _X_UNUSED) { TextWidget ctx = (TextWidget)closure; @@ -299,7 +299,7 @@ DoInsert(Widget w, XtPointer closure, XtPointer call_data) * True if the insert was sucessful, False otherwise. */ static Bool -InsertFileNamed(Widget tw, char *str) +InsertFileNamed(Widget tw, String str) { FILE *file; XawTextBlock text; @@ -313,12 +313,12 @@ InsertFileNamed(Widget tw, char *str) fseek(file, 0L, SEEK_END); text.firstPos = 0; - text.length = ftell(file); - text.ptr = XtMalloc(text.length + 1); + text.length = (int)ftell(file); + text.ptr = XtMalloc((Cardinal)(text.length + 1)); text.format = XawFmt8Bit; fseek(file, 0L, SEEK_SET); - if (fread(text.ptr, 1, text.length, file) != text.length) + if (fread(text.ptr, 1, (size_t)text.length, file) != (size_t)text.length) XtErrorMsg("readError", "insertFileNamed", "XawError", "fread returned error", NULL, NULL); @@ -349,7 +349,7 @@ InsertFileNamed(Widget tw, char *str) * Adds all children to the InsertFile dialog widget. */ static void -AddInsertFileChildren(Widget form, char *ptr, Widget tw) +AddInsertFileChildren(Widget form, String ptr, Widget tw) { Arg args[10]; Cardinal num_args; @@ -423,7 +423,7 @@ AddInsertFileChildren(Widget form, char *ptr, Widget tw) */ /*ARGSUSED*/ void -_XawTextDoSearchAction(Widget w, XEvent *event, +_XawTextDoSearchAction(Widget w, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { TextWidget tw = (TextWidget)XtParent(XtParent(XtParent(w))); @@ -446,8 +446,8 @@ _XawTextDoSearchAction(Widget w, XEvent *event, */ /*ARGSUSED*/ void -_XawTextPopdownSearchAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) +_XawTextPopdownSearchAction(Widget w, XEvent *event _X_UNUSED, + String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { TextWidget tw = (TextWidget)XtParent(XtParent(XtParent(w))); @@ -468,7 +468,7 @@ _XawTextPopdownSearchAction(Widget w, XEvent *event, */ /*ARGSUSED*/ static void -PopdownSearch(Widget w, XtPointer closure, XtPointer call_data) +PopdownSearch(Widget w _X_UNUSED, XtPointer closure, XtPointer call_data _X_UNUSED) { struct SearchAndReplace *search = (struct SearchAndReplace *)closure; @@ -490,7 +490,7 @@ PopdownSearch(Widget w, XtPointer closure, XtPointer call_data) */ /*ARGSUSED*/ static void -SearchButton(Widget w, XtPointer closure, XtPointer call_data) +SearchButton(Widget w _X_UNUSED, XtPointer closure, XtPointer call_data _X_UNUSED) { (void)DoSearch((struct SearchAndReplace *)closure); } @@ -529,7 +529,8 @@ _XawTextSearch(Widget w, XEvent *event, String *params, Cardinal *num_params) { TextWidget ctx = (TextWidget)w; XawTextScanDirection dir; - char *ptr, buf[BUFSIZ]; + String ptr; + char buf[BUFSIZ]; XawTextEditType edit_mode; Arg args[1]; wchar_t wcs[1]; @@ -634,7 +635,7 @@ InitializeSearchWidget(struct SearchAndReplace *search, * Adds all children to the Search Dialog Widget. */ static void -AddSearchChildren(Widget form, char *ptr, Widget tw) +AddSearchChildren(Widget form, String ptr, Widget tw) { Arg args[10]; Cardinal num_args; @@ -844,10 +845,10 @@ DoSearch(struct SearchAndReplace *search) text.firstPos = 0; text.ptr = GetStringRaw(search->search_text); - if ((text.format = _XawTextFormat(ctx)) == XawFmtWide) - text.length = wcslen((wchar_t*)text.ptr); + if ((text.format = (unsigned long)_XawTextFormat(ctx)) == XawFmtWide) + text.length = (int)wcslen((wchar_t*)text.ptr); else { - text.length = strlen(text.ptr); + text.length = (int)strlen(text.ptr); #ifndef OLDXAW if (search->case_sensitive) { @@ -873,19 +874,19 @@ DoSearch(struct SearchAndReplace *search) GetString to get a tame version */ if (pos == XawTextSearchError) { - char *ptr; + String ptr; int len; ptr = GetString(search->search_text); - len = strlen(ptr); + len = (int)strlen(ptr); snprintf(msg, sizeof(msg), "%s", ptr); ptr = strchr(msg, '\n'); - if (ptr != NULL || sizeof(msg) - 1 < len) { + if (ptr != NULL || sizeof(msg) - 1 < (size_t)len) { if (ptr != NULL) - len = ptr - msg + 4; + len = (int)(ptr - msg + 4); else - len = strlen(msg); + len = (int)strlen(msg); if (len < 4) strcpy(msg, "..."); @@ -925,7 +926,7 @@ DoSearch(struct SearchAndReplace *search) */ /*ARGSUSED*/ void -_XawTextDoReplaceAction(Widget w, XEvent *event, +_XawTextDoReplaceAction(Widget w, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { TextWidget ctx = (TextWidget)XtParent(XtParent(XtParent(w))); @@ -953,7 +954,7 @@ _XawTextDoReplaceAction(Widget w, XEvent *event, */ /*ARGSUSED*/ static void -DoReplaceOne(Widget w, XtPointer closure, XtPointer call_data) +DoReplaceOne(Widget w _X_UNUSED, XtPointer closure, XtPointer call_data _X_UNUSED) { Replace((struct SearchAndReplace *)closure, True, False); } @@ -973,7 +974,7 @@ DoReplaceOne(Widget w, XtPointer closure, XtPointer call_data) */ /*ARGSUSED*/ static void -DoReplaceAll(Widget w, XtPointer closure, XtPointer call_data) +DoReplaceAll(Widget w _X_UNUSED, XtPointer closure, XtPointer call_data _X_UNUSED) { Replace((struct SearchAndReplace *)closure, False, False); } @@ -1006,18 +1007,18 @@ Replace(struct SearchAndReplace *search, Bool once_only, Bool show_current) Bool redisplay; find.ptr = GetStringRaw(search->search_text); - if ((find.format = _XawTextFormat(ctx)) == XawFmtWide) - find.length = (XawTextPosition)wcslen((wchar_t*)find.ptr); + if ((find.format = (unsigned long)_XawTextFormat(ctx)) == XawFmtWide) + find.length = (int)(XawTextPosition)wcslen((wchar_t*)find.ptr); else - find.length = (XawTextPosition)strlen(find.ptr); + find.length = (int)(XawTextPosition)strlen(find.ptr); find.firstPos = 0; replace.ptr = GetStringRaw(search->rep_text); replace.firstPos = 0; - if ((replace.format = _XawTextFormat(ctx)) == XawFmtWide) - replace.length = wcslen((wchar_t*)replace.ptr); + if ((replace.format = (unsigned long)_XawTextFormat(ctx)) == XawFmtWide) + replace.length = (int)wcslen((wchar_t*)replace.ptr); else - replace.length = strlen(replace.ptr); + replace.length = (int)strlen(replace.ptr); dir = (XawTextScanDirection)(unsigned long) ((XPointer)XawToggleGetCurrent(search->left_toggle) - R_OFFSET); @@ -1034,18 +1035,18 @@ Replace(struct SearchAndReplace *search, Bool once_only, Bool show_current) if (new_pos == XawTextSearchError) { if (count == 0) { char msg[37]; - char *ptr; + String ptr; int len; ptr = GetString(search->search_text); - len = strlen(ptr); + len = (int)strlen(ptr); snprintf(msg, sizeof(msg), "%s", ptr); ptr = strchr(msg, '\n'); - if (ptr != NULL || sizeof(msg) - 1 < len) { + if (ptr != NULL || sizeof(msg) - 1 < (size_t)len) { if (ptr != NULL) - len = ptr - msg + 4; + len = (int)(ptr - msg + 4); else - len = strlen(msg); + len = (int)strlen(msg); if (len < 4) strcpy(msg, "..."); @@ -1170,7 +1171,7 @@ SetSearchLabels(struct SearchAndReplace *search, String msg1, String msg2, */ /*ARGSUSED*/ void -_XawTextSetField(Widget w, XEvent *event, String *params, Cardinal *num_params) +_XawTextSetField(Widget w, XEvent *event _X_UNUSED, String *params, Cardinal *num_params) { struct SearchAndReplace *search; Widget cnew, old; @@ -1258,7 +1259,7 @@ _SetField(Widget cnew, Widget old) * True if sucessful */ static Bool -SetResourceByName(Widget shell, char *name, char *res_name, XtArgVal value) +SetResourceByName(Widget shell, String name, String res_name, XtArgVal value) { Widget temp_widget; char buf[BUFSIZ]; @@ -1285,7 +1286,7 @@ SetResourceByName(Widget shell, char *name, char *res_name, XtArgVal value) * Sets a resource in a widget */ static void -SetResource(Widget w, char *res_name, XtArgVal value) +SetResource(Widget w, String res_name, XtArgVal value) { Arg args[1]; @@ -1319,7 +1320,7 @@ GetString(Widget text) return (string); } -static String +static _XtString GetStringRaw(Widget tw) { TextWidget ctx = (TextWidget)tw; @@ -1356,13 +1357,13 @@ CenterWidgetOnPoint(Widget w, XEvent *event) switch (event->type) { case ButtonPress: case ButtonRelease: - x = event->xbutton.x_root; - y = event->xbutton.y_root; + x = (Position)event->xbutton.x_root; + y = (Position)event->xbutton.y_root; break; case KeyPress: case KeyRelease: - x = event->xkey.x_root; - y = event->xkey.y_root; + x = (Position)event->xkey.x_root; + y = (Position)event->xkey.y_root; break; default: return; @@ -1377,16 +1378,16 @@ CenterWidgetOnPoint(Widget w, XEvent *event) XtSetArg(args[num_args], XtNborderWidth, &b_width); num_args++; XtGetValues(w, args, num_args); - width += b_width << 1; - height += b_width << 1; + width = (Dimension)(width + (b_width << 1)); + height = (Dimension)(height + (b_width << 1)); - x -= (Position)(width >> 1); + x = (Position)(x - (width >> 1)); if (x < 0) x = 0; if (x > (max_x = (Position)(XtScreen(w)->width - width))) x = max_x; - y -= (Position)(height >> 1); + y = (Position)(y - (height >> 1)); if (y < 0) y = 0; if (y > (max_y = (Position)(XtScreen(w)->height - height))) @@ -1475,7 +1476,7 @@ InParams(String str, String *p, unsigned int n) return (False); } -static char *WM_DELETE_WINDOW = "WM_DELETE_WINDOW"; +static const char *WM_DELETE_WINDOW = "WM_DELETE_WINDOW"; static void WMProtocols(Widget w, XEvent *event, String *params, Cardinal *num_params) @@ -1495,7 +1496,7 @@ WMProtocols(Widget w, XEvent *event, String *params, Cardinal *num_params) if ((event->type == ClientMessage && event->xclient.message_type == wm_protocols - && event->xclient.data.l[0] == wm_delete_window + && (Atom)event->xclient.data.l[0] == wm_delete_window && (*num_params == 0 || DO_DELETE_WINDOW)) || (event->type != ClientMessage && DO_DELETE_WINDOW)) { #undef DO_DELETE_WINDOW @@ -1537,7 +1538,7 @@ SetWMProtocolTranslations(Widget w) actions[0].proc = WMProtocols; list_size++; app_context_list = (XtAppContext *)XtRealloc - ((char *)app_context_list, list_size * sizeof(XtAppContext)); + ((char *)app_context_list, (Cardinal)(list_size * sizeof(XtAppContext))); XtAppAddActions(app_context, actions, 1); app_context_list[i] = app_context; } diff --git a/lib/libXaw/src/TextSink.c b/lib/libXaw/src/TextSink.c index 333701b03..bb6b0f2d3 100644 --- a/lib/libXaw/src/TextSink.c +++ b/lib/libXaw/src/TextSink.c @@ -100,7 +100,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(foreground), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XtNbackground, @@ -109,7 +109,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(background), XtRString, - XtDefaultBackground + (XtPointer)XtDefaultBackground }, #ifndef OLDXAW { @@ -119,7 +119,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(cursor_color), XtRString, - XtDefaultForeground + (XtPointer)XtDefaultForeground }, { XawNtextProperties, @@ -293,8 +293,8 @@ XawTextSinkClassPartInitialize(WidgetClass wc) */ /*ARGSUSED*/ static void -XawTextSinkInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTextSinkInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TextSinkObject sink = (TextSinkObject)cnew; @@ -342,8 +342,8 @@ XawTextSinkDestroy(Widget w) */ /*ARGSUSED*/ static Boolean -XawTextSinkSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTextSinkSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TextSinkObject w = (TextSinkObject)cnew; TextSinkObject old_w = (TextSinkObject)current; @@ -371,8 +371,8 @@ XawTextSinkSetValues(Widget current, Widget request, Widget cnew, */ /*ARGSUSED*/ static void -DisplayText(Widget w, int x, int y, - XawTextPosition pos1, XawTextPosition pos2, Bool highlight) +DisplayText(Widget w _X_UNUSED, int x _X_UNUSED, int y _X_UNUSED, + XawTextPosition pos1 _X_UNUSED, XawTextPosition pos2 _X_UNUSED, Bool highlight _X_UNUSED) { return; } @@ -392,7 +392,7 @@ DisplayText(Widget w, int x, int y, */ /*ARGSUSED*/ static void -InsertCursor(Widget w, int x, int y, XawTextInsertState state) +InsertCursor(Widget w _X_UNUSED, int x _X_UNUSED, int y _X_UNUSED, XawTextInsertState state _X_UNUSED) { return; } @@ -423,15 +423,15 @@ ClearToBackground(Widget w, int x, int y, TextWidget xaw = (TextWidget)XtParent(w); Position x1, y1, x2, y2; - x1 = XawMax(x, xaw->text.r_margin.left); - y1 = XawMax(y, xaw->text.r_margin.top); - x2 = XawMin(x + (int)width, (int)XtWidth(xaw) - xaw->text.r_margin.right); - y2 = XawMin(y + (int)height, (int)XtHeight(xaw) - xaw->text.r_margin.bottom); + x1 = (XawMax(x, xaw->text.r_margin.left)); + y1 = (XawMax(y, xaw->text.r_margin.top)); + x2 = (XawMin(x + (int)width, (int)XtWidth(xaw) - xaw->text.r_margin.right)); + y2 = (XawMin(y + (int)height, (int)XtHeight(xaw) - xaw->text.r_margin.bottom)); - x = x1; - y = y1; - width = XawMax(0, x2 - x1); - height = XawMax(0, y2 - y1); + x = (int)x1; + y = (int)y1; + width = (unsigned)(XawMax(0, x2 - x1)); + height = (unsigned)(XawMax(0, y2 - y1)); if (height != 0 && width != 0) XClearArea(XtDisplayOfObject(w), XtWindowOfObject(w), @@ -457,8 +457,8 @@ ClearToBackground(Widget w, int x, int y, */ /*ARGSUSED*/ static void -FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, - Bool stopAtWordBreak, XawTextPosition *resPos, +FindPosition(Widget w _X_UNUSED, XawTextPosition fromPos _X_UNUSED, int fromx _X_UNUSED, int width _X_UNUSED, + Bool stopAtWordBreak _X_UNUSED, XawTextPosition *resPos, int *resWidth, int *resHeight) { *resPos = fromPos; @@ -483,8 +483,8 @@ FindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, */ /*ARGSUSED*/ static void -FindDistance(Widget w, XawTextPosition fromPos, int fromx, - XawTextPosition toPos, int *resWidth, +FindDistance(Widget w _X_UNUSED, XawTextPosition fromPos, int fromx _X_UNUSED, + XawTextPosition toPos _X_UNUSED, int *resWidth, XawTextPosition *resPos, int *resHeight) { *resWidth = *resHeight = 0; @@ -507,7 +507,7 @@ FindDistance(Widget w, XawTextPosition fromPos, int fromx, */ /*ARGSUSED*/ static void -Resolve(Widget w, XawTextPosition pos, int fromx, int width, +Resolve(Widget w _X_UNUSED, XawTextPosition pos _X_UNUSED, int fromx _X_UNUSED, int width _X_UNUSED, XawTextPosition *resPos) { *resPos = pos; @@ -529,7 +529,7 @@ Resolve(Widget w, XawTextPosition pos, int fromx, int width, */ /*ARGSUSED*/ static int -MaxLines(Widget w, unsigned int height) +MaxLines(Widget w _X_UNUSED, unsigned int height _X_UNUSED) { /* * The fontset has gone down to descent Sink Widget, so @@ -556,7 +556,7 @@ MaxLines(Widget w, unsigned int height) */ /*ARGSUSED*/ static int -MaxHeight(Widget w, int lines) +MaxHeight(Widget w _X_UNUSED, int lines _X_UNUSED) { return (0); } @@ -574,7 +574,7 @@ MaxHeight(Widget w, int lines) */ /*ARGSUSED*/ static void -SetTabs(Widget w, int tab_count, short *tabs) +SetTabs(Widget w _X_UNUSED, int tab_count _X_UNUSED, short *tabs _X_UNUSED) { return; } @@ -592,9 +592,9 @@ SetTabs(Widget w, int tab_count, short *tabs) */ /*ARGSUSED*/ static void -GetCursorBounds(Widget w, XRectangle *rect) +GetCursorBounds(Widget w _X_UNUSED, XRectangle *rect) { - rect->x = rect->y = rect->width = rect->height = 0; + rect->x = rect->y = (short)(rect->width = rect->height = 0); } /* @@ -858,7 +858,7 @@ XawTextSinkSetTabs(Widget w, int tab_count, int *tabs) { if (tab_count > 0) { TextSinkObjectClass cclass = (TextSinkObjectClass)w->core.widget_class; - short *char_tabs = (short*)XtMalloc((unsigned)tab_count * sizeof(short)); + short *char_tabs = (short*)XtMalloc((Cardinal)((unsigned)tab_count * sizeof(short))); short *tab, len = 0; int i; @@ -1015,7 +1015,7 @@ static Cardinal num_prop_lists; static int bcmp_qident(_Xconst void *left, _Xconst void *right) { - return ((long)left - (*(XawTextProperty**)right)->identifier); + return (int)((long)left - (*(XawTextProperty**)right)->identifier); } static int @@ -1102,7 +1102,7 @@ SetXlfdDefaults(Display *display, XawTextProperty *property) atom = XInternAtom(display, "UNDERLINE_THICKNESS", True); if (XGetFontProperty(property->font, atom, &value) && (str = XGetAtomName(display, value)) != NULL) { - property->underline_thickness = atoi(str); + property->underline_thickness = (short)(atoi(str)); XFree(str); } else { @@ -1115,9 +1115,9 @@ SetXlfdDefaults(Display *display, XawTextProperty *property) */ if (property->pixel_size != NULLQUARK) { property->underline_thickness = - atoi(XrmQuarkToString(property->pixel_size)) / 10; + (short)(atoi(XrmQuarkToString(property->pixel_size)) / 10); property->underline_thickness = - XawMax(1, property->underline_thickness); + (XawMax(1, property->underline_thickness)); } else property->underline_thickness = 1; @@ -1126,7 +1126,7 @@ SetXlfdDefaults(Display *display, XawTextProperty *property) atom = XInternAtom(display, "UNDERLINE_POSITION", True); if (XGetFontProperty(property->font, atom, &value) && (str = XGetAtomName(display, value)) != NULL) { - property->underline_position = atoi(str); + property->underline_position = (short)(atoi(str)); XFree(str); } else @@ -1139,8 +1139,8 @@ SetXlfdDefaults(Display *display, XawTextProperty *property) /* I am assuming xlfd does not consider that lines are * centered in the path */ - property->underline_position += property->underline_thickness >> 1; - + property->underline_position = (short)(property->underline_position + + (property->underline_thickness >> 1)); } static void @@ -1148,7 +1148,7 @@ DestroyTextPropertyList(XawTextPropertyList *list) { int i; - for (i = 0; i < list->num_properties; i++) { + for (i = 0; (Cardinal)i < list->num_properties; i++) { if (list->properties[i]->font) XFreeFont(DisplayOfScreen(list->screen), list->properties[i]->font); XtFree((char*)list->properties[i]); @@ -1194,7 +1194,7 @@ XawTextSinkCopyProperty(Widget w, XrmQuark property) if (cur) memcpy(ret, cur, sizeof(XawTextProperty)); ret->identifier = NULLQUARK; - ret->mask &= ~XAW_TPROP_FONT; + ret->mask &= (unsigned long)(~XAW_TPROP_FONT); return (ret); } @@ -1208,10 +1208,11 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, char identifier[1024]; char foreground[16]; char background[16]; - char *foundry, *family, *weight, *slant, *setwidth, *addstyle, *pixel_size, + const char *foundry, *family, *weight, *slant, *setwidth, *addstyle, *pixel_size, *point_size, *res_x, *res_y, *spacing, *avgwidth, *registry, *encoding; - char *xlfd; - static char *asterisk = "*", *null = ""; + const char *xlfd; + static const char *asterisk = "*"; + static const char *null = ""; XrmQuark quark; if (list == NULL || property == NULL) @@ -1324,7 +1325,7 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, SetXlfdDefaults(DisplayOfScreen(list->screen), result); } else - result->mask &= ~XAW_TPROP_FONT; + result->mask &= (unsigned long)(~XAW_TPROP_FONT); } if (result->font) @@ -1356,8 +1357,9 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, } list->properties = (XawTextProperty**) - XtRealloc((XtPointer)list->properties, sizeof(XawTextProperty*) * - (list->num_properties + 1)); + XtRealloc((XtPointer)list->properties, + (Cardinal)(sizeof(XawTextProperty*) * + (list->num_properties + 1))); list->properties[list->num_properties++] = result; qsort((void*)list->properties, list->num_properties, sizeof(XawTextProperty*), qcmp_qident); @@ -1375,7 +1377,7 @@ XawTextSinkAddProperty(Widget w, XawTextProperty *property) } XawTextProperty * -XawTextSinkCombineProperty(Widget w, +XawTextSinkCombineProperty(Widget w _X_UNUSED, XawTextProperty *property, XawTextProperty *combine, Bool override) { @@ -1498,7 +1500,9 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, XawTextPropertyList **ptr = NULL; XawTextPropertyList *propl, *prev = NULL; XawTextProperty *def_prop = NULL; - String str, tok, tmp; + char * str; + String tok; + char *tmp; char buffer[BUFSIZ]; if (prop_lists) ptr = (XawTextPropertyList**) @@ -1712,8 +1716,9 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, } prop_lists = (XawTextPropertyList**) - XtRealloc((XtPointer)prop_lists, sizeof(XawTextPropertyList*) * - (num_prop_lists + 1)); + XtRealloc((XtPointer)prop_lists, + (Cardinal)(sizeof(XawTextPropertyList*) * + (num_prop_lists + 1))); prop_lists[num_prop_lists++] = propl; qsort((void*)prop_lists, num_prop_lists, sizeof(XawTextPropertyList*), qcmp_qident); @@ -1727,7 +1732,7 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, static Boolean CvtStringToPropertyList(Display *dpy, XrmValue *args, Cardinal *num_args, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { XawTextPropertyList *propl = NULL; String name; @@ -1758,7 +1763,7 @@ CvtStringToPropertyList(Display *dpy, XrmValue *args, Cardinal *num_args, if (ptr) { Screen *screen = w->core.screen; Colormap colormap = w->core.colormap; - int depth = w->core.depth; + int depth = (int)w->core.depth; propl = *ptr; while (propl) { @@ -1799,18 +1804,26 @@ CvtStringToPropertyList(Display *dpy, XrmValue *args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtPropertyListToString(Display *dpy, XrmValue *args, Cardinal *num_args, +CvtPropertyListToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValue *fromVal, XrmValue *toVal, - XtPointer *converter_data) + XtPointer *converter_data _X_UNUSED) { static char *buffer; Cardinal size; XawTextPropertyList *propl; propl = *(XawTextPropertyList**)fromVal[0].addr; + if (propl == NULL) { + XtAppWarningMsg(XtDisplayToApplicationContext(dpy), + "wrongParameters", "cvtPropertyListToString", + "ToolkitError", + "textProperties to String conversion needs property list argument", + NULL, NULL); + return (False); + } buffer = XrmQuarkToString(propl->identifier); - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); if (toVal->addr != NULL) { if (toVal->size < size) { diff --git a/lib/libXaw/src/TextSrc.c b/lib/libXaw/src/TextSrc.c index 26ce47416..0a9db664b 100644 --- a/lib/libXaw/src/TextSrc.c +++ b/lib/libXaw/src/TextSrc.c @@ -143,7 +143,7 @@ static XtResource resources[] = { sizeof(XawTextEditType), offset(edit_mode), XtRString, - "read" + (XtPointer)"read" }, #ifndef OLDXAW { @@ -296,8 +296,8 @@ XawTextSrcClassPartInitialize(WidgetClass wc) /*ARGSUSED*/ static void -XawTextSrcInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTextSrcInitialize(Widget request _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { #ifndef OLDXAW TextSrcObject src = (TextSrcObject)cnew; @@ -326,7 +326,7 @@ XawTextSrcInitialize(Widget request, Widget cnew, } static void -XawTextSrcDestroy(Widget w) +XawTextSrcDestroy(Widget w _X_UNUSED) { #ifndef OLDXAW TextSrcObject src = (TextSrcObject)w; @@ -357,8 +357,8 @@ XawTextSrcDestroy(Widget w) /*ARGSUSED*/ static Boolean -XawTextSrcSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTextSrcSetValues(Widget current _X_UNUSED, Widget request _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { #ifndef OLDXAW TextSrcObject oldtw = (TextSrcObject)current; @@ -411,7 +411,7 @@ XawTextSrcSetValues(Widget current, Widget request, Widget cnew, */ /*ARGSUSED*/ static XawTextPosition -Read(Widget w, XawTextPosition pos, XawTextBlock *text, int length) +Read(Widget w _X_UNUSED, XawTextPosition pos _X_UNUSED, XawTextBlock *text _X_UNUSED, int length _X_UNUSED) { return ((XawTextPosition)0); } @@ -431,8 +431,8 @@ Read(Widget w, XawTextPosition pos, XawTextBlock *text, int length) */ /*ARGSUSED*/ static int -Replace(Widget w, XawTextPosition startPos, XawTextPosition endPos, - XawTextBlock *text) +Replace(Widget w _X_UNUSED, XawTextPosition startPos _X_UNUSED, XawTextPosition endPos _X_UNUSED, + XawTextBlock *text _X_UNUSED) { return (XawEditError); } @@ -455,8 +455,8 @@ Replace(Widget w, XawTextPosition startPos, XawTextPosition endPos, */ /*ARGSUSED*/ static XawTextPosition -Scan(Widget w, XawTextPosition position, XawTextScanType type, - XawTextScanDirection dir, int count, Bool include) +Scan(Widget w _X_UNUSED, XawTextPosition position _X_UNUSED, XawTextScanType type _X_UNUSED, + XawTextScanDirection dir _X_UNUSED, int count _X_UNUSED, Bool include _X_UNUSED) { return ((XawTextPosition)0); } @@ -476,30 +476,30 @@ Scan(Widget w, XawTextPosition position, XawTextScanType type, */ /*ARGSUSED*/ static XawTextPosition -Search(Widget w, XawTextPosition position, XawTextScanDirection dir, - XawTextBlock *text) +Search(Widget w _X_UNUSED, XawTextPosition position _X_UNUSED, XawTextScanDirection dir _X_UNUSED, + XawTextBlock *text _X_UNUSED) { return (XawTextSearchError); } /*ARGSUSED*/ static Boolean -ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, - XtPointer *value, unsigned long *length, int *format) +ConvertSelection(Widget w _X_UNUSED, Atom *selection _X_UNUSED, Atom *target _X_UNUSED, Atom *type _X_UNUSED, + XtPointer *value _X_UNUSED, unsigned long *length _X_UNUSED, int *format _X_UNUSED) { return (False); } /*ARGSUSED*/ static void -SetSelection(Widget w, XawTextPosition left, XawTextPosition right, - Atom selection) +SetSelection(Widget w _X_UNUSED, XawTextPosition left _X_UNUSED, XawTextPosition right _X_UNUSED, + Atom selection _X_UNUSED) { } /*ARGSUSED*/ static void -CvtStringToEditMode(XrmValuePtr args, Cardinal *num_args, +CvtStringToEditMode(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawTextEditType editType; @@ -526,9 +526,9 @@ CvtStringToEditMode(XrmValuePtr args, Cardinal *num_args, /*ARGSUSED*/ static Boolean -CvtEditModeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, +CvtEditModeToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValuePtr fromVal, XrmValuePtr toVal, - XtPointer *data) + XtPointer *data _X_UNUSED) { static String buffer; Cardinal size; @@ -550,7 +550,7 @@ CvtEditModeToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, return (False); } - size = strlen(buffer) + 1; + size = (Cardinal)(strlen(buffer) + 1); if (toVal->addr != NULL) { if (toVal->size < size) { toVal->size = size; @@ -573,7 +573,7 @@ _XawTextSourceNewLineAtEOF(Widget w) XawTextBlock text; text.firstPos = 0; - if ((text.format = src->textSrc.text_format) == XawFmt8Bit) + if ((text.format = (unsigned long)src->textSrc.text_format) == XawFmt8Bit) text.ptr = SrcNL; else text.ptr = (char*)SrcWNL; @@ -600,7 +600,7 @@ _XawSourceAddText(Widget source, Widget text) if (!found) { src->textSrc.text = (WidgetList) XtRealloc((char*)src->textSrc.text, - sizeof(Widget) * (src->textSrc.num_text + 1)); + (Cardinal)(sizeof(Widget) * (src->textSrc.num_text + 1))); src->textSrc.text[src->textSrc.num_text++] = text; } } @@ -757,13 +757,13 @@ XawTextSourceReplace(Widget w, XawTextPosition left, break; } l_state->buffer = _XawTextGetText((TextWidget)ctx, left, right); - l_state->length = right - left; + l_state->length = (unsigned)(right - left); } else { l_state->length = 0; l_state->buffer = NULL; } - l_state->format = src->textSrc.text_format; + l_state->format = (unsigned long)src->textSrc.text_format; if (l_state->length == 1) { if (l_state->format == XawFmtWide && *(wchar_t*)l_state->buffer == *SrcWNL) { @@ -786,8 +786,8 @@ XawTextSourceReplace(Widget w, XawTextPosition left, r_state->position = left; r_state->format = block->format; size = block->format == XawFmtWide ? sizeof(wchar_t) : sizeof(char); - total = size * block->length; - r_state->length = block->length; + total = (size * (unsigned)block->length); + r_state->length = (unsigned)block->length; r_state->buffer = NULL; if (total == size) { if (r_state->format == XawFmtWide && @@ -953,8 +953,8 @@ XawTextSourceReplace(Widget w, XawTextPosition left, else { src->textSrc.undo->undo = (XawTextUndoBuffer**) XtRealloc((char*)src->textSrc.undo->undo, - (2 + src->textSrc.undo->num_undo) - * sizeof(XawTextUndoBuffer)); + (Cardinal)((2 + src->textSrc.undo->num_undo) + * sizeof(XawTextUndoBuffer))); src->textSrc.undo->undo[src->textSrc.undo->num_undo++] = l_state; src->textSrc.undo->undo[src->textSrc.undo->num_undo++] = r_state; @@ -1019,9 +1019,9 @@ XawTextSourceReplace(Widget w, XawTextPosition left, /* adjust entity length */ if (entity && offset <= left) { if (offset + entity->length < right) - entity->length = left - offset + block->length; + entity->length = (Cardinal)(left - offset + block->length); else - entity->length += diff; + entity->length = (Cardinal)(entity->length + diff); if (entity->length == 0) { enext = entity->next; @@ -1051,7 +1051,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left, offset = anchor->position + entity->offset + entity->length; if (offset > right) { - entity->length = XawMin(entity->length, offset - right); + entity->length = (XawMin(entity->length, offset - right)); goto exit_anchor_loop; } @@ -1068,7 +1068,7 @@ XawTextSourceReplace(Widget w, XawTextPosition left, else if (i < --src->textSrc.num_anchors) { memmove(&src->textSrc.anchors[i], &src->textSrc.anchors[i + 1], - (src->textSrc.num_anchors - i) * + (size_t)(src->textSrc.num_anchors - i) * sizeof(XawTextAnchor*)); XtFree((XtPointer)anchor); } @@ -1158,7 +1158,7 @@ exit_anchor_loop: anchor->cache = NULL; if ((anchor->entities = entity) != NULL) { if ((entity->offset += diff) < 0) { - entity->length += entity->offset; + entity->length = (Cardinal)(entity->length + entity->offset); entity->offset = 0; } } @@ -1229,7 +1229,7 @@ _XawTextSrcUndo(TextSrcObject src, XawTextPosition *insert_pos) src->textSrc.changed = True; block.firstPos = 0; - block.length = r_state->length; + block.length = (int)r_state->length; block.ptr = r_state->buffer ? r_state->buffer : (char*)&wnull; block.format = r_state->format; @@ -1343,7 +1343,7 @@ FreeUndoBuffer(XawTextUndo *undo) undo->l_no_change = undo->r_no_change = NULL; undo->undo = NULL; undo->dir = XawsdLeft; - undo->num_undo = undo->num_list = undo->erase = undo->merge = 0; + undo->num_undo = undo->num_list = (unsigned)(undo->erase = undo->merge = 0); } static void @@ -1538,7 +1538,7 @@ _XawTextWCToMB(Display *d, wchar_t *wstr, int *len_in_out) *len_in_out = 0; return (NULL); } - *len_in_out = textprop.nitems; + *len_in_out = (int)textprop.nitems; return ((char *)textprop.value); } @@ -1563,9 +1563,9 @@ _XawTextMBToWC(Display *d, char *str, int *len_in_out) if (*len_in_out == 0) return (NULL); - buf = XtMalloc(*len_in_out + 1); + buf = XtMalloc((Cardinal)(*len_in_out + 1)); - strncpy(buf, str, *len_in_out); + strncpy(buf, str, (size_t)*len_in_out); *(buf + *len_in_out) = '\0'; if (XmbTextListToTextProperty(d, &buf, 1, XTextStyle, &textprop) != Success) { XtWarningMsg("convertError", "textSource", "XawError", @@ -1584,7 +1584,7 @@ _XawTextMBToWC(Display *d, char *str, int *len_in_out) return (NULL); } wstr = wlist[0]; - *len_in_out = wcslen(wstr); + *len_in_out = (int)wcslen(wstr); XtFree((XtPointer)wlist); return (wstr); @@ -1594,8 +1594,8 @@ _XawTextMBToWC(Display *d, char *str, int *len_in_out) static int qcmp_anchors(_Xconst void *left, _Xconst void *right) { - return ((*(XawTextAnchor**)left)->position - - (*(XawTextAnchor**)right)->position); + return (int)((*(XawTextAnchor**)left)->position - + (*(XawTextAnchor**)right)->position); } XawTextAnchor * @@ -1658,10 +1658,12 @@ XawTextSourceAddAnchor(Widget w, XawTextPosition position) anchor->cache = NULL; src->textSrc.anchors = (XawTextAnchor**) - XtRealloc((XtPointer)src->textSrc.anchors, sizeof(XawTextAnchor*) * - (src->textSrc.num_anchors + 1)); + XtRealloc((XtPointer)src->textSrc.anchors, + (Cardinal)(sizeof(XawTextAnchor*) * + (size_t)(src->textSrc.num_anchors + 1))); src->textSrc.anchors[src->textSrc.num_anchors++] = anchor; - qsort((void*)src->textSrc.anchors, src->textSrc.num_anchors, + qsort((void*)src->textSrc.anchors, + (size_t)src->textSrc.num_anchors, sizeof(XawTextAnchor*), qcmp_anchors); return (anchor); @@ -1782,7 +1784,7 @@ XawTextSourceRemoveAnchor(Widget w, XawTextAnchor *anchor) if (i < --src->textSrc.num_anchors) { memmove(&src->textSrc.anchors[i], &src->textSrc.anchors[i + 1], - (src->textSrc.num_anchors - i) * + (size_t)(src->textSrc.num_anchors - i) * sizeof(XawTextAnchor*)); return (src->textSrc.anchors[i]); @@ -1865,8 +1867,8 @@ XawTextSourceAddEntity(Widget w, int type, int flags, XtPointer data, } entity = XtNew(XawTextEntity); - entity->type = type; - entity->flags = flags; + entity->type = (short)type; + entity->flags = (short)flags; entity->data = data; entity->offset = position - anchor->position; entity->length = length; @@ -1926,7 +1928,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right offset = anchor->position + entity->offset; if (offset <= left) { - length = XawMin(entity->length, left - offset); + length = (XawMin(entity->length, left - offset)); if (length <= 0) { enext = entity->next; @@ -1947,7 +1949,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right entity = enext; } else { - entity->length = length; + entity->length = (Cardinal)length; eprev = entity; entity = entity->next; } @@ -1961,7 +1963,7 @@ XawTextSourceClearEntities(Widget w, XawTextPosition left, XawTextPosition right if (offset > right) { anchor->cache = NULL; entity->offset = XawMax(entity->offset, right - anchor->position); - entity->length = XawMin(entity->length, offset - right); + entity->length = (XawMin(entity->length, offset - right)); return; } diff --git a/lib/libXaw/src/Tip.c b/lib/libXaw/src/Tip.c index 8328aace3..06d53c818 100644 --- a/lib/libXaw/src/Tip.c +++ b/lib/libXaw/src/Tip.c @@ -92,7 +92,7 @@ static XtResource resources[] = { sizeof(Pixel), offset(foreground), XtRString, - XtDefaultForeground, + (XtPointer)XtDefaultForeground, }, { XtNfont, @@ -101,7 +101,7 @@ static XtResource resources[] = { sizeof(XFontStruct*), offset(font), XtRString, - XtDefaultFont + (XtPointer)XtDefaultFont }, { XtNfontSet, @@ -110,7 +110,7 @@ static XtResource resources[] = { sizeof(XFontSet), offset(fontset), XtRString, - XtDefaultFontSet + (XtPointer)XtDefaultFontSet }, { XtNtopMargin, @@ -239,7 +239,7 @@ XawTipClassInitialize(void) /*ARGSUSED*/ static void -XawTipInitialize(Widget req, Widget w, ArgList args, Cardinal *num_args) +XawTipInitialize(Widget req _X_UNUSED, Widget w _X_UNUSED, ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TipWidget tip = (TipWidget)w; XGCValues values; @@ -297,7 +297,7 @@ XawTipRealize(Widget w, Mask *mask, XSetWindowAttributes *attr) attr->backing_store = tip->tip.backing_store; } else - *mask &= ~CWBackingStore; + *mask &= (Mask)(~CWBackingStore); *mask |= CWOverrideRedirect; attr->override_redirect = True; @@ -318,27 +318,28 @@ XawTipExpose(Widget w, XEvent *event, Region region) { TipWidget tip = (TipWidget)w; GC gc = tip->tip.gc; - char *nl, *label = tip->tip.label; - Position y = tip->tip.top_margin + tip->tip.font->max_bounds.ascent; + char *nl; + _Xconst char * label = tip->tip.label; + Position y = (Position)(tip->tip.top_margin + tip->tip.font->max_bounds.ascent); int len; if (tip->tip.display_list) XawRunDisplayList(w, tip->tip.display_list, event, region); if (tip->tip.international == True) { - Position ksy = tip->tip.top_margin; + Position ksy = (Position)tip->tip.top_margin; XFontSetExtents *ext = XExtentsOfFontSet(tip->tip.fontset); - ksy += XawAbs(ext->max_ink_extent.y); + ksy = (ksy + XawAbs(ext->max_ink_extent.y)); while ((nl = index(label, '\n')) != NULL) { XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset, gc, tip->tip.left_margin, ksy, label, (int)(nl - label)); - ksy += ext->max_ink_extent.height; + ksy = (ksy + ext->max_ink_extent.height); label = nl + 1; } - len = strlen(label); + len = (int)strlen(label); if (len) XmbDrawString(XtDisplay(w), XtWindow(w), tip->tip.fontset, gc, tip->tip.left_margin, ksy, label, len); @@ -348,19 +349,19 @@ XawTipExpose(Widget w, XEvent *event, Region region) if (tip->tip.encoding) XDrawString16(XtDisplay(w), XtWindow(w), gc, tip->tip.left_margin, y, - (XChar2b*)label, (int)(nl - label) >> 1); + (_Xconst XChar2b*)label, (int)(nl - label) >> 1); else XDrawString(XtDisplay(w), XtWindow(w), gc, tip->tip.left_margin, y, label, (int)(nl - label)); - y += tip->tip.font->max_bounds.ascent + - tip->tip.font->max_bounds.descent; + y = (Position)(y + (tip->tip.font->max_bounds.ascent + + tip->tip.font->max_bounds.descent)); label = nl + 1; } - len = strlen(label); + len = (int)strlen(label); if (len) { if (tip->tip.encoding) XDrawString16(XtDisplay(w), XtWindow(w), gc, - tip->tip.left_margin, y, (XChar2b*)label, len >> 1); + tip->tip.left_margin, y, (_Xconst XChar2b*)label, len >> 1); else XDrawString(XtDisplay(w), XtWindow(w), gc, tip->tip.left_margin, y, label, len); @@ -370,8 +371,8 @@ XawTipExpose(Widget w, XEvent *event, Region region) /*ARGSUSED*/ static Boolean -XawTipSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTipSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TipWidget curtip = (TipWidget)current; TipWidget newtip = (TipWidget)cnew; @@ -402,7 +403,8 @@ TipLayout(XawTipInfo *info) { XFontStruct *fs = info->tip->tip.font; int width = 0, height; - char *nl, *label = info->tip->tip.label; + char *nl; + _Xconst char *label = info->tip->tip.label; if (info->tip->tip.international == True) { XFontSet fset = info->tip->tip.fontset; @@ -426,7 +428,7 @@ TipLayout(XawTipInfo *info) } } else - width = XmbTextEscapement(fset, label, strlen(label)); + width = XmbTextEscapement(fset, label, (int)strlen(label)); } else { height = fs->max_bounds.ascent + fs->max_bounds.descent; @@ -434,7 +436,7 @@ TipLayout(XawTipInfo *info) /*CONSTCOND*/ while (True) { int w = info->tip->tip.encoding ? - XTextWidth16(fs, (XChar2b*)label, (int)(nl - label) >> 1) : + XTextWidth16(fs, (_Xconst XChar2b*)label, (int)(nl - label) >> 1) : XTextWidth(fs, label, (int)(nl - label)); if (w > width) width = w; @@ -449,13 +451,13 @@ TipLayout(XawTipInfo *info) } else width = info->tip->tip.encoding ? - XTextWidth16(fs, (XChar2b*)label, strlen(label) >> 1) : - XTextWidth(fs, label, strlen(label)); + XTextWidth16(fs, (_Xconst XChar2b*)label, (int)(strlen(label) >> 1)) : + XTextWidth(fs, label, (int)strlen(label)); } - XtWidth(info->tip) = width + info->tip->tip.left_margin + - info->tip->tip.right_margin; - XtHeight(info->tip) = height + info->tip->tip.top_margin + - info->tip->tip.bottom_margin; + XtWidth(info->tip) = (width + info->tip->tip.left_margin + + info->tip->tip.right_margin); + XtHeight(info->tip) = (height + info->tip->tip.top_margin + + info->tip->tip.bottom_margin); } #define DEFAULT_TIP_Y_OFFSET 12 @@ -469,14 +471,14 @@ TipPosition(XawTipInfo *info) XQueryPointer(XtDisplay((Widget)info->tip), XtWindow((Widget)info->tip), &r, &c, &rx, &ry, &wx, &wy, &mask); - x = rx - (XtWidth(info->tip) >> 1); - y = ry + DEFAULT_TIP_Y_OFFSET; + x = (Position)(rx - (XtWidth(info->tip) >> 1)); + y = (Position)(ry + DEFAULT_TIP_Y_OFFSET); if (x >= 0) { int scr_width = WidthOfScreen(XtScreen(info->tip)); if (x + XtWidth(info->tip) + XtBorderWidth(info->tip) > scr_width) - x = scr_width - XtWidth(info->tip) - XtBorderWidth(info->tip); + x = (Position)(scr_width - XtWidth(info->tip) - XtBorderWidth(info->tip)); } if (x < 0) x = 0; @@ -484,8 +486,8 @@ TipPosition(XawTipInfo *info) int scr_height = HeightOfScreen(XtScreen(info->tip)); if (y + XtHeight(info->tip) + XtBorderWidth(info->tip) > scr_height) - y -= XtHeight(info->tip) + XtBorderWidth(info->tip) + - (DEFAULT_TIP_Y_OFFSET << 1); + y = (Position)(y - (XtHeight(info->tip) + XtBorderWidth(info->tip) + + (DEFAULT_TIP_Y_OFFSET << 1))); } if (y < 0) y = 0; @@ -548,13 +550,14 @@ ResetTip(XawTipInfo *info, Bool add_timeout) if (add_timeout) { info->tip->tip.timer = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)info->tip), - info->tip->tip.timeout, TipTimeoutCallback, + (unsigned long)info->tip->tip.timeout, + TipTimeoutCallback, (XtPointer)info); } } static void -TipTimeoutCallback(XtPointer closure, XtIntervalId *id) +TipTimeoutCallback(XtPointer closure, XtIntervalId *id _X_UNUSED) { XawTipInfo *info = (XawTipInfo*)closure; Arg args[3]; @@ -579,16 +582,16 @@ TipTimeoutCallback(XtPointer closure, XtIntervalId *id) /*ARGSUSED*/ static void -TipShellEventHandler(Widget w, XtPointer client_data, XEvent *event, - Boolean *continue_to_dispatch) +TipShellEventHandler(Widget w, XtPointer client_data _X_UNUSED, XEvent *event _X_UNUSED, + Boolean *continue_to_dispatch _X_UNUSED) { ResetTip(FindTipInfo(w), False); } /*ARGSUSED*/ static void -TipEventHandler(Widget w, XtPointer client_data, XEvent *event, - Boolean *continue_to_dispatch) +TipEventHandler(Widget w, XtPointer client_data _X_UNUSED, XEvent *event, + Boolean *continue_to_dispatch _X_UNUSED) { XawTipInfo *info = FindTipInfo(w); Boolean add_timeout; diff --git a/lib/libXaw/src/Toggle.c b/lib/libXaw/src/Toggle.c index b484878cc..9b93d4128 100644 --- a/lib/libXaw/src/Toggle.c +++ b/lib/libXaw/src/Toggle.c @@ -90,7 +90,7 @@ static XtResource resources[] = { sizeof(Boolean), offset(command.set), XtRString, - "off" + (XtPointer)"off" }, { XtNradioGroup, @@ -225,7 +225,7 @@ XawToggleClassInitialize(void) /*ARGSUSED*/ static void XawToggleInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ToggleWidget tw = (ToggleWidget)cnew; ToggleWidget tw_req = (ToggleWidget)request; @@ -259,7 +259,7 @@ XawToggleInitialize(Widget request, Widget cnew, /*ARGSUSED*/ static void -ToggleSet(Widget w, XEvent *event, String *params, Cardinal *num_params) +ToggleSet(Widget w, XEvent *event, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ToggleWidgetClass cclass = (ToggleWidgetClass)w->core.widget_class; @@ -281,7 +281,7 @@ Toggle(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static void -Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) +Notify(Widget w, XEvent *event _X_UNUSED, String *params _X_UNUSED, Cardinal *num_params _X_UNUSED) { ToggleWidget tw = (ToggleWidget)w; long antilint = tw->command.set; @@ -292,7 +292,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) /*ARGSUSED*/ static Boolean XawToggleSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ToggleWidget oldtw = (ToggleWidget)current; ToggleWidget tw = (ToggleWidget)cnew; @@ -326,7 +326,7 @@ XawToggleSetValues(Widget current, Widget request, Widget cnew, */ /*ARGSUSED*/ static void -XawToggleDestroy(Widget w, XtPointer temp1, XtPointer temp2) +XawToggleDestroy(Widget w, XtPointer temp1 _X_UNUSED, XtPointer temp2 _X_UNUSED) { RemoveFromRadioGroup(w); } diff --git a/lib/libXaw/src/Tree.c b/lib/libXaw/src/Tree.c index f4781bfd1..b3485f55a 100644 --- a/lib/libXaw/src/Tree.c +++ b/lib/libXaw/src/Tree.c @@ -109,7 +109,7 @@ static XtResource resources[] = { XtOffsetOf(TreeRec, tree.vpad), XtRImmediate, (XtPointer) 0 }, { XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel), XtOffsetOf(TreeRec, tree.foreground), XtRString, - XtDefaultForeground}, + (XtPointer) XtDefaultForeground}, { XtNlineWidth, XtCLineWidth, XtRDimension, sizeof (Dimension), XtOffsetOf(TreeRec, tree.line_width), XtRImmediate, (XtPointer) 0 }, { XtNgravity, XtCGravity, XtRGravity, sizeof (XtGravity), @@ -217,7 +217,7 @@ initialize_dimensions(Dimension **listp, int *sizep, int n) } if (n > *sizep) { *listp = (Dimension *) XtRealloc((char *) *listp, - (unsigned int) (n*sizeof(Dimension))); + (Cardinal) ((size_t)n*sizeof(Dimension))); if (!*listp) { *sizep = 0; return; @@ -265,8 +265,8 @@ insert_node(Widget parent, Widget node) if (pc->tree.n_children == pc->tree.max_children) { pc->tree.max_children += (pc->tree.max_children / 2) + 2; pc->tree.children = (WidgetList) XtRealloc ((char *)pc->tree.children, - (unsigned int) - ((pc->tree.max_children) * + (Cardinal) + ((size_t)pc->tree.max_children * sizeof(Widget))); } @@ -346,7 +346,7 @@ XawTreeClassInitialize(void) /*ARGSUSED*/ static void XawTreeInitialize(Widget grequest, Widget gnew, - ArgList args, Cardinal *num_args) + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TreeWidget request = (TreeWidget) grequest, cnew = (TreeWidget) gnew; Arg arglist[2]; @@ -402,8 +402,8 @@ XawTreeInitialize(Widget grequest, Widget gnew, /* ARGSUSED */ static void -XawTreeConstraintInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTreeConstraintInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TreeConstraints tc = TREE_CONSTRAINT(cnew); TreeWidget tw = (TreeWidget) cnew->core.parent; @@ -433,8 +433,8 @@ XawTreeConstraintInitialize(Widget request, Widget cnew, /* ARGSUSED */ static Boolean -XawTreeSetValues(Widget gcurrent, Widget grequest, Widget gnew, - ArgList args, Cardinal *num_args) +XawTreeSetValues(Widget gcurrent, Widget grequest _X_UNUSED, Widget gnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TreeWidget current = (TreeWidget) gcurrent, cnew = (TreeWidget) gnew; Boolean redraw = FALSE; @@ -480,8 +480,8 @@ XawTreeSetValues(Widget gcurrent, Widget grequest, Widget gnew, /* ARGSUSED */ static Boolean -XawTreeConstraintSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawTreeConstraintSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { TreeConstraints newc = TREE_CONSTRAINT(cnew); TreeConstraints curc = TREE_CONSTRAINT(current); @@ -538,7 +538,7 @@ XawTreeConstraintDestroy(Widget w) /* ARGSUSED */ static XtGeometryResult XawTreeGeometryManager(Widget w, XtWidgetGeometry *request, - XtWidgetGeometry *reply) + XtWidgetGeometry *reply _X_UNUSED) { TreeWidget tw = (TreeWidget) w->core.parent; @@ -584,7 +584,7 @@ XawTreeDestroy(Widget gw) /* ARGSUSED */ static void -XawTreeRedisplay(Widget gw, XEvent *event, Region region) +XawTreeRedisplay(Widget gw, XEvent *event _X_UNUSED, Region region _X_UNUSED) { TreeWidget tw = (TreeWidget) gw; @@ -725,7 +725,7 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) int i; Bool horiz = IsHorizontal (tree); Dimension newwidth, newheight; - Dimension bw2 = w->core.border_width * 2; + Dimension bw2 = (Dimension)(w->core.border_width * 2); /* * Set the max-size per level. @@ -734,7 +734,7 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) initialize_dimensions (&tree->tree.largest, &tree->tree.n_largest, depth + 1); } - newwidth = ((horiz ? w->core.width : w->core.height) + bw2); + newwidth = (Dimension)((horiz ? w->core.width : w->core.height) + bw2); if (tree->tree.largest[depth] < newwidth) tree->tree.largest[depth] = newwidth; @@ -742,8 +742,8 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) /* * initialize */ - tc->tree.bbwidth = w->core.width + bw2; - tc->tree.bbheight = w->core.height + bw2; + tc->tree.bbwidth = (Dimension)(w->core.width + bw2); + tc->tree.bbheight = (Dimension)(w->core.height + bw2); if (tc->tree.n_children == 0) return; @@ -762,10 +762,10 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) if (horiz) { if (newwidth < cc->tree.bbwidth) newwidth = cc->tree.bbwidth; - newheight += tree->tree.vpad + cc->tree.bbheight; + newheight = (Dimension)(newheight + (tree->tree.vpad + cc->tree.bbheight)); } else { if (newheight < cc->tree.bbheight) newheight = cc->tree.bbheight; - newwidth += tree->tree.hpad + cc->tree.bbwidth; + newwidth = (Dimension)(newwidth + (tree->tree.hpad + cc->tree.bbwidth)); } } @@ -778,12 +778,12 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) * extra padding. Be careful of unsigned arithmetic. */ if (horiz) { - tc->tree.bbwidth += tree->tree.hpad + newwidth; - newheight -= tree->tree.vpad; + tc->tree.bbwidth = (Dimension)(tc->tree.bbwidth + (tree->tree.hpad + newwidth)); + newheight = (Dimension)(newheight - tree->tree.vpad); if (newheight > tc->tree.bbheight) tc->tree.bbheight = newheight; } else { - tc->tree.bbheight += tree->tree.vpad + newheight; - newwidth -= tree->tree.hpad; + tc->tree.bbheight = (Dimension)(tc->tree.bbheight + (tree->tree.vpad + newheight)); + newwidth = (Dimension)(newwidth - tree->tree.hpad); if (newwidth > tc->tree.bbwidth) tc->tree.bbwidth = newwidth; } } @@ -803,13 +803,13 @@ set_positions(TreeWidget tw, Widget w, int level) */ switch (tw->tree.gravity) { case EastGravity: - tc->tree.x = (((Position) tw->tree.maxwidth) - - ((Position) w->core.width) - tc->tree.x); + tc->tree.x = (Position) (tw->tree.maxwidth - + w->core.width - tc->tree.x); break; case SouthGravity: - tc->tree.y = (((Position) tw->tree.maxheight) - - ((Position) w->core.height) - tc->tree.y); + tc->tree.y = (Position) (tw->tree.maxheight - + w->core.height - tc->tree.y); break; } @@ -838,15 +838,15 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) Bool horiz = IsHorizontal (tree); Widget child = NULL; Dimension tmp; - Dimension bw2 = w->core.border_width * 2; + Dimension bw2 = (Dimension)(w->core.border_width * 2); Bool relayout = True; /* * If no children, then just lay out where requested. */ - tc->tree.x = x; - tc->tree.y = y; + tc->tree.x = (Position)x; + tc->tree.y = (Position)y; if (horiz) { int myh = (w->core.height + bw2); @@ -864,9 +864,9 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) } } - if ((tmp = ((Dimension) x) + tc->tree.bbwidth) > tree->tree.maxwidth) + if ((tmp = (Dimension)(x + tc->tree.bbwidth)) > tree->tree.maxwidth) tree->tree.maxwidth = tmp; - if ((tmp = ((Dimension) y) + tc->tree.bbheight) > tree->tree.maxheight) + if ((tmp = (Dimension)(y + tc->tree.bbheight)) > tree->tree.maxheight) tree->tree.maxheight = tmp; if (tc->tree.n_children == 0) return; @@ -913,21 +913,21 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) * this could collide with the position of the previous sibling. */ if (horiz) { - tc->tree.x = x; - adjusted = firstcc->tree.y + + tc->tree.x = (Position)x; + adjusted = (Position)(firstcc->tree.y + ((lastcc->tree.y + (Position) child->core.height + (Position) child->core.border_width * 2 - firstcc->tree.y - (Position) w->core.height - - (Position) w->core.border_width * 2 + 1) / 2); + (Position) w->core.border_width * 2 + 1) / 2)); if (adjusted > tc->tree.y) tc->tree.y = adjusted; } else { - adjusted = firstcc->tree.x + + adjusted = (Position)(firstcc->tree.x + ((lastcc->tree.x + (Position) child->core.width + (Position) child->core.border_width * 2 - firstcc->tree.x - (Position) w->core.width - - (Position) w->core.border_width * 2 + 1) / 2); + (Position) w->core.border_width * 2 + 1) / 2)); if (adjusted > tc->tree.x) tc->tree.x = adjusted; - tc->tree.y = y; + tc->tree.y = (Position)y; } } } @@ -937,12 +937,13 @@ set_tree_size(TreeWidget tw, Bool insetvalues, unsigned int width, unsigned int height) { if (insetvalues) { - tw->core.width = width; - tw->core.height = height; + tw->core.width = (Dimension)width; + tw->core.height = (Dimension)height; } else { Dimension replyWidth = 0, replyHeight = 0; XtGeometryResult result = XtMakeResizeRequest ((Widget) tw, - width, height, + (Dimension)width, + (Dimension)height, &replyWidth, &replyHeight); /* diff --git a/lib/libXaw/src/Vendor.c b/lib/libXaw/src/Vendor.c index b8797f59d..7940d2e5c 100644 --- a/lib/libXaw/src/Vendor.c +++ b/lib/libXaw/src/Vendor.c @@ -111,12 +111,20 @@ static XtResource resources[] = { * ***************************************************************************/ -#if defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */ extern VendorShellClassRec _XawVendorShellClassRec; extern void _XawFixupVendorShell(); +#if defined(__APPLE__) +__attribute__((constructor)) +static void __VendorShellHack(void) +{ + vendorShellWidgetClass = (WidgetClass)(&_XawVendorShellClassRec); + _XawFixupVendorShell(); +} +#else int __stdcall DllMain(unsigned long mod_handle, unsigned long flag, void *routine) { @@ -131,6 +139,7 @@ DllMain(unsigned long mod_handle, unsigned long flag, void *routine) } return 1; } +#endif #define vendorShellClassRec _XawVendorShellClassRec @@ -195,7 +204,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { } }; -#ifndef __UNIXOS2__ +#if !defined(__UNIXOS2__) && !defined(__APPLE__) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); #endif @@ -267,9 +276,9 @@ externaldef(xawvendorshellwidgetclass) WidgetClass /*ARGSUSED*/ static Boolean -XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, +XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED, XrmValue *fromVal, XrmValue *toVal, - XtPointer *cvt_data) + XtPointer *cvt_data _X_UNUSED) { XTextProperty prop; char **list; @@ -288,9 +297,9 @@ XawCvtCompoundTextToString(Display *dpy, XrmValuePtr args, Cardinal *num_args, "conversion from CT to MB failed.", NULL, NULL); return False; } - len = strlen(*list); - toVal->size = len; - mbs = XtRealloc(mbs, len + 1); /* keep buffer because no one call free :( */ + len = (int)strlen(*list); + toVal->size = (unsigned)len; + mbs = XtRealloc(mbs, (Cardinal)(len + 1)); /* keep buffer because no one call free :( */ strcpy(mbs, *list); XFreeStringList(list); toVal->addr = (XtPointer)mbs; @@ -339,7 +348,7 @@ XawVendorShellClassPartInit(WidgetClass cclass) } } -#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__osf__) || defined(__UNIXOS2__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) /* stupid OSF/1 shared libraries have the wrong semantics */ /* symbols do not get resolved external to the shared library */ void _XawFixupVendorShell() @@ -353,7 +362,7 @@ void _XawFixupVendorShell() /* ARGSUSED */ static void -XawVendorShellInitialize(Widget req, Widget cnew, +XawVendorShellInitialize(Widget req _X_UNUSED, Widget cnew, ArgList args, Cardinal *num_args) { XtAddEventHandler(cnew, (EventMask) 0, TRUE, _XEditResCheckMessages, NULL); @@ -364,8 +373,8 @@ XawVendorShellInitialize(Widget req, Widget cnew, /* ARGSUSED */ static Boolean -XawVendorShellSetValues(Widget old, Widget ref, Widget cnew, - ArgList args, Cardinal *num_args) +XawVendorShellSetValues(Widget old _X_UNUSED, Widget ref _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { return FALSE; } @@ -389,8 +398,8 @@ XawVendorShellExtClassInitialize(void) /* ARGSUSED */ static void -XawVendorShellExtInitialize(Widget req, Widget cnew, - ArgList args, Cardinal *num_args) +XawVendorShellExtInitialize(Widget req _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { _XawImInitialize(cnew->core.parent, cnew); } @@ -404,8 +413,8 @@ XawVendorShellExtDestroy(Widget w) /* ARGSUSED */ static Boolean -XawVendorShellExtSetValues(Widget old, Widget ref, Widget cnew, - ArgList args, Cardinal *num_args) +XawVendorShellExtSetValues(Widget old _X_UNUSED, Widget ref _X_UNUSED, Widget cnew _X_UNUSED, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { return FALSE; } @@ -423,7 +432,9 @@ XawVendorShellExtResize(Widget w) for( i = 0; i < sw->composite.num_children; i++ ) { if( XtIsManaged( sw->composite.children[ i ] ) ) { childwid = sw->composite.children[ i ]; - XtResizeWidget( childwid, sw->core.width, core_height, + XtResizeWidget( childwid, + (Dimension)sw->core.width, + (Dimension)core_height, childwid->core.border_width ); } } @@ -431,8 +442,8 @@ XawVendorShellExtResize(Widget w) /*ARGSUSED*/ void -XawVendorStructureNotifyHandler(Widget w, XtPointer closure, XEvent *event, - Boolean *continue_to_dispatch) +XawVendorStructureNotifyHandler(Widget w, XtPointer closure _X_UNUSED, XEvent *event _X_UNUSED, + Boolean *continue_to_dispatch _X_UNUSED) { XawVendorShellExtResize(w); } @@ -440,7 +451,7 @@ XawVendorStructureNotifyHandler(Widget w, XtPointer closure, XEvent *event, /*ARGSUSED*/ static XtGeometryResult XawVendorShellGeometryManager(Widget wid, XtWidgetGeometry *request, - XtWidgetGeometry *reply) + XtWidgetGeometry *reply _X_UNUSED) { ShellWidget shell = (ShellWidget)(wid->core.parent); XtWidgetGeometry my_request; @@ -458,8 +469,8 @@ XawVendorShellGeometryManager(Widget wid, XtWidgetGeometry *request, my_request.request_mode |= CWWidth; } if (request->request_mode & CWHeight) { - my_request.height = request->height - + _XawImGetImAreaHeight( wid ); + my_request.height = (Dimension)(request->height + + _XawImGetImAreaHeight( wid )); my_request.request_mode |= CWHeight; } if (request->request_mode & CWBorderWidth) { @@ -480,7 +491,7 @@ XawVendorShellGeometryManager(Widget wid, XtWidgetGeometry *request, 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); } _XawImCallVendorShellExtResize(wid); return XtGeometryYes; @@ -495,7 +506,7 @@ XawVendorShellChangeManaged(Widget wid) int i; (*SuperClass->composite_class.change_managed)(wid); - for (i = w->composite.num_children, childP = w->composite.children; + for (i = (int)w->composite.num_children, childP = w->composite.children; i; i--, childP++) { if (XtIsManaged(*childP)) { XtSetKeyboardFocus(wid, *childP); diff --git a/lib/libXaw/src/Viewport.c b/lib/libXaw/src/Viewport.c index 082682f82..893c8bf66 100644 --- a/lib/libXaw/src/Viewport.c +++ b/lib/libXaw/src/Viewport.c @@ -280,8 +280,8 @@ CreateScrollbar(ViewportWidget w, Bool horizontal) /*ARGSUSED*/ static void -XawViewportInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawViewportInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ViewportWidget w = (ViewportWidget)cnew; static Arg clip_args[8]; @@ -331,10 +331,10 @@ XawViewportInitialize(Widget request, Widget cnew, clip_height = XtHeight(w); if (h_bar != NULL && XtWidth(w) > XtWidth(h_bar) + XtBorderWidth(h_bar)) - clip_width -= XtWidth(h_bar) + XtBorderWidth(h_bar); + clip_width = (Dimension)(clip_width - (XtWidth(h_bar) + XtBorderWidth(h_bar))); if (v_bar != NULL && XtHeight(w) > XtHeight(v_bar) + XtBorderWidth(v_bar)) - clip_height -= XtHeight(v_bar) + XtBorderWidth(v_bar); + clip_height = (Dimension)(clip_height - (XtHeight(v_bar) + XtBorderWidth(v_bar))); arg_cnt = 0; XtSetArg(clip_args[arg_cnt], XtNwidth, clip_width); arg_cnt++; @@ -344,8 +344,8 @@ XawViewportInitialize(Widget request, Widget cnew, /*ARGSUSED*/ static void -XawViewportConstraintInitialize(Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawViewportConstraintInitialize(Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ((ViewportConstraints)cnew->core.constraints)->viewport.reparented = False; } @@ -375,8 +375,8 @@ XawViewportRealize(Widget widget, XtValueMask *value_mask, /*ARGSUSED*/ static Boolean -XawViewportSetValues(Widget current, Widget request, Widget cnew, - ArgList args, Cardinal *num_args) +XawViewportSetValues(Widget current, Widget request _X_UNUSED, Widget cnew, + ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED) { ViewportWidget w = (ViewportWidget)cnew; ViewportWidget cw = (ViewportWidget)current; @@ -395,7 +395,7 @@ static void XawViewportChangeManaged(Widget widget) { ViewportWidget w = (ViewportWidget)widget; - int num_children = w->composite.num_children; + int num_children = (int)w->composite.num_children; Widget child, *childP; int i; @@ -479,8 +479,8 @@ SendReport(ViewportWidget w, unsigned int changed) Widget clip = w->viewport.clip; rep.changed = changed; - rep.slider_x = -XtX(child); /* child is canvas */ - rep.slider_y = -XtY(child); /* clip is slider */ + rep.slider_x = (Position) -XtX(child); /* child is canvas */ + rep.slider_y = (Position) -XtY(child); /* clip is slider */ rep.slider_width = XtWidth(clip); rep.slider_height = XtHeight(clip); rep.canvas_width = XtWidth(child); @@ -509,7 +509,7 @@ MoveChild(ViewportWidget w, int x, int y) if (y >= 0) y = 0; - XtMoveWidget(child, x, y); + XtMoveWidget(child, (Position) x, (Position) y); SendReport(w, (XawPRSliderX | XawPRSliderY)); RedrawThumbs(w); @@ -557,12 +557,12 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) intended.request_mode |= CWWidth; if (XtWidth(child) < clip_width) - intended.width = clip_width; + intended.width = (Dimension)clip_width; else intended.width = XtWidth(child); if (XtHeight(child) < clip_height) - intended.height = clip_height; + intended.height = (Dimension)clip_height; else intended.height = XtHeight(child); @@ -593,12 +593,12 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) if (w->viewport.allowhoriz && \ preferred.width > clip_width) { \ if (!needshoriz) { \ - Widget bar; \ + Widget bar2; \ \ needshoriz = True; \ - if ((bar = w->viewport.horiz_bar) == NULL) \ - bar = CreateScrollbar(w, True); \ - clip_height -= XtHeight(bar) + XtBorderWidth(bar); \ + if ((bar2 = w->viewport.horiz_bar) == NULL) \ + bar2 = CreateScrollbar(w, True); \ + clip_height -= XtHeight(bar2) + XtBorderWidth(bar2);\ if (clip_height < 1) \ clip_height = 1; \ } \ @@ -620,11 +620,11 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) intended.height = preferred.height; } if (!w->viewport.allowhoriz || preferred.width < clip_width) { - intended.width = clip_width; + intended.width = (Dimension)clip_width; intended.request_mode |= CWWidth; } if (!w->viewport.allowvert || preferred.height < clip_height) { - intended.height = clip_height; + intended.height = (Dimension)clip_height; intended.request_mode |= CWHeight; } } while (intended.request_mode != prev_mode @@ -638,13 +638,13 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) XRaiseWindow(XtDisplay(clip), XtWindow(clip)); XtMoveWidget(clip, - needsvert ? w->viewport.useright ? 0 : - XtWidth(w->viewport.vert_bar) - + XtBorderWidth(w->viewport.vert_bar) : 0, - needshoriz ? w->viewport.usebottom ? 0 : - XtHeight(w->viewport.horiz_bar) - + XtBorderWidth(w->viewport.horiz_bar) : 0); - XtResizeWidget(clip, clip_width, clip_height, 0); + (Position)(needsvert ? w->viewport.useright ? 0 : + XtWidth(w->viewport.vert_bar) + + XtBorderWidth(w->viewport.vert_bar) : 0), + (Position)(needshoriz ? w->viewport.usebottom ? 0 : + XtHeight(w->viewport.horiz_bar) + + XtBorderWidth(w->viewport.horiz_bar) : 0)); + XtResizeWidget(clip, (Dimension)clip_width, (Dimension)clip_height, 0); if (w->viewport.horiz_bar != NULL) { Widget bar = w->viewport.horiz_bar; @@ -659,12 +659,12 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) else { int bw = XtBorderWidth(bar); - XtResizeWidget(bar, clip_width, XtHeight(bar), bw); + XtResizeWidget(bar, (Dimension)clip_width, (Dimension)XtHeight(bar), (Dimension)bw); XtMoveWidget(bar, - needsvert && !w->viewport.useright - ? XtWidth(w->viewport.vert_bar) : -bw, - w->viewport.usebottom - ? XtHeight(w) - XtHeight(bar) - bw : -bw); + (Position)(needsvert && !w->viewport.useright + ? XtWidth(w->viewport.vert_bar) : -bw), + (Position)(w->viewport.usebottom + ? XtHeight(w) - XtHeight(bar) - bw : -bw)); XtSetMappedWhenManaged(bar, True); } } @@ -682,12 +682,12 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) else { int bw = bar->core.border_width; - XtResizeWidget(bar, XtWidth(bar), clip_height, bw); + XtResizeWidget(bar, (Dimension)XtWidth(bar), (Dimension)clip_height, (Dimension)bw); XtMoveWidget(bar, - w->viewport.useright - ? XtWidth(w) - XtWidth(bar) - bw : -bw, - needshoriz && !w->viewport.usebottom - ? XtHeight(w->viewport.horiz_bar) : -bw); + (Position)(w->viewport.useright + ? XtWidth(w) - XtWidth(bar) - bw : -bw), + (Position)(needshoriz && !w->viewport.usebottom + ? XtHeight(w->viewport.horiz_bar) : -bw)); XtSetMappedWhenManaged(bar, True); } } @@ -747,11 +747,11 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, AssignMax(*clip_height, 1); if (!w->viewport.allowvert) { - intended->height = *clip_height; + intended->height = (Dimension)*clip_height; intended->request_mode = CWHeight; } if (!w->viewport.allowhoriz) { - intended->width = *clip_width; + intended->width = (Dimension)*clip_width; intended->request_mode = CWWidth; } @@ -782,9 +782,9 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, } if (*clip_width > (int)intended->width) - intended->width = *clip_width; + intended->width = (Dimension)*clip_width; if (*clip_height > (int)intended->height) - intended->height = *clip_height; + intended->height = (Dimension)*clip_height; } static void @@ -795,7 +795,7 @@ XawViewportResize(Widget widget) /*ARGSUSED*/ static Boolean -Layout(FormWidget w, unsigned int width, unsigned int height, Bool force) +Layout(FormWidget w, unsigned int width _X_UNUSED, unsigned int height _X_UNUSED, Bool force _X_UNUSED) { ComputeLayout((Widget)w, True, True); w->form.preferred_width = XtWidth(w); @@ -809,7 +809,7 @@ ScrollUpDownProc(Widget widget, XtPointer closure, XtPointer call_data) { ViewportWidget w = (ViewportWidget)closure; Widget child = w->viewport.child; - int pix = (long)call_data; + int pix = (int)(long)call_data; int x, y; if (child == NULL) @@ -833,12 +833,12 @@ ThumbProc(Widget widget, XtPointer closure, XtPointer call_data) return; if (widget == w->viewport.horiz_bar) - x = -percent * XtWidth(child); + x = (int)(-percent * XtWidth(child)); else x = XtX(child); if (widget == w->viewport.vert_bar) - y = -percent * XtHeight(child); + y = (int)(-percent * XtHeight(child)); else y = XtY(child); @@ -866,8 +866,8 @@ GeometryRequestPlusScrollbar(ViewportWidget w, Bool horizontal, plusScrollbars = *request; if ((sb = w->viewport.horiz_bar) == NULL) sb = CreateScrollbar(w, horizontal); - request->width += XtWidth(sb); - request->height += XtHeight(sb); + request->width = (Dimension)(request->width + XtWidth(sb)); + request->height = (Dimension)(request->height + XtHeight(sb)); XtDestroyWidget(sb); return (XtMakeGeometryRequest((Widget)w, &plusScrollbars, reply_return)); } @@ -924,7 +924,7 @@ XawViewportGeometryManager(Widget child, XtWidgetGeometry *request, return (QueryGeometry(w, request, reply)); if (child != w->viewport.child - || request->request_mode & ~(CWWidth | CWHeight | CWBorderWidth) + || request->request_mode & (XtGeometryMask)(~(CWWidth | CWHeight | CWBorderWidth)) || ((request->request_mode & CWBorderWidth) && request->border_width > 0)) return (XtGeometryNo); @@ -946,7 +946,7 @@ XawViewportGeometryManager(Widget child, XtWidgetGeometry *request, if ((bar = w->viewport.horiz_bar) == NULL) bar = CreateScrollbar(w, True); - height_remaining -= XtHeight(bar) + XtBorderWidth(bar); + height_remaining = (height_remaining - (unsigned)(XtHeight(bar) + XtBorderWidth(bar))); reconfigured = True; } else @@ -965,14 +965,14 @@ XawViewportGeometryManager(Widget child, XtWidgetGeometry *request, allowed.request_mode |= CWWidth; } if (allowed.width > XtWidth(bar) + XtBorderWidth(bar)) - allowed.width -= XtWidth(bar) + XtBorderWidth(bar); + allowed.width = (Dimension)(allowed.width - (XtWidth(bar) + XtBorderWidth(bar))); else allowed.width = 1; reconfigured = True; } } else - allowed.height = height_remaining; + allowed.height = (Dimension)height_remaining; } if (allowed.width != request->width || allowed.height != request->height) { @@ -1003,8 +1003,8 @@ GetGeometry(Widget w, unsigned int width, unsigned int height) return (False); geometry.request_mode = CWWidth | CWHeight; - geometry.width = width; - geometry.height = height; + geometry.width = (Dimension)width; + geometry.height = (Dimension)height; if (XtIsRealized(w)) { if (((ViewportWidget)w)->viewport.allowhoriz && width > XtWidth(w)) @@ -1061,14 +1061,14 @@ XawViewportSetLocation else if (xoff < 0.0) /* if the offset is < 0.0 nothing */ x = XtX(child); else - x = (float)XtWidth(child) * xoff; + x = (int)((float)XtWidth(child) * xoff); if (yoff > 1.0) y = XtHeight(child); else if (yoff < 0.0) y = XtY(child); else - y = (float)XtHeight(child) * yoff; + y = (int)((float)XtHeight(child) * yoff); MoveChild (w, -x, -y); } @@ -1086,14 +1086,14 @@ XawViewportSetCoordinates(Widget gw, Widget child = w->viewport.child; if (x > XtWidth(child)) - x = XtWidth(child); + x = (Position)XtWidth(child); else if (x < 0) - x = XtX(child); + x = (Position)XtX(child); if (y > XtHeight(child)) - y = XtHeight(child); + y = (Position)XtHeight(child); else if (y < 0) - y = XtY(child); + y = (Position)XtY(child); MoveChild (w, -x, -y); } diff --git a/lib/libXaw/src/XawI18n.c b/lib/libXaw/src/XawI18n.c index 99ed2ca18..b75f70a32 100644 --- a/lib/libXaw/src/XawI18n.c +++ b/lib/libXaw/src/XawI18n.c @@ -68,7 +68,7 @@ _Xaw_atowc(unsigned char c) wchar_t wc; char str[2]; - str[0] = c; + str[0] = (char)c; str[1] = '\0'; mbtowc(&wc, str, 1); @@ -94,7 +94,7 @@ int _Xaw_iswalnum(wchar_t ch) { #ifdef HAVE_ISWALNUM - return iswalnum(ch); + return iswalnum((wint_t)ch); #else unsigned char mb[MB_LEN_MAX]; diff --git a/lib/libXaw/src/XawIm.c b/lib/libXaw/src/XawIm.c index 7a7152fb6..1c733cdb3 100644 --- a/lib/libXaw/src/XawIm.c +++ b/lib/libXaw/src/XawIm.c @@ -155,7 +155,7 @@ static XtResource resources[] = { { XtNfontSet, XtCFontSet, XtRFontSet, sizeof(XFontSet), - Offset (font_set), XtRString, XtDefaultFontSet + Offset (font_set), XtRString, (XtPointer)XtDefaultFontSet }, { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), @@ -262,7 +262,7 @@ GetInputStyleOfIC(XawVendorShellExtPart *ve) /*ARGSUSED*/ static void -ConfigureCB(Widget w, XtPointer closure, XEvent *event, Boolean *unused) +ConfigureCB(Widget w, XtPointer closure _X_UNUSED, XEvent *event, Boolean *unused _X_UNUSED) { XawIcTableList p; XawVendorShellExtPart *ve; @@ -285,10 +285,10 @@ ConfigureCB(Widget w, XtPointer closure, XEvent *event, Boolean *unused) pe_area.width = w->core.width; pe_area.height = w->core.height; margin = &(((TextWidget)w)->text.margin); - pe_area.x += margin->left; - pe_area.y += margin->top; - pe_area.width -= (margin->left + margin->right - 1); - pe_area.height -= (margin->top + margin->bottom - 1); + pe_area.x = (short)(pe_area.x + margin->left); + pe_area.y = (short)(pe_area.y + margin->top); + pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1)); + pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1)); pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL); XSetICValues(p->xic, XNPreeditAttributes, pe_attr, NULL); @@ -344,7 +344,7 @@ SetVendorShellHeight(XawVendorShellExtPart* ve, unsigned int height) if (ve->im.area_height < height || height == 0) { XtSetArg(args[i], XtNheight, (ve->parent->core.height + height - ve->im.area_height)); - ve->im.area_height = height; + ve->im.area_height = (Dimension)height; XtSetValues(ve->parent, args, 1); } return(ve->im.area_height); @@ -416,7 +416,7 @@ FreeAllDataOfVendorShell(XawVendorShellExtPart *ve, VendorShellWidget vw) } static void -VendorShellDestroyed(Widget w, XtPointer cl_data, XtPointer ca_data) +VendorShellDestroyed(Widget w, XtPointer cl_data _X_UNUSED, XtPointer ca_data _X_UNUSED) { XawVendorShellExtPart *ve; @@ -449,7 +449,8 @@ static void OpenIM(XawVendorShellExtPart *ve) { int i; - char *p, *s, *ns, *end, *pbuf, buf[32]; + _Xconst char *s, *ns, *end; + char *p, *pbuf, buf[32]; XIM xim = NULL; XIMStyles *xim_styles; XIMStyle input_style = 0; @@ -462,7 +463,7 @@ OpenIM(XawVendorShellExtPart *ve) xim = XOpenIM(XtDisplay(ve->parent), NULL, NULL, NULL); } else { /* no fragment can be longer than the whole string */ - Cardinal len = strlen (ve->im.input_method) + 5; + Cardinal len = (Cardinal)strlen (ve->im.input_method) + 5; if (len < sizeof buf) pbuf = buf; else pbuf = XtMalloc (len); @@ -481,7 +482,7 @@ OpenIM(XawVendorShellExtPart *ve) while (isspace(*(end - 1))) end--; strcpy (pbuf, "@im="); - strncat (pbuf, s, end - s); + strncat (pbuf, s, (size_t)(end - s)); pbuf[end - s + 4] = '\0'; } @@ -522,11 +523,11 @@ OpenIM(XawVendorShellExtPart *ve) if (end > s) while (isspace(*(end - 1))) end--; - if (!strncmp(s, "OverTheSpot", end - s)) { + if (!strncmp(s, "OverTheSpot", (size_t)(end - s))) { input_style = (XIMPreeditPosition | XIMStatusArea); - } else if (!strncmp(s, "OffTheSpot", end - s)) { + } else if (!strncmp(s, "OffTheSpot", (size_t)(end - s))) { input_style = (XIMPreeditArea | XIMStatusArea); - } else if (!strncmp(s, "Root", end - s)) { + } else if (!strncmp(s, "Root", (size_t)(end - s))) { input_style = (XIMPreeditNothing | XIMStatusNothing); } for (i = 0; (unsigned short)i < xim_styles->count_styles; i++) @@ -566,7 +567,7 @@ ResizeVendorShell_Core(VendorShellWidget vw, XawVendorShellExtPart *ve, return(FALSE); } st_area.x = 0; - st_area.y = vw->core.height - ve->im.area_height; + st_area.y = (short)(vw->core.height - ve->im.area_height); st_area.width = get_st_area->width; st_area.height = get_st_area->height; XFree(get_st_area); @@ -584,12 +585,12 @@ ResizeVendorShell_Core(VendorShellWidget vw, XawVendorShellExtPart *ve, if (p->xic == NULL) { return(FALSE); } - pe_area.x = st_area.width; - pe_area.y = vw->core.height - ve->im.area_height; + pe_area.x = (short)st_area.width; + pe_area.y = (short)(vw->core.height - ve->im.area_height); pe_area.width = vw->core.width; pe_area.height = get_pe_area->height; if (p->input_style & XIMStatusArea) { - pe_area.width -= st_area.width; + pe_area.width = (unsigned short)(pe_area.width - st_area.width); } XFree(get_pe_area); pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL); @@ -617,7 +618,7 @@ ResizeVendorShell(VendorShellWidget vw, XawVendorShellExtPart *ve) } static XawIcTableList -CreateIcTable(Widget w, XawVendorShellExtPart *ve) +CreateIcTable(Widget w, XawVendorShellExtPart *ve _X_UNUSED) { XawIcTableList table; @@ -742,11 +743,11 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height) if (p->input_style & XIMStatusArea) { st_area.height = st_area_needed->height; st_area.x = 0; - st_area.y = height - st_area.height; + st_area.y = (short)(height - st_area.height); if (p->input_style & XIMPreeditArea) { st_area.width = st_area_needed->width; } else { - st_area.width = width; + st_area.width = (unsigned short)width; } XFree(st_area_needed); @@ -756,15 +757,15 @@ SizeNegotiation(XawIcTableList p, unsigned int width, unsigned int height) } if (p->input_style & XIMPreeditArea) { if (p->input_style & XIMStatusArea) { - pe_area.x = st_area.width; - pe_area.width = width - st_area.width; + pe_area.x = (short)st_area.width; + pe_area.width = (unsigned short)(width - st_area.width); } else { pe_area.x = 0; - pe_area.width = width; + pe_area.width = (unsigned short)width; } pe_area.height = pe_area_needed->height; XFree(pe_area_needed); - pe_area.y = height - pe_area.height; + pe_area.y = (short)(height - pe_area.height); pe_attr = XVaCreateNestedList(0, XNArea, &pe_area, NULL); ic_a[ic_cnt] = (XPointer) XNPreeditAttributes; ic_cnt++; ic_a[ic_cnt] = (XPointer) pe_attr; ic_cnt++; @@ -808,10 +809,10 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++; st_a[st_cnt] = (XPointer) p->font_set; st_cnt++; if (p->font_set) { - height = maxAscentOfFontSet(p->font_set) - + maxDescentOfFontSet(p->font_set); + height = (Dimension)(maxAscentOfFontSet(p->font_set) + + maxDescentOfFontSet(p->font_set)); } - height = SetVendorShellHeight(ve, height); + height = (Dimension)SetVendorShellHeight(ve, height); } if (p->flg & CIFg) { pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++; @@ -840,7 +841,7 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) } if (p->input_style & XIMPreeditArea) { pe_area.x = 0; - pe_area.y = ve->parent->core.height - height; + pe_area.y = (short)(ve->parent->core.height - height); pe_area.width = ve->parent->core.width; pe_area.height = height; pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; @@ -852,10 +853,10 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) pe_area.width = w->core.width; pe_area.height = w->core.height; margin = &(((TextWidget)w)->text.margin); - pe_area.x += margin->left; - pe_area.y += margin->top; - pe_area.width -= (margin->left + margin->right - 1); - pe_area.height -= (margin->top + margin->bottom - 1); + pe_area.x = (short)(pe_area.x + margin->left); + pe_area.y = (short)(pe_area.y + margin->top); + pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1)); + pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1)); pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++; if (p->flg & CICursorP) { @@ -868,7 +869,7 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) } if (p->input_style & XIMStatusArea) { st_area.x = 0; - st_area.y = ve->parent->core.height - height; + st_area.y = (short)(ve->parent->core.height - height); st_area.width = ve->parent->core.width; st_area.height = height; st_a[st_cnt] = (XPointer) XNArea; st_cnt++; @@ -919,7 +920,7 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) SizeNegotiation(p, ve->parent->core.width, ve->parent->core.height); - p->flg &= ~(CIFontSet | CIFg | CIBg | CIBgPixmap | CICursorP | CILineS); + p->flg &= (unsigned long)(~(CIFontSet | CIFg | CIBg | CIBgPixmap | CICursorP | CILineS)); if (!IsSharedIC(ve)) { if (p->input_style & XIMPreeditPosition) { @@ -970,7 +971,7 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus) height = maxAscentOfFontSet(p->font_set) + maxDescentOfFontSet(p->font_set); } - height = SetVendorShellHeight(ve, height); + height = (int)SetVendorShellHeight(ve, (unsigned)height); } if (p->flg & CIFg) { pe_a[pe_cnt] = (XPointer) XNForeground; pe_cnt++; @@ -1011,10 +1012,10 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus) pe_area.width = w->core.width; pe_area.height = w->core.height; margin = &(((TextWidget)w)->text.margin); - pe_area.x += margin->left; - pe_area.y += margin->top; - pe_area.width -= (margin->left + margin->right - 1); - pe_area.height -= (margin->top + margin->bottom - 1); + pe_area.x = (short)(pe_area.x + margin->left); + pe_area.y = (short)(pe_area.y + margin->top); + pe_area.width = (unsigned short)(pe_area.width - (margin->left + margin->right - 1)); + pe_area.height = (unsigned short)(pe_area.height - (margin->top + margin->bottom - 1)); pe_a[pe_cnt] = (XPointer) XNArea; pe_cnt++; pe_a[pe_cnt] = (XPointer) &pe_area; pe_cnt++; } @@ -1057,12 +1058,12 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus) if (IsSharedIC(ve) && p->flg & CIFontSet) SizeNegotiation(p, ve->parent->core.width, ve->parent->core.height); - p->flg &= ~(CIFontSet | CIFg | CIBg | CIBgPixmap | CICursorP | CILineS); + p->flg &= (unsigned long)(~(CIFontSet | CIFg | CIBg | CIBgPixmap | CICursorP | CILineS)); } static void SharedICChangeFocusWindow(Widget w, XawVendorShellExtPart *ve, - XawIcTableList p) + XawIcTableList p _X_UNUSED) { XawIcTableList pp; @@ -1099,7 +1100,7 @@ SetICFocus(Widget w, XawVendorShellExtPart *ve) p->ic_focused = TRUE; XSetICFocus(p->xic); } - p->flg &= ~CIICFocus; + p->flg &= (unsigned long)(~CIICFocus); } static void @@ -1237,9 +1238,9 @@ UnsetFocus(Widget inwidg) if ((ve = GetExtPart(vw)) != NULL) { if ((p = GetIcTableShared(inwidg, ve)) == NULL) return; if (p->flg & CIICFocus) { - p->flg &= ~CIICFocus; + p->flg &= (unsigned long)(~CIICFocus); } - p->prev_flg &= ~CIICFocus; + p->prev_flg &= (unsigned long)(~CIICFocus); if (ve->im.xim && XtIsRealized((Widget)vw) && p->xic) { UnsetICFocus(inwidg, ve); } @@ -1364,7 +1365,7 @@ CompileResourceList(XtResourceList res, unsigned int num_res) xrmres->xrm_name = XrmPermStringToQuark(res->resource_name); xrmres->xrm_class = XrmPermStringToQuark(res->resource_class); xrmres->xrm_type = XrmPermStringToQuark(res->resource_type); - xrmres->xrm_offset = -res->resource_offset - 1; + xrmres->xrm_offset = (int)(-res->resource_offset - 1); xrmres->xrm_default_type = XrmPermStringToQuark(res->default_type); } #undef xrmres @@ -1443,7 +1444,7 @@ _XawImGetShellHeight(Widget w) if (!XtIsVendorShell( w ) ) return( w->core.height ); if ( (ve = GetExtPart( (VendorShellWidget) w )) != NULL ) { - return( w->core.height - ve->im.area_height ); + return (Dimension)( w->core.height - ve->im.area_height ); } return( w->core.height ); } @@ -1542,13 +1543,14 @@ _XawImWcLookupString(Widget inwidg, XKeyPressedEvent *event, if ((vw = SearchVendorShell(inwidg)) && (ve = GetExtPart(vw)) && ve->im.xim && (p = GetIcTableShared(inwidg, ve)) && p->xic) { - return(XwcLookupString(p->xic, event, buffer_return, bytes_buffer/sizeof(wchar_t), + return(XwcLookupString(p->xic, event, buffer_return, + (int)((size_t)bytes_buffer/sizeof(wchar_t)), keysym_return, NULL)); } ret = XLookupString( event, tmp_buf, sizeof(tmp_buf), keysym_return, NULL ); for ( i = 0, tmp_p = tmp_buf, buf_p = buffer_return; i < ret; i++ ) { - *buf_p++ = _Xaw_atowc(*tmp_p++); + *buf_p++ = _Xaw_atowc((unsigned char)*tmp_p++); } return( ret ); } @@ -1599,7 +1601,7 @@ _XawImCallVendorShellExtResize(Widget w) * core Destroy method. Sheeran, Omron KK 93/08/05 */ void -_XawImDestroy(Widget w, Widget ext) +_XawImDestroy(Widget w, Widget ext _X_UNUSED) { XawVendorShellExtPart *ve; diff --git a/lib/libXaw/src/XawInit.c b/lib/libXaw/src/XawInit.c index 5ca1ef88a..702ea5c3d 100644 --- a/lib/libXaw/src/XawInit.c +++ b/lib/libXaw/src/XawInit.c @@ -66,7 +66,7 @@ Widget XawOpenApplication(XtAppContext *app_context_return, String application_class, WidgetClass widget_class, int *argc, - String *argv) + _XtString *argv) { Widget toplevel; Cardinal n; |