Commit Graph

7 Commits

Author SHA1 Message Date
Adam Jackson 8d985c1e69 shadow: Macro cleanup
shadowDamage is just obfuscation. The other two macros won't work
outside shadow.c since the private key is in fact static there (meaning
the extern decl is a lie).

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2016-12-12 14:10:44 -05:00
Michal Suchanek 1339681e4f miext: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:04 +01:00
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Cyril Brulebois f41ac25d93 miext: Mark some variables as unused.
There's no use for the values set through the various macro calls
(fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused.

The following warnings go away accordingly:
|   CC     shpacked.lo
| shpacked.c: In function 'shadowUpdatePacked':
| shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shplanar8.lo
| shplanar8.c: In function 'shadowUpdatePlanar4x8':
| shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shplanar.lo
| shplanar.c: In function 'shadowUpdatePlanar4':
| shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_180.lo
| In file included from shrot16pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_270.lo
| In file included from shrot16pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_270YX.lo
| In file included from shrot16pack_270YX.c:31:0:
| shrotpackYX.h: In function 'shadowUpdateRotate16_270YX':
| shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_90.lo
| In file included from shrot16pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_90YX.lo
| In file included from shrot16pack_90YX.c:31:0:
| shrotpackYX.h: In function 'shadowUpdateRotate16_90YX':
| shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack.lo
| In file included from shrot16pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate16':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_180.lo
| In file included from shrot32pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_270.lo
| In file included from shrot32pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_90.lo
| In file included from shrot32pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack.lo
| In file included from shrot32pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate32':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_180.lo
| In file included from shrot8pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_270.lo
| In file included from shrot8pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_90.lo
| In file included from shrot8pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack.lo
| In file included from shrot8pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate8':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrotate.lo
| shrotate.c: In function 'shadowUpdateRotatePacked':
| shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shpacked.lo
| shpacked.c: In function 'shadowUpdatePacked':
| shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shplanar8.lo
| shplanar8.c: In function 'shadowUpdatePlanar4x8':
| shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shplanar.lo
| shplanar.c: In function 'shadowUpdatePlanar4':
| shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_180.lo
| In file included from shrot16pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_270.lo
| In file included from shrot16pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_270YX.lo
| In file included from shrot16pack_270YX.c:31:0:
| shrotpackYX.h: In function 'shadowUpdateRotate16_270YX':
| shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_90.lo
| In file included from shrot16pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate16_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack_90YX.lo
| In file included from shrot16pack_90YX.c:31:0:
| shrotpackYX.h: In function 'shadowUpdateRotate16_90YX':
| shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot16pack.lo
| In file included from shrot16pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate16':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_180.lo
| In file included from shrot32pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_270.lo
| In file included from shrot32pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack_90.lo
| In file included from shrot32pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate32_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot32pack.lo
| In file included from shrot32pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate32':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_180.lo
| In file included from shrot8pack_180.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_180':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_270.lo
| In file included from shrot8pack_270.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_270':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack_90.lo
| In file included from shrot8pack_90.c:31:0:
| shrotpack.h: In function 'shadowUpdateRotate8_90':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrot8pack.lo
| In file included from shrot8pack.c:30:0:
| shrotpack.h: In function 'shadowUpdateRotate8':
| shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]
|   CC     shrotate.lo
| shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable]
| shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable]

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-16 00:43:56 +02:00
Keith Packard 2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Keith Packard 60d4839a2d Forgot to include this file in previous patch 2006-02-16 19:03:07 +00:00