From ddd7bf5b8a173f375cf3de92a4493c0b80cc2de3 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 13 Apr 2004 13:17:48 +0000 Subject: Initial work on PS and PDF output. Because these two backends share an enormous amount of preprocessing and differ only in their final output form, I've introduced a new type of layer called a `pre-backend' (bk_paper.c is one). This takes all the information passed to a normal backend and returns an arbitrary void *, which is cached by the front end and passed on to any backend(s) which state a desire for the output of that particular pre-backend. Thus, all the page layout is done only once, and the PS and PDF backends process the same data structures into two output files. Note that these backends are _very_ unfinished; all sorts of vital things such as section numbers, list markers, and title formatting are missing, the paragraph justification doesn't quite work, and advanced stuff like indexes and PDF interactive features haven't even been started. But this basic framework generates valid output files and is a good starting point, so I'm checking it in. [originally from svn r4058] --- bk_man.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bk_man.c') diff --git a/bk_man.c b/bk_man.c index a773b60..60157fa 100644 --- a/bk_man.c +++ b/bk_man.c @@ -94,13 +94,14 @@ paragraph *man_config_filename(char *filename) #define QUOTE_QUOTES 2 /* quote double quotes by doubling them */ void man_backend(paragraph *sourceform, keywordlist *keywords, - indexdata *idx) { + indexdata *idx, void *unused) { paragraph *p; FILE *fp; manconfig conf; - IGNORE(keywords); /* we don't happen to need this */ - IGNORE(idx); /* or this */ + IGNORE(unused); + IGNORE(keywords); + IGNORE(idx); conf = man_configure(sourceform); -- cgit v1.1