diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-29 17:12:47 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-29 17:12:47 +0000 |
commit | 08a006d08a4c35d2c3ecc9a3d10cf7fd14661a84 (patch) | |
tree | 0cfc4f0736babb895eb97a65c6defe632a0249c7 /graphics/svgalib/files/patch-src__vgapix.c | |
parent | editors/fte: update to 20110708 (diff) |
Rename all patches that contain '::' as a path separator, and use
'__' instead.
Notes
Notes:
svn path=/head/; revision=363362
Diffstat (limited to 'graphics/svgalib/files/patch-src__vgapix.c')
-rw-r--r-- | graphics/svgalib/files/patch-src__vgapix.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/graphics/svgalib/files/patch-src__vgapix.c b/graphics/svgalib/files/patch-src__vgapix.c new file mode 100644 index 000000000000..cccdddb749d5 --- /dev/null +++ b/graphics/svgalib/files/patch-src__vgapix.c @@ -0,0 +1,33 @@ +--- src/vgapix.c.orig 1999-07-27 18:36:19.000000000 +0200 ++++ src/vgapix.c 2013-01-26 21:14:42.000000000 +0100 +@@ -8,6 +8,7 @@ + /* partially copyrighted (C) 1993 by Hartmut Schirmer */ + /* HH: Added 4bpp support, and use bytesperpixel. */ + ++#include <sys/endian.h> + #include <stdio.h> + #include "vga.h" + #include "libvga.h" +@@ -22,21 +23,8 @@ static inline void read_write(unsigned l + + static inline int RGB2BGR(int c) + { +-/* a bswap would do the same as the first 3 but in only ONE! cycle. */ +-/* However bswap is not supported by 386 */ +- + if (MODEFLAGS & RGB_MISORDERED) +-#ifdef __alpha__ +- c = ((c >> 0) & 0xff) << 16 | +- ((c >> 8) & 0xff) << 8 | +- ((c >> 16) & 0xff) << 0; +-#else +- asm("rorw $8, %0\n" /* 0RGB -> 0RBG */ +- "rorl $16, %0\n" /* 0RBG -> BG0R */ +- "rorw $8, %0\n" /* BG0R -> BGR0 */ +- "shrl $8, %0\n" /* 0BGR -> 0BGR */ +- : "=q"(c):"0"(c)); +-#endif ++ c = bswap32(c) >> 8; + return c; + } + |