Changeset 85


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

EncodingAction?: void return type; lgth calc.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xmldecl.c

    r84 r85  
    7474
    7575template <CodeUnit_Base C>
    76 int XML_Decl_Parser<C>::EncodingAction(Model_Info * m, int start_pos, int end_pos) {
    77         m->encoding = (unsigned char *) malloc(end_pos-start_pos+1);
    78         memcpy(m->encoding, &x8data[start_pos-buffer_base_pos], end_pos - start_pos);
    79         m->encoding[end_pos - start_pos] = '\0';
     76void XML_Decl_Parser<C>::EncodingAction(Model_Info * m, int start_pos, int end_pos) {
     77        int encoding_lgth = end_pos-start_pos;
     78        m->encoding = (unsigned char *) malloc(encoding_lgth+1);
     79        memcpy(m->encoding, &x8data[start_pos-buffer_base_pos], encoding_lgth);
     80        m->encoding[encoding_lgth] = '\0';
    8081}
    8182//
  • trunk/src/xmldecl.h

    r67 r85  
    3434        unsigned char * cur() const;
    3535       
    36         int EncodingAction(Model_Info * m, int start_pos, int end_pos);
     36        void EncodingAction(Model_Info * m, int start_pos, int end_pos);
    3737private:
    3838        /* Bytespace parsing routines for internal use in ReadXMLInfo and
Note: See TracChangeset for help on using the changeset viewer.