この関数は、指定したパーサー・オブジェクトについて、 入力メッセージのビット・ストリーム表現が含まれるバッファーから 1 バイトを取得します。 索引引数の値で、バイト配列のどのバイトを戻すかを指示します。
CciByte cpiBufferByte(
int* returnCode,
CciParser* parser,
CciSize index);
要求されたバイトが戻されます。 エラーが発生した場合、returnCode がエラーの理由を示します。
この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています。
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);
}