CciByte cpiBufferByte( int* returnCode, CciParser* parser, CciSize index);
返回了请求的字节。如果发生错误,则 returnCode 表明错误原因。
此示例取自样本解析器文件 BipSampPluginParser.c(61 行到 75 行):
void advance( PARSER_CONTEXT_ST* context, CciParser* parser ){ int rc = 0; /* Advance to the next character */ context->iIndex++; /* Detect and handle the end condition */ if (context->iIndex == context->iSize) return; /* Obtain the next character from the buffer */ context->iCurrentCharacter = cpiBufferByte(&rc, parser, context->iIndex); }