Changeset 80 for trunk/src/engine.c


Ignore:
Timestamp:
Mar 30, 2008, 3:59:56 PM (12 years ago)
Author:
cameron
Message:

Specialized ScanTo? for MarkupStart? => Text_action at Buffer end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.c

    r78 r80  
    183183}
    184184#endif
     185
     186template <CodeUnit_Base C>
     187inline void ParsingEngine<C>::ScanToMarkupStart() {
     188        int preserve_pos;
     189        text_or_markup_start = AbsPos();
     190        buffer_rel_pos = bitstream_scan(buf->item_stream[MarkupStart], buffer_rel_pos);
     191        while (buffer_rel_pos >= BUFFER_SIZE) {
     192                Text_action(text_or_markup_start, AbsPos());
     193                text_or_markup_start = AbsPos();
     194                FinalizeBuffer_action(preserve_pos);
     195                AdvanceBuffers(preserve_pos);
     196                buffer_rel_pos = bitstream_scan(buf->item_stream[MarkupStart], buffer_rel_pos);
     197        }
     198}
    185199
    186200#ifdef OPTIMIZE_SHORT_SCAN
     
    445459        do {
    446460                text_or_markup_start = AbsPos();
    447                 ScanTo(MarkupStart); /* '<', '&', or ']' for ']]>' test */
     461                ScanToMarkupStart(); /* '<', '&', or ']' for ']]>' test */
    448462/*              if (AtChar<C,'<'>(cur())) {
    449463                        text_if_nonnull_action();
Note: See TracChangeset for help on using the changeset viewer.