update to x11perf 1.7.0

This commit is contained in:
purplerain 2024-08-12 07:23:02 +00:00
parent 05823bf282
commit 4b69692ae6
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
22 changed files with 7440 additions and 5807 deletions

View file

@ -1,4 +1,4 @@
# $OpenBSD: MODULES,v 1.527 2024/08/04 18:22:48 matthieu Exp $
# $OpenBSD: MODULES,v 1.528 2024/08/12 05:59:08 matthieu Exp $
#
# X.Org maintained modules
#
@ -22,7 +22,7 @@ app/setxkbmap 1.3.4
app/smproxy 1.0.7
app/twm 1.0.12
app/viewres 1.0.7
app/x11perf 1.7.0 needs-update
app/x11perf 1.7.0
app/xauth 1.1.3
app/xbacklight 1.2.3
app/xbiff 1.0.5

View file

@ -1,3 +1,316 @@
commit 82ee29eaa466dbdca6d8c075270896127944fc0d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Aug 1 17:33:00 2024 -0700
x11perf 1.7.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 397cfd30aed296e1f3f7c37e0c65ecf558ca8baa
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jul 13 16:42:19 2024 -0700
Include both option name & argument in invalid argument errors
Found by gcc 14.1:
x11perf.c: In function invalid_arg:
x11perf.c:339:21: warning: too many arguments for format [-Wformat-extra-args]
339 | fprintf(stderr, "Error: invalid argument to %s\n", arg, option);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: e7a6545 ("When users give invalid arguments, tell them what they did wrong")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/11>
commit e7a65459a2f6ce9ea5fd3d0ac413043986c19471
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 14:26:38 2024 -0700
When users give invalid arguments, tell them what they did wrong
Don't just dump a usage message and leave them to figure it out
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit 6deca4cb7bd0293760d0f1e3678387d74ca72251
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 13:27:10 2024 -0700
Add -help [options|tests|all] and remove tests from default usage message
Previously, the error message when giving a bad option was over 350 lines
long. This moves the list of tests out into the `-help tests` option and
makes the usage error message a much more reasonable 32 lines long.
(Also accepts but does not document --help.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit 7e24793ede11649a412413ff2567bf20670ba4ef
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 13:06:17 2024 -0700
Mark tests introduced in version 1.6 as version 1.6 & later
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit 3fd3380e289717d657b7c42e6f6980d4207e5bbb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 13:04:16 2024 -0700
Mark tests introduced since version 1.6 as version 1.7
Also bumps package version to 1.6.99.0 to prepare for 1.7 release.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit cb073d318328d8ac2df64aed195d933cf64b5358
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 12:23:45 2024 -0700
Add -version option
(Also accepts but does not document --version)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit 16fda0825a0c6a51f800c225e66adce65e5f327c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 18 12:00:43 2024 -0700
Add -v1.6 & -v1.7 to recognized version flags
Also adds missing -v1.4 & -v1.5 to the man page.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/10>
commit 2454977d35ee9961ade650a8fa0e908d8feaf363
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 17:07:32 2024 -0700
x11perf.man: Add missing tests inherited from XFree86 4.3
Fixes: ee11b04 ("XFree86 4.3.0.1")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit bb2566b73b547fb6d097ff9b86c2e3a38808c35d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 17:03:40 2024 -0700
x11perf.man: Add missing tests inherited from X11R6.6
Fixes: d7d99c8 ("R6.6 is the Xorg base-line")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit 7964896807fa0bb608ce2d274b2ae5a56e16bc95
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:38:12 2024 -0700
x11perf.man: Add tests for anti-aliased trapezoids
Fixes: 9f86498 ("Add RenderAddTraps. Rewrite trapezoid rendering code.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit 9b289139ffaf017857dc3cbb0ceea21a44da6f7d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:26:28 2024 -0700
x11perf.man: Add tests for ShmGetImage
Fixes: 7f46d58 ("Add tests for ShmGetImage")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit 3853dd4a66d1fb6c29965a6664f9a7e6a3fe7bf7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:15:14 2024 -0700
x11perf.man: Add tiled text test
Fixes: 0fcb26e ("Add tiled text test")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit 76df8ca88c6553a290e9e003b117ee800c165451
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:13:00 2024 -0700
x11perf.man: Add xybitmap putimage tests
Fixes: bd6b810 ("Add xybitmap putimage tests")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit c923e89b0756dd40c41b6969f400a248ca4d0b22
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:32:02 2024 -0700
man pages: use .BR markup for references to other man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit bcabb502977e3680b955c131f037f8d817a3af4f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 16:07:00 2024 -0700
configure: use @-style substitutions for man pages instead of __-style
Moves substitution of variables from Makefile.am to configure.ac
in preparation for allowing meson.build to do the same.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/9>
commit ebab5f63aaab943a8e6495fbac0cd5c41869d286
Author: Mike A. Harris <mharris@redhat.com>
Date: Thu Aug 27 13:09:49 2020 -0400
Move x11perfcomp scripts into datadir
These don't need to be in libdir, they're not arch-sensitive.
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/2>
commit 55e9fceffc45bb4cbbeabe8fd45028f50caec906
Author: Keith Packard <keithp@keithp.com>
Date: Fri Apr 3 17:57:43 2020 -0700
Fix core AA text tests which now fail due to change in fontconfig
Xft can no longer support 'render' in font names due to a
change in fontconfig. Work around this by removing that from
the font names and apply it to the pattern manually whenever
the 'bfont' name is not NULL.
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit 95a84fd5584873885f3123f25b6424008409afc1
Author: Keith Packard <keithp@keithp.com>
Date: Fri Apr 3 16:48:10 2020 -0700
Validate fonts used in Xft tests
This compares the font family from the loaded font with the requested
family and skips tests where the requested family wasn't available.
It's not perfect, as someone could have a mis-configured font family,
but should catch most incorrect font usages.
I've also switched from Charter to DejaVu Sans as that is more widely
installed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit c0ba2f7af7270f2e6edf1bc2386c97ed3f0783cb
Author: Keith Packard <keithp@keithp.com>
Date: Mon Oct 3 15:12:34 2016 -0700
Don't try to make XOR 'look good'. Best to make it visible.
Attempts to pick 'good' pixel values to make XOR rendering look decent
instead make it invisible on modern TrueColor visuals. Just use the
defined fg/bg pixel values, which at least make it appear.
Adapt to this change by drawing the lines for the blt tests in copy
mode so they appear on the screen.
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit bd6b8109b34e2effbe071b7881aebb8a7cfac53d
Author: Keith Packard <keithp@keithp.com>
Date: Mon Oct 3 15:09:20 2016 -0700
Add xybitmap putimage tests
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit ba26e97853d209663de8527cfefee16afe3b959b
Author: Keith Packard <keithp@keithp.com>
Date: Tue Apr 1 14:48:42 2014 -0700
Make put image tests work with planemasks
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit 0fcb26e0efdab2a8662b50dd6957b681c87b6737
Author: Keith Packard <keithp@keithp.com>
Date: Tue Apr 1 15:38:22 2014 -0700
Add tiled text test
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit c6bbcba1102cb4420303afa0f6c1338e5885cf3d
Author: Keith Packard <keithp@keithp.com>
Date: Tue Apr 1 15:37:51 2014 -0700
Eliminate overlaps in rects and traps
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit bd0f1e637f960962203cb5bb7cf0c5ce58cb2cec
Author: Keith Packard <keithp@keithp.com>
Date: Tue Mar 25 16:59:02 2014 -0700
Ensure that 100x100 rectangle outlines do not overlap
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit f0c5c1c49bfbae402b11367103acae7675edf779
Author: Keith Packard <keithp@keithp.com>
Date: Tue Mar 25 16:56:29 2014 -0700
Ensure that 100x100 rectangles do not overlap
This avoids the obvious optimization which catch overlapping
rectangles to avoid re-rendering the same pixels.
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit a2f8e2cf966156b2ce93e16068c31e088c578eda
Author: Keith Packard <keithp@keithp.com>
Date: Tue Mar 25 16:54:40 2014 -0700
Set position of the status window based on perf window pos
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit 3e9ee84d8ce39c3f8cbc598c4105dcc9da9a7c15
Author: Keith Packard <keithp@keithp.com>
Date: Tue Mar 25 16:52:02 2014 -0700
Ensure that vertical/horizontal segments do not overlap
Some drivers manage to optimize the solid block of segments into a
single square fill operation, which is a nifty optimization, but
doesn't really measure what we're interested here.
Signed-off-by: Keith Packard <keithp@keithp.com>
Part-of: <https://gitlab.freedesktop.org/xorg/test/x11perf/-/merge_requests/1>
commit 688bebb13c9a82983f544ff415440321a721fd53
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Apr 13 15:09:08 2024 -0700
Strip trailing whitespace from source files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 95ff3954dea7deb1cc995c09c404ebb22b6f18a0
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 28 19:19:52 2022 -0700
@ -710,7 +1023,7 @@ Date: Thu Dec 6 16:37:08 2007 -0500
Replace static ChangeLog with dist-hook to generate from git log
commit b1c5b72bb4bb5f3e116255f9d04b368137ff25f7
Author: Michel Dänzer <michel@tungstengraphics.com>
Author: Michel Dänzer <michel@tungstengraphics.com>
Date: Thu Nov 1 09:13:43 2007 +0100
Fix typos in descriptions of -compwinwin{1,5}00.
@ -943,7 +1256,7 @@ Date: Sat Jul 16 23:29:38 2005 +0000
correctly
commit 68ebb5b755791822c2f1d9f9659c2ee94bb63f1c
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Wed Jun 29 20:41:01 2005 +0000
Add x11perf build system Add some x11perf shell script to symlink.sh

View file

@ -14,9 +14,9 @@
@SET_MAKE@
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@ -26,7 +26,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@ -239,7 +239,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
@ -250,11 +249,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@

166
app/x11perf/aclocal.m4 vendored
View file

@ -13,13 +13,13 @@
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 -*-
# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
@ -107,7 +107,7 @@ dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl only at the first occurrence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
@ -176,14 +176,14 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
@ -195,7 +195,7 @@ _PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@ -205,10 +205,10 @@ _PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
@ -295,6 +295,74 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------
dnl
dnl Prepare a "--with-" configure option using the lowercase
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
dnl PKG_CHECK_MODULES in a single macro.
AC_DEFUN([PKG_WITH_MODULES],
[
m4_pushdef([with_arg], m4_tolower([$1]))
m4_pushdef([description],
[m4_default([$5], [build with ]with_arg[ support])])
m4_pushdef([def_arg], [m4_default([$6], [auto])])
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
m4_case(def_arg,
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
[m4_pushdef([with_without],[--with-]with_arg)])
AC_ARG_WITH(with_arg,
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
[AS_TR_SH([with_]with_arg)=def_arg])
AS_CASE([$AS_TR_SH([with_]with_arg)],
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
[auto],[PKG_CHECK_MODULES([$1],[$2],
[m4_n([def_action_if_found]) $3],
[m4_n([def_action_if_not_found]) $4])])
m4_popdef([with_arg])
m4_popdef([description])
m4_popdef([def_arg])
])dnl PKG_WITH_MODULES
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl -----------------------------------------------
dnl
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
dnl check._[VARIABLE-PREFIX] is exported as make variable.
AC_DEFUN([PKG_HAVE_WITH_MODULES],
[
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
AM_CONDITIONAL([HAVE_][$1],
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
])dnl PKG_HAVE_WITH_MODULES
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
dnl [DESCRIPTION], [DEFAULT])
dnl ------------------------------------------------------
dnl
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
dnl and preprocessor variable.
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
[
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
])dnl PKG_HAVE_DEFINE_WITH_MODULES
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@ -1318,7 +1386,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@ -1355,7 +1423,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.19.2])
m4_define([vers_have], [1.20.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@ -1376,7 +1444,7 @@ AM_MAINTAINER_MODE
# such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP])
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
# Check for flag to avoid builtin definitions - assumes unix is predefined,
@ -1402,10 +1470,10 @@ rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
AC_MSG_RESULT([no])
else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
AC_MSG_RESULT([yes])
@ -1686,7 +1754,7 @@ AC_SUBST(MAKE_HTML)
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions
# the --with-xmlto option, it allows maximum flexibility in making decisions
# as whether or not to use the xmlto package. When DEFAULT is not specified,
# --with-xmlto assumes 'auto'.
#
@ -1900,7 +1968,7 @@ AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
# the --with-asciidoc option, it allows maximum flexibility in making decisions
# as whether or not to use the asciidoc package. When DEFAULT is not specified,
# --with-asciidoc assumes 'auto'.
#
@ -1970,7 +2038,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions
# the --with-doxygen option, it allows maximum flexibility in making decisions
# as whether or not to use the doxygen package. When DEFAULT is not specified,
# --with-doxygen assumes 'auto'.
#
@ -2054,7 +2122,7 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions
# the --with-groff option, it allows maximum flexibility in making decisions
# as whether or not to use the groff package. When DEFAULT is not specified,
# --with-groff assumes 'auto'.
#
@ -2162,7 +2230,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions
# the --with-fop option, it allows maximum flexibility in making decisions
# as whether or not to use the fop package. When DEFAULT is not specified,
# --with-fop assumes 'auto'.
#
@ -2256,7 +2324,7 @@ AC_SUBST([M4], [$ac_cv_path_M4])
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
# the --with-ps2pdf option, it allows maximum flexibility in making decisions
# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
# --with-ps2pdf assumes 'auto'.
#
@ -2311,7 +2379,7 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# maximum flexibility in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
@ -2344,7 +2412,7 @@ AC_MSG_RESULT([$build_docs])
#
# This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# maximum flexibility in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
@ -2377,7 +2445,7 @@ AC_MSG_RESULT([$build_devel_docs])
#
# This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# maximum flexibility in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
@ -2852,7 +2920,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
AC_DEFUN([XORG_COMPILER_BRAND], [
AC_LANG_CASE(
[C], [
AC_REQUIRE([AC_PROG_CC_C99])
dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
],
[C++], [
AC_REQUIRE([AC_PROG_CXX])
@ -2868,7 +2940,7 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Minimum version: 1.16.0
#
# Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
# If it succeeds, the flag is appended to the given variable. If not, it tries the
# next flag in the list until there are no more options.
#
# Note that this does not guarantee that the compiler supports the flag as some
@ -2884,7 +2956,11 @@ AC_LANG_COMPILER_REQUIRE
AC_LANG_CASE(
[C], [
AC_REQUIRE([AC_PROG_CC_C99])
dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC
dnl and complains that AC_PROG_CC_C99 is obsolete
m4_version_prereq([2.70],
[AC_REQUIRE([AC_PROG_CC])],
[AC_REQUIRE([AC_PROG_CC_C99])])
define([PREFIX], [C])
define([CACHE_PREFIX], [cc])
define([COMPILER], [$CC])
@ -3025,7 +3101,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
# Turn some warnings into errors, so we don't accidently get successful builds
# Turn some warnings into errors, so we don't accidentally get successful builds
# when there are problems that should be fixed.
if test "x$SELECTIVE_WERROR" = "xyes" ; then
@ -3134,23 +3210,35 @@ AC_SUBST([BASE_]PREFIX[FLAGS])
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
# XORG_DEFAULT_NOCODE_OPTIONS
# ---------------------------
# Minimum version: 1.20.0
#
# Defines default options for X.Org modules.
# Defines default options for X.Org modules which don't compile code,
# such as fonts, bitmaps, cursors, and docs.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
XORG_CHANGELOG
XORG_INSTALL
XORG_MANPAGE_SECTIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_NOCODE_OPTIONS
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules which compile code.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_DEFAULT_NOCODE_OPTIONS
]) # XORG_DEFAULT_OPTIONS
# XORG_INSTALL()

View file

@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
scriptversion=2024-06-19.01; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
*.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <https://www.gnu.org/software/automake/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
echo "compile (GNU Automake) $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;

1783
app/x11perf/config.guess vendored

File diff suppressed because it is too large Load diff

View file

@ -3,15 +3,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `srand_deterministic' function. */
#undef HAVE_SRAND_DETERMINISTIC
/* 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
@ -66,7 +66,9 @@
/* 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
/* Version number of package */

2954
app/x11perf/config.sub vendored

File diff suppressed because it is too large Load diff

6683
app/x11perf/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([x11perf],
[1.6.2],
[1.7.0],
[https://gitlab.freedesktop.org/xorg/test/x11perf/-/issues],
[x11perf])
AC_CONFIG_SRCDIR([Makefile.am])
@ -39,13 +39,13 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Define the installation directory for the x11 performance compare scripts
AC_SUBST([x11perfcompdir], [$libdir/X11/x11perfcomp])
AC_SUBST([x11perfcompdir], [$datadir/X11/x11perfcomp])
# Checks for programs run by the scripts we install
AC_PATH_PROG(MKTEMP, mktemp)
# Checks for pkg-config packages
PKG_CHECK_MODULES(X11PERF, [x11 xmuu xproto >= 7.0.17])
PKG_CHECK_MODULES(X11PERF, [x11 xmuu xproto >= 7.0.25])
# Check for Xrender library
PKG_CHECK_MODULES(XRENDER, xrender, [xrender_found=yes], [xrender_found=no])
@ -56,7 +56,7 @@ yes)
esac
# Check for Xft library
PKG_CHECK_MODULES(XFT, xft, [xft_found=yes], [xft_found=no])
PKG_CHECK_MODULES(XFT, xft fontconfig, [xft_found=yes], [xft_found=no])
case "$xft_found" in
yes)
AC_DEFINE(XFT,1,[Xft library available])
@ -76,6 +76,9 @@ yes)
esac
AC_CHECK_FUNCS([srand_deterministic])
AC_CONFIG_FILES([man/x11perf.1:man/x11perf.man])
AC_CONFIG_FILES([man/x11perfcomp.1:man/x11perfcomp.man])
AC_CONFIG_FILES([man/Xmark.1:man/Xmark.man])
AC_CONFIG_FILES([
Makefile

View file

@ -66,7 +66,9 @@ int
InitScroll(XParms xp, Parms p, int64_t reps)
{
InitBltLines();
XSetFunction(xp->d, xp->fggc, GXcopy);
XDrawLines(xp->d, xp->w, xp->fggc, points, NUMPOINTS, CoordModeOrigin);
XSetFunction(xp->d, xp->fggc, xp->func);
return reps;
}
@ -208,25 +210,57 @@ InitCopyPix(XParms xp, Parms p, int64_t reps)
return reps;
}
int
InitGetImage(XParms xp, Parms p, int64_t reps)
static int
InitImage(XParms xp, Parms p, int64_t reps, long pm)
{
(void) InitCopyWin(xp, p, reps);
/* Create image to stuff bits into */
image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, xp->planemask,
p->font==NULL?ZPixmap:XYPixmap);
image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, pm,
p->font==NULL ? ZPixmap : (strcmp(p->font, "XY") == 0? XYPixmap : ZPixmap));
if(image==NULL){
printf("XGetImage failed\n");
return False;
}
if (p->font && !strcmp(p->font, "XYBitmap")) {
int bytes_per_line = (WIDTH + 31) / 8;
char *data = malloc (bytes_per_line * HEIGHT);
XImage *new = XCreateImage(xp->d, xp->vinfo.visual, 1, XYBitmap, 0,
data, WIDTH, HEIGHT, 32, bytes_per_line);
int x, y;
unsigned long zero_pixel;
int has_zero = 0;
for (y = 0; y < HEIGHT; y++)
for (x = 0; x < WIDTH; x++) {
unsigned long src_pixel = XGetPixel(image, x, y);
unsigned long dst_pixel = 0;
if (!has_zero) {
zero_pixel = src_pixel;
has_zero = 1;
}
if (src_pixel == zero_pixel)
dst_pixel = 0;
else
dst_pixel = 1;
XPutPixel(new, x, y, dst_pixel);
}
XDestroyImage(image);
image = new;
}
return reps;
}
int
InitGetImage(XParms xp, Parms p, int64_t reps)
{
return InitImage(xp, p, reps, xp->planemask);
}
int
InitPutImage(XParms xp, Parms p, int64_t reps)
{
if(!InitGetImage(xp, p, reps))return False;
if(!InitImage(xp, p, reps, 0xffffffff))return False;
XClearWindow(xp->d, xp->w);
return reps;
}
@ -372,7 +406,7 @@ InitShmImage(XParms xp, Parms p, int64_t reps, Bool read_only)
{
int image_size;
if(!InitGetImage(xp, p, reps))return False;
if(!InitImage(xp, p, reps, 0xffffffff))return False;
if (!XShmQueryExtension(xp->d)) {
/*
* Clean up here because cleanup function is not called if this

View file

@ -208,13 +208,11 @@ InitDoubleDashedSegments(XParms xp, Parms p, int64_t reps)
return reps;
}
int
InitHorizSegments(XParms xp, Parms p, int64_t reps)
static int
InitHorizSegmentsWidth(XParms xp, Parms p, int64_t reps, int width)
{
int size;
int half;
int i;
int rows; /* Number of rows filled in current column */
int x, y; /* base of square to draw in */
int y1; /* y position inside square */
int inc;
@ -223,39 +221,33 @@ InitHorizSegments(XParms xp, Parms p, int64_t reps)
pgc = xp->fggc;
size = p->special;
half = (size + 19) / 20;
segments = malloc((p->objects) * sizeof(XSegment));
x = half;
y = half;
x = width / 2 + 1;
y = width / 2 + 1;
y1 = 0;
rows = 0;
inc = size / p->objects;
if (inc == 0) inc = 1;
inc = width + 1;
for (i = 0; i != p->objects; i++) {
if (i % 2) {
segments[i].x1 = x + size;
segments[i].x2 = x;
segments[i].y1 = y + size - y1;
segments[i].y2 = y + size - y1;
y1 += inc;
if (y1 >= size) y1 -= size;
segments[i].y1 = y + (HEIGHT - width - 2) - y1;
segments[i].y2 = y + (HEIGHT - width - 2) - y1;
y1 += inc;
} else {
segments[i].x1 = x;
segments[i].x2 = x + size;
segments[i].y1 = y + y1;
segments[i].y2 = y + y1;
}
rows++;
y += size;
if (y >= HEIGHT - size - half || rows == MAXROWS) {
rows = 0;
y = half;
x += size;
if (x >= WIDTH - size - half)
x = half;
/* Go to next row */
if (y1 >= HEIGHT / 2 - (width + 2)) {
y1 =0;
x += size + inc;
if (x >= WIDTH - size - width)
x = width/2 + 1;
}
}
gcv.cap_style = CapNotLast;
@ -264,14 +256,19 @@ InitHorizSegments(XParms xp, Parms p, int64_t reps)
return reps;
}
int
InitHorizSegments(XParms xp, Parms p, int64_t reps)
{
return InitHorizSegmentsWidth(xp, p, reps, 1);
}
int
InitWideHorizSegments(XParms xp, Parms p, int64_t reps)
{
int size;
int size = p->special;
(void)InitHorizSegments(xp, p, reps);
(void)InitHorizSegmentsWidth(xp, p, reps, (int) ((size + 9) / 10));
size = p->special;
XSetLineAttributes(xp->d, xp->bggc, (int) ((size + 9) / 10),
LineSolid, CapRound, JoinRound);
XSetLineAttributes(xp->d, xp->fggc, (int) ((size + 9) / 10),
@ -280,14 +277,11 @@ InitWideHorizSegments(XParms xp, Parms p, int64_t reps)
return reps;
}
int
InitVertSegments(XParms xp, Parms p, int64_t reps)
static int
InitVertSegmentsWidth(XParms xp, Parms p, int64_t reps, int width)
{
int size;
int half;
int i;
int rows; /* Number of rows filled in current column */
int x, y; /* base of square to draw in */
int x1; /* x position inside square */
int inc;
@ -296,41 +290,33 @@ InitVertSegments(XParms xp, Parms p, int64_t reps)
pgc = xp->fggc;
size = p->special;
half = (size + 19) / 20;
segments = malloc((p->objects) * sizeof(XSegment));
x = half;
y = half;
x = width / 2 + 1;
y = width / 2 + 1;
x1 = 0;
rows = 0;
inc = size / p->objects;
if (inc == 0) inc = 1;
inc = width + 1;
for (i = 0; i != p->objects; i++) {
if (i % 2) {
segments[i].x1 = x + size - x1;
segments[i].x2 = x + size - x1;
segments[i].x1 = x + (WIDTH - width - 2) - x1;
segments[i].x2 = x + (WIDTH - width - 2) - x1;
segments[i].y1 = y + size;
segments[i].y2 = y;
x1 += inc;
if (x1 >= size) x1 -= size;
x1 += inc;
} else {
segments[i].x1 = x + x1;
segments[i].x2 = x + x1;
segments[i].y1 = y;
segments[i].y2 = y + size;
}
rows++;
y += size;
if (y >= HEIGHT - size - half || rows == MAXROWS) {
/* Go to next column */
rows = 0;
y = half;
x += size;
if (x >= WIDTH - size - half) {
x = half;
}
/* Go to next column */
if (x1 >= WIDTH / 2 - (width + 2)) {
x1 = 0;
y += size + inc;
if (y >= HEIGHT - size - width)
y = width/2 + 1;
}
}
gcv.cap_style = CapNotLast;
@ -339,14 +325,19 @@ InitVertSegments(XParms xp, Parms p, int64_t reps)
return reps;
}
int
InitVertSegments(XParms xp, Parms p, int64_t reps)
{
return InitVertSegmentsWidth(xp, p, reps, 1);
}
int
InitWideVertSegments(XParms xp, Parms p, int64_t reps)
{
int size;
int size = p->special;
(void)InitVertSegments(xp, p, reps);
(void)InitVertSegmentsWidth(xp, p, reps, (size + 9) / 10);
size = p->special;
XSetLineAttributes(xp->d, xp->bggc, (int) ((size + 9) / 10),
LineSolid, CapRound, JoinRound);
XSetLineAttributes(xp->d, xp->fggc, (int) ((size + 9) / 10),
@ -355,7 +346,6 @@ InitWideVertSegments(XParms xp, Parms p, int64_t reps)
return reps;
}
void
DoSegments(XParms xp, Parms p, int64_t reps)
{
@ -380,4 +370,3 @@ EndSegments(XParms xp, Parms p)
{
free(segments);
}

View file

@ -45,7 +45,7 @@ Test test[] = {
{"-rect100", "100x100 rectangle", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
{36, 100, NULL, NULL, FillSolid}},
{25, 100, NULL, NULL, FillSolid}},
{"-rect500", "500x500 rectangle", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
@ -64,7 +64,7 @@ Test test[] = {
"100x100 stippled rectangle (8x8 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
{36, 100, NULL, NULL, FillStippled}},
{25, 100, NULL, NULL, FillStippled}},
{"-srect500", "500x500 stippled rectangle",
"500x500 stippled rectangle (8x8 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -84,7 +84,7 @@ Test test[] = {
"100x100 opaque stippled rectangle (8x8 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
{36, 100, NULL, NULL, FillOpaqueStippled}},
{25, 100, NULL, NULL, FillOpaqueStippled}},
{"-osrect500", "500x500 opaque stippled rectangle",
"500x500 opaque stippled rectangle (8x8 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -104,7 +104,7 @@ Test test[] = {
"100x100 tiled rectangle (4x4 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
{36, 100, NULL, NULL, FillTiled}},
{25, 100, NULL, NULL, FillTiled}},
{"-tilerect500", "500x500 4x4 tiled rectangle",
"500x500 tiled rectangle (4x4 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -121,7 +121,7 @@ Test test[] = {
{"-oddsrect100", "100x100 stippled rectangle (17x15 stipple)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
{36, 100, "OddTile", NULL, FillStippled}},
{25, 100, "OddTile", NULL, FillStippled}},
{"-oddsrect500", "500x500 stippled rectangle (17x15 stipple)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
@ -137,7 +137,7 @@ Test test[] = {
{"-oddosrect100", "100x100 opaque stippled rectangle (17x15 stipple)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
{36, 100, "OddTile", NULL, FillOpaqueStippled}},
{25, 100, "OddTile", NULL, FillOpaqueStippled}},
{"-oddosrect500", "500x500 opaque stippled rectangle (17x15 stipple)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
@ -153,7 +153,7 @@ Test test[] = {
{"-oddtilerect100", "100x100 tiled rectangle (17x15 tile)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
{36, 100, "OddTile", NULL, FillTiled}},
{25, 100, "OddTile", NULL, FillTiled}},
{"-oddtilerect500", "500x500 tiled rectangle (17x15 tile)", NULL,
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_4FEATURE, ROP, 0,
@ -172,7 +172,7 @@ Test test[] = {
"100x100 stippled rectangle (161x145 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
{36, 100, "mensetmanus", NULL, FillStippled}},
{25, 100, "mensetmanus", NULL, FillStippled}},
{"-bigsrect500", "500x500 161x145 stippled rectangle",
"500x500 stippled rectangle (161x145 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -192,7 +192,7 @@ Test test[] = {
"100x100 opaque stippled rectangle (161x145 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
{36, 100, "mensetmanus", NULL, FillOpaqueStippled}},
{25, 100, "mensetmanus", NULL, FillOpaqueStippled}},
{"-bigosrect500", "500x500 161x145 opaque stippled rectangle",
"500x500 opaque stippled rectangle (161x145 stipple)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -212,7 +212,7 @@ Test test[] = {
"100x100 tiled rectangle (161x145 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_2FEATURE, ROP, 0,
{36, 100, "mensetmanus", NULL, FillTiled}},
{25, 100, "mensetmanus", NULL, FillTiled}},
{"-bigtilerect500", "500x500 161x145 tiled rectangle",
"500x500 tiled rectangle (161x145 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -232,7 +232,7 @@ Test test[] = {
"100x100 tiled rectangle (216x208 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
{36, 100, "escherknot", NULL, FillTiled}},
{25, 100, "escherknot", NULL, FillTiled}},
{"-eschertilerect500", "500x500 216x208 tiled rectangle",
"500x500 tiled rectangle (216x208 tile)",
InitRectangles, DoRectangles, NullProc, EndRectangles,
@ -289,7 +289,7 @@ Test test[] = {
{"-hseg500", "500-pixel horizontal line segment", NULL,
InitHorizSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{POLY, 500}},
{300, 500}},
{"-vseg10", "10-pixel vertical line segment", NULL,
InitVertSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
@ -301,31 +301,31 @@ Test test[] = {
{"-vseg500", "500-pixel vertical line segment", NULL,
InitVertSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{POLY, 500}},
{300, 500}},
{"-whseg10", "10x1 wide horizontal line segment", NULL,
InitWideHorizSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{200, 10}},
{POLY, 10}},
{"-whseg100", "100x10 wide horizontal line segment", NULL,
InitWideHorizSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{100, 100}},
{270, 100}},
{"-whseg500", "500x50 wide horizontal line segment", NULL,
InitWideHorizSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{50, 500}},
{10, 500}},
{"-wvseg10", "10x1 wide vertical line segment", NULL,
InitWideVertSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{200, 10}},
{POLY, 10}},
{"-wvseg100", "100x10 wide vertical line segment", NULL,
InitWideVertSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{100, 100}},
{270, 100}},
{"-wvseg500", "500x50 wide vertical line segment", NULL,
InitWideVertSegments, DoSegments, NullProc, EndSegments,
V1_3FEATURE, ROP, 0,
{50, 500}},
{10, 500}},
{"-line1", "1-pixel line", NULL,
InitLines, DoLines, NullProc, EndLines,
V1_2FEATURE, ROP, 0,
@ -381,7 +381,7 @@ Test test[] = {
{"-orect100", "100x100 rectangle outline", NULL,
InitRectangles, DoOutlineRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
{36, 100, NULL, "0", FillSolid}},
{25, 100, NULL, "0", FillSolid}},
{"-orect500", "500x500 rectangle outline", NULL,
InitRectangles, DoOutlineRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
@ -393,7 +393,7 @@ Test test[] = {
{"-worect100", "100x100 wide rectangle outline", NULL,
InitRectangles, DoOutlineRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
{36, 100, NULL, "10", FillSolid}},
{25, 100, NULL, "10", FillSolid}},
{"-worect500", "500x500 wide rectangle outline", NULL,
InitRectangles, DoOutlineRectangles, NullProc, EndRectangles,
V1_3FEATURE, ROP, 0,
@ -783,7 +783,7 @@ Test test[] = {
"Fill 100x100 tiled trapezoid (216x208 tile)",
InitTrapezoids, DoTrapezoids, NullProc, EndTrapezoids,
V1_3FEATURE, ROP, 0,
{36, 100, "escherknot", NULL, FillTiled}},
{25, 100, "escherknot", NULL, FillTiled}},
{"-eschertiletrap300", "Fill 300x300 tiled trapezoid (216x208 tile)", NULL,
InitTrapezoids, DoTrapezoids, NullProc, EndTrapezoids,
V1_4FEATURE, ROP, 0,
@ -816,7 +816,7 @@ Test test[] = {
{"-aa4trap100", "Fill 100x100 aa trap with 4 bit alpha", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
{POLY, 100, "4" }},
{25, 100, "4" }},
{"-aa4trap300", "Fill 300x300 aa trap with 4 bit alpha", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
@ -832,11 +832,11 @@ Test test[] = {
{"-aa1trap100", "Fill 100x100 aa trap with 1 bit alpha", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
{POLY, 100, "1" }},
{25, 100, "1" }},
{"-aa1trap300", "Fill 300x300 aa trap with 1 bit alpha", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
{POLY, 300, "1" }},
{2, 300, "1" }},
{"-aatrap2x1", "Fill 2x1 aa trap", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
@ -849,11 +849,11 @@ Test test[] = {
{"-aatrap2x100", "Fill 2x100 aa trap", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
{POLY, 100, "8,2" }},
{25, 100, "8,2" }},
{"-aatrap2x300", "Fill 2x300 aa trap", NULL,
InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
V1_5FEATURE, NONROP, 0,
{POLY, 300, "8,2" }},
{2, 300, "8,2" }},
{"-aatrapezoid1", "Fill 1x1 aa trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
@ -866,11 +866,11 @@ Test test[] = {
{"-aatrapezoid100", "Fill 100x100 aa trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
V1_5FEATURE, NONROP, 0,
{POLY, 100 }},
{25, 100 }},
{"-aatrapezoid300", "Fill 300x300 aa trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
V1_5FEATURE, NONROP, 0,
{POLY, 300 }},
{2, 300 }},
{"-addaatrapezoid1", "Fill 1x1 aa pre-added trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
V1_5FEATURE, NONROP, 0,
@ -882,11 +882,11 @@ Test test[] = {
{"-addaatrapezoid100", "Fill 100x100 aa pre-added trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
V1_5FEATURE, NONROP, 0,
{POLY, 100, "add" }},
{25, 100, "add" }},
{"-addaatrapezoid300", "Fill 300x300 aa pre-added trapezoid", NULL,
InitFixedTrapezoids, DoFixedTrapezoids, NullProc, EndFixedTrapezoids,
V1_5FEATURE, NONROP, 0,
{POLY, 300, "add" }},
{2, 300, "add" }},
#endif
{"-complex10", "Fill 10-pixel/side complex polygon", NULL,
InitComplexPoly, DoComplexPoly, NullProc, EndComplexPoly,
@ -924,6 +924,10 @@ Test test[] = {
InitText, DoText, ClearTextWin, EndText,
V1_2FEATURE, ROP, 0,
{80, False, "6x13", NULL}},
{"-tileftext","Char in 80-char line tiled (6x13)", NULL,
InitText, DoText, ClearTextWin, EndText,
V1_7FEATURE, ROP, 0,
{80, False, "6x13", NULL, FillTiled}},
{"-f8text", "Char in 70-char line (8x13)", NULL,
InitText, DoText, ClearTextWin, EndText,
V1_3FEATURE, ROP, 0,
@ -1004,78 +1008,78 @@ Test test[] = {
"-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",
NULL}},
#ifdef XFT
{"-aa10text", "Char in 80-char aa line (Charter 10)", NULL,
{"-aa10text", "Char in 80-char aa line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=true:rgba=0:pixelsize=10", NULL}},
{"-aa24text", "Char in 30-char aa line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=true:rgba=0:pixelsize=10", NULL}},
{"-aa24text", "Char in 30-char aa line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=true:rgba=0:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=true:rgba=0:pixelsize=24", NULL}},
{"-aaftext", "Char in 80-char aa line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=true:rgba=0:pixelsize=12", NULL}},
{"-a10text", "Char in 80-char a line (Charter 10)", NULL,
{80, 12, "Courier:antialias=true:rgba=0:pixelsize=12", NULL}},
{"-a10text", "Char in 80-char a line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=false:rgba=0:pixelsize=10", NULL}},
{"-a24text", "Char in 30-char a line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=false:rgba=0:pixelsize=10", NULL}},
{"-a24text", "Char in 30-char a line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=false:rgba=0:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=false:rgba=0:pixelsize=24", NULL}},
{"-aftext", "Char in 80-char a line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=false:rgba=0:pixelsize=12", NULL}},
{"-rgb10text", "Char in 80-char rgb line (Charter 10)", NULL,
{80, 12, "Courier:antialias=false:rgba=0:pixelsize=12", NULL}},
{"-rgb10text", "Char in 80-char rgb line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=true:rgba=rgb:pixelsize=10", NULL}},
{"-rgb24text", "Char in 30-char rgb line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=10", NULL}},
{"-rgb24text", "Char in 30-char rgb line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=true:rgba=rgb:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=24", NULL}},
{"-rgbftext", "Char in 80-char rgb line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=true:rgba=rgb:pixelsize=12", NULL}},
{"-caa10text", "Char in 80-char aa core line (Charter 10)", NULL,
{80, 12, "Courier:antialias=true:rgba=rgb:pixelsize=12", NULL}},
{"-caa10text", "Char in 80-char aa core line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=true:render=false:rgba=0:pixelsize=10", NULL}},
{"-caa24text", "Char in 30-char aa core line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=true:rgba=0:pixelsize=10", "render=false"}},
{"-caa24text", "Char in 30-char aa core line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=true:render=false:rgba=0:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=true:rgba=0:pixelsize=24", "render=false"}},
{"-caaftext", "Char in 80-char aa core line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=true:render=false:rgba=0:pixelsize=12", NULL}},
{"-ca10text", "Char in 80-char a core line (Charter 10)", NULL,
{80, 12, "Courier:antialias=true:rgba=0:pixelsize=12", "render=false"}},
{"-ca10text", "Char in 80-char a core line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=false:render=false:rgba=0:pixelsize=10", NULL}},
{"-ca24text", "Char in 30-char a core line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=false:rgba=0:pixelsize=10", "render=false"}},
{"-ca24text", "Char in 30-char a core line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=false:render=false:rgba=0:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=false:rgba=0:pixelsize=24", "render=false"}},
{"-caftext", "Char in 80-char a core line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=false:render=false:rgba=0:pixelsize=12", NULL}},
{"-crgb10text", "Char in 80-char rgb core line (Charter 10)", NULL,
{80, 12, "Courier:antialias=false:rgba=0:pixelsize=12", "render=false"}},
{"-crgb10text", "Char in 80-char rgb core line (DejaVu Sans 10)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 10, "charter:antialias=true:render=false:rgba=rgb:pixelsize=10", NULL}},
{"-crgb24text", "Char in 30-char rgb core line (Charter 24)", NULL,
{80, 10, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=10", "render=false"}},
{"-crgb24text", "Char in 30-char rgb core line (DejaVu Sans 24)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{30, 24, "charter:antialias=true:render=false:rgba=rgb:pixelsize=24", NULL}},
{30, 24, "DejaVu Sans:antialias=true:rgba=rgb:pixelsize=24", "render=false"}},
{"-crgbftext", "Char in 80-char rgb core line (Courier 12)", NULL,
InitAAText, DoAAText, ClearTextWin, EndAAText,
V1_5FEATURE, NONROP, 0,
{80, 12, "courier:antialias=true:render=false:rgba=rgb:pixelsize=12", NULL}},
{80, 12, "Courier:antialias=true:rgba=rgb:pixelsize=12", "render=false"}},
#endif
{"-scroll10", "Scroll 10x10 pixels", NULL,
InitScroll, DoScroll, MidScroll, EndScroll,
@ -1185,6 +1189,18 @@ Test test[] = {
InitPutImage, DoPutImage, MidCopyPix, EndGetImage,
V1_4FEATURE, ROP, 0,
{4, 500, "XY"}},
{"-putimagexybitmap10", "PutImage XYBitmap 10x10 square", NULL,
InitPutImage, DoPutImage, MidCopyPix, EndGetImage,
V1_7FEATURE, ROP, 0,
{4, 10, "XYBitmap"}},
{"-putimagexybitmap100", "PutImage XYBitmap 100x100 square", NULL,
InitPutImage, DoPutImage, MidCopyPix, EndGetImage,
V1_7FEATURE, ROP, 0,
{4, 100, "XYBitmap"}},
{"-putimagexybitmap500", "PutImage XYBitmap 500x500 square", NULL,
InitPutImage, DoPutImage, MidCopyPix, EndGetImage,
V1_7FEATURE, ROP, 0,
{4, 500, "XYBitmap"}},
#ifdef MITSHM
{"-shmput10", "ShmPutImage 10x10 square", NULL,
InitShmPutImage, DoShmPutImage, MidCopyPix, EndShmPutImage,
@ -1210,6 +1226,18 @@ Test test[] = {
InitShmPutImage, DoShmPutImage, MidCopyPix, EndShmPutImage,
V1_4FEATURE, ROP, 0,
{4, 500, "XY"}},
{"-shmputxybitmap10", "ShmPutImage XYBitmap 10x10 square", NULL,
InitShmPutImage, DoShmPutImage, MidCopyPix, EndShmPutImage,
V1_7FEATURE, ROP, 0,
{4, 10, "XYBitmap"}},
{"-shmputxybitmap100", "ShmPutImage XYBitmap 100x100 square", NULL,
InitShmPutImage, DoShmPutImage, MidCopyPix, EndShmPutImage,
V1_7FEATURE, ROP, 0,
{4, 100, "XYBitmap"}},
{"-shmputxybitmap500", "ShmPutImage XYBitmap 500x500 square", NULL,
InitShmPutImage, DoShmPutImage, MidCopyPix, EndShmPutImage,
V1_7FEATURE, ROP, 0,
{4, 500, "XYBitmap"}},
{"-shmget10", "ShmGetImage 10x10 square", NULL,
InitShmGetImage, DoShmGetImage, NullProc, EndShmGetImage,
V1_2FEATURE, ROP, 0,
@ -1261,51 +1289,51 @@ Test test[] = {
{4, 500, "XY"}},
{"-compwinwin10", "Composite 10x10 from window to window", NULL,
InitCompositeWin, DoCompositeWinWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 10}},
{"-compwinwin100", "Composite 100x100 from window to window", NULL,
InitCompositeWin, DoCompositeWinWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 100}},
{"-compwinwin500", "Composite 500x500 from window to window", NULL,
InitCompositeWin, DoCompositeWinWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 500}},
{"-comppixwin10", "Composite 10x10 from pixmap to window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 10}},
{"-comppixwin100", "Composite 100x100 from pixmap to window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 100}},
{"-comppixwin500", "Composite 500x500 from pixmap to window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 500}},
{"-magpixwin10", "Scale 5x5 from pixmap to 10x10 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 10, NULL, NULL, 0x20000}},
{"-magpixwin100", "Scale 50x50 from pixmap to 100x100 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 100, NULL, NULL, 0x20000}},
{"-magpixwin500", "Scale 250x250 from pixmap to 500x500 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 500, NULL, NULL, 0x20000}},
{"-minpixwin10", "Scale 10x10 from pixmap to 5x5 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 5, NULL, NULL, 0x8000}},
{"-minpixwin100", "Scale 100x100 from pixmap to 50x50 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 50, NULL, NULL, 0x8000}},
{"-minpixwin500", "Scale 500x500 from pixmap to 250x250 window", NULL,
InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin,
VERSION1_6, COMP, 0,
V1_6FEATURE, COMP, 0,
{4, 250, NULL, NULL, 0x8000}},
{"-noop", "X protocol NoOperation", NULL,
NullInitProc, DoNoOp, NullProc, NullProc,

View file

@ -23,6 +23,7 @@ SOFTWARE.
#include "x11perf.h"
#include <stdio.h>
#include "bitmaps.h"
static char **charBuf;
static XFontStruct *font, *bfont;
@ -65,6 +66,8 @@ InitText(XParms xp, Parms p, int64_t reps)
XChangeGC(xp->d, xp->fggc, GCFont, &gcv);
XChangeGC(xp->d, xp->bggc, GCFont, &gcv);
SetFillStyle(xp, p);
charsPerLine = p->objects;
charsPerLine = (charsPerLine + 3) & ~3;
p->objects = charsPerLine;
@ -406,8 +409,21 @@ InitAAText(XParms xp, Parms p, int64_t reps)
{
char ch;
XRenderColor color;
FcValue value;
int v_len;
FcPattern *pat;
FcPattern *match;
FcResult result;
aafont = XftFontOpenName (xp->d, DefaultScreen (xp->d), p->font);
pat = FcNameParse((FcChar8 *) p->font);
match = XftFontMatch(xp->d, DefaultScreen(xp->d), pat, &result);
FcPatternDestroy(pat);
if (p->bfont) {
FcPatternDel(match, XFT_RENDER);
FcPatternAddBool(match, XFT_RENDER, False);
}
aafont = XftFontOpenPattern (xp->d, match);
if (aafont == NULL)
{
@ -415,6 +431,22 @@ InitAAText(XParms xp, Parms p, int64_t reps)
p->font);
return 0;
}
if (FcPatternGet(aafont->pattern, FC_FAMILY, 0, &value) != FcResultMatch ||
value.type != FcTypeString)
{
printf("Could not load font '%s', benchmark omitted\n",
p->font);
XftFontClose (xp->d, aafont);
return 0;
}
v_len = strlen((char *) value.u.s);
if (strncmp((char *) value.u.s, p->font, v_len) != 0 || p->font[v_len] != ':') {
printf("Could not load font '%s' (found %s), benchmark omitted\n",
p->font,
(char *) value.u.s);
XftFontClose (xp->d, aafont);
return 0;
}
aadraw = XftDrawCreate (xp->d, xp->w,
xp->vinfo.visual,

View file

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

View file

@ -5,8 +5,3 @@ appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

View file

@ -52,14 +52,15 @@ build_triplet = @build@
host_triplet = @host@
subdir = man
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
$(srcdir)/Xmark.man $(srcdir)/x11perf.man \
$(srcdir)/x11perfcomp.man $(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = x11perf.1 x11perfcomp.1 Xmark.1
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@ -126,7 +127,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
@ -137,11 +137,9 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
@ -245,11 +243,9 @@ appman_PRE = x11perfcomp.man x11perf.man Xmark.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
all: all-am
.SUFFIXES:
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -280,6 +276,12 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
x11perf.1: $(top_builddir)/config.status $(srcdir)/x11perf.man
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
x11perfcomp.1: $(top_builddir)/config.status $(srcdir)/x11perfcomp.man
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Xmark.1: $(top_builddir)/config.status $(srcdir)/Xmark.man
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-appmanDATA: $(appman_DATA)
@$(NORMAL_INSTALL)
@list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
@ -458,10 +460,6 @@ uninstall-am: uninstall-appmanDATA
pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,6 +1,6 @@
.\" This manpage was written by Richard Braakman and is licensed under the
.\" XFree86 license.
.TH Xmark 1 __xorgversion__
.TH Xmark 1 "@PACKAGE_STRING@" "@XORG_MAN_PAGE@"
.SH NAME
Xmark \- summarize x11perf results
.SH SYNTAX
@ -63,4 +63,4 @@ by x11perf in the expected way.
.BR "Diagnostic: ERROR: sum of weights =" nnn ", not equal to 4566.0;"
There is an internal error in Xmark.
.SH "SEE ALSO"
X(__miscmansuffix__), x11perf(__appmansuffix__), x11perfcomp(__appmansuffix__)
X(@MISC_MAN_SUFFIX@), x11perf(@APP_MAN_SUFFIX@), x11perfcomp(@APP_MAN_SUFFIX@)

View file

@ -24,7 +24,7 @@
.\" from The Open Group.
.\"
.\"
.TH X11PERF 1 __xorgversion__
.TH X11PERF 1 "@PACKAGE_STRING@" "@XORG_MAN_PAGE@"
.SH NAME
x11perf \- X11 server performance test program
.SH SYNTAX
@ -86,7 +86,7 @@ may be able to use the numbers
reports to predict its performance on a given X implementation.
.PP
That said, you might also want to look at
.I x11perfcomp(__appmansuffix__),
.BR x11perfcomp (@APP_MAN_SUFFIX@),
a program to compare the outputs of different
.I x11perf
runs. You provide a list of files containing results from
@ -236,6 +236,21 @@ Perform only x11perf Version 1.2 tests using Version 1.2 semantics.
.B \-v1.3
Perform only x11perf Version 1.3 tests using Version 1.3 semantics.
.TP 14
.B \-v1.4
Perform only x11perf Version 1.4 tests using Version 1.4 semantics.
.TP 14
.B \-v1.5
Perform only x11perf Version 1.5 tests using Version 1.5 semantics.
.TP 14
.B \-v1.6
Perform only x11perf Version 1.6 tests using Version 1.6 semantics.
.TP 14
.B \-v1.7
Perform only x11perf Version 1.7 tests using Version 1.7 semantics.
.TP 14
.B \-version
Print program version and exit.
.TP 14
.B \-su
Set the save_under window attribute to True on all windows created by x11perf.
Default is False.
@ -245,6 +260,18 @@ Set the backing_store window attribute to the given value on all windows
created by x11perf. <backing_store_hint> can be WhenMapped or
Always. Default is NotUseful.
.TP 14
.B \-help [options|tests|all]
Print information about available options and exit.
If no argument is specified, or \fBoptions\fR is specified, just prints
information about general options, but does not include the long list of
options for running specific tests.
If \fBtests\fR is specified, just prints the long list of options for
running specific tests.
If \fBall\fR is specified, prints information about both sets of options.
If \fB-v\fR\fIversion\fR is also specified, the list of options for
running specific tests will be limited to the tests for that version.
.SS Options for running specific tests
.TP 14
.B \-dot
Dot.
.TP 14
@ -777,6 +804,78 @@ Fill 100x100 tiled trapezoid, 216x208 tile pattern.
.B \-eschertiletrap300
Fill 300x300 tiled trapezoid, 216x208 tile pattern.
.TP 14
.B \-aatrap1
Fill 1x1 aa trap
.TP 14
.B \-aatrap10
Fill 10x10 aa trap
.TP 14
.B \-aatrap100
Fill 100x100 aa trap
.TP 14
.B \-aatrap300
Fill 300x300 aa trap
.TP 14
.B \-aa4trap1
Fill 1x1 aa trap with 4 bit alpha
.TP 14
.B \-aa4trap10
Fill 10x10 aa trap with 4 bit alpha
.TP 14
.B \-aa4trap100
Fill 100x100 aa trap with 4 bit alpha
.TP 14
.B \-aa4trap300
Fill 300x300 aa trap with 4 bit alpha
.TP 14
.B \-aa1trap1
Fill 1x1 aa trap with 1 bit alpha
.TP 14
.B \-aa1trap10
Fill 10x10 aa trap with 1 bit alpha
.TP 14
.B \-aa1trap100
Fill 100x100 aa trap with 1 bit alpha
.TP 14
.B \-aa1trap300
Fill 300x300 aa trap with 1 bit alpha
.TP 14
.B \-aatrap2x1
Fill 2x1 aa trap
.TP 14
.B \-aatrap2x10
Fill 2x10 aa trap
.TP 14
.B \-aatrap2x100
Fill 2x100 aa trap
.TP 14
.B \-aatrap2x300
Fill 2x300 aa trap
.TP 14
.B \-aatrapezoid1
Fill 1x1 aa trapezoid
.TP 14
.B \-aatrapezoid10
Fill 10x10 aa trapezoid
.TP 14
.B \-aatrapezoid100
Fill 100x100 aa trapezoid
.TP 14
.B \-aatrapezoid300
Fill 300x300 aa trapezoid
.TP 14
.B \-addaatrapezoid1
Fill 1x1 aa pre-added trapezoid
.TP 14
.B \-addaatrapezoid10
Fill 10x10 aa pre-added trapezoid
.TP 14
.B \-addaatrapezoid100
Fill 100x100 aa pre-added trapezoid
.TP 14
.B \-addaatrapezoid300
Fill 300x300 aa pre-added trapezoid
.TP 14
.B \-complex10
Fill 10-pixel/side complex polygon.
.TP 14
@ -798,6 +897,9 @@ Fill 100x100 complex 64-gon.
.B \-ftext
Character in 80-char line (6x13).
.TP 14
.B \-tileftext
Character in 80-char line tiled (6x13).
.TP 14
.B \-f8text
Character in 70-char line (8x13).
.TP 14
@ -807,6 +909,9 @@ Character in 60-char line (9x15).
.B \-f14text16
2-byte character in 40-char line (k14).
.TP 14
.B \-f24text16
Char16 in 23-char line (k24)
.TP 14
.B \-tr10text
Character in 80-char line (Times-Roman 10).
.TP 14
@ -840,6 +945,60 @@ Character in 80-char image line (Times-Roman 10).
.B \-tr24itext
Character in 30-char image line (Times-Roman 24).
.TP 14
.B \-aa10text
Character in 80-char aa line (DejaVu Sans 10)
.TP 14
.B \-aa24text
Character in 30-char aa line (DejaVu Sans 24)
.TP 14
.B \-aaftext
Character in 80-char aa line (Courier 12)
.TP 14
.B \-a10text
Character in 80-char a line (DejaVu Sans 10)
.TP 14
.B \-a24text
Character in 30-char a line (DejaVu Sans 24)
.TP 14
.B \-aftext
Character in 80-char a line (Courier 12)
.TP 14
.B \-rgb10text
Character in 80-char rgb line (DejaVu Sans 10)
.TP 14
.B \-rgb24text
Character in 30-char rgb line (DejaVu Sans 24)
.TP 14
.B \-rgbftext
Character in 80-char rgb line (Courier 12)
.TP 14
.B \-caa10text
Character in 80-char aa core line (DejaVu Sans 10)
.TP 14
.B \-caa24text
Character in 30-char aa core line (DejaVu Sans 24)
.TP 14
.B \-caaftext
Character in 80-char aa core line (Courier 12)
.TP 14
.B \-ca10text
Character in 80-char a core line (DejaVu Sans 10)
.TP 14
.B \-ca24text
Character in 30-char a core line (DejaVu Sans 24)
.TP 14
.B \-caftext
Character in 80-char a core line (Courier 12)
.TP 14
.B \-crgb10text
Character in 80-char rgb core line (DejaVu Sans 10)
.TP 14
.B \-crgb24text
Character in 30-char rgb core line (DejaVu Sans 24)
.TP 14
.B \-crgbftext
Character in 80-char rgb core line (Courier 12)
.TP 14
.B \-scroll10
Scroll 10x10 pixels vertically.
.TP 14
@ -894,6 +1053,15 @@ Copy 100x100 1-bit deep plane.
.B \-copyplane500
Copy 500x500 1-bit deep plane.
.TP 14
.B \-deepcopyplane10
Copy 10x10 n-bit deep plane
.TP 14
.B \-deepcopyplane100
Copy 100x100 n-bit deep plane
.TP 14
.B \-deepcopyplane500
Copy 500x500 n-bit deep plane
.TP 14
.B \-putimage10
PutImage 10x10 square.
.TP 14
@ -912,6 +1080,15 @@ PutImage XY format 100x100 square.
.B \-putimagexy500
PutImage XY format 500x500 square.
.TP 14
.B \-putimagexybitmap10
PutImage XYbitmap 10x10 square.
.TP 14
.B \-putimagexybitmap100
PutImage XYbitmap 100x100 square.
.TP 14
.B \-putimagexybitmap500
PutImage XYbitmap 500x500 square.
.TP 14
.B \-shmput10
PutImage 10x10 square, MIT shared memory extension.
.TP 14
@ -930,6 +1107,33 @@ PutImage XY format 100x100 square, MIT shared memory extension.
.B \-shmputxy500
PutImage XY format 500x500 square, MIT shared memory extension.
.TP 14
.B \-shmputxybitmap10
PutImage XYbitmap 10x10 square, MIT shared memory extension.
.TP 14
.B \-shmputxybitmap100
PutImage XYbitmap 100x100 square, MIT shared memory extension.
.TP 14
.B \-shmputxybitmap500
PutImage XYbitmap 500x500 square, MIT shared memory extension.
.TP 14
.B \-shmget10
GetImage 10x10 square, MIT shared memory extension.
.TP 14
.B \-shmget100
GetImage 100x100 square, MIT shared memory extension.
.TP 14
.B \-shmget500
GetImage 500x500 square, MIT shared memory extension.
.TP 14
.B \-shmgetxy10
GetImage XY format 10x10 square, MIT shared memory extension.
.TP 14
.B \-shmgetxy100
GetImage XY format 100x100 square, MIT shared memory extension.
.TP 14
.B \-shmgetxy500
GetImage XY format 500x500 square, MIT shared memory extension.
.TP 14
.B \-getimage10
GetImage 10x10 square.
.TP 14
@ -1040,7 +1244,8 @@ Circulate unmapped window to top.
.SH X DEFAULTS
There are no X defaults used by this program.
.SH "SEE ALSO"
X(__miscmansuffix__), x11perfcomp(__appmansuffix__)
.BR X (@MISC_MAN_SUFFIX@),
.BR x11perfcomp (@APP_MAN_SUFFIX@)
.SH AUTHORS
Joel McCormack
.br

View file

@ -23,7 +23,7 @@
.\" from The Open Group.
.\"
.\"
.TH X11PERFCOMP 1 __xorgversion__
.TH X11PERFCOMP 1 "@PACKAGE_STRING@" "@XORG_MAN_PAGE@"
.SH NAME
x11perfcomp \- X11 server performance comparison program
.SH SYNTAX
@ -33,7 +33,7 @@ x11perfcomp \- X11 server performance comparison program
The
.I x11perfcomp
program merges the output of several
.I x11perf(__appmansuffix__)
.BR x11perf (@APP_MAN_SUFFIX@)
runs into a nice tabular
format. It takes the results in each file, fills in any missing test results if
necessary, and for each test shows the objects/second rate of each server.
@ -73,7 +73,8 @@ Specifies a label file to use.
.SH X DEFAULTS
There are no X defaults used by this program.
.SH "SEE ALSO"
X(__miscmansuffix__), x11perf(__appmansuffix__)
.BR X (@MISC_MAN_SUFFIX@),
.BR x11perf(@APP_MAN_SUFFIX@)
.SH AUTHORS
Mark Moraes wrote the original scripts to compare servers.
.br

View file

@ -319,7 +319,26 @@ ReportTimes(double usecs, int64_t n, char *str, int average)
************************************************/
static char *program_name;
static void usage(void) _X_NORETURN;
typedef enum {
USAGE_OPTIONS,
USAGE_TESTS,
USAGE_ALL
} usage_contents;
_X_NORETURN _X_COLD static void usage(usage_contents, int);
_X_NORETURN _X_COLD static void
missing_arg(const char *option)
{
fprintf(stderr, "Error: missing argument to %s\n", option);
usage(USAGE_OPTIONS, EXIT_FAILURE);
}
_X_NORETURN _X_COLD static void
invalid_arg( const char *arg, const char *option)
{
fprintf(stderr, "Error: invalid argument '%s' to %s\n", arg, option);
usage(USAGE_OPTIONS, EXIT_FAILURE);
}
/*
* Get_Display_Name (argc, argv) Look for -display, -d, or host:dpy (obsolete)
@ -337,7 +356,8 @@ Get_Display_Name(int *pargc, /* MODIFIED */
char *arg = argv[i];
if (!strcmp (arg, "-display") || !strcmp (arg, "-d")) {
if (++i >= argc) usage ();
if (++i >= argc)
missing_arg(arg);
displayname = argv[i];
*pargc -= 2;
@ -356,8 +376,9 @@ Get_Display_Name(int *pargc, /* MODIFIED */
/*
* GetVersion (argc, argv) Look for -v1.2, -v1.3, or -v1.4.
* GetVersion (argc, argv) Look for -v followed by a version number.
* If found remove it from command line. Don't go past a lone -.
* Leave -v followed by non-numbers as it could be -vclass or -version.
*/
static Version
@ -366,49 +387,53 @@ GetVersion(int *pargc, /* MODIFIED */
{
int argc = *pargc;
char **pargv = argv+1;
Version version = VERSION1_6;
Version version = VERSION1_7;
Bool found = False;
for (int i = 1; i != argc; i++) {
char *arg = argv[i];
if (!strcmp (arg, "-v1.2")) {
version = VERSION1_2;
*pargc -= 1;
if (found) {
fprintf(stderr, "Warning: multiple version specifications\n");
if (arg[0] == '-' && arg[1] == 'v') {
if (arg[2] == '1' && arg[3] == '.' && arg[5] == '\0') {
switch (arg[4]) {
case '2':
version = VERSION1_2;
break;
case '3':
version = VERSION1_3;
break;
case '4':
version = VERSION1_4;
break;
case '5':
version = VERSION1_5;
break;
case '6':
version = VERSION1_6;
break;
case '7':
version = VERSION1_7;
break;
default:
goto unknown_version;
}
if (found) {
fprintf(stderr, "Warning: multiple version specifications\n");
}
found = True;
/* reduce arg count and skip copying this arg to pargv */
*pargc -= 1;
continue;
} else if (isdigit(arg[2])) {
unknown_version:
fprintf(stderr, "Error: unknown version specification: %s\n",
arg);
exit(1);
}
found = True;
continue;
}
if (!strcmp (arg, "-v1.3")) {
version = VERSION1_3;
*pargc -= 1;
if (found) {
fprintf(stderr, "Warning: multiple version specifications\n");
}
found = True;
continue;
}
if (!strcmp (arg, "-v1.4")) {
version = VERSION1_4;
*pargc -= 1;
if (found) {
fprintf(stderr, "Warning: multiple version specifications\n");
}
found = True;
continue;
}
if (!strcmp (arg, "-v1.5")) {
version = VERSION1_5;
*pargc -= 1;
if (found) {
fprintf(stderr, "Warning: multiple version specifications\n");
}
found = True;
continue;
}
if (!strcmp(arg,"-")) {
else if (!strcmp(arg,"-")) {
while (i<argc) *pargv++ = argv[i++];
break;
}
@ -462,7 +487,7 @@ AbortTest(void)
static void
usage(void)
usage(usage_contents show, int exit_status)
{
int i = 0;
static const char *help_message =
@ -479,10 +504,10 @@ usage(void)
" -all do all tests\n"
" -range <test1>[,<test2>] like all, but do <test1> to <test2>\n"
" -labels generate test labels for use by fillblnk\n"
" -fg the foreground color to use\n"
" -bg the background color to use\n"
" -fg <color-or-pixel> the foreground color to use\n"
" -bg <color-or-pixel> the background color to use\n"
" -clips <default> default number of clip windows per test\n"
" -ddbg the background color to use for DoubleDash\n"
" -ddbg <color-or-pixel> the background color to use for DoubleDash\n"
" -rop <rop0 rop1 ...> use the given rops to draw (default = GXcopy)\n"
" -pm <pm0 pm1 ...> use the given planemasks to draw (default = ~0)\n"
" -depth <depth> use a visual with <depth> planes per pixel\n"
@ -491,28 +516,34 @@ usage(void)
" -subs <s0 s1 ...> a list of the number of sub-windows to use\n"
" -v1.2 perform only v1.2 tests using old semantics\n"
" -v1.3 perform only v1.3 tests using old semantics\n"
" -v1.4 perform only v1.4 tests using old semantics\n"
" -v1.5 perform only v1.5 tests using old semantics\n"
" -v1.6 perform only v1.6 tests using old semantics\n"
" -v1.7 perform only v1.7 tests using old semantics\n"
" -version print version and exit\n"
" -su request save unders on windows\n"
" -bs <backing_store_hint> WhenMapped or Always (default = NotUseful)\n"
" -help [options|tests|all] list general options, test options, or both\n"
;
fflush(stdout);
fprintf(stderr, "usage: %s [-options ...]\n%s", program_name, help_message);
while (test[i].option != NULL) {
if (test[i].versions & xparms.version ) {
fprintf(stderr, " %-24s %s\n",
test[i].option,
test[i].label14 ? test[i].label14 : test[i].label);
}
i++;
if (show == USAGE_OPTIONS || show == USAGE_ALL) {
fprintf(stderr, "usage: %s [-options ...]\n%s",
program_name, help_message);
}
if (show == USAGE_TESTS || show == USAGE_ALL) {
while (test[i].option != NULL) {
if (test[i].versions & xparms.version ) {
fprintf(stderr, " %-24s %s\n",
test[i].option,
test[i].label14 ? test[i].label14 : test[i].label);
}
i++;
}
}
fprintf(stderr, "\n");
/* Print out original command line as the above usage message is so long */
for (i = 0; i != saveargc; i++) {
fprintf(stderr, "%s ", saveargv[i]);
}
fprintf(stderr, "\n\n");
exit (1);
exit (exit_status);
}
void
@ -739,23 +770,14 @@ CreatePerfGCs(XParms xp, int func, unsigned long pm)
gcvddfg.function = func;
gcvddbg.function = func;
if (func == GXxor) {
/* Make test look good visually if possible */
gcvbg.foreground = gcvfg.foreground = bg ^ fg;
gcvbg.background = gcvfg.background = bg;
/* Double Dash GCs (This doesn't make a huge amount of sense) */
gcvddbg.foreground = gcvddfg.foreground = bg ^ fg;
gcvddbg.background = gcvddfg.foreground = bg ^ ddbg;
} else {
gcvfg.foreground = fg;
gcvfg.background = bg;
gcvbg.foreground = bg;
gcvbg.background = fg;
gcvddfg.foreground = fg;
gcvddfg.background = ddbg;
gcvddbg.foreground = ddbg;
gcvddbg.background = fg;
}
gcvfg.foreground = fg;
gcvfg.background = bg;
gcvbg.foreground = bg;
gcvbg.background = fg;
gcvddfg.foreground = fg;
gcvddfg.background = ddbg;
gcvddbg.foreground = ddbg;
gcvddbg.background = fg;
xp->fggc = XCreateGC(xp->d, xp->w,
GCForeground | GCBackground | GCGraphicsExposures
| GCFunction | GCPlaneMask, &gcvfg);
@ -930,7 +952,7 @@ main(int argc, char *argv[])
char *cp2;
if (argc <= ++i)
usage();
missing_arg(argv[i-1]);
cp1 = argv[i];
if (*cp1 == '-')
cp1++;
@ -951,13 +973,19 @@ main(int argc, char *argv[])
} while (!(strcmp(cp2, (test[k].option + 1)) == 0 &&
(test[k].versions & xparms.version)) &&
test[++k].option != NULL);
if (*cp2 != '-' && test[k].option == NULL)
usage();
if (*cp2 != '-' && test[k].option == NULL) {
fprintf(stderr, "Error: unknown test %s listed for %s\n",
cp2, argv[i-1]);
usage(USAGE_OPTIONS, EXIT_FAILURE);
}
break;
}
}
if (test[j].option == NULL)
usage();
if (test[j].option == NULL) {
fprintf(stderr, "Error: unknown test %s listed for %s\n",
argv[i], argv[i-1]);
usage(USAGE_OPTIONS, EXIT_FAILURE);
}
foundOne = True;
} else if (strcmp (argv[i], "-sync") == 0) {
synchronous = True;
@ -970,44 +998,44 @@ main(int argc, char *argv[])
} else if (strcmp (argv[i], "-repeat") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
repeat = atoi (argv[i]);
if (repeat <= 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp (argv[i], "-time") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
seconds = atoi (argv[i]);
if (seconds <= 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp (argv[i], "-pause") == 0) {
++i;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
delay = atoi (argv[i]);
if (delay < 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp(argv[i], "-fg") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
foreground = argv[i];
} else if (strcmp(argv[i], "-bg") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
background = argv[i];
if(ddbackground == NULL)
ddbackground = argv[i];
} else if (strcmp(argv[i], "-clips") == 0 ) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
clips = atoi( argv[i] );
} else if (strcmp(argv[i], "-ddbg") == 0) {
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
i++;
ddbackground = argv[i];
} else if (strcmp(argv[i], "-rop") == 0) {
@ -1032,21 +1060,21 @@ main(int argc, char *argv[])
} else if (strcmp(argv[i], "-reps") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
fixedReps = atoi (argv[i]);
if (fixedReps <= 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp(argv[i], "-depth") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
depth = atoi(argv[i]);
if (depth <= 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp(argv[i], "-vclass") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
for (j = StaticGray; j <= DirectColor; j++) {
if (strcmp(argv[i], visualClassNames[j]) == 0) {
vclass = j;
@ -1054,25 +1082,42 @@ main(int argc, char *argv[])
}
}
if (vclass < 0)
usage ();
invalid_arg(argv[i], argv[i-1]);
} else if (strcmp(argv[i], "-subs") == 0) {
skip = GetNumbers (i+1, argc, argv, subWindows, &numSubWindows);
i += skip;
} else if (strcmp(argv[i], "-v1.2") == 0) {
xparms.version = VERSION1_2;
} else if (strcmp(argv[i], "-v1.3") == 0) {
xparms.version = VERSION1_3;
} else if (strcmp(argv[i], "-su") == 0) {
xparms.save_under = True;
} else if (strcmp(argv[i], "-bs") == 0) {
i++;
if (argc <= i)
usage ();
missing_arg(argv[i-1]);
if (strcmp(argv[i], "WhenMapped") == 0) {
xparms.backing_store = WhenMapped;
} else if (strcmp(argv[i], "Always") == 0) {
xparms.backing_store = Always;
} else usage ();
} else
invalid_arg(argv[i], argv[i-1]);
} else if ((strcmp(argv[i], "-version") == 0) ||
(strcmp(argv[i], "--version") == 0)) {
puts(PACKAGE_STRING);
exit(EXIT_SUCCESS);
} else if ((strcmp(argv[i], "-help") == 0) ||
(strcmp(argv[i], "--help") == 0)) {
i++;
/* default is to just show general options */
if (argc <= i || (strcmp(argv[i], "options") == 0)) {
usage (USAGE_OPTIONS, EXIT_SUCCESS);
}
else if (strcmp(argv[i], "tests") == 0) {
usage (USAGE_TESTS, EXIT_SUCCESS);
}
else if (strcmp(argv[i], "all") == 0) {
usage (USAGE_ALL, EXIT_SUCCESS);
}
else {
invalid_arg(argv[i], argv[i-1]);
}
} else {
int len,found;
ForEachTest (j) {
@ -1098,8 +1143,11 @@ main(int argc, char *argv[])
doit[j] = found = True;
}
}
if(!found)
usage ();
if (!found) {
fprintf(stderr,
"Error: unrecognized option %s\n", argv[i]);
usage (USAGE_OPTIONS, EXIT_FAILURE);
}
LegalOption:
foundOne = True;
}
@ -1174,8 +1222,10 @@ main(int argc, char *argv[])
exit(0);
}
if (!foundOne)
usage ();
if (!foundOne) {
fprintf(stderr, "Error: no argument found for which test(s) to run\n");
usage (USAGE_OPTIONS, EXIT_FAILURE);
}
xparms.d = Open_Display (displayName);
screen = DefaultScreen(xparms.d);
@ -1292,7 +1342,7 @@ main(int argc, char *argv[])
HSy = HEIGHT-1;
if (window_y + 1 + HEIGHT > DisplayHeight(xparms.d, screen))
HSy = DisplayHeight(xparms.d, screen) - (1 + window_y + 1);
status = CreatePerfWindow(&xparms, window_x, HEIGHT+5, WIDTH, 20);
status = CreatePerfWindow(&xparms, window_x, window_y + HEIGHT+3, WIDTH, 20);
tgcv.foreground =
AllocateColor(xparms.d, "black", BlackPixel(xparms.d, screen));
tgcv.background =
@ -1421,7 +1471,7 @@ GetWords (int argi, int argc, char **argv, char **wordsp, int *nump)
int count;
if (argc <= argi)
usage();
missing_arg(argv[argi-1]);
count = 0;
while (argv[argi] && *(argv[argi]) != '-') {
*wordsp++ = argv[argi];
@ -1496,7 +1546,7 @@ GetRops (int argi, int argc, char **argv, int *ropsp, int *nump)
}
}
if (rop == NUM_ROPS) {
usage ();
usage (USAGE_OPTIONS, EXIT_FAILURE);
fprintf (stderr, "unknown rop name %s\n", words[i]);
}
}
@ -1528,7 +1578,7 @@ GetPops (int argi, int argc, char **argv, int *popsp, int *nump)
}
}
if (pop == NUM_POPS) {
usage ();
usage (USAGE_OPTIONS, EXIT_FAILURE);
fprintf (stderr, "unknown picture op name %s\n", words[i]);
}
}
@ -1573,7 +1623,7 @@ GetFormats (int argi, int argc, char **argv, int *formatsp, int *nump)
}
format = FormatFromName (words[i]);
if (format < 0) {
usage ();
usage (USAGE_OPTIONS, EXIT_FAILURE);
fprintf (stderr, "unknown format name %s\n", words[i]);
}
formatsp[i] = format;

View file

@ -61,12 +61,17 @@ typedef unsigned char Version;
#define VERSION1_4 ((Version)(1 << 2))
#define VERSION1_5 ((Version)(1 << 3))
#define VERSION1_6 ((Version)(1 << 4))
#define VERSION1_7 ((Version)(1 << 5))
#define V1_2ONLY VERSION1_2
#define V1_2FEATURE (VERSION1_2 | VERSION1_3 | VERSION1_4 | VERSION1_5 | VERSION1_6)
#define V1_3FEATURE (VERSION1_3 | VERSION1_4 | VERSION1_5 | VERSION1_6)
#define V1_4FEATURE (VERSION1_4 | VERSION1_5 | VERSION1_6)
#define V1_5FEATURE (VERSION1_5 | VERSION1_6)
#define V1_6FEATURE (VERSION1_6)
/* Each V1_*FEATURE flag includes all later versions */
#define V1_7FEATURE (VERSION1_7)
#define V1_6FEATURE (VERSION1_6 | V1_7FEATURE)
#define V1_5FEATURE (VERSION1_5 | V1_6FEATURE)
#define V1_4FEATURE (VERSION1_4 | V1_5FEATURE)
#define V1_3FEATURE (VERSION1_3 | V1_4FEATURE)
#define V1_2FEATURE (VERSION1_2 | V1_3FEATURE)
typedef struct _Parms {
/* Required fields */