summaryrefslogtreecommitdiff
path: root/delta.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-11 02:32:00 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-11 02:32:00 -0300
commit27fb8eff8f1ad8054fe18933fe20b79ab90b5501 (patch)
tree874df966a9dc18d9b7a2cc1d17637487966bdef0 /delta.c
parent79440418db978dc56d204d251fa079e6bd001dde (diff)
downloadeeshow-27fb8eff8f1ad8054fe18933fe20b79ab90b5501.tar.gz
eeshow-27fb8eff8f1ad8054fe18933fe20b79ab90b5501.tar.bz2
eeshow-27fb8eff8f1ad8054fe18933fe20b79ab90b5501.zip
eeshow/: support component aliases
Diffstat (limited to 'delta.c')
-rw-r--r--delta.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/delta.c b/delta.c
index 6e309ba..f407019 100644
--- a/delta.c
+++ b/delta.c
@@ -36,7 +36,7 @@
/* ----- Components -------------------------------------------------------- */
-static bool comp_lib_objs(const struct lib_obj *a, const struct lib_obj *b)
+static bool comp_eq_objs(const struct lib_obj *a, const struct lib_obj *b)
{
/*
* @@@ over-simplify a little. We don't search to find objects that
@@ -97,6 +97,19 @@ static bool comp_lib_objs(const struct lib_obj *a, const struct lib_obj *b)
}
+static bool comp_eq_aliases(const struct comp_alias *a,
+ const struct comp_alias *b)
+{
+ while (a && b) {
+ if (strcmp(a->name, b->name))
+ return 0;
+ a = a->next;
+ b = b->next;
+ }
+ return a == b;
+}
+
+
static bool comp_eq(const struct comp *a, const struct comp *b)
{
if (a == b)
@@ -113,7 +126,9 @@ static bool comp_eq(const struct comp *a, const struct comp *b)
return 0;
if (a->name_offset != b->name_offset)
return 0;
- return comp_lib_objs(a->objs, b->objs);
+ if (!comp_eq_aliases(a->aliases, b->aliases))
+ return 0;
+ return comp_eq_objs(a->objs, b->objs);
}