Ignore:
Timestamp:
Jan 11, 2008, 6:16:25 AM (11 years ago)
Author:
cameron
Message:

Bytespace scanning in XML declarations; various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/charsets/ext_ascii_16.c

    r8 r15  
    2828
    2929int Ext_ASCII_16BE_Lexer::AdvanceBuffer(int newpos) {
    30   unsigned char * buf_ptr = xml_buf->GetBytePtr(newpos * X16_CODE_UNIT_BYTES);
    31   int avail_bytes = xml_buf->PrepareBytes(X16_BYTE_STREAM_SIZE);
     30  int byte_pos = newpos * X16_CODE_UNIT_BYTES;
     31  int avail_bytes = xml_buf->PrepareBytes(byte_pos, X16_BYTE_STREAM_SIZE);
     32  unsigned char * buf_ptr = xml_buf->BytePtr(byte_pos);
    3233  int new_blocks = min(BUFFER_BLOCKS,
    3334                       (avail_bytes/X16_CODE_UNIT_BYTES + BLOCKSIZE - 1)/BLOCKSIZE);
     
    6465
    6566int Ext_ASCII_16LE_Lexer::AdvanceBuffer(int newpos) {
    66   unsigned char * buf_ptr = xml_buf->GetBytePtr(newpos * X16_CODE_UNIT_BYTES);
    67   int avail_bytes = xml_buf->PrepareBytes(X16_BYTE_STREAM_SIZE);
     67  int byte_pos = newpos * X16_CODE_UNIT_BYTES;
     68  int avail_bytes = xml_buf->PrepareBytes(byte_pos, X16_BYTE_STREAM_SIZE);
     69  unsigned char * buf_ptr = xml_buf->BytePtr(byte_pos);
    6870  int new_blocks = min(BUFFER_BLOCKS,
    6971                       (avail_bytes/X16_CODE_UNIT_BYTES + BLOCKSIZE - 1)/BLOCKSIZE);
Note: See TracChangeset for help on using the changeset viewer.