本文整理汇总了C++中pj_scan_syntax_err函数的典型用法代码示例。如果您正苦于以下问题:C++ pj_scan_syntax_err函数的具体用法?C++ pj_scan_syntax_err怎么用?C++ pj_scan_syntax_err使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pj_scan_syntax_err函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: PJ_DEF
PJ_DEF(void) pj_scan_get_newline( pj_scanner *scanner )
{
if (!PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
pj_scan_syntax_err(scanner);
return;
}
if (*scanner->curptr == '\r') {
++scanner->curptr;
}
if (*scanner->curptr == '\n') {
++scanner->curptr;
}
++scanner->line;
scanner->start_line = scanner->curptr;
/**
* This probably is a bug, see PROTOS test #2480.
* This would cause scanner to incorrectly eat two new lines, e.g.
* when parsing:
*
* Content-Length: 120\r\n
* \r\n
* <space><space><space>...
*
* When pj_scan_get_newline() is called to parse the first newline
* in the Content-Length header, it will eat the second newline
* too because it thinks that it's a header continuation.
*
* if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
* pj_scan_skip_whitespace(scanner);
* }
*/
}
开发者ID:0x0B501E7E,项目名称:pjproject,代码行数:35,代码来源:scanner.c
示例2: pj_scan_strcmp
int pj_scan_strcmp( pj_scanner *scanner, const char *s, int len)
{
if (scanner->curptr + len > scanner->end) {
pj_scan_syntax_err(scanner);
return -1;
}
return strncmp(scanner->curptr, s, len);
}
开发者ID:zndxlx,项目名称:pjsip_r,代码行数:8,代码来源:scanner.c
注:本文中的pj_scan_syntax_err函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论