From 6e0015cdd60f1575253bb0585734618374f5da68 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 11 Jul 2012 22:45:40 -0300 Subject: [PATCH] gencat/libs.[ch]: keep back pointer to file in "struct entry" --- gencat/libs.c | 1 + gencat/libs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/gencat/libs.c b/gencat/libs.c index 2350e13..c627e28 100644 --- a/gencat/libs.c +++ b/gencat/libs.c @@ -62,6 +62,7 @@ struct entry *new_entry(struct lib *lib, int units) e = alloc_type(struct entry); e->names = NULL; e->units = units; + e->file = lib->files; e->next = lib->files->entries; lib->files->entries = e; return e; diff --git a/gencat/libs.h b/gencat/libs.h index 37dd263..3962ffa 100644 --- a/gencat/libs.h +++ b/gencat/libs.h @@ -20,6 +20,7 @@ struct name { struct entry { struct name *names; int units; + const struct file *file; struct entry *next; };