From b3113fca04af4df1274559c5f45dd3c48fae0404 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 11 Jul 2012 12:25:46 -0300 Subject: [PATCH] gencat/pdf.c: add section titles --- gencat/pdf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gencat/pdf.c b/gencat/pdf.c index 5e5cc0d..5949189 100644 --- a/gencat/pdf.c +++ b/gencat/pdf.c @@ -71,6 +71,9 @@ static struct format { static int total, done = 0; +/* ----- Utility functions ------------------------------------------------- */ + + static char *sanitize_name(const char *s) { char *t, *tmp; @@ -102,6 +105,9 @@ static void ps_string(FILE *file, const char *s) } +/* ----- Alphabetic index -------------------------------------------------- */ + + static void collect_names(const struct node *node, const char ***idx, int *n) { const struct name *name; @@ -181,6 +187,9 @@ static void make_index(FILE *file, const struct node *node) } +/* ----- Overlay and table of contents ------------------------------------- */ + + static int children(const struct node *node) { int n = 0; @@ -266,6 +275,9 @@ static void print_comment(FILE *file, const struct line *comment) } +/* ----- Component conversion ---------------------------------------------- */ + + static void cat(FILE *out, const char *name) { FILE *in; @@ -343,6 +355,9 @@ static void convert_tree(const struct node *node, FILE *out) } +/* ----- Setup and PDF generation ------------------------------------------ */ + + static int count_tree(const struct node *node) { int sum = 0;