⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfbteblt8.c

📁 远程桌面连接工具
💻 C
📖 第 1 页 / 共 2 页
字号:
/* * TEGblt - ImageText expanded glyph fonts only.  For * 8 bit displays, in Copy mode with no clipping. *//*Copyright (c) 1989  X ConsortiumPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THEX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER INAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Except as contained in this notice, the name of the X Consortium shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from the X Consortium.*//* $XConsortium: cfbteblt8.c,v 5.24 94/09/29 15:26:00 dpw Exp $ */#if PSZ == 8#include	"X.h"#include	"Xmd.h"#include	"Xproto.h"#include	"cfb.h"#include	"fontstruct.h"#include	"dixfontstr.h"#include	"gcstruct.h"#include	"windowstr.h"#include	"scrnintstr.h"#include	"pixmapstr.h"#include	"regionstr.h"#include	"cfbmskbits.h"#include	"cfb8bit.h"/* * this code supports up to 5 characters at a time.  The performance * differences between 4 and 5 is usually small (~7% on PMAX) and * frequently negative (SPARC and Sun3), so this file is compiled * only once for now.  If you want to use the other options, you'll * need to hack cfbgc.c as well. */#ifndef NGLYPHS#define NGLYPHS 4#define DO_COMMON#endif#ifdef DO_COMMON#define CFBTEGBLT8 cfbTEGlyphBlt8#endif/* * On little-endian machines (or where fonts are padded to 32-bit * boundaries) we can use some magic to avoid the expense of getleftbits */#if ((BITMAP_BIT_ORDER == LSBFirst && NGLYPHS >= 4) || GLYPHPADBYTES == 4)#if GLYPHPADBYTES == 1typedef unsigned char	*glyphPointer;#define USE_LEFTBITS#endif#if GLYPHPADBYTES == 2typedef unsigned short	*glyphPointer;#define USE_LEFTBITS#endif#if GLYPHPADBYTES == 4typedef unsigned int	*glyphPointer;#endif#define GetBitsL       c = BitLeft (*leftChar++, lshift)#define NGetBits1S(r)   c = BitRight(*char1++ r, xoff1)#define NGetBits1L(r)   GetBitsL | BitRight(*char1++ r, xoff1)#define NGetBits1U(r)   c = *char1++ r#define NGetBits2S(r)   NGetBits1S(| BitRight(*char2++ r, widthGlyph))#define NGetBits2L(r)   NGetBits1L(| BitRight(*char2++ r, widthGlyph))#define NGetBits2U(r)   NGetBits1U(| BitRight(*char2++ r, widthGlyph))#define NGetBits3S(r)   NGetBits2S(| BitRight(*char3++ r, widthGlyph))#define NGetBits3L(r)   NGetBits2L(| BitRight(*char3++ r, widthGlyph))#define NGetBits3U(r)   NGetBits2U(| BitRight(*char3++ r, widthGlyph))#define NGetBits4S(r)   NGetBits3S(| BitRight(*char4++ r, widthGlyph))#define NGetBits4L(r)   NGetBits3L(| BitRight(*char4++ r, widthGlyph))#define NGetBits4U(r)   NGetBits3U(| BitRight(*char4++ r, widthGlyph))#define NGetBits5S(r)   NGetBits4S(| BitRight(*char5++ r, widthGlyph))#define NGetBits5L(r)   NGetBits4L(| BitRight(*char5++ r, widthGlyph))#define NGetBits5U(r)   NGetBits4U(| BitRight(*char5++ r, widthGlyph))#define GetBits1S   c = BitRight(*char1++, xoff1)#define GetBits1L   GetBitsL | BitRight(*char1++, xoff1)#define GetBits1U   c = *char1++#define GetBits2S   NGetBits1S(| BitRight(*char2++, widthGlyph))#define GetBits2L   NGetBits1L(| BitRight(*char2++, widthGlyph))#define GetBits2U   NGetBits1U(| BitRight(*char2++, widthGlyph))#define GetBits3S   NGetBits2S(| BitRight(*char3++, widthGlyph))#define GetBits3L   NGetBits2L(| BitRight(*char3++, widthGlyph))#define GetBits3U   NGetBits2U(| BitRight(*char3++, widthGlyph))#define GetBits4S   NGetBits3S(| BitRight(*char4++, widthGlyph))#define GetBits4L   NGetBits3L(| BitRight(*char4++, widthGlyph))#define GetBits4U   NGetBits3U(| BitRight(*char4++, widthGlyph))#define GetBits5S   NGetBits4S(| BitRight(*char5++, widthGlyph))#define GetBits5L   NGetBits4L(| BitRight(*char5++, widthGlyph))#define GetBits5U   NGetBits4U(| BitRight(*char5++, widthGlyph))#elsetypedef unsigned int	*glyphPointer;#define USE_LEFTBITS#define ALL_LEFTBITS#define GetBitsL    WGetBitsL#define GetBits1S   WGetBits1S#define GetBits1L   WGetBits1L#define GetBits1U   WGetBits1U#define GetBits2S   GetBits1S Get1Bits (char2, tmpSrc) \		    c |= BitRight(tmpSrc, xoff2);#define GetBits2L   GetBits1L Get1Bits (char2, tmpSrc) \		    c |= BitRight(tmpSrc, xoff2);#define GetBits2U   GetBits1U Get1Bits (char2, tmpSrc) \		    c |= BitRight(tmpSrc, xoff2);#define GetBits3S   GetBits2S Get1Bits (char3, tmpSrc) \		    c |= BitRight(tmpSrc, xoff3);#define GetBits3L   GetBits2L Get1Bits (char3, tmpSrc) \		    c |= BitRight(tmpSrc, xoff3);#define GetBits3U   GetBits2U Get1Bits (char3, tmpSrc) \		    c |= BitRight(tmpSrc, xoff3);#define GetBits4S   GetBits3S Get1Bits (char4, tmpSrc) \		    c |= BitRight(tmpSrc, xoff4);#define GetBits4L   GetBits3L Get1Bits (char4, tmpSrc) \		    c |= BitRight(tmpSrc, xoff4);#define GetBits4U   GetBits3U Get1Bits (char4, tmpSrc) \		    c |= BitRight(tmpSrc, xoff4);#define GetBits5S   GetBits4S Get1Bits (char5, tmpSrc) \		    c |= BitRight(tmpSrc, xoff5);#define GetBits5L   GetBits4L Get1Bits (char5, tmpSrc) \		    c |= BitRight(tmpSrc, xoff5);#define GetBits5U   GetBits4U Get1Bits (char5, tmpSrc) \		    c |= BitRight(tmpSrc, xoff5);#endif#ifdef USE_LEFTBITSextern unsigned long endtab[];#define IncChar(c)  (c = (glyphPointer) (((char *) c) + glyphBytes))#define Get1Bits(ch,dst)    glyphbits (ch, widthGlyph, glyphMask, dst); \			    IncChar (ch);#define glyphbits(bits,width,mask,dst)	getleftbits(bits,width,dst); \					dst &= mask;#define WGetBitsL   Get1Bits(leftChar,c); \		    c = BitLeft (c, lshift);#define WGetBits1S  Get1Bits (char1, c) \		    c = BitRight (c, xoff1);#define WGetBits1L  WGetBitsL Get1Bits (char1, tmpSrc) \		    c |= BitRight (tmpSrc, xoff1);#define WGetBits1U  Get1Bits (char1, c)#else#define WGetBitsL   GetBitsL#define WGetBits1S  GetBits1S#define WGetBits1L  GetBits1L#define WGetBits1U  GetBits1U#endif#if NGLYPHS == 2# define GetBitsNS GetBits2S# define GetBitsNL GetBits2L# define GetBitsNU GetBits2U# define LastChar char2#ifndef CFBTEGBLT8# define CFBTEGBLT8 cfbTEGlyphBlt8x2#endif#endif#if NGLYPHS == 3# define GetBitsNS GetBits3S# define GetBitsNL GetBits3L# define GetBitsNU GetBits3U# define LastChar char3#ifndef CFBTEGBLT8# define CFBTEGBLT8 cfbTEGlyphBlt8x3#endif#endif#if NGLYPHS == 4# define GetBitsNS GetBits4S# define GetBitsNL GetBits4L# define GetBitsNU GetBits4U# define LastChar char4#ifndef CFBTEGBLT8# define CFBTEGBLT8 cfbTEGlyphBlt8x4#endif#endif#if NGLYPHS == 5# define GetBitsNS GetBits5S# define GetBitsNL GetBits5L# define GetBitsNU GetBits5U# define LastChar char5#ifndef CFBTEGBLT8# define CFBTEGBLT8 cfbTEGlyphBlt8x5#endif#endif/* another ugly giant macro */#define SwitchEm    switch (ew) \		    { \		    case 0: \		    	break; \		    case 1: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 \			    Loop \		    	} \		    	break; \		    case 2: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) \			    Loop \		    	} \		    	break; \		    case 3: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step StoreBits(2) \			    Loop \		    	} \		    	break; \		    case 4: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step \			    StoreBits(2) Step StoreBits(3) \			    Loop \		    	} \		    	break; \		    case 5: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step \			    StoreBits(2) Step StoreBits(3) Step \			    StoreBits(4) \			    Loop \		    	} \		    	break; \		    case 6: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step \ 			    StoreBits(2) Step StoreBits(3) Step \			    StoreBits(4) Step StoreBits(5) \			    Loop \		    	} \		    	break; \		    case 7: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step \			    StoreBits(2) Step StoreBits(3) Step \			    StoreBits(4) Step StoreBits(5) Step \			    StoreBits(6) \			    Loop \		    	} \		    	break; \		    case 8: \		    	while (hTmp--) { \			    GetBits; \			    StoreBits0 FirstStep StoreBits(1) Step \			    StoreBits(2) Step StoreBits(3) Step \			    StoreBits(4) Step StoreBits(5) Step \			    StoreBits(6) Step StoreBits(7) \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -