Don't reset line/col on restart marker.
Check for duplicate attributes. Bump version.
This commit is contained in:
parent
e4f386c7f5
commit
e4aca335e2
3 changed files with 7 additions and 5 deletions
|
|
@ -454,6 +454,10 @@ int csxml_feedChar(struct csxml* ctx, char ch)
|
|||
|
||||
default:
|
||||
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));
|
||||
CLEAR_BUFFER(buffer);
|
||||
ctx->state = StateElemAttrEq;
|
||||
|
|
@ -619,8 +623,6 @@ void csxml_reset(struct csxml* ctx)
|
|||
ctx->restartCount = 0;
|
||||
ctx->skipNextNewline = 0;
|
||||
ctx->parsingAttr = 0;
|
||||
ctx->line = 0;
|
||||
ctx->col = 0;
|
||||
ctx->elemStack.len = 0;
|
||||
ctx->elemAttrNames.len = 0;
|
||||
ctx->elemAttrVals.len = 0;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ SOMAJOR=0
|
|||
SOMINOR=0
|
||||
|
||||
# SOMICRO is bumped every time there is a binary-compatible release.
|
||||
SOMICRO=5
|
||||
SOMICRO=6
|
||||
|
|
|
|||
4
version
4
version
|
|
@ -11,8 +11,8 @@
|
|||
# expected to be in 'major.minor.micro' format. It can optionally be
|
||||
# suffixed with a string.
|
||||
VERMAJOR=1
|
||||
VERMINOR=2
|
||||
VERMICRO=9
|
||||
VERMINOR=3
|
||||
VERMICRO=0
|
||||
VEREXTRA=""
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue