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;