ReactOS 0.4.16-dev-122-g325d74c
pcfutil.h File Reference
#include <ft2build.h>
Include dependency graph for pcfutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER BitOrderInvert (unsigned char *buf, size_t nbytes)
 
 TwoByteSwap (unsigned char *buf, size_t nbytes)
 
 FourByteSwap (unsigned char *buf, size_t nbytes)
 

Function Documentation

◆ BitOrderInvert()

FT_BEGIN_HEADER BitOrderInvert ( unsigned char buf,
size_t  nbytes 
)

Definition at line 44 of file pcfutil.c.

46 {
47 for ( ; nbytes > 0; nbytes--, buf++ )
48 {
49 unsigned int val = *buf;
50
51
52 val = ( ( val >> 1 ) & 0x55 ) | ( ( val << 1 ) & 0xAA );
53 val = ( ( val >> 2 ) & 0x33 ) | ( ( val << 2 ) & 0xCC );
54 val = ( ( val >> 4 ) & 0x0F ) | ( ( val << 4 ) & 0xF0 );
55
56 *buf = (unsigned char)val;
57 }
58 }
unsigned char
Definition: typeof.h:29
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLfloat * val
Definition: glext.h:7180

Referenced by PCF_Glyph_Load().

◆ FourByteSwap()

FourByteSwap ( unsigned char buf,
size_t  nbytes 
)

Definition at line 85 of file pcfutil.c.

87 {
88 for ( ; nbytes >= 4; nbytes -= 4, buf += 4 )
89 {
90 unsigned char c;
91
92
93 c = buf[0];
94 buf[0] = buf[3];
95 buf[3] = c;
96
97 c = buf[1];
98 buf[1] = buf[2];
99 buf[2] = c;
100 }
101 }
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80

Referenced by PCF_Glyph_Load().

◆ TwoByteSwap()

TwoByteSwap ( unsigned char buf,
size_t  nbytes 
)

Definition at line 66 of file pcfutil.c.

68 {
69 for ( ; nbytes >= 2; nbytes -= 2, buf += 2 )
70 {
71 unsigned char c;
72
73
74 c = buf[0];
75 buf[0] = buf[1];
76 buf[1] = c;
77 }
78 }

Referenced by PCF_Glyph_Load().