Author: kkaempf Date: Mon Feb 18 16:18:45 2008 New Revision: 8781 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8781&view=rev Log: comments added Modified: trunk/sat-solver/tools/repo_patchxml.c Modified: trunk/sat-solver/tools/repo_patchxml.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_patchxml.c?rev=8781&r1=8780&r2=8781&view=diff ============================================================================== --- trunk/sat-solver/tools/repo_patchxml.c (original) +++ trunk/sat-solver/tools/repo_patchxml.c Mon Feb 18 16:18:45 2008 @@ -162,6 +162,10 @@ } #endif +/* + * create evr (as Id) from 'epoch', 'ver' and 'rel' attributes + */ + static Id makeevr_atts(Pool *pool, struct parsedata *pd, const char **atts) { @@ -227,6 +231,11 @@ return str2id(pool, pd->content, 1); } + +/* + * find attribute + */ + static const char * find_attr(const char *txt, const char **atts) { @@ -238,6 +247,11 @@ return 0; } + +/* + * relation comparision operators + */ + static char *flagtab[] = { "GT", "EQ", @@ -247,6 +261,11 @@ "LE" }; + +/* + * add dependency + */ + static unsigned int adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, const char **atts, int isreq) { @@ -269,7 +288,7 @@ } if (!n) return olddeps; - if (k && !strcmp(k, "package")) + if (k && !strcmp(k, "package")) /* kind 'package' -> ignore */ k = 0; if (k) { @@ -279,12 +298,12 @@ pd->content = realloc(pd->content, l + 256); pd->acontent = l + 256; } - sprintf(pd->content, "%s:%s", k, n); + sprintf(pd->content, "%s:%s", k, n); /* prepend kind to name */ name = str2id(pool, pd->content, 1); } else name = str2id(pool, (char *)n, 1); - if (f) + if (f) /* flags means name,operator,relation */ { Id evr = makeevr_atts(pool, pd, atts); int flags; @@ -322,9 +341,10 @@ return; pd->depth++; - for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) + 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 -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org