projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b254e00
)
- copy parser swtab fix from Matz into other files
author
Michael Schroeder
<mls@suse.de>
Fri, 19 Sep 2008 14:18:48 +0000
(14:18 +0000)
committer
Michael Schroeder
<mls@suse.de>
Fri, 19 Sep 2008 14:18:48 +0000
(14:18 +0000)
tools/repo_deltainfoxml.c
patch
|
blob
|
history
tools/repo_patchxml.c
patch
|
blob
|
history
tools/repo_products.c
patch
|
blob
|
history
tools/repo_repomdxml.c
patch
|
blob
|
history
tools/repo_rpmmd.c
patch
|
blob
|
history
tools/repo_updateinfoxml.c
patch
|
blob
|
history
diff --git
a/tools/repo_deltainfoxml.c
b/tools/repo_deltainfoxml.c
index
b14bb9a
..
2211b5d
100644
(file)
--- a/
tools/repo_deltainfoxml.c
+++ b/
tools/repo_deltainfoxml.c
@@
-290,10
+290,11
@@
startElement(void *userData, const char *name, const char **atts)
}
pd->depth++;
}
pd->depth++;
+ if (!pd->swtab[pd->state])
+ return;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
-
if (sw->from != pd->state)
{
#if 1
if (sw->from != pd->state)
{
#if 1
diff --git
a/tools/repo_patchxml.c
b/tools/repo_patchxml.c
index
e03613f
..
10cc2b7
100644
(file)
--- a/
tools/repo_patchxml.c
+++ b/
tools/repo_patchxml.c
@@
-355,6
+355,8
@@
startElement(void *userData, const char *name, const char **atts)
return;
pd->depth++;
return;
pd->depth++;
+ if (!pd->swtab[pd->state])
+ return;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
diff --git
a/tools/repo_products.c
b/tools/repo_products.c
index
7e0a296
..
3f71fe2
100644
(file)
--- a/
tools/repo_products.c
+++ b/
tools/repo_products.c
@@
-183,22
+183,21
@@
startElement(void *userData, const char *name, const char **atts)
}
pd->depth++;
}
pd->depth++;
- if (!
(sw = pd->swtab[pd->state]))
/* no statetable -> no substates */
+ if (!
pd->swtab[pd->state])
/* no statetable -> no substates */
{
#if 0
{
#if 0
- fprintf(stderr, "into unknown:
[?]%s (from: ?, state
%d)\n", name, pd->state);
+ fprintf(stderr, "into unknown:
%s (from:
%d)\n", name, pd->state);
#endif
return;
}
#endif
return;
}
- for (; sw->from == pd->state; sw++) /* find name in statetable */
+ for (
sw = pd->swtab[pd->state]
; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
if (sw->from != pd->state)
{
#if 0
if (!strcmp(sw->ename, name))
break;
if (sw->from != pd->state)
{
#if 0
- fprintf(stderr, "into unknown: [%d]%s (from: %d, state %d)\n", sw->to, name, sw->from, pd->state);
- exit( 1 );
+ fprintf(stderr, "into unknown: %s (from: %d)\n", name, pd->state);
#endif
return;
}
#endif
return;
}
diff --git
a/tools/repo_repomdxml.c
b/tools/repo_repomdxml.c
index
f387406
..
dce33c2
100644
(file)
--- a/
tools/repo_repomdxml.c
+++ b/
tools/repo_repomdxml.c
@@
-163,7
+163,7
@@
startElement(void *userData, const char *name, const char **atts)
int expire = 0;
#if 0
int expire = 0;
#if 0
-
fprintf(stderr, "start: [%d]%s\n", pd->state, name);
+ fprintf(stderr, "start: [%d]%s\n", pd->state, name);
#endif
if (pd->depth != pd->statedepth)
{
#endif
if (pd->depth != pd->statedepth)
{
@@
-172,6
+172,8
@@
startElement(void *userData, const char *name, const char **atts)
}
pd->depth++;
}
pd->depth++;
+ if (!pd->swtab[pd->state])
+ return;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
@@
-179,7
+181,7
@@
startElement(void *userData, const char *name, const char **atts)
if (sw->from != pd->state)
{
#if 1
if (sw->from != pd->state)
{
#if 1
- fprintf(stderr, "into unknown:
[%d]%s (from: %d)\n", sw->to, name, sw->from
);
+ fprintf(stderr, "into unknown:
%s (from: %d)\n", name, pd->state
);
exit( 1 );
#endif
return;
exit( 1 );
#endif
return;
diff --git
a/tools/repo_rpmmd.c
b/tools/repo_rpmmd.c
index
80b587d
..
d3fe112
100644
(file)
--- a/
tools/repo_rpmmd.c
+++ b/
tools/repo_rpmmd.c
@@
-643,6
+643,8
@@
startElement(void *userData, const char *name, const char **atts)
return;
pd->depth++;
return;
pd->depth++;
+ if (!pd->swtab[pd->state])
+ return;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++)
if (!strcmp(sw->ename, name))
break;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++)
if (!strcmp(sw->ename, name))
break;
diff --git
a/tools/repo_updateinfoxml.c
b/tools/repo_updateinfoxml.c
index
b96b972
..
cc442fc
100644
(file)
--- a/
tools/repo_updateinfoxml.c
+++ b/
tools/repo_updateinfoxml.c
@@
-216,7
+216,7
@@
startElement(void *userData, const char *name, const char **atts)
/*const char *str; */
#if 0
/*const char *str; */
#if 0
-
fprintf(stderr, "start: [%d]%s\n", pd->state, name);
+ fprintf(stderr, "start: [%d]%s\n", pd->state, name);
#endif
if (pd->depth != pd->statedepth)
{
#endif
if (pd->depth != pd->statedepth)
{
@@
-225,15
+225,16
@@
startElement(void *userData, const char *name, const char **atts)
}
pd->depth++;
}
pd->depth++;
+ if (!pd->swtab[pd->state])
+ return;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
-
if (sw->from != pd->state)
{
#if 1
if (sw->from != pd->state)
{
#if 1
- fprintf(stderr, "into unknown:
[%d]%s (from: %d)\n", sw->to, name, sw->from
);
+ fprintf(stderr, "into unknown:
%s (from: %d)\n", name, pd->state
);
exit( 1 );
#endif
return;
exit( 1 );
#endif
return;