Projects
openEuler:Mainline
libXt
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
_service:tar_scm:libXt.spec
Changed
@@ -1,12 +1,12 @@ %bcond_without static Name: libXt -Version: 1.2.1 -Release: 4 +Version: 1.3.0 +Release: 1 License: MIT Summary: X.Org X11 libXt runtime library URL: https://www.x.org -Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 +Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.gz %ifarch sw_64 Patch1: libXt-1.2.1-sw.patch %endif @@ -72,6 +72,9 @@ %{_docdir}/%{name}/*.xml %changelog +* Thu Jul 20 2023 zhangpan <zhangpan103@h-partners.com> - 1.3.0-1 +- update to 1.3.0 + * Wed Nov 23 2022 wuzx<wuzx1226@qq.com> - 1.2.1-4 - Add sw64 architecture
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/COPYING -> _service:tar_scm:libXt-1.3.0.tar.gz/COPYING
Changed
@@ -1,5 +1,5 @@ -Copyright © 2003,2019 Thomas E. Dickey +Copyright © 2003,2019,2022 Thomas E. Dickey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -39,7 +39,7 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Copyright (c) 1993, 2011, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, 2023, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/ChangeLog -> _service:tar_scm:libXt-1.3.0.tar.gz/ChangeLog
Changed
@@ -1,3 +1,408 @@ +commit 64fca6a2d7cf4fee28ca2277ca6a8b7b32aee66e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Apr 9 13:42:31 2023 -0700 + + libXt 1.3.0 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b3b0c1ad25a5d0f628eddd00113a40364d68480b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 3 17:42:47 2023 -0800 + + Replace XtMalloc() calls with XtMallocArray() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit b1b54c50d0e5851d72c1e7aff4057687be2e447e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 3 16:23:20 2023 -0800 + + Replace XtRealloc() calls with XtReallocArray() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 4ece1c842a08c11c1f84b95355801d41cd8435b1 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 3 14:55:19 2023 -0800 + + Add XtReallocArray() for overflow checking of multiplied args + + Uses reallocarray() if available, otherwise checks for overflow itself, + if overflow is possible (i.e. in ILP32 & ILP64 environments, but not LP64 + with 32-bit ints). + + Includes unit tests and XtMallocArray() helper macro. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 392eb1cd5f2bdb186f0ff7f51abc4dd05ec13709 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Mar 3 13:28:18 2023 -0800 + + test: Add unit tests for XtMalloc, XtCalloc, & XtRealloc + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 6cc4dd4191b4b13bd85fe287b6067e287a85d1d2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Mar 4 10:33:29 2023 -0800 + + configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL + + AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008, + so it's time to rely on it. + + Clears autoconf warnings: + configure.ac:36: warning: The macro `AC_PROG_LIBTOOL' is obsolete. + configure.ac:36: You should run autoupdate. + m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from... + configure.ac:36: the top level + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 444eb13db2f9bc89aba333057fb9eae5d12acf5d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Feb 25 09:30:58 2023 -0800 + + Remove "All rights reserved" from Oracle copyright notices + + Oracle no longer includes this term in our copyright & license notices. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1736034c39682927830c0660a0b9587f19e53e4e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Feb 3 11:35:21 2023 -0800 + + TMstate.c: Handle -Wduplicated-branches warnings + + Gets rid of these messages from gcc: + + TMstate.c: In function ‘GetBranchHead’: + TMstate.c:128:12: warning: this condition has identical branches + -Wduplicated-branches + if (parseTree->branchHeadTblSize == 0) + ^ + TMstate.c: In function ‘_XtGetQuarkIndex’: + TMstate.c:183:16: warning: this condition has identical branches + -Wduplicated-branches + if (parseTree->quarkTblSize == 0) + ^ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 358e6295fdc494f4f1ed6ab7b1618a82bcd4b0ac +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Feb 3 11:09:22 2023 -0800 + + Add xfilesearchpath to xt.pc + + Make setting of --with-xfile-search-path available to other components, + without having to link with libXt. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5c617fc17d9da49f92823b78472a59bd98033611 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Feb 6 16:24:31 2023 -0800 + + configure.ac: Replace HAVE_LIBRARY with AC_CHECK_LIB + + AC_CHECK_LIB was introduced in autoconf 2.0 (1994) to replace HAVE_LIBRARY + + Clears autoconf warnings of: + + configure.ac:108: warning: The macro `AC_HAVE_LIBRARY' is obsolete. + configure.ac:108: You should run autoupdate. + ./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from... + configure.ac:108: the top level + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e7b044c11190ed4deae2c2bb61ff3cc2c99170b2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Dec 17 09:28:57 2022 -0800 + + tests: Replace g_assert() calls with g_assert_*() calls + + https://docs.gtk.org/glib/testing.html warns against using g_assert() + in test cases, since it is a no-op when compiling with G_DISABLE_ASSERT. + The replacement calls also give more detailed messages on failures. + + Raises the minimum required glib version for building unit tests + from 2.16 (released March 2008) to 2.40 (released March 2014) to + get support for g_assert_nonnull(). + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 205e30739073d282d4401df57862ac3a5cf6a987 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Dec 17 09:12:05 2022 -0800 + + tests: Use XORG_MEMORY_CHECK_FLAGS from xorg-macros 1.16 + + Replaces previous local copy which had gotten out of date. + Raises xorg-macros minimum version from 1.13 (released March 2011) + to 1.16 (Dec. 2011). + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 35eed89c651c87a5e9950f3033c1516358456425 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Dec 17 08:38:38 2022 -0800 + + tests: update g_test_bug_base url from bugzilla to gitlab + + Also adds a call to g_test_bug() for the one existing testcase + associated with a bug in a public bug tracker. + + Otherwise this is mostly a placeholder for now, as no other tests + call g_test_bug() yet to report what bugs they test for. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1aaf5d502027104ddd566090787780319f510278 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 11 19:02:20 2022 -0700 + + Use memcpy() instead of XtMemmove() when buffers are known to differ + + Most of these came from a mass XtBCopy() -> XtMemmove() substitution + in 1993 with a commit comment of "ANSIfication". + + But include/X11/IntrinsicI.h now defines XtMemmmove() as just + calling memcpy() as long as src & dst differ, so remove an + unnecessary check when we've just allocated a buffer, and reduce + the chance that someone thinks we'll actually call memmove() instead + of memcpy() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 3c54e99864eb6dba0d0cde7fe0a23ed7c1f5875f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 11 18:41:14 2022 -0700 + + Use memcpy() instead of memmove() when buffers are known not to overlap + + Most of these came from a mass bcopy() -> memmove() substitution + in 1993 with a commit comment of "ANSIfication". + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit bbe78f905da6e36ebe1fe520903c760107b92b78 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Jul 17 18:14:45 2022 -0700 + + gitlab CI: stop requiring Signed-off-by in commits + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -207,12 +207,9 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/xt.pc.in COPYING ChangeLog INSTALL compile \ + $(srcdir)/xt.pc.in COPYING ChangeLog INSTALL README.md compile \ config.guess config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -249,9 +246,11 @@ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best -DIST_TARGETS = dist-bzip2 dist-gzip +DIST_TARGETS = dist-xz dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -278,6 +277,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -292,8 +293,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -319,7 +322,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -617,7 +619,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -691,6 +692,7 @@ dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) @@ -698,7 +700,6 @@ dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) @@ -766,7 +767,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/README.md -> _service:tar_scm:libXt-1.3.0.tar.gz/README.md
Changed
@@ -41,7 +41,7 @@ https://lists.x.org/mailman/listinfo/xorg -The master development code repository can be found at: +The primary development code repository can be found at: https://gitlab.freedesktop.org/xorg/lib/libXt
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/aclocal.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/aclocal.m4
Changed
@@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,15 +14,1143 @@ m4_ifndef(AC_CONFIG_MACRO_DIRS, m4_defun(_AM_CONFIG_MACRO_DIRS, )m4_defun(AC_CONFIG_MACRO_DIRS, _AM_CONFIG_MACRO_DIRS($@))) m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl -m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.69,, -m4_warning(this file was generated for autoconf 2.69. +m4_if(m4_defn(AC_AUTOCONF_VERSION), 2.71,, +m4_warning(this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.)) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) +# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN(AM_AUTOMAKE_VERSION, +am__api_version='1.16' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if($1, 1.16.5, , + AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl +) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define(_AM_AUTOCONF_VERSION, ) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN(AM_SET_CURRENT_AUTOMAKE_VERSION, +AM_AUTOMAKE_VERSION(1.16.5)dnl +m4_ifndef(AC_AUTOCONF_VERSION, + m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl +_AM_AUTOCONF_VERSION(m4_defn(AC_AUTOCONF_VERSION))) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR(foo), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN(AM_AUX_DIR_EXPAND, +AC_REQUIRE(AC_CONFIG_AUX_DIR_DEFAULT)dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN(AM_CONDITIONAL, +AC_PREREQ(2.52)dnl + m4_if($1, TRUE, AC_FATAL($0: invalid condition: $1), + $1, FALSE, AC_FATAL($0: invalid condition: $1))dnl +AC_SUBST($1_TRUE)dnl +AC_SUBST($1_FALSE)dnl +_AM_SUBST_NOTMAKE($1_TRUE)dnl +_AM_SUBST_NOTMAKE($1_FALSE)dnl +m4_define(_AM_COND_VALUE_$1, $2)dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR(conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.) +fi)) + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN(_AM_DEPENDENCIES, +AC_REQUIRE(AM_SET_DEPDIR)dnl +AC_REQUIRE(AM_OUTPUT_DEPENDENCY_COMMANDS)dnl +AC_REQUIRE(AM_MAKE_INCLUDE)dnl +AC_REQUIRE(AM_DEP_TRACK)dnl + +m4_if($1, CC, depcc="$CC" am_compiler_list=, + $1, CXX, depcc="$CXX" am_compiler_list=, + $1, OBJC, depcc="$OBJC" am_compiler_list='gcc3 gcc', + $1, OBJCXX, depcc="$OBJCXX" am_compiler_list='gcc3 gcc', + $1, UPC, depcc="$UPC" am_compiler_list=, + $1, GCJ, depcc="$GCJ" am_compiler_list='gcc3 gcc', + depcc="$$1" am_compiler_list=) + +AC_CACHE_CHECK(dependency style of $depcc, + am_cv_$1_dependencies_compiler_type, +if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/compile -> _service:tar_scm:libXt-1.3.0.tar.gz/compile
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/config.guess -> _service:tar_scm:libXt-1.3.0.tar.gz/config.guess
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2020-04-26' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-01' # This file 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,11 +29,19 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,6 +94,9 @@ exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -102,7 +115,7 @@ # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -112,7 +125,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -133,14 +146,12 @@ UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,24 +160,37 @@ LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if "$LIBC" = unknown && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if "$LIBC" = unknown ; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -178,12 +202,12 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -192,13 +216,13 @@ earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv0-9\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -219,7 +243,7 @@ ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv0-9/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -230,7 +254,7 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -241,51 +265,57 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/config.h.in -> _service:tar_scm:libXt-1.3.0.tar.gz/config.h.in
Changed
@@ -9,12 +9,24 @@ /* Define to 1 if you have the `ws2_32' library (-lws2_32). */ #undef HAVE_LIBWS2_32 -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the `malloc_usable_size' function. */ +#undef HAVE_MALLOC_USABLE_SIZE + +/* Define to 1 if you have the <minix/config.h> header file. */ +#undef HAVE_MINIX_CONFIG_H + +/* Define to 1 if you have the `reallocarray' function. */ +#undef HAVE_REALLOCARRAY /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -33,6 +45,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <wchar.h> header file. */ +#undef HAVE_WCHAR_H + /* Define to 1 if Xalloca.h should include <alloca.h> */ #undef INCLUDE_ALLOCA_H @@ -69,12 +84,102 @@ /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* poll() function is available */ #undef USE_POLL +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif + + /* Version number of package */ #undef VERSION
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/config.sub -> _service:tar_scm:libXt-1.3.0.tar.gz/config.sub
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2020 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2020-06-20' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-21' # This file 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 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,7 +76,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2020 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -112,9 +121,11 @@ # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF +IFS=$saved_IFS # Separate into logical components for further validation case $1 in @@ -124,28 +135,27 @@ ;; *-*-*-*) basic_machine=$field1-$field2 - os=$field3-$field4 + basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) basic_machine=$field1 - os=$maybe_os + basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=linux-android + basic_os=linux-android ;; *) basic_machine=$field1-$field2 - os=$field3 + basic_os=$field3 ;; esac ;; @@ -154,7 +164,7 @@ case $field1-$field2 in decstation-3100) basic_machine=mips-dec - os= + basic_os= ;; *-*) # Second component is usually, but not always the OS @@ -162,7 +172,11 @@ # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 - os=$field2 + basic_os=$field2 + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ @@ -175,11 +189,11 @@ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 - os= + basic_os= ;; *) basic_machine=$field1 - os=$field2 + basic_os=$field2 ;; esac ;; @@ -191,451 +205,451 @@ case $field1 in 386bsd) basic_machine=i386-pc - os=bsd + basic_os=bsd ;; a29khif) basic_machine=a29k-amd - os=udi + basic_os=udi ;; adobe68k) basic_machine=m68010-adobe - os=scout + basic_os=scout ;; alliant) basic_machine=fx80-alliant - os= + basic_os= ;; altos | altos3068) basic_machine=m68k-altos - os= + basic_os= ;; am29k) basic_machine=a29k-none - os=bsd + basic_os=bsd ;; amdahl) basic_machine=580-amdahl - os=sysv + basic_os=sysv ;; amiga) basic_machine=m68k-unknown - os= + basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown - os=amigaos + basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - os=sysv4 + basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo - os=sysv + basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - os=bsd + basic_os=bsd ;; aros) basic_machine=i386-pc - os=aros + basic_os=aros ;;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/configure -> _service:tar_scm:libXt-1.3.0.tar.gz/configure
Changed
@@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXt 1.2.1. +# Generated by GNU Autoconf 2.71 for libXt 1.3.0. # -# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXt/issues>. +# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxt/-/issues/>. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/configure.ac -> _service:tar_scm:libXt-1.3.0.tar.gz/configure.ac
Changed
@@ -22,23 +22,28 @@ # # Initialize Autoconf -AC_PREREQ(2.60) -AC_INIT(libXt, 1.2.1, - https://gitlab.freedesktop.org/xorg/lib/libXt/issues, libXt) +AC_PREREQ(2.70) +AC_INIT(libXt, 1.3.0, + https://gitlab.freedesktop.org/xorg/lib/libxt/-/issues/, libXt) AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_HEADERS(config.h) AC_CONFIG_MACRO_DIR(m4) +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) +# to avoid autoconf errors. +AC_USE_SYSTEM_EXTENSIONS + # Initialize Automake -AM_INIT_AUTOMAKE(foreign dist-bzip2) +AM_INIT_AUTOMAKE(foreign dist-xz) # Initialize libtool -AC_PROG_LIBTOOL +LT_INIT -# Require X.Org macros 1.13 or later for XORG_ENABLE_UNIT_TESTS +# Require X.Org macros 1.16 or later for XORG_MEMORY_CHECK_FLAGS m4_ifndef(XORG_MACROS_VERSION, - m4_fatal(must install xorg-macros 1.13 or later before running autoconf/autogen)) -XORG_MACROS_VERSION(1.13) + m4_fatal(must install xorg-macros 1.16 or later before running autoconf/autogen)) +XORG_MACROS_VERSION(1.16) XORG_DEFAULT_OPTIONS XORG_CHECK_MALLOC_ZERO XORG_ENABLE_SPECS @@ -53,7 +58,10 @@ # Checks for header files. AC_CHECK_HEADER(alloca.h, AC_DEFINE(INCLUDE_ALLOCA_H, 1, Define to 1 if Xalloca.h should include <alloca.h>)) -# Obtain compiler/linker options for depedencies +# Checks for library functions. +AC_CHECK_FUNCS(reallocarray) + +# Obtain compiler/linker options for dependencies PKG_CHECK_MODULES(XT, sm ice x11 xproto kbproto) # Set-up variables to use build machine compiler when cross-compiling @@ -105,7 +113,7 @@ # Link with winsock if mingw target case $host_os in *mingw*) - AC_HAVE_LIBRARY(ws2_32) + AC_CHECK_LIB(ws2_32,main) ;; *) ;; @@ -138,25 +146,12 @@ # --enable-unit-tests XORG_ENABLE_UNIT_TESTS -XORG_WITH_GLIB(2.16) - -# Memory checking support -case $host_os in - solaris*) - AC_CHECK_LIB(umem, umem_alloc, - MALLOC_DEBUG_ENV='LD_PRELOAD=libumem.so UMEM_DEBUG=default') - ;; - *-gnu*) # GNU libc - Value is used as a single byte bit pattern, - # both directly and inverted, so should not be 0 or 255. - MALLOC_DEBUG_ENV='MALLOC_PERTURB_=15' - ;; - *bsd*|darwin*) - MALLOC_DEBUG_ENV='MallocPreScribble=1 MallocScribble=1' - ;; -esac -AC_MSG_CHECKING(for definitions to enable memory-checking support) -AC_MSG_RESULT(${MALLOC_DEBUG_ENV:-none}) -AC_SUBST(MALLOC_DEBUG_ENV) +XORG_WITH_GLIB(2.40) +XORG_MEMORY_CHECK_FLAGS +if test "x$enable_unit_tests" != "xno" ; then + AC_CHECK_FUNCS(malloc_usable_size) + AC_CHECK_HEADERS(malloc.h) +fi # Replaces XFileSearchPathDefault from Imake configs XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S'
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/depcomp -> _service:tar_scm:libXt-1.3.0.tar.gz/depcomp
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/include/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -168,8 +168,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -194,6 +192,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -208,8 +208,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -235,7 +237,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -512,7 +513,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/X11/CallbackI.h -> _service:tar_scm:libXt-1.3.0.tar.gz/include/X11/CallbackI.h
Changed
@@ -62,7 +62,11 @@ unsigned short count; char is_padded; /* contains NULL padding for external form */ char call_state; /* combination of _XtCB{FreeAfter}Calling */ -#ifdef LONG64 +#if __STDC_VERSION__ >= 199901L + /* When compiling with C99 or newer, use a flexible member to ensure + * padding and alignment for sizeof(). */ + XtCallbackRec callbacks; +#elif defined(LONG64) unsigned int align_pad; /* padding to align callback list */ #endif /* XtCallbackList */
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/X11/Intrinsic.h -> _service:tar_scm:libXt-1.3.0.tar.gz/include/X11/Intrinsic.h
Changed
@@ -111,6 +111,15 @@ #define TRUE 1 #endif +#if __STDC_VERSION__ >= 199901L +#include <stdint.h> +typedef intptr_t XtIntPtr; +typedef uintptr_t XtUIntPtr; +#else +typedef long XtIntPtr; +typedef unsigned long XtUIntPtr; +#endif + #define XtNumber(arr) ((Cardinal) (sizeof(arr) / sizeof(arr0))) typedef struct _WidgetRec *Widget; @@ -122,10 +131,10 @@ typedef struct _XtAppStruct *XtAppContext; typedef unsigned long XtValueMask; -typedef unsigned long XtIntervalId; -typedef unsigned long XtInputId; -typedef unsigned long XtWorkProcId; -typedef unsigned long XtSignalId; +typedef XtUIntPtr XtIntervalId; +typedef XtUIntPtr XtInputId; +typedef XtUIntPtr XtWorkProcId; +typedef XtUIntPtr XtSignalId; typedef unsigned int XtGeometryMask; typedef unsigned long XtGCMask; /* Mask of values that are used by widget*/ typedef unsigned long Pixel; /* Index into colormap */ @@ -157,7 +166,7 @@ * ****************************************************************/ typedef char Boolean; -typedef long XtArgVal; +typedef XtIntPtr XtArgVal; typedef unsigned char XtEnum; typedef unsigned int Cardinal; @@ -165,6 +174,11 @@ typedef short Position; /* Offset from 0 coordinate */ typedef void* XtPointer; +#if __STDC_VERSION__ >= 201112L +_Static_assert(sizeof(XtArgVal) >= sizeof(XtPointer), "XtArgVal too small"); +_Static_assert(sizeof(XtArgVal) >= sizeof(long), "XtArgVal too small"); +#endif + /* The type Opaque is NOT part of the Xt standard, do NOT use it. */ /* (It remains here only for backward compatibility.) */ @@ -269,7 +283,7 @@ Cardinal* /* num_params */ ); -typedef unsigned long XtBlockHookId; +typedef XtUIntPtr XtBlockHookId; typedef void (*XtBlockHookProc)( XtPointer /* client_data */ @@ -1850,6 +1864,12 @@ Cardinal /* num */ ); +extern void *XtReallocArray( + void * /* ptr */, + Cardinal /* num */, + Cardinal /* size */ +); + extern void XtFree( char* /* ptr */ ); @@ -1878,6 +1898,14 @@ int /* line */ ); +extern char *_XtReallocArray( /* implementation-private */ + char * /* ptr */, + Cardinal /* num */, + Cardinal /* size */, + const char */* file */, + int /* line */ +); + extern char *_XtCalloc( /* implementation-private */ Cardinal /* num */, Cardinal /* size */, @@ -1897,9 +1925,15 @@ #define XtMalloc(size) _XtMalloc(size, __FILE__, __LINE__) #define XtRealloc(ptr,size) _XtRealloc(ptr, size, __FILE__, __LINE__) +#define XtMallocArray(num,size) _XtReallocArray(NULL, num, size, __FILE__, __LINE__) +#define XtReallocArray(ptr,num,size) _XtReallocArray(ptr, num, size, __FILE__, __LINE__) #define XtCalloc(num,size) _XtCalloc(num, size, __FILE__, __LINE__) #define XtFree(ptr) _XtFree(ptr) +#else + +#define XtMallocArray(num,size) XtReallocArray(NULL, num, size) + #endif /* ifdef XTTRACEMEMORY */ #define XtNew(type) ((type *) XtMalloc((unsigned) sizeof(type)))
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/X11/IntrinsicP.h -> _service:tar_scm:libXt-1.3.0.tar.gz/include/X11/IntrinsicP.h
Changed
@@ -56,14 +56,19 @@ * are not the same size on all systems. */ typedef struct { - long xrm_name; /* Resource name quark */ - long xrm_class; /* Resource class quark */ - long xrm_type; /* Resource representation type quark */ + XtIntPtr xrm_name; /* Resource name quark */ + XtIntPtr xrm_class; /* Resource class quark */ + XtIntPtr xrm_type; /* Resource representation type quark */ Cardinal xrm_size; /* Size in bytes of representation */ int xrm_offset; /* -offset-1 */ - long xrm_default_type; /* Default representation type quark */ + XtIntPtr xrm_default_type; /* Default representation type quark */ XtPointer xrm_default_addr; /* Default resource address */ } XrmResource, *XrmResourceList; +#if __STDC_VERSION__ >= 201112L +_Static_assert(XtOffsetOf(XrmResource, xrm_default_addr) == + XtOffsetOf(XtResource, default_addr), + "Field offset mismatch"); +#endif typedef unsigned long XtVersionType;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/X11/ThreadsI.h -> _service:tar_scm:libXt-1.3.0.tar.gz/include/X11/ThreadsI.h
Changed
@@ -1,6 +1,6 @@ /************************************************************ -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/include/X11/Xtos.h -> _service:tar_scm:libXt-1.3.0.tar.gz/include/X11/Xtos.h
Changed
@@ -53,7 +53,11 @@ #include <X11/Xalloca.h> -#if defined (_LP64) || \ +#if defined(__SIZEOF_LONG__) +# if __SIZEOF_LONG__ == 8 +# define LONG64 +# endif +# elif defined (_LP64) || \ defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/install-sh -> _service:tar_scm:libXt-1.3.0.tar.gz/install-sh
Changed
@@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *23672367) mkdir_umask=$umask;; - .*00202 | .0202 | .02) mkdir_umask=22;; - - *0-7) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *1235670-70-7) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX,
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/ltmain.sh -> _service:tar_scm:libXt-1.3.0.tar.gz/ltmain.sh
Changed
@@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-10-04.22; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# 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 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## @@ -139,9 +130,12 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ s/\\(^$_G_bs\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,132 +1134,203 @@ } -# func_quote ARG
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/m4/libtool.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/m4/libtool.m4
Changed
@@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require(_LT_CHECK_SHELL_FEATURES)dnl m4_require(_LT_PATH_CONVERSION_FUNCTIONS)dnl m4_require(_LT_CMD_RELOAD)dnl +m4_require(_LT_DECL_FILECMD)dnl m4_require(_LT_CHECK_MAGIC_METHOD)dnl m4_require(_LT_CHECK_SHAREDLIB_FROM_LINKLIB)dnl m4_require(_LT_CMD_OLD_ARCHIVE)dnl @@ -219,8 +221,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -778,7 +780,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1042,8 +1044,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1067,17 +1069,12 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin91*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.012,.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.012,*|,*powerpc*-darwin5-8*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1126,12 +1123,12 @@ output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if($1, CXX, if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ,) else @@ -1245,7 +1242,8 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN(_LT_WITH_SYSROOT, -AC_MSG_CHECKING(for sysroot) +m4_require(_LT_DECL_SED)dnl +AC_MSG_CHECKING(for sysroot) AC_ARG_WITH(sysroot, AS_HELP_STRING(--with-sysroot@<:@=DIR@:>@, Search for dependent libraries within DIR (or the compiler's sysroot @@ -1262,7 +1260,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1292,7 +1290,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1309,7 +1307,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1321,7 +1319,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1343,7 +1341,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1351,7 +1349,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1359,7 +1357,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1379,14 +1377,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1417,10 +1415,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*|powerpc64le-*linux*) + powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; - powerpc-*linux*|powerpc64-*linux*) + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/m4/ltoptions.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/m4/ltoptions.m4
Changed
@@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/m4/ltsugar.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/m4/ltsugar.m4
Changed
@@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 #
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/m4/ltversion.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/m4/ltversion.m4
Changed
@@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define(LT_PACKAGE_VERSION, 2.4.6) -m4_define(LT_PACKAGE_REVISION, 2.4.6) +m4_define(LT_PACKAGE_VERSION, 2.4.7) +m4_define(LT_PACKAGE_REVISION, 2.4.7) AC_DEFUN(LTVERSION_VERSION, -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, Which release of libtool.m4 was used?) _LT_DECL(, macro_revision, 0) )
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/m4/lt~obsolete.m4 -> _service:tar_scm:libXt-1.3.0.tar.gz/m4/lt~obsolete.m4
Changed
@@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/man/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -174,6 +174,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -188,8 +190,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -215,7 +219,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -868,7 +871,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtAllocateGC.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtAllocateGC.man
Changed
@@ -35,7 +35,7 @@ .na .TH XtAllocateGC __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME -XtAllocateGC \- obtain a sharable GC with modifiable fields +XtAllocateGC \- obtain a shareable GC with modifiable fields .SH SYNTAX #include <X11/Intrinsic.h> .HP @@ -58,7 +58,7 @@ .SH DESCRIPTION The .B XtAllocateGC -function returns a sharable GC that may be modified by the client. +function returns a shareable GC that may be modified by the client. The \fIscreen\fP field of the specified widget or of the nearest widget ancestor of the specified object and the specified \fIdepth\fP argument supply the root and drawable depths for which the GC is to
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtAppError.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtAppError.man
Changed
@@ -41,9 +41,9 @@ .SH SYNTAX #include <X11/Intrinsic.h> .HP -void XtAppError(XtAppContext \fIapp_context\fP, const char *\fImessage\fP); +_X_NORETURN void XtAppError(XtAppContext \fIapp_context\fP, const char *\fImessage\fP); .HP -XtErrorHandler XtAppSetErrorHandler(XtAppContext \fIapp_context\fP, XtErrorHandler +XtErrorHandler XtAppSetErrorHandler(XtAppContext \fIapp_context\fP, _X_NORETURN XtErrorHandler \fIhandler\fP); .HP XtErrorHandler XtAppSetWarningHandler(XtAppContext \fIapp_context\fP, XtErrorHandler
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtAppErrorMsg.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtAppErrorMsg.man
Changed
@@ -41,11 +41,11 @@ .SH SYNTAX #include <X11/Intrinsic.h> .HP -void XtAppErrorMsg(XtAppContext \fIapp_context\fP, const char *\fIname\fP, +_X_NORETURN void XtAppErrorMsg(XtAppContext \fIapp_context\fP, const char *\fIname\fP, const char *\fItype\fP, const char *\fIclass\fP, const char *\fIdefaultMsg\fP, String *\fIparams\fP, Cardinal *\fInum_params\fP); .HP -XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext \fIapp_context\fP, XtErrorMsgHandler +XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext \fIapp_context\fP, _X_NORETURN XtErrorMsgHandler \fImsg_handler\fP); .HP XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext \fIapp_context\fP,
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtAppInitialize.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtAppInitialize.man
Changed
@@ -106,7 +106,7 @@ is called with the value prior to calling .BR XtOpenDisplay . .LP -XtAppInitialize and XtVaAppInitialize have been superceded by +XtAppInitialize and XtVaAppInitialize have been superseded by .B XtOpenApplication and .B XtVaOpenApplication
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtAppSetTypeConverter.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtAppSetTypeConverter.man
Changed
@@ -64,7 +64,7 @@ Specifies the destination type. .IP \fIcache_type\fP 1i Specifies whether or not resources produced by this converter are -sharable or display-specific and when they should be freed. +shareable or display-specific and when they should be freed. .IP \fIdestructor\fP 1i Specifies a destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallocate resources
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtError.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtError.man
Changed
@@ -39,9 +39,9 @@ .SH SYNTAX #include <X11/Intrinsic.h> .HP -void XtError(const char *\fImessage\fP); +_X_NORETURN void XtError(const char *\fImessage\fP); .HP -void XtSetErrorHandler(XtErrorHandler \fIhandler\fP); +void XtSetErrorHandler(_X_NORETURN XtErrorHandler \fIhandler\fP); .HP void XtSetWarningHandler(XtErrorHandler \fIhandler\fP); .HP @@ -57,22 +57,22 @@ .SH DESCRIPTION The .B XtError -function has been superceded by +function has been superseded by .BR XtAppError . .LP The .B XtSetErrorHandler -function has been superceded by +function has been superseded by .BR XtAppSetErrorHandler . .LP The .B XtSetWarningHandler -function has been superceded by +function has been superseded by .BR XtAppSetWarningHandler . .LP The .B XtWarning -function has been superceded by +function has been superseded by .BR XtAppWarning . .SH "SEE ALSO" .BR XtAppError (__libmansuffix__)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtErrorMsg.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtErrorMsg.man
Changed
@@ -40,13 +40,13 @@ .SH SYNTAX #include <X11/Intrinsic.h> .HP -void XtErrorMsg(const char *\fIname\fP, +_X_NORETURN void XtErrorMsg(const char *\fIname\fP, const char *\fItype\fP, const char *\fIclass\fP, const char *\fIdefaultMsg\fP, String *\fIparams\fP, Cardinal *\fInum_params\fP); .HP -void XtSetErrorMsgHandler(XtErrorMsgHandler \fImsg_handler\fP); +void XtSetErrorMsgHandler(_X_NORETURN XtErrorMsgHandler \fImsg_handler\fP); .HP void XtSetWarningMsgHandler(XtErrorMsgHandler \fImsg_handler\fP); .HP @@ -74,22 +74,22 @@ .SH DESCRIPTION The .B XtErrorMsg -function has been superceded by +function has been superseded by .BR XtAppErrorMsg . .LP The .B XtSetErrorMsgHandler -function has been superceded by +function has been superseded by .BR XtAppSetErrorMsgHandler . .LP The .B XtSetWarningMsgHandler -function has been superceded by +function has been superseded by .BR XtAppSetWarningMsgHandler . .LP The .B XtWarningMsg -function has been superceded by +function has been superseded by .B XtAppWarningMsg .SH "SEE ALSO" .BR XtAppErrorMsg (__libmansuffix__)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtGetErrorDatabase.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtGetErrorDatabase.man
Changed
@@ -65,12 +65,12 @@ .SH DESCRIPTION The .B XtGetErrorDatabase -function has been superceded by +function has been superseded by .BR XtAppGetErrorDatabase . .LP The .B XtGetErrorDatabaseText -function has been superceded by +function has been superseded by .BR XtAppGetErrorDatabaseText . .SH "SEE ALSO" .BR XtAppGetErrorDatabase (__libmansuffix__)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtGetGC.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtGetGC.man
Changed
@@ -36,7 +36,7 @@ .na .TH XtGetGC __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME -XtGetGC, XtReleaseGC \- obtain and destroy a sharable GC +XtGetGC, XtReleaseGC \- obtain and destroy a shareable GC .SH SYNTAX #include <X11/Intrinsic.h> .HP @@ -56,7 +56,7 @@ .SH DESCRIPTION The .B XtGetGC -function returns a sharable, read-only GC. +function returns a shareable, read-only GC. The parameters to this function are the same as those for .B XCreateGC except that a widget is passed instead of a display.
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtGetSelectionTimeout.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtGetSelectionTimeout.man
Changed
@@ -48,12 +48,12 @@ .SH DESCRIPTION The .B XtGetSelectionTimeout -function has been superceded by +function has been superseded by .BR XtAppGetSelectionTimeout . .LP The .B XtSetSelectionTimeout -function has been superceded by +function has been superseded by .BR XtAppSetSelectionTimeout . .SH "SEE ALSO" .BR XtAppGetSelectionTimeout (__libmansuffix__)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtInsertEventTypeHandler.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtInsertEventTypeHandler.man
Changed
@@ -173,7 +173,7 @@ In the future, when .B XtDispatchEvent is called with an event of \fIevent_type\fP, the specified \fIproc\fP (or -the default dispatcher) will be invoked to determine a widget ot which +the default dispatcher) will be invoked to determine a widget at which to dispatch the event. .LP The
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtMalloc.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtMalloc.man
Changed
@@ -36,7 +36,7 @@ .na .TH XtMalloc __libmansuffix__ __xorgversion__ "XT FUNCTIONS" .SH NAME -XtMalloc, XtCalloc, XtRealloc, XtFree, XtNew, XtNewString \- memory management functions +XtMalloc, XtCalloc, XtRealloc, XtReallocArray, XtFree, XtNew, XtNewString \- memory management functions .SH SYNTAX #include <X11/Intrinsic.h> .HP @@ -44,7 +44,9 @@ .HP char *XtCalloc(Cardinal \fInum\fP, Cardinal \fIsize\fP); .HP -char *XtRealloc(char *\fIptr\fP, Cardinal \fInum\fP); +char *XtRealloc(char *\fIptr\fP, Cardinal \fIsize\fP); +.HP +void *XtReallocArray(void *\fIptr\fP, Cardinal \fInum\fP, Cardinal \fIsize\fP); .HP void XtFree(char *\fIptr\fP); .HP @@ -55,7 +57,7 @@ Cardinal XtAsprintf(char **\fInew_string\fP, const char *\fIformat\fP, ...); .SH ARGUMENTS .IP \fInum\fP 1i -Specifies the number of bytes or array elements. +Specifies the number of array elements. .IP \fIptr\fP 1i Specifies a pointer to the old storage or to the block of storage that is to be freed. .IP \fIsize\fP 1i @@ -90,17 +92,18 @@ .LP The .B XtRealloc -function changes the size of a block of storage (possibly moving it). -Then, it copies the old contents (or as much as will fit) into the new block -and frees the old block. +and +.B XtReallocArray +functions change the size of a block of storage (possibly moving it). +Then, they copy the old contents (or as much as will fit) into the new block +and free the old block. If there is insufficient memory to allocate the new block, -.B XtRealloc -calls +or the calculations for the size of the new block would cause an +integer overflow, these functions call .BR XtErrorMsg . If ptr is NULL, -.B XtRealloc -allocates the new storage without copying the old contents; -that is, it simply calls +these functions allocate the new storage without copying the old contents; +that is, they simply call .BR XtMalloc . .LP The
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/man/XtOpenApplication.man -> _service:tar_scm:libXt-1.3.0.tar.gz/man/XtOpenApplication.man
Changed
@@ -112,7 +112,7 @@ is called with the value prior to calling .BR XtOpenDisplay . .LP -XtAppInitialize and XtVaAppInitialize have been superceded by +XtAppInitialize and XtVaAppInitialize have been superseded by .B XtOpenApplication and .B XtVaOpenApplication
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/missing -> _service:tar_scm:libXt-1.3.0.tar.gz/missing
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/specs/CH09.xml -> _service:tar_scm:libXt-1.3.0.tar.gz/specs/CH09.xml
Changed
@@ -1487,7 +1487,7 @@ <function>XListFonts</function> using a wildcard font name and use the first font in the list. This wildcard font name should be as broad as -possible to maximize the probability of locating a useable font; +possible to maximize the probability of locating a usable font; for example, “<code>-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1</code>”.) </para> </listitem> @@ -1527,7 +1527,7 @@ <function>XCreateFontSet</function> using a wildcard base font name. This wildcard base font name should be as broad as -possible to maximize the probability of locating a useable font; +possible to maximize the probability of locating a usable font; for example, “<code>-*-*-*-R-*-*-*-120-*-*-*-*</code>”.) </para> </listitem> @@ -2371,7 +2371,7 @@ <listitem> <para> Specifies whether or not resources produced by this -converter are sharable or display-specific and when +converter are shareable or display-specific and when they should be freed. </para> </listitem> @@ -2473,7 +2473,7 @@ <listitem> <para> Specifies whether or not resources produced by this -converter are sharable or display-specific and when +converter are shareable or display-specific and when they should be freed. </para> </listitem>
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/specs/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/specs/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -202,6 +202,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -216,8 +218,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -243,7 +247,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -522,7 +525,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/specs/appB.xml -> _service:tar_scm:libXt-1.3.0.tar.gz/specs/appB.xml
Changed
@@ -249,7 +249,7 @@ <para> The use of “None” for a modifier list is identical to the use -of an exclamation point with no modifers. +of an exclamation point with no modifiers. </para> <informaltable frame='topbot'> @@ -729,11 +729,11 @@ </row> <row> <entry>ButtonPress</entry> - <entry>button from event <emphasis>detail</emphasis></entry> + <entry>“Button” followed by button from event <emphasis>detail</emphasis> (e.g. <function>Button1</function>)</entry> </row> <row> <entry>ButtonRelease</entry> - <entry>button from event <emphasis>detail</emphasis></entry> + <entry>“Button” followed by button from event <emphasis>detail</emphasis> (e.g. <function>Button42</function>)</entry> </row> <row> <entry>MotionNotify</entry>
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/specs/appC.xml -> _service:tar_scm:libXt-1.3.0.tar.gz/specs/appC.xml
Changed
@@ -1354,7 +1354,7 @@ </variablelist> <para> -References to sharable GCs are counted and a free request is generated to the +References to shareable GCs are counted and a free request is generated to the server when the last user of a given GC destroys it. Note that some earlier versions of <xref linkend='XtDestroyGC' xrefstyle='select: title'/>
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/ActionHook.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/ActionHook.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Alloc.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Alloc.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, 2011, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, 2023, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -84,6 +84,7 @@ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> +#include <limits.h> #define Xmalloc(size) malloc((size)) #define Xrealloc(ptr, size) realloc((ptr), (size)) @@ -145,7 +146,9 @@ *new_string = XtMalloc((Cardinal) len + 1); /* snprintf doesn't count trailing '\0' */ if ((size_t) len < sizeof(buf)) { - strncpy(*new_string, buf, (size_t) len); + if ((size_t) len > 0) { + memcpy(*new_string, buf, (size_t) len); + } (*new_string)len = '\0'; } else { @@ -195,6 +198,38 @@ return (ptr); } +void * +XtReallocArray(void *ptr, unsigned num, unsigned size) +{ + if (ptr == NULL) { +#ifdef MALLOC_0_RETURNS_NULL + if ((num == 0) || (size == 0)) + num = size = 1; +#endif +#if (SIZE_MAX / UINT_MAX) <= UINT_MAX + if ((num > 0) && (SIZE_MAX / num) < size) + _XtAllocError("reallocarray: overflow detected"); +#endif + return (XtMalloc(num * size)); + } + else { + void *new; + +#ifdef HAVE_REALLOCARRAY + new = reallocarray(ptr, size, num); +#else +# if (SIZE_MAX / UINT_MAX) <= UINT_MAX + if ((num > 0) && ((SIZE_MAX / num) < size)) + _XtAllocError("reallocarray: overflow detected"); +# endif + new = Xrealloc(ptr, size * num); +#endif + if ((new == NULL) && (num != 0) && (size != 0)) + _XtAllocError("reallocarray"); + return (new); + } +} + char * XtCalloc(unsigned num, unsigned size) { @@ -387,7 +422,7 @@ if (copysize > size) copysize = size; - memmove(newptr, ptr, copysize); + memcpy(newptr, ptr, copysize); _XtFree(ptr); } UNLOCK_PROCESS; @@ -400,6 +435,23 @@ return _XtRealloc(ptr, size, (char *) NULL, 0); } +void * +_XtReallocArray(void *ptr, unsigned num, unsigned size, const char *file, int line) +{ +#if (SIZE_MAX / UINT_MAX) <= UINT_MAX + if ((num > 0) && (SIZE_MAX / num) < size) + _XtAllocError("reallocarray: overflow"); +#endif + + return _XtRealloc(ptr, (num * size), file, line); +} + +void * +XtReallocArray(void *ptr, unsigned num, unsigned size) +{ + return _XtReallocArray(ptr, num, size, (char *) NULL, 0); +} + char * _XtCalloc(unsigned num, unsigned size, const char *file, int line) {
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Callback.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Callback.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -80,7 +80,11 @@ static _Xconst _XtString XtNxtCallCallback = "xtCallCallback"; /* However it doesn't contain a final NULL record */ +#if __STDC_VERSION__ >= 199901L +#define ToList(p) ((p)->callbacks) +#else #define ToList(p) ((XtCallbackList) ((p)+1)) +#endif static InternalCallbackList * FetchInternalList(Widget widget,
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/ClickTime.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/ClickTime.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Composite.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Composite.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -247,10 +247,8 @@ /* Allocate more space */ cw->composite.num_slots += (cw->composite.num_slots / 2) + 2; cw->composite.children = children = - (WidgetList) XtRealloc((XtPointer) children, - (Cardinal) ((unsigned) - (cw->composite.num_slots) * - sizeof(Widget))); + XtReallocArray(children, cw->composite.num_slots, + (Cardinal) sizeof(Widget)); } /* Ripple children up one space from "position" */ for (i = cw->composite.num_children; i > position; i--) {
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Constraint.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Constraint.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Convert.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Convert.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -403,7 +403,7 @@ else { p->from_is_value = False; p->from.addr = (XPointer) _XtHeapAlloc(heap, from->size); - (void) memmove((char *) p->from.addr, (char *) from->addr, from->size); + (void) memcpy(p->from.addr, (char *) from->addr, from->size); } p->num_args = (unsigned short) num_args; if (num_args && args) { @@ -428,7 +428,7 @@ else { p->to_is_value = False; p->to.addr = (XPointer) _XtHeapAlloc(heap, to->size); - (void) memmove((char *) p->to.addr, (char *) to->addr, to->size); + (void) memcpy(p->to.addr, (char *) to->addr, to->size); } UNLOCK_PROCESS; return p; @@ -608,8 +608,8 @@ /* Convert in place for next usage */ convert_argsi.address_mode = XtResourceQuark; convert_argsi.address_id = - (XtPointer) (long) XrmStringToQuark((String) convert_argsi. - address_id); + (XtPointer) (XtIntPtr) XrmStringToQuark((String) convert_argsi. + address_id); /* Fall through */ case XtResourceQuark: @@ -698,7 +698,7 @@ (*to).addr = NULL; (*converter) (args, &num_args, from, to); /* This memory can never be freed since we don't know the Display - * or app context from which to compute the persistance */ + * or app context from which to compute the persistence */ { CacheEnter(&globalHeap, (XtTypeConverter) converter, args, num_args, from, to, (to->addr != NULL), hash, False, False,
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Converters.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Converters.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -208,7 +208,7 @@ report_it = *(Boolean *) value.addr ? Report : Ignore; else if (rep_type == _XtQString) { XrmValue toVal; - Boolean report; + Boolean report = False; toVal.addr = (XPointer) &report; toVal.size = sizeof(Boolean); @@ -817,7 +817,7 @@ XtPointer *closure_ret _X_UNUSED) { int ret; - float f, nan; + float f, nan = 0.0; (void) sscanf("NaN", "%g", toVal->addr != NULL ? (float *) toVal->addr : &nan); @@ -1697,7 +1697,7 @@ (IsWhitespace(*(src + 1)) || IsNewline(*(src + 1)))) { len = (int) (src - start); if (len) { - /* copy preceeding part of token */ + /* copy preceding part of token */ memcpy(dst, start, (size_t) len); dst += len; } @@ -1719,8 +1719,8 @@ dst++; } - ptr = strarray = (String *) - __XtMalloc((Cardinal) ((size_t) (tokens + 1) * sizeof(String))); + ptr = strarray = XtMallocArray((Cardinal) tokens + 1, + (Cardinal) sizeof(String)); src = dst_str; while (--tokens >= 0) { *ptr = src;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Core.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Core.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Create.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Create.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -145,8 +145,8 @@ Cardinal num_params; param0 = wc->core_class.class_name; - param1 = (String) wc->core_class.version; - param2 = (String) XtVersion; + param1 = (String) (XtIntPtr) wc->core_class.version; + param2 = (String) (XtIntPtr) XtVersion; if (wc->core_class.version == (11 * 1000 + 5) || /* MIT X11R5 */ wc->core_class.version == (11 * 1000 + 4)) { /* MIT X11R4 */ @@ -352,7 +352,7 @@ double widget_cache100; Widget req_widget; XtPointer req_constraints = NULL; - Cardinal wsize, csize; + Cardinal wsize; Widget widget; XtCacheRef *cache_refs; XtCreateHookDataRec call_data; @@ -411,15 +411,16 @@ wsize = widget_class->core_class.widget_size; req_widget = (Widget) XtStackAlloc(wsize, widget_cache); - (void) memmove((char *) req_widget, (char *) widget, (size_t) wsize); + (void) memcpy(req_widget, (char *) widget, (size_t) wsize); CallInitialize(XtClass(widget), req_widget, widget, args, num_args); if (parent_constraint_class != NULL) { double constraint_cache20; + Cardinal csize; csize = parent_constraint_class->constraint_class.constraint_size; if (csize) { req_constraints = XtStackAlloc(csize, constraint_cache); - (void) memmove((char *) req_constraints, widget->core.constraints, + (void) memcpy(req_constraints, widget->core.constraints, (size_t) csize); req_widget->core.constraints = req_constraints; } @@ -432,7 +433,7 @@ } } XtStackFree((XtPointer) req_widget, widget_cache); - if (post_proc != (XtWidgetProc) NULL) { + if (post_proc != (XtWidgetProc) NULL && (parent != NULL)) { Widget hookobj; (*post_proc) (widget); @@ -628,11 +629,9 @@ { Widget parent = XtParent(w); - parent->core.popup_list = - (WidgetList) XtRealloc((char *) parent->core.popup_list, - (Cardinal) ((unsigned) - (parent->core.num_popups + - 1) * sizeof(Widget))); + parent->core.popup_list = XtReallocArray(parent->core.popup_list, + (parent->core.num_popups + 1), + (Cardinal) sizeof(Widget)); parent->core.popup_listparent->core.num_popups++ = w; } @@ -781,7 +780,7 @@ CompileCallbacks(hookobj); wsize = hookObjectClass->core_class.widget_size; req_widget = (Widget) XtStackAlloc(wsize, widget_cache); - (void) memmove((char *) req_widget, (char *) hookobj, (size_t) wsize); + (void) memcpy(req_widget, (char *) hookobj, (size_t) wsize); CallInitialize(hookObjectClass, req_widget, hookobj, (ArgList) NULL, (Cardinal) 0); XtStackFree((XtPointer) req_widget, widget_cache);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Destroy.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Destroy.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -193,13 +193,12 @@ } /* Phase2Destroy */ static Boolean -IsDescendant(Widget widget, Widget root) +IsDescendant(Widget widget, const Widget root) { - while ((widget = XtParent(widget)) != root) { - if (widget == NULL) - return False; + while (widget != NULL && (widget = XtParent(widget)) != root) { + ; } - return True; + return (widget != NULL) ? True : False; } static void @@ -372,11 +371,9 @@ if (app->destroy_count == app->destroy_list_size) { app->destroy_list_size += 10; - app->destroy_list = (DestroyRec *) - XtRealloc((char *) app->destroy_list, - (Cardinal) (sizeof(DestroyRec) * - (size_t) app->destroy_list_size) - ); + app->destroy_list = XtReallocArray(app->destroy_list, + (Cardinal) app->destroy_list_size, + (Cardinal) sizeof(DestroyRec)); } dr = app->destroy_list + app->destroy_count++; dr->dispatch_level = app->dispatch_level;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Display.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Display.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -121,9 +121,9 @@ if (app->count >= app->max) { app->max = (short) (app->max + DISPLAYS_TO_ADD); - app->list = (Display **) XtRealloc((char *) app->list, - (Cardinal) (((size_t) app->max) * - sizeof(Display *))); + app->list = XtReallocArray(app->list, + (Cardinal) app->max, + (Cardinal) sizeof(Display *)); } app->listapp->count++ = d; @@ -139,7 +139,7 @@ } static void -XtDeleteFromAppContext(Display *d, register XtAppContext app) +XtDeleteFromAppContext(const Display *d, register XtAppContext app) { register int i; @@ -346,9 +346,8 @@ /* * Save away argv and argc so we can set the properties later */ - saved_argv = (_XtString *) - __XtMalloc((Cardinal) - ((size_t) (*argc_in_out + 1) * sizeof(_XtString))); + saved_argv = XtMallocArray((Cardinal) *argc_in_out + 1, + (Cardinal) sizeof(_XtString)); for (i = 0; i < *argc_in_out; i++) saved_argvi = (*argv_in_out)i; @@ -550,10 +549,9 @@ app->being_destroyed = TRUE; LOCK_PROCESS; _XtAppDestroyCount++; - appDestroyList = - (XtAppContext *) XtRealloc((char *) appDestroyList, - (unsigned) ((size_t) _XtAppDestroyCount * - sizeof(XtAppContext))); + appDestroyList = XtReallocArray(appDestroyList, + (Cardinal) _XtAppDestroyCount, + (Cardinal) sizeof(XtAppContext)); appDestroyList_XtAppDestroyCount - 1 = app; UNLOCK_PROCESS; UNLOCK_APP(app); @@ -739,10 +737,9 @@ else { pd->being_destroyed = TRUE; app->dpy_destroy_count++; - app->dpy_destroy_list = (Display **) - XtRealloc((char *) app->dpy_destroy_list, - (Cardinal) ((size_t) app->dpy_destroy_count * - sizeof(Display *))); + app->dpy_destroy_list = XtReallocArray(app->dpy_destroy_list, + (Cardinal) app->dpy_destroy_count, + (Cardinal) sizeof(Display *)); app->dpy_destroy_listapp->dpy_destroy_count - 1 = dpy; } UNLOCK_APP(app); @@ -819,9 +816,8 @@ LOCK_APP(app_context); *num_dpy_return = (Cardinal) app_context->count; - *dpy_return = (Display **) - __XtMalloc((Cardinal) - ((size_t) app_context->count * sizeof(Display *))); + *dpy_return = XtMallocArray((Cardinal) app_context->count, + (Cardinal) sizeof(Display *)); for (ii = 0; ii < app_context->count; ii++) (*dpy_return)ii = app_context->listii; UNLOCK_APP(app_context);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Error.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Error.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -241,7 +241,7 @@ String class, String defaultp, String *params, - Cardinal *num_params, + const Cardinal *num_params, Bool error, void (*fn) (_Xconst _XtString)) { @@ -266,7 +266,7 @@ if (i > 10) i = 10; - (void) memmove((char *) par, (char *) params, i * sizeof(String)); + (void) memcpy(par, params, i * sizeof(String)); memset(&pari, 0, (10 - i) * sizeof(String)); (void) fprintf(stderr, "%s%s", error ? XTERROR_PREFIX : XTWARNING_PREFIX, @@ -305,7 +305,7 @@ if (i > 10) i = 10; - (void) memmove((char *) par, (char *) params, i * sizeof(String)); + (void) memcpy(par, params, i * sizeof(String)); memset(&pari, 0, (10 - i) * sizeof(String)); if (i != *num_params) XtWarning("Some arguments in following message were lost");
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Event.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Event.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -86,7 +86,7 @@ #define NonMaskableMask ((EventMask)0x80000000L) /* - * These are definitions to make the code that handles exposure compresssion + * These are definitions to make the code that handles exposure compression * easier to read. * * COMP_EXPOSE - The compression exposure field of "widget" @@ -105,39 +105,42 @@ EventMask XtBuildEventMask(Widget widget) { - XtEventTable ev; EventMask mask = 0L; - WIDGET_TO_APPCON(widget); + if (widget != NULL) { + XtEventTable ev; - LOCK_APP(app); - for (ev = widget->core.event_table; ev != NULL; ev = ev->next) { - if (!ev->select) - continue; + WIDGET_TO_APPCON(widget); - if (!ev->has_type_specifier) - mask |= ev->mask; - else { - if (EXT_TYPE(ev) < LASTEvent) { - Cardinal i; + LOCK_APP(app); + for (ev = widget->core.event_table; ev != NULL; ev = ev->next) { + if (!ev->select) + continue; - for (i = 0; i < ev->mask; i++) - if (EXT_SELECT_DATA(ev, i)) - mask |= *(EventMask *) EXT_SELECT_DATA(ev, i); + if (!ev->has_type_specifier) + mask |= ev->mask; + else { + if (EXT_TYPE(ev) < LASTEvent) { + Cardinal i; + + for (i = 0; i < ev->mask; i++) + if (EXT_SELECT_DATA(ev, i)) + mask |= *(EventMask *) EXT_SELECT_DATA(ev, i); + } } } - } - LOCK_PROCESS; - if (widget->core.widget_class->core_class.expose != NULL) - mask |= ExposureMask; - if (widget->core.widget_class->core_class.visible_interest) - mask |= VisibilityChangeMask; - UNLOCK_PROCESS; - if (widget->core.tm.translations) - mask |= widget->core.tm.translations->eventMask; + LOCK_PROCESS; + if (widget->core.widget_class->core_class.expose != NULL) + mask |= ExposureMask; + if (widget->core.widget_class->core_class.visible_interest) + mask |= VisibilityChangeMask; + UNLOCK_PROCESS; + if (widget->core.tm.translations) + mask |= widget->core.tm.translations->eventMask; - mask = mask & ~NonMaskableMask; - UNLOCK_APP(app); + mask = mask & ~NonMaskableMask; + UNLOCK_APP(app); + } return mask; } @@ -180,8 +183,8 @@ int type, Boolean has_type_specifier, Boolean other, - XtEventHandler proc, - XtPointer closure, + const XtEventHandler proc, + const XtPointer closure, Boolean raw) { XtEventRec *p, **pp; @@ -212,7 +215,7 @@ /* p->mask specifies count of EXT_SELECT_DATA(p,i) * search through the list of selection data, if not found - * dont remove this handler + * don't remove this handler */ for (i = 0; i < p->mask && select_data != EXT_SELECT_DATA(p, i);) i++; @@ -265,9 +268,9 @@ * adding the event handlers. * Arguments: widget - widget to register an event handler for. * eventMask - events to mask for. - * other - pass non maskable events to this proceedure. - * proc - proceedure to register. - * closure - data to pass to the event hander. + * other - pass non maskable events to this procedure. + * proc - procedure to register. + * closure - data to pass to the event handler. * position - where to add this event handler. * force_new_position - If the element is already in the * list, this will force it to the @@ -765,10 +768,8 @@ (p->has_type_specifier && event->type == EXT_TYPE(p))) numprocs++; } - proc = (XtEventHandler *) - __XtMalloc((Cardinal) - ((size_t) numprocs * - (sizeof(XtEventHandler) + sizeof(XtPointer)))); + proc = XtMallocArray((Cardinal) numprocs, (Cardinal) + (sizeof(XtEventHandler) + sizeof(XtPointer))); closure = (XtPointer *) (proc + numprocs); numprocs = 0; @@ -955,7 +956,7 @@ /* Function Name: CompressExposures * Description: Handles all exposure compression * Arguments: event - the xevent that is to be dispatched - * widget - the widget that this event occured in. + * widget - the widget that this event occurred in. * Returns: none. * * NOTE: Event must be of type Expose or GraphicsExpose. @@ -1123,7 +1124,7 @@ * Description: Sets the x, y, width, and height of the event * to be the clip box of Expose Region. * Arguments: event - the X Event to mangle; Expose or GraphicsExpose. - * widget - the widget that this event occured in. + * widget - the widget that this event occurred in. * pd - the per display information for this widget. * Returns: none. */ @@ -1777,10 +1778,9 @@ } } pd->ext_select_count++; - pd->ext_select_list = - (ExtSelectRec *) XtRealloc((char *) pd->ext_select_list, - (Cardinal) ((size_t) pd->ext_select_count * - sizeof(ExtSelectRec))); + pd->ext_select_list = XtReallocArray(pd->ext_select_list, + (Cardinal) pd->ext_select_count, + (Cardinal) sizeof(ExtSelectRec)); for (i = pd->ext_select_count - 1; i > 0; i--) { if (pd->ext_select_listi - 1.min > min_event_type) { pd->ext_select_listi = pd->ext_select_listi - 1;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/EventUtil.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/EventUtil.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -146,7 +146,7 @@ /* First time in, allocate the ancestor list */ if (trace == NULL) { - trace = (Widget *) __XtMalloc(CACHESIZE * sizeof(Widget)); + trace = XtMallocArray(CACHESIZE, (Cardinal) sizeof(Widget)); *maxElemsPtr = CACHESIZE; } /* First fill in the ancestor list */ @@ -160,9 +160,8 @@ /* This should rarely happen, but if it does it'll probably happen again, so grow the ancestor list */ *maxElemsPtr += CACHESIZE; - trace = (Widget *) XtRealloc((char *) trace, - (Cardinal) (sizeof(Widget) * - (size_t) (*maxElemsPtr))); + trace = XtReallocArray(trace, (Cardinal) *maxElemsPtr, + (Cardinal) sizeof(Widget)); } tracei = w; }
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Functions.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Functions.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/GCManager.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/GCManager.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -250,10 +250,8 @@ if (!pd->pixmap_tab) { int n; - pd->pixmap_tab = - (Drawable **) - __XtMalloc((Cardinal) - ((unsigned) ScreenCount(dpy) * sizeof(Drawable *))); + pd->pixmap_tab = XtMallocArray((Cardinal) ScreenCount(dpy), + (Cardinal) sizeof(Drawable *)); for (n = 0; n < ScreenCount(dpy); n++) pd->pixmap_tabn = NULL; }
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Geometry.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Geometry.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -539,6 +539,7 @@ WIDGET_TO_APPCON(widget); LOCK_APP(app); + memset(&request, 0, sizeof(request)); request.request_mode = CWWidth | CWHeight; request.width = (Dimension) width; request.height = (Dimension) height;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/GetActKey.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/GetActKey.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/GetResList.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/GetResList.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -90,15 +90,15 @@ register XtResourceList *list, dlist; LOCK_PROCESS; + *resources = XtMallocArray(widget_class->core_class.num_resources, + (Cardinal) sizeof(XtResource)); size = (int) (widget_class->core_class.num_resources * sizeof(XtResource)); - *resources = (XtResourceList) __XtMalloc((unsigned) size); if (!widget_class->core_class.class_inited) { /* Easy case */ - (void) memmove((char *) *resources, - (char *) widget_class->core_class.resources, - (size_t) size); + (void) memcpy(*resources, widget_class->core_class.resources, + (size_t) size); *num_resources = widget_class->core_class.num_resources; UNLOCK_PROCESS; return; @@ -131,7 +131,7 @@ } static Boolean -ClassIsSubclassOf(WidgetClass class, WidgetClass superclass) +ClassIsSubclassOf(WidgetClass class, const WidgetClass superclass) { for (; class != NULL; class = class->core_class.superclass) { if (class == superclass) @@ -163,15 +163,15 @@ return; } + *resources = XtMallocArray(class->constraint_class.num_resources, + (Cardinal) sizeof(XtResource)); size = (int) (class->constraint_class.num_resources * sizeof(XtResource)); - *resources = (XtResourceList) __XtMalloc((unsigned) size); if (!class->core_class.class_inited) { /* Easy case */ - (void) memmove((char *) *resources, - (char *) class->constraint_class.resources, - (size_t) size); + (void) memcpy(*resources, class->constraint_class.resources, + (size_t) size); *num_resources = class->constraint_class.num_resources; UNLOCK_PROCESS; return;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/GetValues.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/GetValues.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -75,8 +75,8 @@ #include "StringDefs.h" static int -GetValues(char *base, /* Base address to fetch values from */ - XrmResourceList *res, /* The current resource values. */ +GetValues(char *const base, /* Base address to fetch values from */ + XrmResourceList *res, /* The current resource values. */ register Cardinal num_resources, /* number of items in resources */ ArgList args, /* The resource values requested */ Cardinal num_args) /* number of items in arg list */ @@ -200,9 +200,9 @@ int targ; XtAppContext app = XtWidgetToApplicationContext(w); - if (num_args == 0) + if (num_args == 0) { return; - if ((args == NULL) && (num_args != 0)) { + } else if (args == NULL) { XtAppErrorMsg(app, "invalidArgCount", "xtGetValues", XtCXtToolkitError, "Argument count > 0 on NULL argument list in XtGetValues",
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Hooks.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Hooks.c
Changed
@@ -87,7 +87,7 @@ } static void -DeleteShellFromHookObj(Widget shell, +DeleteShellFromHookObj(const Widget shell, XtPointer closure, XtPointer call_data _X_UNUSED) { @@ -117,10 +117,9 @@ if (ho->hooks.num_shells == ho->hooks.max_shells) { ho->hooks.max_shells += SHELL_INCR; - ho->hooks.shells = - (WidgetList) XtRealloc((char *) ho->hooks.shells, - (Cardinal) (ho->hooks.max_shells * - sizeof(Widget))); + ho->hooks.shells = XtReallocArray(ho->hooks.shells, + (Cardinal) ho->hooks.max_shells, + (Cardinal) sizeof(Widget)); } ho->hooks.shellsho->hooks.num_shells++ = shell;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Initialize.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Initialize.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -203,10 +203,10 @@ * First it could be used as a generic function and second * as an absolute address reference, which will be used to * check the initialisation process of several other libraries. - * Because of this the symbol must be accessable by all + * Because of this the symbol must be accessible by all * client dll's and applications. In unix environments * this is no problem, because the used shared libraries - * format (elf) supports this immediatly. Under Windows + * format (elf) supports this immediately. Under Windows * this isn't true, because a functions address in a dll * is different from the same function in another dll or * applications, because the used Portable Executable @@ -287,7 +287,7 @@ XrmInitialize(); _XtResourceListInitialize(); - /* Other intrinsic intialization */ + /* Other intrinsic initialization */ _XtConvertInitialize(); _XtEventInitialize(); _XtTranslateInitialize(); @@ -668,11 +668,10 @@ int dst_len, order; enum { Check, NotSorted, IsSorted } sort_order = Check; - *dst = table = (XrmOptionDescRec *) - __XtMalloc((Cardinal) - (sizeof(XrmOptionDescRec) * (num_src1 + num_src2))); + *dst = table = XtMallocArray(num_src1 + num_src2, + (Cardinal) sizeof(XrmOptionDescRec)); - (void) memmove(table, src1, sizeof(XrmOptionDescRec) * num_src1); + (void) memcpy(table, src1, sizeof(XrmOptionDescRec) * num_src1); if (num_src2 == 0) { *num_dst = num_src1; return; @@ -748,7 +747,7 @@ if (Qtype == _XtQString) *(String *) value->addr = db_value.addr; else - (void) memmove(value->addr, db_value.addr, value->size); + (void) memcpy(value->addr, db_value.addr, value->size); return True; } else { @@ -786,9 +785,8 @@ _XtString *targv; int targc = argc; - targv = (_XtString *) - __XtMalloc((Cardinal) (sizeof(_XtString *) * (size_t) argc)); - (void) memmove(targv, argv, sizeof(char *) * (size_t) argc); + targv = XtMallocArray((Cardinal) argc, (Cardinal) sizeof(_XtString *)); + (void) memcpy(targv, argv, sizeof(char *) * (size_t) argc); _MergeOptionTables(opTable, XtNumber(opTable), urlist, num_urs, &options, &num_options); name_list0 = class_list0 = XrmPermStringToQuark("."); @@ -931,7 +929,7 @@ sizeof(XrmHashTable)); if (!(search_list = (XrmHashTable *) ALLOCATE_LOCAL(size))) _XtAllocError(NULL); - (void) memmove((char *) search_list, (char *) old, (size >> 1)); + (void) memcpy(search_list, old, (size >> 1)); DEALLOCATE_LOCAL(old); }
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Intrinsic.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Intrinsic.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -1293,8 +1293,7 @@ char **rest; char *ch; - if (pd->language == NULL || - (pd->language != NULL && pd->language0 == '\0')) { + if (pd->language == NULL || pd->language0 == '\0') { subs0.substitution = subs1.substitution = subs2.substitution = subs3.substitution = NULL; return; @@ -1302,7 +1301,7 @@ string = ExtractLocaleName(pd->language); - if (string == NULL || (string != NULL && string0 == '\0')) { + if (string == NULL || string0 == '\0') { subs0.substitution = subs1.substitution = subs2.substitution = subs3.substitution = NULL; return; @@ -1310,7 +1309,7 @@ len = (int) strlen(string) + 1; subs0.substitution = (_XtString) string; - p1 = subs1.substitution = __XtMalloc((Cardinal) (3 * len)); + p1 = subs1.substitution = XtMallocArray(3, (Cardinal) len); p2 = subs2.substitution = subs1.substitution + len; p3 = subs3.substitution = subs2.substitution + len; @@ -1346,7 +1345,7 @@ /* * default path used if environment variable XFILESEARCHPATH - * is not defined. Also substitued for %D. + * is not defined. Also substituted for %D. * The exact value should be documented in the implementation * notes for any Xt implementation. */
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Keyboard.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Keyboard.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -226,7 +226,7 @@ /* * if the pointer is outside the shell or inside - * the window try to see if it would recieve the + * the window try to see if it would receive the * focus */ XtTranslateCoords(w, 0, 0, &left, &top); @@ -346,11 +346,7 @@ device->grabType = XtPseudoPassiveServerGrab; pdi->activatingKey = (KeyCode) event->keycode; device->grab = *grab; - - if (grab) - dspWidget = grab->widget; - else - dspWidget = focusWidget; + dspWidget = grab->widget; } } } @@ -428,7 +424,7 @@ } /* - * Check that widget really has Xt focus due to it having recieved an + * Check that widget really has Xt focus due to it having received an * event */ typedef enum { NotActive = 0, IsActive, IsTarget } ActiveType;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -237,8 +237,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -263,6 +261,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -277,8 +277,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -304,7 +306,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -710,7 +711,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -754,7 +754,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -965,7 +966,7 @@ uninstall-am: uninstall-libLTLIBRARIES -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \ check-am clean clean-generic clean-libLTLIBRARIES \
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Manage.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Manage.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -243,8 +243,7 @@ unique_children = cache; } else { - unique_children = (WidgetList) - __XtMalloc((Cardinal) ((size_t) num_children * sizeof(Widget))); + unique_children = XtMallocArray(num_children, (Cardinal) sizeof(Widget)); } num_unique_children = 0; for (i = 0; i < num_children; i++) { @@ -396,7 +395,7 @@ call_data.type = XtHsetMappedWhenManaged; call_data.widget = widget; - call_data.event_data = (XtPointer) (unsigned long) mapped_when_managed; + call_data.event_data = (XtPointer) (XtUIntPtr) mapped_when_managed; XtCallCallbackList(hookobj, ((HookObject) hookobj)->hooks.changehook_callbacks, (XtPointer) &call_data);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/NextEvent.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/NextEvent.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -144,7 +144,7 @@ #endif static void -AdjustHowLong(unsigned long *howlong, struct timeval *start_time) +AdjustHowLong(unsigned long *howlong, const struct timeval *start_time) { struct timeval new_time, time_spent, lstart_time; @@ -280,10 +280,8 @@ wf->stack); } else { - wf->fdlist = (struct pollfd *) - XtRealloc((char *) wf->fdlist, - (Cardinal) (sizeof(struct pollfd) * - (size_t) wf->fdlistlen)); + wf->fdlist = XtReallocArray(wf->fdlist, (Cardinal) wf->fdlistlen, + (Cardinal) sizeof(struct pollfd)); } if (wf->fdlistlen) { @@ -332,7 +330,7 @@ static void AdjustTimes(XtAppContext app, Boolean block, - unsigned long *howlong, + const unsigned long *howlong, Boolean ignoreTimers, wait_times_ptr_t wt) { @@ -601,7 +599,7 @@ if (app->lock == (ThreadAppProc) NULL) drop_lock = FALSE; #else - drop_lock = drop_lock; /* avoid unsed warning */ + (void) drop_lock; /* avoid unused warning */ #endif InitTimes((Boolean) block, howlong, &wt); @@ -649,14 +647,14 @@ nfds = IoWait(&wt, &wf); if (nfds == -1) { /* - * interrupt occured recalculate time value and wait again. + * interrupt occurred recalculate time value and wait again. */ if (errno == EINTR || errno == EAGAIN) { if (errno == EAGAIN) { - errno = 0; /* errno is not self reseting */ + errno = 0; /* errno is not self resetting */ continue; } - errno = 0; /* errno is not self reseting */ + errno = 0; /* errno is not self resetting */ /* was it interrupted by a signal that we care about? */ if (!ignoreSignals && app->signalQueue != NULL) { @@ -1002,7 +1000,7 @@ * * Lastly, and perhaps most importantly, since POSIX threads * says that the handling of asynchronous signals in a synchronous - * threads environment is undefined. Therefor it would be an + * threads environment is undefined. Therefore it would be an * error for both signals and threads to be in use in the same * program. */ @@ -1043,11 +1041,8 @@ Cardinal n = (Cardinal) (source + 1); int ii; - app->input_list = (InputEvent **) XtRealloc((char *) app->input_list, - (Cardinal) ((size_t) n * - sizeof - (InputEvent - *))); + app->input_list = XtReallocArray(app->input_list, n, + (Cardinal) sizeof(InputEvent *)); for (ii = app->input_max; ii < (int) n; ii++) app->input_listii = (InputEvent *) NULL; app->input_max = (short) n;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Object.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Object.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -166,21 +166,23 @@ /* Count the number of callbacks */ resourceList = (XrmResourceList) myObjectClass->object_class.resources; - for (i = (int) myObjectClass->object_class.num_resources; --i >= 0; - resourceList++) - if (resourceList->xrm_type == QCallback) - tableSize++; + if (resourceList != NULL) { + for (i = (int) myObjectClass->object_class.num_resources; --i >= 0; + resourceList++) { + if (resourceList->xrm_type == QCallback) + tableSize++; + } + } /* * Allocate and load the table. Make sure that the new callback * offsets occur in the table ahead of the superclass callback * offsets so that resource overrides work. */ - newTable = (CallbackTable) - __XtMalloc((Cardinal) - (sizeof(XrmResource *) * (size_t) (tableSize + 1))); + newTable = XtMallocArray((Cardinal) tableSize + 1, + (Cardinal) sizeof(XrmResource *)); - newTable0 = (XrmResource *) (long) tableSize; + newTable0 = (XrmResource *) (XtIntPtr) tableSize; if (superTable) tableSize -= (int) (long) superTable0;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/PassivGrab.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/PassivGrab.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -108,7 +108,7 @@ if (!pDetailMask) { int i; - pDetailMask = (Mask *) __XtMalloc(sizeof(Mask) * MasksPerDetailMask); + pDetailMask = XtMallocArray(MasksPerDetailMask, (Cardinal) sizeof(Mask)); for (i = MasksPerDetailMask; --i >= 0;) pDetailMaski = (unsigned long) (~0); *ppDetailMask = pDetailMask; @@ -121,7 +121,7 @@ */ static Mask * -CopyDetailMask(Mask *pOriginalDetailMask) +CopyDetailMask(const Mask *pOriginalDetailMask) { Mask *pTempMask; int i; @@ -129,7 +129,7 @@ if (!pOriginalDetailMask) return NULL; - pTempMask = (Mask *) __XtMalloc(sizeof(Mask) * MasksPerDetailMask); + pTempMask = XtMallocArray(MasksPerDetailMask, (Cardinal) sizeof(Mask)); for (i = 0; i < MasksPerDetailMask; i++) pTempMaski = pOriginalDetailMaski; @@ -558,7 +558,7 @@ /* * if either there is no entry in the context manager or the entry - * is empty, or the keyboard is grabed, then no work to be done + * is empty, or the keyboard is grabbed, then no work to be done */ if (!*passiveListPtr) return (XtServerGrabPtr) NULL; @@ -859,7 +859,7 @@ } /* - * Active grab of Device. clear any client side grabs so we dont lock + * Active grab of Device. clear any client side grabs so we don't lock */ static int GrabDevice(Widget widget, @@ -940,7 +940,7 @@ } /* - * Active grab of keyboard. clear any client side grabs so we dont lock + * Active grab of keyboard. clear any client side grabs so we don't lock */ int XtGrabKeyboard(Widget widget,
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Popup.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Popup.c
Changed
@@ -114,7 +114,7 @@ call_data.type = XtHpopup; call_data.widget = widget; - call_data.event_data = (XtPointer) grab_kind; + call_data.event_data = (XtPointer) (XtIntPtr) grab_kind; XtCallCallbackList(hookobj, ((HookObject) hookobj)->hooks.changehook_callbacks, (XtPointer) &call_data);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/ResConfig.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/ResConfig.c
Changed
@@ -288,7 +288,7 @@ * remainder the part of the resource string left over * resource the resource string to be matched * value the value to be set - * last_token the last * or . before the final resoruce part + * last_token the last * or . before the final resource part * last_part the last resource part (e.g. *background) * * RETURN VALUES: void @@ -347,7 +347,7 @@ * remainder the remaining part of the resource string * resource the resource string to be matched * value the value to be applied - * last_token the last * or . before the final resoruce part + * last_token the last * or . before the final resource part * last_part the last resource part (e.g. *background) * * RETURN VALUES: none @@ -483,7 +483,7 @@ * remainder the part of the resource string left over * resource the resource string to be matched * value the value to be set - * last_token the last * or . before the final resoruce part + * last_token the last * or . before the final resource part * last_part the last resource part (e.g. *background) * * RETURN VALUES: none @@ -620,7 +620,7 @@ *part = XtNewString(tight); return ('.'); } - if ((tight == NULL) || (loose && (strcoll(tight, loose) < 0))) { + if ((tight == NULL) || (strcoll(tight, loose) < 0)) { *loose++ = '\0'; *part = XtNewString(loose); return ('*'); @@ -665,10 +665,12 @@ Widget parent = w; char *last_part; char *remainder = NULL; - char last_token; char *loose, *tight; int loose_len, tight_len; + if (resource == NULL) + return; + /* * Find the root of the tree given any widget */ @@ -705,6 +707,8 @@ * etc.) */ if (remainder) { + char last_token; + last_token = _get_last_part(remainder, &last_part); /* * this case covers resources of only one level (eg. *background) @@ -777,8 +781,7 @@ return (0); } - *children = (Widget *) - XtMalloc((Cardinal) (sizeof(Widget) * (size_t) num_children)); + *children = XtMallocArray((Cardinal)num_children, (Cardinal)sizeof(Widget)); if (XtIsComposite(parent)) { for (i = 0; i < comp->composite.num_children; i++) {
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Resources.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Resources.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -133,7 +133,7 @@ else p = (char *) &src; - (void) memmove(dst, p, (size_t) size); + (void) memcpy(dst, p, (size_t) size); } } /* _XtCopyFromArg */ @@ -157,7 +157,7 @@ } u; if (size <= sizeof(XtArgVal)) { - (void) memmove((char *) &u, (char *) src, (size_t) size); + (void) memcpy(&u, src, (size_t) size); if (size == sizeof(long)) *dst = (XtArgVal) u.longval; #ifdef LONG64 @@ -207,7 +207,7 @@ } u; if (size <= sizeof(XtArgVal)) { - (void) memmove((char *) &u, (char *) src, (size_t) size); + (void) memcpy(&u, src, (size_t) size); if (size == sizeof(long)) *dst = (XtArgVal) u.longval; #ifdef LONG64 @@ -336,7 +336,7 @@ String params2; Cardinal num_params = 2; - params0 = (String) (long) size; + params0 = (String) (XtIntPtr) size; params1 = XrmQuarkToString(name); XtWarningMsg("invalidSizeOverride", "xtDependencies", XtCXtToolkitError, "Representation size %d must match superclass's to override %s", @@ -374,10 +374,9 @@ /* Allocate and initialize new_res with superclass resource pointers */ new_num_res = super_num_res + class_num_res; - new_res = (XrmResourceList *) - __XtMalloc((Cardinal) (new_num_res * sizeof(XrmResourceList))); + new_res = XtMallocArray(new_num_res, (Cardinal) sizeof(XrmResourceList)); if (super_num_res > 0) - XtMemmove(new_res, super_res, super_num_res * sizeof(XrmResourceList)); + memcpy(new_res, super_res, super_num_res * sizeof(XrmResourceList)); /* Put pointers to class resource entries into new_res */ new_next = super_num_res; @@ -461,8 +460,7 @@ register Cardinal idx; XrmResourceList *table; - table = (XrmResourceList *) - __XtMalloc((Cardinal) (num_resources * sizeof(XrmResourceList))); + table = XtMallocArray(num_resources, (Cardinal) sizeof(XrmResourceList)); for (idx = 0; idx < num_resources; idx++) tableidx = (XrmResourceList) (&(resourcesidx)); return table; @@ -596,10 +594,9 @@ searchList, (int) searchListSize)) { if (searchList == stackSearchList) searchList = NULL; - searchList = (XrmHashTable *) XtRealloc((char *) searchList, - (Cardinal) (sizeof(XrmHashTable) - * (searchListSize *= - 2))); + searchListSize *= 2; + searchList = XtReallocArray(searchList, searchListSize, + (Cardinal) sizeof(XrmHashTable)); } if (persistent_resources) @@ -921,12 +918,11 @@ cache_ptr = cache_base; if (cache_ptr && cache_ptr != cache_ref) { int cache_ref_size = (int) (cache_ptr - cache_ref); - XtCacheRef *refs = (XtCacheRef *) - __XtMalloc((Cardinal) - (sizeof(XtCacheRef) * (size_t) (cache_ref_size + 1))); + XtCacheRef *refs = XtMallocArray((Cardinal) cache_ref_size + 1, + (Cardinal) sizeof(XtCacheRef)); - (void) memmove(refs, cache_ref, - sizeof(XtCacheRef) * (size_t) cache_ref_size); + (void) memcpy(refs, cache_ref, + sizeof(XtCacheRef) * (size_t) cache_ref_size); refscache_ref_size = NULL; return refs; } @@ -949,8 +945,7 @@ count = (args != NULL) ? num_args : num_typed_args; if (num_quarks < count) { - quarks = - (XrmQuarkList) __XtMalloc((Cardinal) (count * sizeof(XrmQuark))); + quarks = XtMallocArray(count, (Cardinal) sizeof(XrmQuark)); } else { quarks = quark_cache; @@ -1047,7 +1042,6 @@ XrmClass *classes, classes_s50; XrmQuark quark_cache100; XrmQuarkList quark_args; - XrmResourceList *table; Cardinal count, ntyped_args = num_typed_args; XtCacheRef *Resrc = NULL; @@ -1065,6 +1059,8 @@ _XtAllocError(NULL); } else { + XrmResourceList *table; + /* Get full name, class of subobject */ GetNamesAndClasses(w, names, classes); count -= 2;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Selection.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Selection.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -229,11 +229,8 @@ } } propCount = sarray->propCount++; - sarray->list = (SelectionProp) XtRealloc((XtPointer) sarray->list, - (Cardinal) ((size_t) sarray-> - propCount * - sizeof - (SelectionPropRec))); + sarray->list = XtReallocArray(sarray->list, (Cardinal) sarray->propCount, + (Cardinal) sizeof(SelectionPropRec)); (void) snprintf(propname, sizeof(propname), "_XT_SELECTION_%d", propCount); sarray->listpropCount.prop = XInternAtom(dpy, propname, FALSE); sarray->listpropCount.avail = FALSE; @@ -289,15 +286,14 @@ CallBackInfo info = XtNew(CallBackInfoRec); info->ctx = ctx; - info->callbacks = (XtSelectionCallbackProc *) - __XtMalloc((unsigned) - ((size_t) count * sizeof(XtSelectionCallbackProc))); - (void) memmove((char *) info->callbacks, (char *) callbacks, - (size_t) count * sizeof(XtSelectionCallbackProc)); - info->req_closure = (XtPointer *) - __XtMalloc((unsigned) ((size_t) count * sizeof(XtPointer))); - (void) memmove((char *) info->req_closure, (char *) closures, - (size_t) count * sizeof(XtPointer)); + info->callbacks = XtMallocArray((Cardinal) count, + (Cardinal) sizeof(XtSelectionCallbackProc)); + (void) memcpy(info->callbacks, callbacks, + (size_t) count * sizeof(XtSelectionCallbackProc)); + info->req_closure = XtMallocArray((Cardinal) count, + (Cardinal) sizeof(XtPointer)); + (void) memcpy(info->req_closure, closures, + (size_t) count * sizeof(XtPointer)); if (count == 1 && properties != NULL && properties0 != None) info->property = properties0; else { @@ -307,10 +303,10 @@ info->proc = HandleSelectionReplies; info->widget = widget; info->time = time; - info->incremental = - (Boolean *) __XtMalloc((Cardinal) ((size_t) count * sizeof(Boolean))); - (void) memmove((char *) info->incremental, (char *) incremental, - (size_t) count * sizeof(Boolean)); + info->incremental = XtMallocArray((Cardinal) count, + (Cardinal) sizeof(Boolean)); + (void) memcpy(info->incremental, incremental, + (size_t) count * sizeof(Boolean)); info->current = 0; info->value = NULL; return (info); @@ -979,7 +975,7 @@ XtAddCallback(widget, XtNdestroyCallback, WidgetDestroyed, (XtPointer) ctx); } - ctx->widget = widget; /* Selection offically changes hands. */ + ctx->widget = widget; /* Selection officially changes hands. */ ctx->time = time; ctx->serial = serial; } @@ -1240,7 +1236,7 @@ int size = (int) BYTELENGTH(length, info->format) + 1; char *tmp = __XtMalloc((Cardinal) size); - (void) memmove(tmp, value, (size_t) size); + (void) memcpy(tmp, value, (size_t) size); XFree(value); value = tmp; #endif @@ -1256,7 +1252,7 @@ info->value = XtRealloc(info->value, (Cardinal) info->bytelength); } - (void) memmove(&info->valueinfo->offset, value, (size_t) size); + (void) memcpy(&info->valueinfo->offset, value, (size_t) size); info->offset += size; XFree(value); } @@ -1353,7 +1349,7 @@ int size = (int) BYTELENGTH(length, info->format) + 1; char *tmp = __XtMalloc((Cardinal) size); - (void) memmove(tmp, value, (size_t) size); + (void) memcpy(tmp, value, (size_t) size); XFree(value); value = (unsigned char *) tmp; } @@ -1514,7 +1510,7 @@ /* both sides think they own this storage */ temp = __XtMalloc((unsigned) bytelength); - (void) memmove(temp, value, (size_t) bytelength); + (void) memcpy(temp, value, (size_t) bytelength); value = temp; } /* use care; older clients were never warned that @@ -1545,7 +1541,7 @@ (Cardinal) (totallength = totallength + (unsigned long) bytelength)); - (void) memmove((char *) total + totallength - bytelength, + (void) memcpy((char *) total + totallength - bytelength, value, (size_t) bytelength); (*(XtConvertSelectionIncrProc) ctx->convert) (ctx->widget, &selection, &target, @@ -1577,7 +1573,7 @@ /* both sides think they own this storage; better copy */ temp = __XtMalloc((unsigned) bytelength); - (void) memmove(temp, value, (size_t) bytelength); + (void) memcpy(temp, value, (size_t) bytelength); value = temp; } if (value == NULL) @@ -1610,6 +1606,7 @@ RequestRec req; ctx->req = &req; + memset(&req, 0, sizeof(req)); req.ctx = ctx; req.event.time = time; ctx->ref_count++; @@ -1714,7 +1711,7 @@ req.ctx = ctx; req.event.time = time; ctx->ref_count++; - for (i = 0, j = 0; count; count--, i++, j++) { + for (i = 0, j = 0; count > 0; count--, i++, j++) { if (j >= num_callbacks) j = 0; @@ -1753,13 +1750,13 @@ time, incremental, properties); XtStackFree((XtPointer) passed_callbacks, stack_cbs); - info->target = (Atom *) - __XtMalloc((unsigned) ((size_t) (count + 1) * sizeof(Atom))); + info->target = XtMallocArray ((Cardinal) count + 1, + (Cardinal) sizeof(Atom)); (*info->target) = ctx->prop_list->indirect_atom; - (void) memmove((char *) info->target + sizeof(Atom), (char *) targets, + (void) memcpy((char *) info->target + sizeof(Atom), targets, (size_t) count * sizeof(Atom)); - pairs = (IndirectPair *) - __XtMalloc((unsigned) ((size_t) count * sizeof(IndirectPair))); + pairs = XtMallocArray ((Cardinal) count + 1, + (Cardinal) sizeof(IndirectPair)); for (p = &pairscount - 1, t = &targetscount - 1, i = count - 1; p >= pairs; p--, t--, i--) { p->target = *t; @@ -1958,9 +1955,8 @@ int j = 0; qi->count += count; - req = (QueuedRequest *) XtRealloc((char *) req, - (Cardinal) ((size_t) (start + count) * - sizeof(QueuedRequest))); + req = XtReallocArray(req, (Cardinal) (start + count), + (Cardinal) sizeof(QueuedRequest)); while (i < count) { QueuedRequest newreq = (QueuedRequest) __XtMalloc(sizeof(QueuedRequestRec)); @@ -2032,6 +2028,9 @@ { int i, j, n; + if (qi == NULL) + return; + i = 0; /* Remove this selection from the list */ @@ -2071,7 +2070,7 @@ QueuedRequestInfo queueInfo; Window window = XtWindow(widget); Display *dpy = XtDisplay(widget); - int n; + Cardinal n; LOCK_PROCESS; if (multipleContext == 0) @@ -2088,7 +2087,7 @@ queueInfo = (QueuedRequestInfo) __XtMalloc(sizeof(QueuedRequestInfoRec)); queueInfo->count = 0; - queueInfo->selections = (Atom *) __XtMalloc(sizeof(Atom) * 2); + queueInfo->selections = XtMallocArray(2, (Cardinal) sizeof(Atom)); queueInfo->selections0 = None; queueInfo->requests = (QueuedRequest *) __XtMalloc(sizeof(QueuedRequest)); @@ -2098,9 +2097,8 @@
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/SetSens.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/SetSens.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/SetValues.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/SetValues.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -151,8 +151,6 @@ XtSetValuesFunc set_values; if ((WidgetClass) class != constraintWidgetClass) { - ConstraintWidgetClass superclass; - if (class == NULL) { XtAppErrorMsg(XtWidgetToApplicationContext(current), "invalidClass", "constraintSetValue", @@ -161,6 +159,8 @@ NULL, NULL); } else { + ConstraintWidgetClass superclass; + LOCK_PROCESS; superclass = (ConstraintWidgetClass) class->core_class.superclass; UNLOCK_PROCESS; @@ -201,7 +201,6 @@ double oldcCache20, reqcCache20; Cardinal widgetSize, constraintSize; Boolean redisplay, cleared_rect_obj = False; - XtGeometryResult result; XtWidgetGeometry geoReq, geoReply; WidgetClass wc; ConstraintWidgetClass cwc = NULL; @@ -225,7 +224,7 @@ UNLOCK_PROCESS; oldw = (Widget) XtStackAlloc(widgetSize, oldwCache); reqw = (Widget) XtStackAlloc(widgetSize, reqwCache); - (void) memmove((char *) oldw, (char *) w, (size_t) widgetSize); + (void) memcpy(oldw, w, (size_t) widgetSize); /* Set resource values */ @@ -234,7 +233,7 @@ wc->core_class.num_resources, args, num_args); UNLOCK_PROCESS; - (void) memmove((char *) reqw, (char *) w, (size_t) widgetSize); + (void) memcpy(reqw, w, (size_t) widgetSize); hasConstraints = (XtParent(w) != NULL && !XtIsShell(w) && XtIsConstraint(XtParent(w))); @@ -258,8 +257,8 @@ /* Allocate and copy current constraints into oldw */ oldw->core.constraints = XtStackAlloc(constraintSize, oldcCache); reqw->core.constraints = XtStackAlloc(constraintSize, reqcCache); - (void) memmove((char *) oldw->core.constraints, - (char *) w->core.constraints, (size_t) constraintSize); + (void) memcpy(oldw->core.constraints, + w->core.constraints, (size_t) constraintSize); /* Set constraint values */ LOCK_PROCESS; @@ -267,8 +266,8 @@ (XrmResourceList *) (cwc->constraint_class.resources), cwc->constraint_class.num_resources, args, num_args); UNLOCK_PROCESS; - (void) memmove((char *) reqw->core.constraints, - (char *) w->core.constraints, (size_t) constraintSize); + (void) memcpy(reqw->core.constraints, + w->core.constraints, (size_t) constraintSize); } /* Inform widget of changes, then inform parent of changes */ @@ -324,6 +323,8 @@ } if (geoReq.request_mode != 0) { + XtGeometryResult result; + /* Pass on any requests for unchanged geometry values */ if (geoReq.request_mode != (CWX | CWY | CWWidth | CWHeight | CWBorderWidth)) {
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/SetWMCW.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/SetWMCW.c
Changed
@@ -5,7 +5,7 @@ /************************************************************ -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -92,7 +92,7 @@ return; } - top = checked = (Widget *) __XtMalloc((Cardinal) sizeof(Widget) * count); + top = checked = XtMallocArray(count, (Cardinal) sizeof(Widget)); /* * The specification calls for only adding the windows that have unique @@ -136,7 +136,7 @@ * windows and set the property. */ - data = (Window *) __XtMalloc((Cardinal) sizeof(Window) * checked_count); + data = XtMallocArray(checked_count, (Cardinal) sizeof(Window)); for (i = 0; i < checked_count; i++) datai = XtWindow(topi);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Shell.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Shell.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -956,10 +956,9 @@ XtPointer *extP = &((ShellWidgetClass) widget_class)->shell_class.extension; ext = XtNew(ShellClassExtensionRec); - (void) memmove((char *) ext, - (char *) _FindClassExtension(widget_class-> - core_class.superclass), - sizeof(ShellClassExtensionRec)); + (void) memcpy(ext, + _FindClassExtension(widget_class->core_class.superclass), + sizeof(ShellClassExtensionRec)); ext->next_extension = *extP; *extP = (XtPointer) ext; } @@ -1801,8 +1800,8 @@ WMShellPart *wm = &((WMShellWidget) w)->wm; EvaluateSizeHints((WMShellWidget) w); - (void) memmove((char *) &hints, (char *) &wm->size_hints, - sizeof(struct _OldXSizeHints)); + (void) memcpy(&hints, &wm->size_hints, + sizeof(struct _OldXSizeHints)); hints.win_gravity = wm->win_gravity; if (wm->size_hints.flags & PBaseSize) { width -= wm->base_width; @@ -3493,8 +3492,8 @@ count++; if (want) { - s = new = (_XtString *) - __XtMalloc((Cardinal) ((size_t) (count + 3) * sizeof(_XtString *))); + s = new = XtMallocArray((Cardinal) count + 3, + (Cardinal) sizeof(_XtString *)); *s = *sarray; s++; sarray++; @@ -3509,8 +3508,8 @@ else { if (count < 3) return NewStringArray(sarray); - s = new = (_XtString *) - __XtMalloc((Cardinal) ((size_t) (count - 1) * sizeof(_XtString *))); + s = new = XtMallocArray((Cardinal) count - 1, + (Cardinal) sizeof(_XtString *)); for (; --count >= 0; sarray++) { if (strcmp(*sarray, "-xtsessionID") == 0) { sarray++;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMaction.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMaction.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -102,7 +102,6 @@ { register CompiledActionTable cActions; register int i; - CompiledAction hold; CompiledActionTable cTableHold; XrmQuark (*func) (_Xconst char *); @@ -111,8 +110,8 @@ func = (perm ? XrmPermStringToQuark : XrmStringToQuark); if (!stat) { - cTableHold = cActions = (CompiledActionTable) - __XtMalloc((Cardinal) ((size_t) count * sizeof(CompiledAction))); + cTableHold = cActions = XtMallocArray(count, + (Cardinal) sizeof(CompiledAction)); for (i = (int) count; --i >= 0; cActions++, actions++) { cActions->proc = actions->proc; @@ -130,6 +129,7 @@ /* Insertion sort. Whatever sort is used, it must be stable. */ for (i = 1; (Cardinal) i <= count - 1; i++) { + CompiledAction hold; register Cardinal j; hold = cActionsi; @@ -464,15 +464,14 @@ if (_XtGlobalTM.numBindCache == _XtGlobalTM.bindCacheTblSize) { _XtGlobalTM.bindCacheTblSize = (TMShortCard) (_XtGlobalTM.bindCacheTblSize + 16); - _XtGlobalTM.bindCacheTbl = (TMBindCache *) - XtRealloc((char *) _XtGlobalTM.bindCacheTbl, - (Cardinal) ((_XtGlobalTM.bindCacheTblSize) * - sizeof(TMBindCache))); + _XtGlobalTM.bindCacheTbl = + XtReallocArray(_XtGlobalTM.bindCacheTbl, + (Cardinal) _XtGlobalTM.bindCacheTblSize, + (Cardinal) sizeof(TMBindCache)); } _XtGlobalTM.bindCacheTbl_XtGlobalTM.numBindCache++ = bindCache; #endif /* TRACE_TM */ - XtMemmove((XtPointer) &bindCache->procs0, - (XtPointer) procs, procsSize); + memcpy(&bindCache->procs0, procs, procsSize); } UNLOCK_PROCESS; return &bindCache->procs0; @@ -574,7 +573,6 @@ _XtBindActions(Widget widget, XtTM tm) { XtTranslations xlations = tm->translations; - TMSimpleStateTree stateTree; int globalUnbound = 0; Cardinal i; TMBindData bindData = (TMBindData) tm->proc_table; @@ -587,6 +585,8 @@ return; for (i = 0; i < xlations->numStateTrees; i++) { + TMSimpleStateTree stateTree; + stateTree = (TMSimpleStateTree) xlations->stateTreeTbli; if (bindData->simple.isComplex) { complexBindProcs = TMGetComplexBindEntry(bindData, i); @@ -761,9 +761,8 @@ } *num_actions_return = widget_class->core_class.num_actions; if (*num_actions_return) { - XtActionList list = *actions_return = (XtActionList) - __XtMalloc((Cardinal) - ((size_t) *num_actions_return * sizeof(XtActionsRec))); + XtActionList list = *actions_return = + XtMallocArray(*num_actions_return, (Cardinal) sizeof(XtActionsRec)); table = GetClassActions(widget_class); @@ -906,7 +905,7 @@ * The _XtGlobalTM.newMatchSemantics flag determines whether * we support old or new matching * behavior. This is mainly an issue of whether subsequent lhs will - * get pushed up in the match table if a lhs containing thier initial + * get pushed up in the match table if a lhs containing this initial * sequence has already been encountered. Currently inited to False; */ #ifdef NEW_TM
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMgrab.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMgrab.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMkey.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMkey.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -456,15 +456,12 @@ &pd->keysyms_per_keycode); XtFree((char *) pd->modKeysyms); - pd->modKeysyms = - (KeySym *) __XtMalloc((Cardinal) KeysymTableSize * sizeof(KeySym)); + pd->modKeysyms = XtMallocArray(KeysymTableSize, (Cardinal) sizeof(KeySym)); maxCount = KeysymTableSize; tempCount = 0; XtFree((char *) pd->modsToKeysyms); - table = - (ModToKeysymTable *) __XtMalloc((Cardinal) 8 * - sizeof(ModToKeysymTable)); + table = XtMallocArray(8, (Cardinal) sizeof(ModToKeysymTable)); pd->modsToKeysyms = table; table0.mask = ShiftMask; @@ -502,9 +499,10 @@ if (keysym != 0 && keysym != tempKeysym) { if (tempCount == maxCount) { maxCount += KeysymTableSize; - pd->modKeysyms = (KeySym *) XtRealloc((char *) pd-> - modKeysyms, - (unsigned) ((size_t) maxCount * sizeof(KeySym))); + pd->modKeysyms = + XtReallocArray(pd->modKeysyms, + (Cardinal) maxCount, + (Cardinal) sizeof(KeySym)); } pd->modKeysymstempCount++ = keysym; tablei.count++; @@ -738,10 +736,9 @@ KeyCode *old = keycodes; maxcodes += KEYCODE_ARRAY_SIZE; - keycodes = (KeyCode *) __XtMalloc(maxcodes * sizeof(KeyCode)); + keycodes = XtMallocArray(maxcodes, (Cardinal) sizeof(KeyCode)); if (ncodes) { - (void) memmove((char *) keycodes, (char *) old, - ncodes * sizeof(KeyCode)); + (void) memcpy(keycodes, old, ncodes * sizeof(KeyCode)); XtFree((char *) old); } codeP = &keycodesncodes;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMparse.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMparse.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -167,15 +167,6 @@ {"l", 0, ParseModImmed, LockMask}, }; -static NameValueRec buttonNames = { - {"Button1", 0, Button1}, - {"Button2", 0, Button2}, - {"Button3", 0, Button3}, - {"Button4", 0, Button4}, - {"Button5", 0, Button5}, - {NULL, NULLQUARK, 0}, -}; - static NameValueRec motionDetails = { {"Normal", 0, NotifyNormal}, {"Hint", 0, NotifyHint}, @@ -234,6 +225,7 @@ static String ParseKeySym(PARSE_PROC_DECL); static String ParseKeyAndModifiers(PARSE_PROC_DECL); static String ParseTable(PARSE_PROC_DECL); +static String ParseButton(PARSE_PROC_DECL); static String ParseImmed(PARSE_PROC_DECL); static String ParseAddModifier(PARSE_PROC_DECL); static String ParseNone(PARSE_PROC_DECL); @@ -253,8 +245,8 @@ {"KeyUp", NULLQUARK, KeyRelease, ParseKeySym, NULL}, {"KeyRelease", NULLQUARK, KeyRelease, ParseKeySym, NULL}, -{"ButtonPress", NULLQUARK, ButtonPress, ParseTable, (Opaque)buttonNames}, -{"BtnDown", NULLQUARK, ButtonPress, ParseTable, (Opaque)buttonNames}, +{"ButtonPress", NULLQUARK, ButtonPress, ParseButton, NULL }, +{"BtnDown", NULLQUARK, ButtonPress, ParseButton, NULL }, {"Btn1Down", NULLQUARK, ButtonPress, ParseImmed, (Opaque)Button1}, {"Btn2Down", NULLQUARK, ButtonPress, ParseImmed, (Opaque)Button2}, {"Btn3Down", NULLQUARK, ButtonPress, ParseImmed, (Opaque)Button3}, @@ -263,8 +255,8 @@ /* Event Name, Quark, Event Type, Detail Parser, Closure */ -{"ButtonRelease", NULLQUARK, ButtonRelease, ParseTable, (Opaque)buttonNames}, -{"BtnUp", NULLQUARK, ButtonRelease, ParseTable, (Opaque)buttonNames}, +{"ButtonRelease", NULLQUARK, ButtonRelease, ParseButton, NULL }, +{"BtnUp", NULLQUARK, ButtonRelease, ParseButton, NULL }, {"Btn1Up", NULLQUARK, ButtonRelease, ParseImmed, (Opaque)Button1}, {"Btn2Up", NULLQUARK, ButtonRelease, ParseImmed, (Opaque)Button2}, {"Btn3Up", NULLQUARK, ButtonRelease, ParseImmed, (Opaque)Button3}, @@ -561,10 +553,8 @@ pair = TRUE; } - temp = (LateBindingsPtr) XtRealloc((char *) temp, - (unsigned) ((count + number + - 1) * - sizeof(LateBindings))); + temp = XtReallocArray(temp, (Cardinal) (count + number + 1), + (Cardinal) sizeof(LateBindings)); *lateBindings = temp; XtSetBit(tempcount.knot, notL); XtSetBit(tempcount.pair, pair); @@ -681,7 +671,7 @@ modStr = XtStackAlloc((size_t) (str - start + 1), modStrbuf); if (modStr == NULL) _XtAllocError(NULL); - (void) memmove(modStr, start, (size_t) (str - start)); + (void) memcpy(modStr, start, (size_t) (str - start)); modStrstr - start = '\0'; *token_return = XrmStringToQuark(modStr); XtStackFree(modStr, modStrbuf); @@ -709,7 +699,7 @@ ScanWhitespace(str); return str; } - else if (Qmod == QAny) { /*backward compatability */ + else if (Qmod == QAny) { /*backward compatibility */ event->event.modifierMask = 0; event->event.modifiers = AnyModifier; ScanWhitespace(str); @@ -792,7 +782,7 @@ eventTypeStr = XtStackAlloc((size_t) (str - start + 1), eventTypeStrbuf); if (eventTypeStr == NULL) _XtAllocError(NULL); - (void) memmove(eventTypeStr, start, (size_t) (str - start)); + (void) memcpy(eventTypeStr, start, (size_t) (str - start)); eventTypeStrstr - start = '\0'; *tmEventP = LookupTMEventType(eventTypeStr, error); XtStackFree(eventTypeStr, eventTypeStrbuf); @@ -1011,6 +1001,7 @@ */ (*str == '(' && *(str + 1) >= '0' && *(str + 1) <= '9')) { keySymName = keySymNamebuf; /* just so we can stackfree it later */ + keySymName0 = '\0'; /* no detail */ event->event.eventCode = 0L; event->event.eventCodeMask = 0L; @@ -1023,7 +1014,7 @@ && *str != '\0') str++; keySymName = XtStackAlloc((size_t) (str - start + 1), keySymNamebuf); - (void) memmove(keySymName, start, (size_t) (str - start)); + (void) memcpy(keySymName, start, (size_t) (str - start)); keySymNamestr - start = '\0'; event->event.eventCode = StringToKeySym(keySymName, error); event->event.eventCodeMask = (unsigned long) (~0L); @@ -1069,7 +1060,7 @@ *error = TRUE; return str; } - (void) memmove(tableSymName, start, (size_t) (str - start)); + (void) memcpy(tableSymName, start, (size_t) (str - start)); tableSymNamestr - start = '\0'; signature = StringToQuark(tableSymName); for (; table->signature != NULLQUARK; table++) @@ -1085,6 +1076,47 @@ } static String +ParseButton(String str, Opaque closure, EventPtr event, Boolean *error) +{ + String start = str; + char buttonStr7; + size_t len; + static const char buttonPrefix = "Button"; + unsigned long button; + + event->event.eventCode = 0L; + if (strncmp(str, buttonPrefix, sizeof(buttonPrefix)-1) != 0) { + event->event.eventCodeMask = 0L; + return str; + } + str += sizeof(buttonPrefix)-1; + start = str; + ScanNumeric(str); + if (str == start) { + Syntax("Missing button number", ""); + *error = TRUE; + return PanicModeRecovery(str); + } + len = (size_t) (str - start); + if (len >= sizeof buttonStr) { + Syntax("Button number too long", ""); + *error = TRUE; + return PanicModeRecovery(str); + } + (void) memcpy(buttonStr, start, len); + buttonStrlen = '\0'; + button = StrToNum(buttonStr); + if (button < 1 || 255 < button) { + Syntax("Invalid button number", buttonStr); + *error = TRUE; + return PanicModeRecovery(str); + } + event->event.eventCode = button; + event->event.eventCodeMask = (unsigned long) (~0L); + return str; +} + +static String ParseNone(String str, Opaque closure _X_UNUSED, EventPtr event, @@ -1120,7 +1152,7 @@ *error = TRUE; return str; } - (void) memmove(atomName, start, (size_t) (str - start)); + (void) memcpy(atomName, start, (size_t) (str - start)); atomNamestr - start = '\0'; event->event.eventCode = (TMLongCard) XrmStringToQuark(atomName); event->event.matchEvent = _XtMatchAtom; @@ -1532,7 +1564,7 @@ ScanNumeric(str); len = (size_t) (str - start); if (len < sizeof repStr) { - (void) memmove(repStr, start, len); + (void) memcpy(repStr, start, len); repStrlen = '\0'; *reps = (int) StrToNum(repStr); } @@ -1672,7 +1704,7 @@ *error = TRUE; return str; } - (void) memmove(procName, start, (size_t) (str - start)); + (void) memcpy(procName, start, (size_t) (str - start)); procNamestr - start = '\0'; *actionProcNameP = XrmStringToQuark(procName); return str; @@ -1700,7 +1732,7 @@ (*(str + 1) == '\\' && *(str + 2) == '"'))) { len = (unsigned) (prev_len + (str - start + 2)); *strP = XtRealloc(*strP, len); - (void) memmove(*strP + prev_len, start, (size_t) (str - start)); + (void) memcpy(*strP + prev_len, start, (size_t) (str - start));
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMprint.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMprint.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -870,8 +870,7 @@ modMatch = TMGetModifierMatch(_XtGetModifierIndex(&eventSeqsj->event)); PrintEvent(sb, typeMatch, modMatch, dpy); - if (j < i) - *sb->current++ = ','; + *sb->current++ = ','; } UNLOCK_PROCESS; return sb->start;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/TMstate.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/TMstate.c
Changed
@@ -1,5 +1,5 @@ /*********************************************************** -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -103,8 +103,8 @@ TMShortCard modIndex, Boolean isDummy) { -#define TM_BRANCH_HEAD_TBL_ALLOC 8 -#define TM_BRANCH_HEAD_TBL_REALLOC 8 +#define TM_BRANCH_HEAD_TBL_ALLOC ((TMShortCard) 8) +#define TM_BRANCH_HEAD_TBL_REALLOC ((TMShortCard) 8) TMBranchHead branchHead = parseTree->branchHeadTbl; @@ -123,31 +123,27 @@ } } if (parseTree->numBranchHeads == parseTree->branchHeadTblSize) { - TMShortCard newSize; if (parseTree->branchHeadTblSize == 0) - parseTree->branchHeadTblSize = - (TMShortCard) (parseTree->branchHeadTblSize + - TM_BRANCH_HEAD_TBL_ALLOC); + parseTree->branchHeadTblSize = TM_BRANCH_HEAD_TBL_ALLOC; else - parseTree->branchHeadTblSize = - (TMShortCard) (parseTree->branchHeadTblSize + - TM_BRANCH_HEAD_TBL_REALLOC); - newSize = - (TMShortCard) (parseTree->branchHeadTblSize * - sizeof(TMBranchHeadRec)); + parseTree->branchHeadTblSize += TM_BRANCH_HEAD_TBL_REALLOC; + if (parseTree->isStackBranchHeads) { TMBranchHead oldBranchHeadTbl = parseTree->branchHeadTbl; - parseTree->branchHeadTbl = (TMBranchHead) __XtMalloc(newSize); - XtMemmove(parseTree->branchHeadTbl, oldBranchHeadTbl, newSize); + parseTree->branchHeadTbl = + XtMallocArray((Cardinal) parseTree->branchHeadTblSize, + (Cardinal) sizeof(TMBranchHeadRec)); + memcpy(parseTree->branchHeadTbl, oldBranchHeadTbl, + parseTree->branchHeadTblSize * sizeof(TMBranchHeadRec)); parseTree->isStackBranchHeads = False; } else { parseTree->branchHeadTbl = (TMBranchHead) - XtRealloc((char *) parseTree->branchHeadTbl, - (Cardinal) (parseTree->branchHeadTblSize * - sizeof(TMBranchHeadRec))); + XtReallocArray(parseTree->branchHeadTbl, + (Cardinal) parseTree->branchHeadTblSize, + (Cardinal) sizeof(TMBranchHeadRec)); } } #ifdef TRACE_TM @@ -168,8 +164,8 @@ TMShortCard _XtGetQuarkIndex(TMParseStateTree parseTree, XrmQuark quark) { -#define TM_QUARK_TBL_ALLOC 16 -#define TM_QUARK_TBL_REALLOC 16 +#define TM_QUARK_TBL_ALLOC ((TMShortCard) 16) +#define TM_QUARK_TBL_REALLOC ((TMShortCard) 16) TMShortCard i; for (i = 0; i < parseTree->numQuarks; i++) @@ -178,31 +174,27 @@ if (i == parseTree->numQuarks) { if (parseTree->numQuarks == parseTree->quarkTblSize) { - TMShortCard newSize; if (parseTree->quarkTblSize == 0) - parseTree->quarkTblSize = - (TMShortCard) (parseTree->quarkTblSize + - TM_QUARK_TBL_ALLOC); + parseTree->quarkTblSize = TM_QUARK_TBL_ALLOC; else - parseTree->quarkTblSize = - (TMShortCard) (parseTree->quarkTblSize + - TM_QUARK_TBL_REALLOC); - newSize = - (TMShortCard) (parseTree->quarkTblSize * sizeof(XrmQuark)); + parseTree->quarkTblSize += TM_QUARK_TBL_REALLOC; if (parseTree->isStackQuarks) { XrmQuark *oldquarkTbl = parseTree->quarkTbl; - parseTree->quarkTbl = (XrmQuark *) __XtMalloc(newSize); - XtMemmove(parseTree->quarkTbl, oldquarkTbl, newSize); + parseTree->quarkTbl = + XtMallocArray((Cardinal) parseTree->quarkTblSize, + (Cardinal) sizeof(XrmQuark)); + memcpy(parseTree->quarkTbl, oldquarkTbl, + parseTree->quarkTblSize * sizeof(XrmQuark)); parseTree->isStackQuarks = False; } else { parseTree->quarkTbl = (XrmQuark *) - XtRealloc((char *) parseTree->quarkTbl, - (Cardinal) (parseTree->quarkTblSize * - sizeof(XrmQuark))); + XtReallocArray(parseTree->quarkTbl, + (Cardinal) parseTree->quarkTblSize, + (Cardinal) sizeof(XrmQuark)); } } parseTree->quarkTblparseTree->numQuarks++ = quark; @@ -223,8 +215,6 @@ #define TM_COMPLEXBRANCH_HEAD_TBL_REALLOC 4 if (parseTree->numComplexBranchHeads == parseTree->complexBranchHeadTblSize) { - TMShortCard newSize; - if (parseTree->complexBranchHeadTblSize == 0) parseTree->complexBranchHeadTblSize = (TMShortCard) (parseTree->complexBranchHeadTblSize + @@ -234,23 +224,21 @@ (TMShortCard) (parseTree->complexBranchHeadTblSize + TM_COMPLEXBRANCH_HEAD_TBL_REALLOC); - newSize = - (TMShortCard) (parseTree->complexBranchHeadTblSize * - sizeof(StatePtr)); - if (parseTree->isStackComplexBranchHeads) { StatePtr *oldcomplexBranchHeadTbl = parseTree->complexBranchHeadTbl; - parseTree->complexBranchHeadTbl = (StatePtr *) __XtMalloc(newSize); - XtMemmove(parseTree->complexBranchHeadTbl, - oldcomplexBranchHeadTbl, newSize); + parseTree->complexBranchHeadTbl = + XtMallocArray((Cardinal) parseTree->complexBranchHeadTblSize, + (Cardinal) sizeof(StatePtr)); + memcpy(parseTree->complexBranchHeadTbl, oldcomplexBranchHeadTbl, + parseTree->complexBranchHeadTblSize * sizeof(StatePtr)); parseTree->isStackComplexBranchHeads = False; } else { parseTree->complexBranchHeadTbl = (StatePtr *) - XtRealloc((char *) parseTree->complexBranchHeadTbl, - (Cardinal) (parseTree->complexBranchHeadTblSize * - sizeof(StatePtr))); + XtReallocArray(parseTree->complexBranchHeadTbl, + (Cardinal) parseTree->complexBranchHeadTblSize, + (Cardinal) sizeof(StatePtr)); } } parseTree->complexBranchHeadTblparseTree->numComplexBranchHeads++ = NULL; @@ -288,13 +276,13 @@ _XtGlobalTM.typeMatchSegmentTblSize = (TMShortCard) (_XtGlobalTM.typeMatchSegmentTblSize + 4); _XtGlobalTM.typeMatchSegmentTbl = (TMTypeMatch *) - XtRealloc((char *) _XtGlobalTM.typeMatchSegmentTbl, - (Cardinal) (_XtGlobalTM.typeMatchSegmentTblSize * - sizeof(TMTypeMatch))); + XtReallocArray(_XtGlobalTM.typeMatchSegmentTbl, + (Cardinal) _XtGlobalTM.typeMatchSegmentTblSize, + (Cardinal) sizeof(TMTypeMatch)); } _XtGlobalTM.typeMatchSegmentTbl_XtGlobalTM.numTypeMatchSegments++ = - segment = (TMTypeMatch) - __XtMalloc(TM_TYPE_SEGMENT_SIZE * sizeof(TMTypeMatchRec)); + segment = XtMallocArray(TM_TYPE_SEGMENT_SIZE, + (Cardinal) sizeof(TMTypeMatchRec)); j = 0; } typeMatch = &segmentj; @@ -390,13 +378,13 @@ _XtGlobalTM.modMatchSegmentTblSize = (TMShortCard) (_XtGlobalTM.modMatchSegmentTblSize + 4); _XtGlobalTM.modMatchSegmentTbl = (TMModifierMatch *) - XtRealloc((char *) _XtGlobalTM.modMatchSegmentTbl, - (Cardinal) (_XtGlobalTM.modMatchSegmentTblSize * - sizeof(TMModifierMatch))); + XtReallocArray(_XtGlobalTM.modMatchSegmentTbl, + (Cardinal) _XtGlobalTM.modMatchSegmentTblSize, + (Cardinal) sizeof(TMModifierMatch)); } _XtGlobalTM.modMatchSegmentTbl_XtGlobalTM.numModMatchSegments++ = - segment = (TMModifierMatch) - __XtMalloc(TM_MOD_SEGMENT_SIZE * sizeof(TMModifierMatchRec)); + segment = XtMallocArray(TM_MOD_SEGMENT_SIZE, + (Cardinal) sizeof(TMModifierMatchRec)); j = 0; } modMatch = &segmentj; @@ -720,9 +708,9 @@ (TMShortCard) (context->maxMatches + TM_CONTEXT_MATCHES_REALLOC); context->matches = (MatchPairRec *) - XtRealloc((char *) context->matches, - (Cardinal) (context->maxMatches * - sizeof(MatchPairRec)));
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Threads.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Threads.c
Changed
@@ -1,5 +1,5 @@ /************************************************************ -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -239,9 +239,9 @@ unsigned ii; app_lock->stack.st = (struct _Tstack *) - XtRealloc((char *) app_lock->stack.st, - (Cardinal) ((app_lock->stack.size + - STACK_INCR) * sizeof(struct _Tstack))); + XtReallocArray(app_lock->stack.st, + (Cardinal) (app_lock->stack.size + STACK_INCR), + (Cardinal) sizeof(struct _Tstack)); ii = app_lock->stack.size; app_lock->stack.size += STACK_INCR; for (; ii < app_lock->stack.size; ii++) { @@ -363,8 +363,7 @@ #endif app_lock->stack.size = STACK_INCR; app_lock->stack.sp = -1; - app_lock->stack.st = - (struct _Tstack *) __XtMalloc(sizeof(struct _Tstack) * STACK_INCR); + app_lock->stack.st = XtMallocArray(STACK_INCR, sizeof(struct _Tstack)); for (ii = 0; ii < STACK_INCR; ii++) { app_lock->stack.stii.c = xcondition_malloc(); xcondition_init(app_lock->stack.stii.c);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/VarCreate.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/VarCreate.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -295,9 +295,8 @@ typed_argscount.size = 0; } count++; - typed_args = (XtTypedArgList) - XtRealloc((char *) typed_args, - (Cardinal) ((size_t) (count + 1) * sizeof(XtTypedArg))); + typed_args = XtReallocArray(typed_args, (Cardinal) count + 1, + (Cardinal) sizeof(XtTypedArg)); } typed_argscount.name = NULL;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/VarGet.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/VarGet.c
Changed
@@ -1,6 +1,6 @@ /* -Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1993, Oracle and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -246,7 +246,7 @@ if (total_count != typed_count) { size_t limit = (size_t) (total_count - typed_count); - args = (ArgList) __XtMalloc((unsigned) (limit * sizeof(Arg))); + args = XtMallocArray((Cardinal) limit, (Cardinal) sizeof(Arg)); } else args = NULL; /* for lint; really unused */
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/src/Varargs.c -> _service:tar_scm:libXt-1.3.0.tar.gz/src/Varargs.c
Changed
@@ -428,10 +428,8 @@ &num_constraint); cons_top = constraint; - *res_list = (XtResourceList) XtRealloc((char *) *res_list, - (Cardinal) ((*number + - num_constraint) * - sizeof(XtResource))); + *res_list = XtReallocArray(*res_list, *number + num_constraint, + (Cardinal) sizeof(XtResource)); for (temp = num_constraint, res = *res_list + *number; temp != 0; temp--)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test-driver -> _service:tar_scm:libXt-1.3.0.tar.gz/test-driver
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2020 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - --expect-failure={yes|no} --color-tests={yes|no} - --enable-hard-errors={yes|no} -- + test-driver --test-name NAME --log-file PATH --trs-file PATH + --expect-failure {yes|no} --color-tests {yes|no} + --enable-hard-errors {yes|no} -- TEST-SCRIPT TEST-SCRIPT-ARGUMENTS + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,11 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +"$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +131,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name"
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test/Alloc.c -> _service:tar_scm:libXt-1.3.0.tar.gz/test/Alloc.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,13 +21,56 @@ * DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <X11/Xfuncproto.h> #include <X11/Intrinsic.h> +#include <X11/IntrinsicI.h> #include <glib.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> +#include <errno.h> +#include <limits.h> +#include <setjmp.h> +#include <sys/resource.h> +#ifdef HAVE_MALLOC_H +# include <malloc.h> +#endif static const char *program_name; +#ifndef g_assert_no_errno /* defined in glib 2.66 & later*/ +#define g_assert_no_errno(expr) g_assert_cmpint((expr), >=, 0) +#endif + +/* + * Check that allocations point to properly aligned memory. + * For libXt, we consider that to be aligned to an 8-byte (64-bit) boundary. + */ +#define EXPECTED_ALIGNMENT 8 + +#define CHECK_ALIGNMENT(ptr) \ + g_assert_cmpint(((uintptr_t)ptr) % EXPECTED_ALIGNMENT, ==, 0) + +/* Check that allocations point to expected amounts of memory, as best we can. */ +#ifdef HAVE_MALLOC_USABLE_SIZE +# define CHECK_SIZE(ptr, size) do { \ + size_t ps = malloc_usable_size(ptr); \ + g_assert_cmpint(ps, >=, (size)); \ +} while (0) +#else +# define CHECK_SIZE(ptr, size) *(((char *)ptr) + ((size) - 1)) = 0 +#endif + +/* Limit we set for memory allocation to be able to test failure cases */ +#define ALLOC_LIMIT (INT_MAX / 4) + +/* Square root of SIZE_MAX+1 */ +#define SQRT_SIZE_MAX ((size_t)1 << (sizeof (size_t) * 4)) + /* Just a long string of characters to pull from */ const char test_chars = "|000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel|" @@ -64,6 +107,22 @@ "| 78 x | 79 y | 7a z | 7b { | 7c | | 7d } | 7e ~ | 7f del|"; +/* Environment saved by setjmp() */ +static jmp_buf jmp_env; + +static void _X_NORETURN +xt_error_handler(String message) +{ + if (message && *message) + fprintf(stderr, "Caught Error: %s\n", message); + else + fputs("Caught Error.\n", stderr); + + /* Avoid exit() in XtErrorMsg() */ + longjmp(jmp_env, 1); +} + + /* Test a simple short string & int */ static void test_XtAsprintf_short(void) { @@ -75,10 +134,10 @@ snlen = snprintf(snbuf, sizeof(snbuf), "%s: %d\n", program_name, r); aslen = XtAsprintf(&asbuf, "%s: %d\n", program_name, r); - g_assert(asbuf != NULL); - g_assert(snlen == aslen); - g_assert(strcmp(snbuf, asbuf) == 0); - g_assert(asbufaslen == '\0'); + g_assert_nonnull(asbuf); + g_assert_cmpint(snlen, ==, aslen); + g_assert_cmpstr(snbuf, ==, asbuf); + g_assert_cmpint(asbufaslen, ==, '\0'); } /* Test a string long enough to be past the 256 character limit that @@ -92,21 +151,627 @@ aslen = XtAsprintf(&asbuf, "%.*s", r2, test_chars + r1); - g_assert(asbuf != NULL); - g_assert(aslen == r2); - g_assert(strncmp(asbuf, test_chars + r1, r2) == 0); - g_assert(asbufaslen == '\0'); + g_assert_nonnull(asbuf); + g_assert_cmpint(aslen, ==, r2); + g_assert_cmpint(strncmp(asbuf, test_chars + r1, r2), ==, 0); + g_assert_cmpint(asbufaslen, ==, '\0'); +} + +/* Make sure XtMalloc() works for a non-zero amount of memory */ +static void test_XtMalloc_normal(void) +{ + void *p; + /* Pick a size between 1 & 256K */ + guint32 size = g_test_rand_int_range(1, (256 * 1024)); + + errno = 0; + + p = XtMalloc(size); + g_assert_nonnull(p); + CHECK_ALIGNMENT(p); + CHECK_SIZE(p, size); + + /* make sure we can write to all the allocated memory */ + memset(p, 'A', size); + + XtFree(p); + g_assert_cmpint(errno, ==, 0); +} + +/* Make sure XtMalloc(0) returns expected results */ +static void test_XtMalloc_zero(void) +{ + void *p; + + errno = 0; + + p = XtMalloc(0); +#if !defined(MALLOC_0_RETURNS_NULL) || defined(XTMALLOC_BC) + g_assert_nonnull(p); +#else + g_assert_null(p); +#endif + XtFree(p); + g_assert_cmpint(errno, ==, 0); + + /* __XtMalloc always returns a non-NULL pointer for size == 0 */ + p = __XtMalloc(0); + g_assert_nonnull(p); + XtFree(p); + g_assert_cmpint(errno, ==, 0); +} + +/* Make sure sizes larger than the limit we set in main() fail */ +static void test_XtMalloc_oversize(void) +{ + void *p; + + if (setjmp(jmp_env) == 0) { + p = XtMalloc(UINT_MAX - 1); + g_assert_null(p); + } else { + /* + * We jumped here from error handler as expected. + * We cannot verify errno here, as the Xt error handler makes + * calls that override errno, when trying to load error message + * files from different locations. + */ + } +} + +/* Make sure XtMalloc catches integer overflow if possible, by requesting + * sizes that are so large that they cause overflows when either adding the + * malloc data block overhead or aligning. + * + * Testing integer overflow cases is limited by the fact that XtMalloc + * only takes unsigned arguments (typically 32-bit), and relies on + * the underlying libc malloc to catch overflow, which can't occur if + * 32-bit arguments are passed to a function taking 64-bit args. + */ +static void test_XtMalloc_overflow(void) +{ +#if UINT_MAX < SIZE_MAX + g_test_skip("overflow not possible in this config"); +#else + void *p; + + if (setjmp(jmp_env) == 0) { + p = XtMalloc(SIZE_MAX); + g_assert_null(p); + } else { + /* + * We jumped here from error handler as expected.
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test/Converters.c -> _service:tar_scm:libXt-1.3.0.tar.gz/test/Converters.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -54,7 +54,8 @@ status = XtCvtIntToPixmap(display, &args0, &num_args, &fromVal, &toVal, closure_ret); - g_assert(res == num0); + g_assert_cmpint(status, ==, True); + g_assert_cmpint(res, ==, num0); num0 = -1; @@ -69,13 +70,14 @@ status = XtCvtIntToPixmap(display, &args0, &num_args, &fromVal, &toVal, closure_ret); - g_assert(res == num1); + g_assert_cmpint(status, ==, True); + g_assert_cmpint(res, ==, num1); } int main(int argc, char** argv) { g_test_init(&argc, &argv, NULL); - g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + g_test_bug_base("https://gitlab.freedesktop.org/xorg/lib/libxt/-/issues/"); g_test_add_func("/Converters/XtCvtIntToPixmap", test_XtCvtIntToPixmap);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test/Event.c -> _service:tar_scm:libXt-1.3.0.tar.gz/test/Event.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2022, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -57,6 +57,9 @@ XtAppContext app; struct sigaction sa; + g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + g_test_bug("34715"); + XtToolkitInitialize(); app = XtCreateApplicationContext(); XtAppAddTimeOut(app, 1000, _Tick, app); @@ -72,18 +75,19 @@ alarm(10); XtAppMainLoop(app); + alarm(0); /* cancel alarm */ } else { - g_assert(XtAppGetExitFlag(app) == TRUE); - g_assert(0 /* timed out */); + g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, + "test timed out"); } - g_assert(XtAppGetExitFlag(app) == TRUE); + g_assert_cmpint(XtAppGetExitFlag(app), ==, TRUE); XtDestroyApplicationContext(app); } int main(int argc, char** argv) { g_test_init(&argc, &argv, NULL); - g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + g_test_bug_base("https://gitlab.freedesktop.org/xorg/lib/libxt/-/issues/"); g_test_add_func("/Event/XtAppMainLoop/34715", test_XtAppMainLoop_34715);
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test/Makefile.am -> _service:tar_scm:libXt-1.3.0.tar.gz/test/Makefile.am
Changed
@@ -5,7 +5,8 @@ TESTS=$(check_PROGRAMS) AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(GLIB_CFLAGS) -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ + -I$(top_builddir)/include/X11 LDADD= $(top_builddir)/src/libXt.la $(GLIB_LIBS) TESTS_ENVIRONMENT = $(MALLOC_DEBUG_ENV)
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/test/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/test/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -184,8 +184,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no @@ -368,6 +366,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -415,6 +414,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -429,8 +430,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -456,7 +459,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -560,7 +562,9 @@ top_srcdir = @top_srcdir@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@TESTS = $(check_PROGRAMS) @ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(GLIB_CFLAGS) -@ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +@ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include \ +@ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@ -I$(top_builddir)/include/X11 + @ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@LDADD = $(top_builddir)/src/libXt.la $(GLIB_LIBS) @ENABLE_UNIT_TESTS_TRUE@@HAVE_GLIB_TRUE@TESTS_ENVIRONMENT = $(MALLOC_DEBUG_ENV) all: all-am @@ -820,7 +824,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -889,7 +893,6 @@ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/util/Makefile.in -> _service:tar_scm:libXt-1.3.0.tar.gz/util/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -171,8 +171,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -197,6 +195,8 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS_FOR_BUILD@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -211,8 +211,10 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERRORDBDIR = @ERRORDBDIR@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FOP = @FOP@ @@ -238,7 +240,6 @@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ -MALLOC_DEBUG_ENV = @MALLOC_DEBUG_ENV@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ @@ -488,7 +489,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/util/makestrs.c -> _service:tar_scm:libXt-1.3.0.tar.gz/util/makestrs.c
Changed
@@ -345,6 +345,7 @@ { char *c; + (void) abi; for (c = te->right; *c; c++) (void) printf("'%c',", *c); (void) printf("%c", '0'); @@ -439,6 +440,7 @@ File *phile; static int done_atom; + (void) abi; for (phile = file; phile; phile = phile->next) { Table *t; TableEnt *te;
View file
_service:tar_scm:libXt-1.2.1.tar.bz2/xt.pc.in -> _service:tar_scm:libXt-1.3.0.tar.gz/xt.pc.in
Changed
@@ -5,6 +5,7 @@ appdefaultdir=@appdefaultdir@ datarootdir=@datarootdir@ errordbdir=@ERRORDBDIR@ +xfilesearchpath=@XFILESEARCHPATHDEFAULT@ Name: Xt Description: X Toolkit Library
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2