Changeset 92 for trunk/src/engine.h


Ignore:
Timestamp:
Apr 8, 2008, 9:53:53 AM (11 years ago)
Author:
cameron
Message:

Passing buffer pointers/lgths to markup actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine.h

    r91 r92  
    6060        /* Getters for current point/position information. */
    6161        int AbsPos() const;
     62        int LengthFrom(int start_pos) const;
    6263        int BufferRelPos() const;
    6364        unsigned char * cur() const;
     
    110111       
    111112        /* Action routine for an XML comment in "<!--"  "-->" brackets. */
    112         void Comment_action(int start_pos, int end_pos);
     113        void Comment_action(unsigned char * item, int lgth);
    113114       
    114115        /* Action routine called upon recognizing "<![CDATA[" to start a CDATA section. */
    115         void CDATA_start_action(int pos);
     116        void CDATA_start_action(unsigned char * CDATA_ptr);
    116117
    117118        /* Action routine called upon recognizing "]]>" to end a CDATA section. */
    118         void CDATA_end_action(int pos);
     119        void CDATA_end_action(unsigned char * CDATA_end_ptr);
    119120       
    120121        /* Action routine for an XML processing instruction enclosed in "<?" and "?>" brackets. */
    121         void PI_action(int start_pos, int end_pos);
     122        void PI_action(unsigned char * item, int lgth);
    122123       
    123124        /* Action routine for an empty element enclosed in "<" and "/>" brackets. */
    124         void EmptyElement_action(int start_pos, int end_pos);
     125        void EmptyElement_action(unsigned char * item, int lgth);
    125126       
    126127        /* Action routine for a start tag enclosed in "<" and ">" brackets. */
    127         void StartTag_action(int start_pos, int end_pos);
     128        void StartTag_action(unsigned char * item, int lgth);
    128129       
    129130        /* Action routine for an end tag enclosed in "</" and ">" brackets. */
    130         void EndTag_action(int start_pos, int end_pos);
     131        void EndTag_action(unsigned char * item, int lgth);
    131132       
    132133        /* Action routine for an error item */
    133         void Error_action(int start_pos, int end_pos);
     134        void Error_action(unsigned char * item, int lgth);
    134135       
    135136        /* Action routine for a text item */
    136         void Text_action(int start_pos, int end_pos);
     137        void Text_action(unsigned char * item, int lgth);
    137138       
    138139        /* Action routine for a character or entity reference.*/
    139         void Reference_action(int start_pos, int end_pos);
     140        void Reference_action(unsigned char * item, int lgth);
    140141       
    141142        /* Action routine for an element name occurring immediately after the
    142143        opening "<" of a start tag or empty element tag. */
    143         void ElementName_action(int start_pos, int end_pos);
     144        void ElementName_action(unsigned char * item, int lgth);
    144145       
    145146        /* Action routine for a processing instruction target name occurring immediately
    146147        after the opening "<?" of a processing instruction. */
    147         void PI_Target_action(int start_pos, int end_pos);
     148        void PI_Target_action(unsigned char * item, int lgth);
    148149       
    149150        /* Action routine for an individual attribute/value pair occurring in
    150151        a element start tag or an empty element tag. */
    151         void AttributeValue_action(int name_start, int name_end,
    152                                         int val_start, int val_end);
     152        void AttributeValue_action(unsigned char * name, int name_lgth,
     153                                   unsigned char * val, int val_lgth);
    153154       
    154155        /* Action routine for an individual namespace binding occurring in
    155156        a element start tag or an empty element tag. */
    156         void Namespace_action(int name_start, int name_end,
    157                                 int URI_start, int URI_end);
     157        void Namespace_action(unsigned char * name, int name_end,
     158                              unsigned char * URI, int URI_end);
    158159       
    159160        /*Action routine for end of buffer events.
     
    163164       
    164165        /*Document Type actions.*/
    165         void Doctype_action(int start_pos, int end_pos);
    166         void PEReference_action(int start_pos, int end_pos);
    167         void Elementdecl_action(int start_pos, int end_pos);
    168         void AttlistDecl_action(int start_pos, int end_pos);
    169         void Entitydecl_action(int entity_name_start, int entity_name_end, int start_pos, int end_pos);
    170         void Notationdecl_action(int start_pos, int end_pos);
     166        void Doctype_action(unsigned char * item, int lgth);
     167        void PEReference_action(unsigned char * item, int lgth);
     168        void Elementdecl_action(unsigned char * item, int lgth);
     169        void AttlistDecl_action(unsigned char * item, int lgth);
     170        void Entitydecl_action(unsigned char * entity_name, int entity_name_lgth, unsigned char * item, int lgth);
     171        void Notationdecl_action(unsigned char * item, int lgth);
    171172       
    172         void Prolog_action(int start_pos, int end_pos);
     173        void Prolog_action(unsigned char * item, int lgth);
    173174};
    174175
Note: See TracChangeset for help on using the changeset viewer.