本文整理汇总了C++中MIN_BYTES_PER_CHAR函数的典型用法代码示例。如果您正苦于以下问题:C++ MIN_BYTES_PER_CHAR函数的具体用法?C++ MIN_BYTES_PER_CHAR怎么用?C++ MIN_BYTES_PER_CHAR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MIN_BYTES_PER_CHAR函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: internalSubset
static int PTRCALL
internalSubset(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_DECL_OPEN:
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_ENTITY)) {
state->handler = entity0;
return XML_ROLE_ENTITY_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_ATTLIST)) {
state->handler = attlist0;
return XML_ROLE_ATTLIST_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_ELEMENT)) {
state->handler = element0;
return XML_ROLE_ELEMENT_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_NOTATION)) {
state->handler = notation0;
return XML_ROLE_NOTATION_NONE;
}
break;
case XML_TOK_PI:
return XML_ROLE_PI;
case XML_TOK_COMMENT:
return XML_ROLE_COMMENT;
case XML_TOK_PARAM_ENTITY_REF:
return XML_ROLE_PARAM_ENTITY_REF;
case XML_TOK_CLOSE_BRACKET:
state->handler = doctype5;
return XML_ROLE_DOCTYPE_NONE;
case XML_TOK_NONE:
return XML_ROLE_NONE;
}
return common(state, tok);
}
示例2: prolog0
static
int prolog0(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
state->handler = prolog1;
return XML_ROLE_NONE;
case XML_TOK_XML_DECL:
state->handler = prolog1;
return XML_ROLE_XML_DECL;
case XML_TOK_PI:
state->handler = prolog1;
return XML_ROLE_NONE;
case XML_TOK_COMMENT:
state->handler = prolog1;
case XML_TOK_BOM:
return XML_ROLE_NONE;
case XML_TOK_DECL_OPEN:
if (!XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
"DOCTYPE"))
break;
state->handler = doctype0;
return XML_ROLE_NONE;
case XML_TOK_INSTANCE_START:
state->handler = error;
return XML_ROLE_INSTANCE_START;
}
return syntaxError(state);
}
示例3: prolog1
static int PTRCALL
prolog1(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_PI:
return XML_ROLE_PI;
case XML_TOK_COMMENT:
return XML_ROLE_COMMENT;
case XML_TOK_BOM:
return XML_ROLE_NONE;
case XML_TOK_DECL_OPEN:
if (!XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_DOCTYPE))
break;
state->handler = doctype0;
return XML_ROLE_DOCTYPE_NONE;
case XML_TOK_INSTANCE_START:
state->handler = error;
return XML_ROLE_INSTANCE_START;
}
return common(state, tok);
}
示例4: internalSubset
static
int internalSubset(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_DECL_OPEN:
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
"ENTITY")) {
state->handler = entity0;
return XML_ROLE_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
"ATTLIST")) {
state->handler = attlist0;
return XML_ROLE_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
"ELEMENT")) {
state->handler = element0;
return XML_ROLE_NONE;
}
if (XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
"NOTATION")) {
state->handler = notation0;
return XML_ROLE_NONE;
}
break;
case XML_TOK_PI:
case XML_TOK_COMMENT:
return XML_ROLE_NONE;
case XML_TOK_PARAM_ENTITY_REF:
return XML_ROLE_PARAM_ENTITY_REF;
case XML_TOK_CLOSE_BRACKET:
state->handler = doctype5;
return XML_ROLE_NONE;
}
return syntaxError(state);
}
示例5: attlist8
/* default value */
static
int attlist8(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
cmExpatUnused(ptr);
cmExpatUnused(end);
cmExpatUnused(enc);
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_POUND_NAME:
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
end,
KW_IMPLIED)) {
state->handler = attlist1;
return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
}
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
end,
KW_REQUIRED)) {
state->handler = attlist1;
return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
}
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
end,
KW_FIXED)) {
state->handler = attlist9;
return XML_ROLE_NONE;
}
break;
case XML_TOK_LITERAL:
state->handler = attlist1;
return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
}
return common(state, tok);
}
示例6: attlist8
/* default value */
static
int attlist8(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_POUND_NAME:
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
"IMPLIED")) {
state->handler = attlist1;
return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
}
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
"REQUIRED")) {
state->handler = attlist1;
return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
}
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
"FIXED")) {
state->handler = attlist9;
return XML_ROLE_NONE;
}
break;
case XML_TOK_LITERAL:
state->handler = attlist1;
return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
}
return syntaxError(state);
}
示例7: element2
static
int element2(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
cmExpatUnused(ptr);
cmExpatUnused(end);
cmExpatUnused(enc);
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_POUND_NAME:
if (XmlNameMatchesAscii(enc,
ptr + MIN_BYTES_PER_CHAR(enc),
end,
KW_PCDATA)) {
state->handler = element3;
return XML_ROLE_CONTENT_PCDATA;
}
break;
case XML_TOK_OPEN_PAREN:
state->level = 2;
state->handler = element6;
return XML_ROLE_GROUP_OPEN;
case XML_TOK_NAME:
case XML_TOK_PREFIXED_NAME:
state->handler = element7;
return XML_ROLE_CONTENT_ELEMENT;
case XML_TOK_NAME_QUESTION:
state->handler = element7;
return XML_ROLE_CONTENT_ELEMENT_OPT;
case XML_TOK_NAME_ASTERISK:
state->handler = element7;
return XML_ROLE_CONTENT_ELEMENT_REP;
case XML_TOK_NAME_PLUS:
state->handler = element7;
return XML_ROLE_CONTENT_ELEMENT_PLUS;
}
return common(state, tok);
}
示例8: prolog1
static int PTRCALL
prolog1(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_PI:
return XML_ROLE_PI;
case XML_TOK_COMMENT:
return XML_ROLE_COMMENT;
case XML_TOK_BOM:
/* This case can never arise. To reach this role function, the
* parse must have passed through prolog0 and therefore have had
* some form of input, even if only a space. At that point, a
* byte order mark is no longer a valid character (though
* technically it should be interpreted as a non-breaking space),
* so will be rejected by the tokenizing stages.
*/
return XML_ROLE_NONE; /* LCOV_EXCL_LINE */
case XML_TOK_DECL_OPEN:
if (!XmlNameMatchesAscii(enc,
ptr + 2 * MIN_BYTES_PER_CHAR(enc),
end,
KW_DOCTYPE))
break;
state->handler = doctype0;
return XML_ROLE_DOCTYPE_NONE;
case XML_TOK_INSTANCE_START:
state->handler = error;
return XML_ROLE_INSTANCE_START;
}
return common(state, tok);
}