BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
xmltok_ns.c File Reference

Go to the source code of this file.

Macros

#define ENCODING_MAX   128
 

Functions

const ENCODING *NS() XmlGetUtf8InternalEncoding ()
 
const ENCODING *NS() XmlGetUtf16InternalEncoding ()
 
int NS() XmlInitEncoding (INIT_ENCODING *p, const ENCODING **encPtr, const char *name)
 
int NS() XmlParseXmlDecl (int isGeneralTextEntity, const ENCODING *enc, const char *ptr, const char *end, const char **badPtr, const char **versionPtr, const char **encodingName, const ENCODING **encoding, int *standalone)
 

Macro Definition Documentation

◆ ENCODING_MAX

#define ENCODING_MAX   128

Function Documentation

◆ XmlGetUtf16InternalEncoding()

const ENCODING *NS() XmlGetUtf16InternalEncoding ( )

Definition at line 6 of file xmltok_ns.c.

7{
8#if XML_BYTE_ORDER == 12
9 return &ns(internal_little2_encoding).enc;
10#elif XML_BYTE_ORDER == 21
11 return &ns(internal_big2_encoding).enc;
12#else
13 const short n = 1;
14 return *(const char *)&n ? &ns(internal_little2_encoding).enc : &ns(internal_big2_encoding).enc;
15#endif
16}
const Int_t n
#define ns(x)
Definition: xmltok.c:1504

◆ XmlGetUtf8InternalEncoding()

const ENCODING *NS() XmlGetUtf8InternalEncoding ( )

Definition at line 1 of file xmltok_ns.c.

2{
3 return &ns(internal_utf8_encoding).enc;
4}

◆ XmlInitEncoding()

int NS() XmlInitEncoding ( INIT_ENCODING *  p,
const ENCODING **  encPtr,
const char *  name 
)

Definition at line 43 of file xmltok_ns.c.

44{
45 int i = getEncodingIndex(name);
46 if (i == UNKNOWN_ENC)
47 return 0;
48 INIT_ENC_INDEX(p) = (char)i;
49 p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
50 p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
51 p->initEnc.updatePosition = initUpdatePosition;
52 p->encPtr = encPtr;
53 *encPtr = &(p->initEnc);
54 return 1;
55}
#define NS(x)
Definition: xmltok.c:1503
#define INIT_ENC_INDEX(enc)
Definition: xmltok.c:1378
@ UNKNOWN_ENC
Definition: xmltok.c:1344

◆ XmlParseXmlDecl()

int NS() XmlParseXmlDecl ( int  isGeneralTextEntity,
const ENCODING *  enc,
const char *  ptr,
const char *  end,
const char **  badPtr,
const char **  versionPtr,
const char **  encodingName,
const ENCODING **  encoding,
int *  standalone 
)

Definition at line 76 of file xmltok_ns.c.

85{
86 return doParseXmlDecl(NS(findEncoding),
87 isGeneralTextEntity,
88 enc,
89 ptr,
90 end,
91 badPtr,
92 versionPtr,
93 encodingName,
94 encoding,
95 standalone);
96}