if( destroy ) delete [] bfr;
}
-unsigned char *&XMLBuffer::demand(long len)
+int XMLBuffer::demand(long len)
{
if( len > bsz ) {
+ if( !destroy ) return 0;
long sz = inp-bfr;
len += sz/2 + BCTEXTLEN;
unsigned char *np = new unsigned char[len];
lmt = np + len; bsz = len;
delete [] bfr; bfr = np;
}
- return bfr;
+ return 1;
}
int XMLBuffer::write(const char *bp, int len)
{
- if( !destroy && lmt-inp < len ) len = lmt-inp;
if( len <= 0 ) return 0;
+ if( !destroy && lmt-inp < len ) len = lmt-inp;
demand(otell()+len);
memmove(inp,bp,len);
inp += len;
else
term = ' ';
value_start = buf->itell()-1;
- while( ch >= 0 && (ch!=term && ch!=right_delm && ch!='\n') )
+ while( ch >= 0 ) {
+// old edl bug work-around, allow nl in quoted string
+ if( ch==term || ch==right_delm ) break;
+ if( ch=='\n' && term!='\"' ) break;
ch = buf->next();
+ }
if( ch < 0 ) EOB_RETURN();
value_end = buf->itell()-1;
// add property