diff options
| author | roco <[email protected]> | 2012-04-30 14:29:19 -0700 |
|---|---|---|
| committer | roco <[email protected]> | 2012-04-30 14:29:19 -0700 |
| commit | 4ec6d41f16e20fadc6f4c0de363a26a59a1a13fb (patch) | |
| tree | 40539734fd32004652f7c98e2b88921aa57c8b25 /src/transcode_data.h | |
| parent | 6b739d91735fe83bd29f6ca8505c00d530e85584 (diff) | |
| download | mruby-4ec6d41f16e20fadc6f4c0de363a26a59a1a13fb.tar.gz mruby-4ec6d41f16e20fadc6f4c0de363a26a59a1a13fb.zip | |
rm whitespace
Diffstat (limited to 'src/transcode_data.h')
| -rw-r--r-- | src/transcode_data.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/transcode_data.h b/src/transcode_data.h index 7ff540120..62051701a 100644 --- a/src/transcode_data.h +++ b/src/transcode_data.h @@ -22,20 +22,20 @@ #define PType (unsigned int) -#define NOMAP (PType 0x01) /* direct map */ -#define ONEbt (0x02) /* one byte payload */ -#define TWObt (0x03) /* two bytes payload */ -#define THREEbt (0x05) /* three bytes payload */ -#define FOURbt (0x06) /* four bytes payload, UTF-8 only, macros start at getBT0 */ -#define INVALID (PType 0x07) /* invalid byte sequence */ -#define UNDEF (PType 0x09) /* legal but undefined */ -#define ZERObt (PType 0x0A) /* zero bytes of payload, i.e. remove */ -#define FUNii (PType 0x0B) /* function from info to info */ -#define FUNsi (PType 0x0D) /* function from start to info */ -#define FUNio (PType 0x0E) /* function from info to output */ -#define FUNso (PType 0x0F) /* function from start to output */ -#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */ -#define GB4bt (PType 0x12) /* GB18030 four bytes payload */ +#define NOMAP (PType 0x01) /* direct map */ +#define ONEbt (0x02) /* one byte payload */ +#define TWObt (0x03) /* two bytes payload */ +#define THREEbt (0x05) /* three bytes payload */ +#define FOURbt (0x06) /* four bytes payload, UTF-8 only, macros start at getBT0 */ +#define INVALID (PType 0x07) /* invalid byte sequence */ +#define UNDEF (PType 0x09) /* legal but undefined */ +#define ZERObt (PType 0x0A) /* zero bytes of payload, i.e. remove */ +#define FUNii (PType 0x0B) /* function from info to info */ +#define FUNsi (PType 0x0D) /* function from start to info */ +#define FUNio (PType 0x0E) /* function from info to output */ +#define FUNso (PType 0x0F) /* function from start to output */ +#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */ +#define GB4bt (PType 0x12) /* GB18030 four bytes payload */ #define FUNsio (PType 0x13) /* function from start and info to output */ #define STR1_LENGTH(byte_addr) (unsigned int)(*(byte_addr) + 4) @@ -43,24 +43,24 @@ #define makeSTR1(bi) (((bi) << 6) | STR1) #define makeSTR1LEN(len) ((len)-4) -#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt)) -#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt)) -#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU)) -#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU)) +#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt)) +#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt)) +#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU)) +#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU)) #define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU)) -#define funsio(diff) (PType((((unsigned int)(diff))<<8)|FUNsio)) +#define funsio(diff) (PType((((unsigned int)(diff))<<8)|FUNsio)) -#define getBT1(a) ((unsigned char)((a)>> 8)) -#define getBT2(a) ((unsigned char)((a)>>16)) -#define getBT3(a) ((unsigned char)((a)>>24)) -#define getBT0(a) (((unsigned char)((a)>> 5)&0x07)|0xF0) /* for UTF-8 only!!! */ +#define getBT1(a) ((unsigned char)((a)>> 8)) +#define getBT2(a) ((unsigned char)((a)>>16)) +#define getBT3(a) ((unsigned char)((a)>>24)) +#define getBT0(a) (((unsigned char)((a)>> 5)&0x07)|0xF0) /* for UTF-8 only!!! */ -#define getGB4bt0(a) ((unsigned char)((a)>> 8)) -#define getGB4bt1(a) ((((unsigned char)((a)>>24))&0x0F)|0x30) -#define getGB4bt2(a) ((unsigned char)((a)>>16)) -#define getGB4bt3(a) ((((unsigned char)((a)>>28))&0x0F)|0x30) +#define getGB4bt0(a) ((unsigned char)((a)>> 8)) +#define getGB4bt1(a) ((((unsigned char)((a)>>24))&0x0F)|0x30) +#define getGB4bt2(a) ((unsigned char)((a)>>16)) +#define getGB4bt3(a) ((((unsigned char)((a)>>28))&0x0F)|0x30) -#define o2FUNii(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii)) +#define o2FUNii(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii)) /* do we need these??? maybe not, can be done with simple tables */ #define ONETRAIL /* legal but undefined if one more trailing UTF-8 */ |
