From c93b0a5afb0ad410fd428816113161079fd0d76c Mon Sep 17 00:00:00 2001 From: James Aylett Date: Thu, 21 Dec 2000 16:59:38 +0000 Subject: Initial checkin of xhtml backend. [originally from svn r828] --- index.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'index.c') diff --git a/index.c b/index.c index de30691..7e87793 100644 --- a/index.c +++ b/index.c @@ -6,28 +6,6 @@ #include #include "buttress.h" -typedef struct indextag_Tag indextag; -typedef struct indexentry_Tag indexentry; - -struct index_Tag { - tree23 *tags; /* holds type `indextag' */ - tree23 *entries; /* holds type `indexentry' */ -}; - -struct indextag_Tag { - wchar_t *name; - word *implicit_text; - word **explicit_texts; - int nexplicit, explicit_size; - int nrefs; - indexentry **refs; /* array of entries referenced by tag */ -}; - -struct indexentry_Tag { - word *text; - void *backend_data; /* private to back end */ -}; - index *make_index(void) { index *ret = mknew(index); ret->tags = newtree23(); @@ -187,16 +165,28 @@ static void dbg_prtmerge(int is_explicit, wchar_t *tag, word *text); void index_debug(index *i) { indextag *t; + indexentry *y; enum23 e; int j; + printf("\nINDEX TAGS\n==========\n\n"); for (t = (indextag *)first23(i->tags, &e); t; t = (indextag *)next23(&e)) { + printf("\n"); if (t->implicit_text) dbg_prtmerge(0, t->name, t->implicit_text); for (j = 0; j < t->nexplicit; j++) dbg_prtmerge(1, t->name, t->explicit_texts[j]); } + + printf("\nINDEX ENTRIES\n=============\n\n"); + for (y = (indexentry *)first23(i->entries, &e); y; + y = (indexentry *)next23(&e)) { + printf("\n"); + printf("{\n"); + dbg_prtwordlist(1, y->text); + printf("}\n"); + } } static void dbg_prtmerge(int is_explicit, wchar_t *tag, word *text) { -- cgit v1.1