diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-08-27 06:50:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-08-27 06:50:04 +0000 |
commit | 5be1284ad4dfcc91b69d77be0a1fd7155a6591e3 (patch) | |
tree | 497b292909f762bf82cdf78066f6d0714353f8ab /regress | |
parent | 865c418d0c20d4f26367f8e947c17e3f00f0d9d7 (diff) |
backout unapproved diff
Diffstat (limited to 'regress')
-rw-r--r-- | regress/misc/X11/bltone/bltone.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/regress/misc/X11/bltone/bltone.c b/regress/misc/X11/bltone/bltone.c index 3848afc5080..6fcc619789f 100644 --- a/regress/misc/X11/bltone/bltone.c +++ b/regress/misc/X11/bltone/bltone.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bltone.c,v 1.2 2005/08/25 19:41:23 kettenis Exp $ */ +/* $OpenBSD: bltone.c,v 1.3 2005/08/27 06:50:03 deraadt Exp $ */ /* * Written by Mark Kettenis <kettenis@openbsd.org> 2004 Public Domain */ @@ -13,45 +13,45 @@ typedef unsigned FbStip; typedef unsigned FbBits; typedef int FbStride; -extern void fbBltOne (FbStip *, FbStride, int, FbBits *, FbStride, int, int, - int, int, FbBits, FbBits, FbBits, FbBits); +extern void fbBltOne24 (FbStip *, FbStride, int, FbBits *, FbStride, int, int, + int, int, FbBits, FbBits, FbBits, FbBits); FbStip mask[] = { 0x77ff7700, 0x11335577 }; int main (void) { - int pagesize; - FbStip *src; - FbBits *dst; - int srcX, dstX; - int dstBpp; - - pagesize = getpagesize(); - - src = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); - assert(src); - - dst = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); - assert(dst); - - mprotect((char *)src + pagesize, pagesize, PROT_NONE); - src = (FbStip *)((char *)src + (pagesize - sizeof mask)); - memcpy (src, mask, sizeof mask); - - for (dstBpp = 8; dstBpp <= 32; dstBpp += 8) - for (dstX = 0; dstX < 64; dstX += 8) - for (srcX = 0; srcX < 32; srcX++) - fbBltOne(src, 1, srcX, dst, 128, dstX, dstBpp, - (32 - srcX) * dstBpp, 2, - 0, 0, 0xffffffff, 0); - - for (dstBpp = 8; dstBpp <= 32; dstBpp += 8) - for (dstX = 0; dstX < 64; dstX += 8) - for (srcX = 0; srcX < 32; srcX++) - fbBltOne(src, 1, srcX, dst, 128, dstX, dstBpp, - (64 - srcX) * dstBpp, 1, - 0, 0, 0xffffffff, 0); + int pagesize; + FbStip *src; + FbBits *dst; + int srcX, dstX; + int dstBpp; + + pagesize = getpagesize(); + + src = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); + assert (src); + + dst = mmap(NULL, 2 * pagesize, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); + assert (dst); + + mprotect((char *)src + pagesize, pagesize, PROT_NONE); + src = (FbStip *)((char *)src + (pagesize - sizeof mask)); + memcpy (src, mask, sizeof mask); + + for (dstBpp = 8; dstBpp <= 32; dstBpp += 8) + for (dstX = 0; dstX < 64; dstX += 8) + for (srcX = 0; srcX < 32; srcX++) + fbBltOne(src, 1, srcX, dst, 128, dstX, dstBpp, + (32 - srcX) * dstBpp, 2, + 0, 0, 0xffffffff, 0); + + for (dstBpp = 8; dstBpp <= 32; dstBpp += 8) + for (dstX = 0; dstX < 64; dstX += 8) + for (srcX = 0; srcX < 32; srcX++) + fbBltOne(src, 1, srcX, dst, 128, dstX, dstBpp, + (64 - srcX) * dstBpp, 1, + 0, 0, 0xffffffff, 0); return 0; } |