CGEM BOSS 6.6.5.g
BESIII Offline Software System
|
#include "xmldef.h"
#include "xmltok.h"
#include "nametab.h"
#include "xmltok_impl.h"
#include "xmltok_impl.c"
#include "asciitab.h"
#include "utf8tab.h"
#include "iasciitab.h"
#include "latin1tab.h"
#include "xmltok_ns.c"
Go to the source code of this file.
Classes | |
struct | normal_encoding |
struct | unknown_encoding |
Macros | |
#define | VTABLE1 |
#define | VTABLE VTABLE1, PREFIX(toUtf8), PREFIX(toUtf16) |
#define | UCS2_GET_NAMING(pages, hi, lo) (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) |
#define | UTF8_GET_NAMING2(pages, byte) |
#define | UTF8_GET_NAMING3(pages, byte) |
#define | UTF8_GET_NAMING(pages, p, n) |
#define | UTF8_INVALID3(p) |
#define | UTF8_INVALID4(p) ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) |
#define | utf8_isName4 isNever |
#define | utf8_isNmstrt4 isNever |
#define | utf8_isInvalid2 isNever |
#define | STANDARD_VTABLE(E) /* as nothing */ |
#define | NORMAL_VTABLE(E) |
#define | MINBPC(enc) 1 |
#define | SB_BYTE_TYPE(enc, p) (((struct normal_encoding *)(enc))->type[(unsigned char)*(p)]) |
#define | BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p) |
#define | BYTE_TO_ASCII(enc, p) (*p) |
#define | IS_NAME_CHAR(enc, p, n) (((const struct normal_encoding *)(enc))->isName ## n(enc, p)) |
#define | IS_NMSTRT_CHAR(enc, p, n) (((const struct normal_encoding *)(enc))->isNmstrt ## n(enc, p)) |
#define | IS_INVALID_CHAR(enc, p, n) (((const struct normal_encoding *)(enc))->isInvalid ## n(enc, p)) |
#define | IS_NAME_CHAR_MINBPC(enc, p) (0) |
#define | IS_NMSTRT_CHAR_MINBPC(enc, p) (0) |
#define | CHAR_MATCHES(enc, p, c) (*(p) == c) |
#define | PREFIX(ident) normal_ ## ident |
#define | BT_COLON BT_NMSTRT |
#define | BT_COLON BT_NMSTRT |
#define | BT_COLON BT_NMSTRT |
#define | BT_COLON BT_NMSTRT |
#define | DEFINE_UTF16_TO_UTF8(E) |
#define | DEFINE_UTF16_TO_UTF16(E) |
#define | SET2(ptr, ch) (((ptr)[0] = ((ch) & 0xff)), ((ptr)[1] = ((ch) >> 8))) |
#define | GET_LO(ptr) ((unsigned char)(ptr)[0]) |
#define | GET_HI(ptr) ((unsigned char)(ptr)[1]) |
#define | SET2(ptr, ch) (((ptr)[0] = ((ch) >> 8)), ((ptr)[1] = ((ch) & 0xFF))) |
#define | GET_LO(ptr) ((unsigned char)(ptr)[1]) |
#define | GET_HI(ptr) ((unsigned char)(ptr)[0]) |
#define | LITTLE2_BYTE_TYPE(enc, p) |
#define | LITTLE2_BYTE_TO_ASCII(enc, p) ((p)[1] == 0 ? (p)[0] : -1) |
#define | LITTLE2_CHAR_MATCHES(enc, p, c) ((p)[1] == 0 && (p)[0] == c) |
#define | LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0]) |
#define | LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0]) |
#define | PREFIX(ident) little2_ ## ident |
#define | MINBPC(enc) 2 |
#define | BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p) |
#define | BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(enc, p) |
#define | CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(enc, p, c) |
#define | IS_NAME_CHAR(enc, p, n) 0 |
#define | IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) |
#define | IS_NMSTRT_CHAR(enc, p, n) (0) |
#define | IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) |
#define | BT_COLON BT_NMSTRT |
#define | BT_COLON BT_NMSTRT |
#define | BIG2_BYTE_TYPE(enc, p) |
#define | BIG2_BYTE_TO_ASCII(enc, p) ((p)[0] == 0 ? (p)[1] : -1) |
#define | BIG2_CHAR_MATCHES(enc, p, c) ((p)[0] == 0 && (p)[1] == c) |
#define | BIG2_IS_NAME_CHAR_MINBPC(enc, p) UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1]) |
#define | BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1]) |
#define | PREFIX(ident) big2_ ## ident |
#define | MINBPC(enc) 2 |
#define | BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p) |
#define | BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(enc, p) |
#define | CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(enc, p, c) |
#define | IS_NAME_CHAR(enc, p, n) 0 |
#define | IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(enc, p) |
#define | IS_NMSTRT_CHAR(enc, p, n) (0) |
#define | IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) |
#define | BT_COLON BT_NMSTRT |
#define | BT_COLON BT_NMSTRT |
#define | INIT_ENC_INDEX(enc) ((enc)->initEnc.isUtf16) |
#define | NS(x) x |
#define | ns(x) x |
Enumerations | |
enum | { UTF8_cval1 = 0x00 , UTF8_cval2 = 0xc0 , UTF8_cval3 = 0xe0 , UTF8_cval4 = 0xf0 } |
enum | { UNKNOWN_ENC = -1 , ISO_8859_1_ENC = 0 , US_ASCII_ENC , UTF_8_ENC , UTF_16_ENC , UTF_16BE_ENC , UTF_16LE_ENC , NO_ENC } |
Functions | |
int | XmlUtf8Encode (int c, char *buf) |
int | XmlUtf16Encode (int charNum, unsigned short *buf) |
int | XmlSizeOfUnknownEncoding () |
ENCODING * | XmlInitUnknownEncoding (void *mem, int *table, int(*convert)(void *userData, const char *p), void *userData) |
#define BIG2_BYTE_TO_ASCII | ( | enc, | |
p | |||
) | ((p)[0] == 0 ? (p)[1] : -1) |
#define BIG2_BYTE_TYPE | ( | enc, | |
p | |||
) |
#define BIG2_CHAR_MATCHES | ( | enc, | |
p, | |||
c | |||
) | ((p)[0] == 0 && (p)[1] == c) |
#define BIG2_IS_NAME_CHAR_MINBPC | ( | enc, | |
p | |||
) | UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1]) |
#define BIG2_IS_NMSTRT_CHAR_MINBPC | ( | enc, | |
p | |||
) | UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1]) |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BT_COLON BT_NMSTRT |
#define BYTE_TO_ASCII | ( | enc, | |
p | |||
) | LITTLE2_BYTE_TO_ASCII(enc, p) |
#define BYTE_TO_ASCII | ( | enc, | |
p | |||
) | BIG2_BYTE_TO_ASCII(enc, p) |
#define BYTE_TYPE | ( | enc, | |
p | |||
) | SB_BYTE_TYPE(enc, p) |
#define BYTE_TYPE | ( | enc, | |
p | |||
) | LITTLE2_BYTE_TYPE(enc, p) |
#define BYTE_TYPE | ( | enc, | |
p | |||
) | BIG2_BYTE_TYPE(enc, p) |
#define CHAR_MATCHES | ( | enc, | |
p, | |||
c | |||
) | LITTLE2_CHAR_MATCHES(enc, p, c) |
#define CHAR_MATCHES | ( | enc, | |
p, | |||
c | |||
) | BIG2_CHAR_MATCHES(enc, p, c) |
#define DEFINE_UTF16_TO_UTF16 | ( | E | ) |
#define IS_INVALID_CHAR | ( | enc, | |
p, | |||
n | |||
) | (((const struct normal_encoding *)(enc))->isInvalid ## n(enc, p)) |
#define IS_NAME_CHAR | ( | enc, | |
p, | |||
n | |||
) | (((const struct normal_encoding *)(enc))->isName ## n(enc, p)) |
#define IS_NAME_CHAR_MINBPC | ( | enc, | |
p | |||
) | LITTLE2_IS_NAME_CHAR_MINBPC(enc, p) |
#define IS_NAME_CHAR_MINBPC | ( | enc, | |
p | |||
) | BIG2_IS_NAME_CHAR_MINBPC(enc, p) |
#define IS_NMSTRT_CHAR | ( | enc, | |
p, | |||
n | |||
) | (((const struct normal_encoding *)(enc))->isNmstrt ## n(enc, p)) |
#define IS_NMSTRT_CHAR_MINBPC | ( | enc, | |
p | |||
) | LITTLE2_IS_NMSTRT_CHAR_MINBPC(enc, p) |
#define IS_NMSTRT_CHAR_MINBPC | ( | enc, | |
p | |||
) | BIG2_IS_NMSTRT_CHAR_MINBPC(enc, p) |
#define LITTLE2_BYTE_TO_ASCII | ( | enc, | |
p | |||
) | ((p)[1] == 0 ? (p)[0] : -1) |
#define LITTLE2_BYTE_TYPE | ( | enc, | |
p | |||
) |
#define LITTLE2_CHAR_MATCHES | ( | enc, | |
p, | |||
c | |||
) | ((p)[1] == 0 && (p)[0] == c) |
#define LITTLE2_IS_NAME_CHAR_MINBPC | ( | enc, | |
p | |||
) | UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0]) |
#define LITTLE2_IS_NMSTRT_CHAR_MINBPC | ( | enc, | |
p | |||
) | UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0]) |
#define NORMAL_VTABLE | ( | E | ) |
#define SB_BYTE_TYPE | ( | enc, | |
p | |||
) | (((struct normal_encoding *)(enc))->type[(unsigned char)*(p)]) |
#define SET2 | ( | ptr, | |
ch | |||
) | (((ptr)[0] = ((ch) & 0xff)), ((ptr)[1] = ((ch) >> 8))) |
#define SET2 | ( | ptr, | |
ch | |||
) | (((ptr)[0] = ((ch) >> 8)), ((ptr)[1] = ((ch) & 0xFF))) |
#define UCS2_GET_NAMING | ( | pages, | |
hi, | |||
lo | |||
) | (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1 << ((lo) & 0x1F))) |
#define UTF8_GET_NAMING2 | ( | pages, | |
byte | |||
) |
#define UTF8_GET_NAMING3 | ( | pages, | |
byte | |||
) |
#define UTF8_INVALID3 | ( | p | ) |
#define UTF8_INVALID4 | ( | p | ) | ((*p) == 0xF4 && ((p)[1] & 0x30) != 0) |
#define VTABLE1 |
anonymous enum |
Enumerator | |
---|---|
UTF8_cval1 | |
UTF8_cval2 | |
UTF8_cval3 | |
UTF8_cval4 |
Definition at line 276 of file xmltok.c.
anonymous enum |
Enumerator | |
---|---|
UNKNOWN_ENC | |
ISO_8859_1_ENC | |
US_ASCII_ENC | |
UTF_8_ENC | |
UTF_16_ENC | |
UTF_16BE_ENC | |
UTF_16LE_ENC | |
NO_ENC |
Definition at line 1343 of file xmltok.c.
ENCODING * XmlInitUnknownEncoding | ( | void * | mem, |
int * | table, | ||
int(*)(void *userData, const char *p) | convert, | ||
void * | userData | ||
) |
Definition at line 1263 of file xmltok.c.
int XmlSizeOfUnknownEncoding | ( | ) |
int XmlUtf16Encode | ( | int | charNum, |
unsigned short * | buf | ||
) |
Definition at line 1150 of file xmltok.c.
int XmlUtf8Encode | ( | int | c, |
char * | buf | ||
) |
Definition at line 1114 of file xmltok.c.
Referenced by XmlInitUnknownEncoding().