Don't reset line/col on restart marker.

Check for duplicate attributes.
Bump version.
This commit is contained in:
Laurence Withers 2007-01-05 11:54:57 +00:00
parent e4f386c7f5
commit e4aca335e2
3 changed files with 7 additions and 5 deletions

View File

@ -454,6 +454,10 @@ int csxml_feedChar(struct csxml* ctx, char ch)
default: default:
if(ch != '=') ERROR("Invalid character in attribute name."); if(ch != '=') ERROR("Invalid character in attribute name.");
for(try = 0; (size_t)try < ctx->elemAttrNames.size; ++try) {
if(!strcmp(ctx->elemAttrNames.data[try].data, ctx->buffer.data))
ERROR("Duplicate attribute in element.");
}
TRY(list_push(ctx, &ctx->elemAttrNames, &ctx->buffer)); TRY(list_push(ctx, &ctx->elemAttrNames, &ctx->buffer));
CLEAR_BUFFER(buffer); CLEAR_BUFFER(buffer);
ctx->state = StateElemAttrEq; ctx->state = StateElemAttrEq;
@ -619,8 +623,6 @@ void csxml_reset(struct csxml* ctx)
ctx->restartCount = 0; ctx->restartCount = 0;
ctx->skipNextNewline = 0; ctx->skipNextNewline = 0;
ctx->parsingAttr = 0; ctx->parsingAttr = 0;
ctx->line = 0;
ctx->col = 0;
ctx->elemStack.len = 0; ctx->elemStack.len = 0;
ctx->elemAttrNames.len = 0; ctx->elemAttrNames.len = 0;
ctx->elemAttrVals.len = 0; ctx->elemAttrVals.len = 0;

View File

@ -14,4 +14,4 @@ SOMAJOR=0
SOMINOR=0 SOMINOR=0
# SOMICRO is bumped every time there is a binary-compatible release. # SOMICRO is bumped every time there is a binary-compatible release.
SOMICRO=5 SOMICRO=6

View File

@ -11,8 +11,8 @@
# expected to be in 'major.minor.micro' format. It can optionally be # expected to be in 'major.minor.micro' format. It can optionally be
# suffixed with a string. # suffixed with a string.
VERMAJOR=1 VERMAJOR=1
VERMINOR=2 VERMINOR=3
VERMICRO=9 VERMICRO=0
VEREXTRA="" VEREXTRA=""
# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # kate: replace-trailing-space-save true; space-indent true; tab-width 4;