• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MIN_BYTES_PER_CHAR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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);
}
开发者ID:10sr,项目名称:cpython,代码行数:54,代码来源:xmlrole.c


示例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);
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:34,代码来源:xmlrole.c


示例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);
}
开发者ID:10sr,项目名称:cpython,代码行数:30,代码来源:xmlrole.c


示例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);
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:47,代码来源:xmlrole.c


示例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);
}
开发者ID:0-wiz-0,项目名称:CMake,代码行数:43,代码来源:xmlrole.c


示例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);
}
开发者ID:kamalsirsa,项目名称:vtp,代码行数:37,代码来源:xmlrole.c


示例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);
}
开发者ID:0-wiz-0,项目名称:CMake,代码行数:42,代码来源:xmlrole.c


示例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);
}
开发者ID:RTEMS,项目名称:rtems-libbsd,代码行数:37,代码来源:xmlrole.c



注:本文中的MIN_BYTES_PER_CHAR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MIPI_OUTP函数代码示例发布时间:2022-05-30
下一篇:
C++ MINUTES函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap