Removed #include "getline.h" because gnulib no longer provides it.
[pspp-builds.git] / src / output / ChangeLog
1 2007-09-08  John Darrington <john@darrington.wattle.id.au>      
2
3         * postscript.c html.c: Remove #include "getline.h" to concurr with 
4         new gnulib arrangements.
5
6 2007-08-23  Ben Pfaff  <blp@gnu.org>
7
8         Implement journaling.  Bug #17240.
9         
10         * automake.mk (output_sources): Add journal.c, journal.h.
11         
12         * journal.c: New file.
13         
14         * journal.h: New file.
15
16 2007-08-16  Ben Pfaff  <blp@gnu.org>
17
18         * output.c output.h: export function outp_configure_driver_line.
19         * ascii.c: Added an "append" property.
20         
21 2007-08-12  Ben Pfaff  <blp@gnu.org>
22
23         Add support for charts to ASCII driver.  Bug #16364.
24         Thanks to John Darrington for review.
25         
26         * ascii.c (struct ascii_driver_ext): Add chart_type,
27         chart_file_name, chart_cnt members.
28         (ascii_open_driver): Initialize new members.
29         (static array option_tab): Add new options, reorganize slightly.
30         (handle_option): Handle new options.
31         (ascii_submit): New function.
32         (ascii_chart_initialise): Implement.
33         (ascii_chart_finalise): Implement.
34
35         * chart.c (chart_init_separate): New function.
36         (chart_finalise_separate): New function.
37         
38         * dummy-chart.c (chart_init_separate): New function.
39         (chart_finalise_separate): New function.
40
41         * html.c (html_open_driver): Don't free chart_file_name.
42         (html_close_driver): Do free chart_file_name.
43         (handle_option): Only give an error for chart-files options that
44         don't contain "#".
45         (html_initialise_chart): Use new chart_init_separate.
46         (html_finalise_chart): Use new chart_finalise_separate.
47
48 2007-07-25  Ben Pfaff  <blp@gnu.org>
49
50         Allow the user to specify an initialization string to write at the
51         beginning of an ASCII output file.
52         * ascii.c (struct ascii_driver_ext): New member `init'.
53         (ascii_open_driver): Initialize `init'.
54         (ascii_close_driver): Parse `init'.
55         (ascii_open_page): Write `init' to output file.
56
57         * output.c (get_option_token): Fix parsing of octal constants.
58
59 2007-07-25  Ben Pfaff  <blp@gnu.org>
60
61         Make interactive output go to the terminal (bug #17213), by
62         causing the UI to flush output to the user when it prompts for a
63         command.
64
65         * ascii.c (ascii_open_driver): Move the file open into
66         ascii_open_page, so that we can re-open after a flush.
67         (ascii_close_driver): Close file using ascii_flush.
68         (ascii_open_page): Open the output file if it's not already open.
69         Use fn_open so that we can support pipes.
70         (ascii_close_page): Do nothing if output file not open.
71         (ascii_flush): New function.
72         (static var ascii_class): Add ascii_flush.
73
74         * manager.c (som_flush): New function.
75
76         * output.c (outp_flush): New function.
77
78 Tue Feb 20 07:03:48 2007  Ben Pfaff  <blp@gnu.org>
79
80         * html.c: Don't need to include "getlogin_r.h" anymore, because
81         gnulib merged it into <unistd.h>.
82
83 Sun Feb 18 11:20:35 2007  Ben Pfaff  <blp@gnu.org>
84
85         * postscript.c: Add missing _() around message.
86
87 Sun Feb 11 17:59:30 2007  Ben Pfaff  <blp@gnu.org>
88
89         * html.c (html_initialise_chart): Mark `this' parameter UNUSED to
90         account for NO_CHARTS case.
91
92 Sat Feb  3 21:56:46 2007  Ben Pfaff  <blp@gnu.org>
93
94         * table.c (tab_hline): Allow t->nr as y argument, so that we can
95         draw a line below the bottom row of the table.
96
97 Wed Feb  7 21:38:12 2007  Ben Pfaff  <blp@gnu.org>
98
99         * afm.c: Add #include <limits.h>.  Thanks to John McCabe-Dansted
100         <gmatht@gmail.com> for pointing out the need.
101
102 Sun Oct  8 07:09:34 WST 2006 John Darrington <john@darrington.wattle.id.au>
103
104         * table.c (tab_destroy): Freed title, since this is not allocated
105         from the pool.
106
107         * html.c (html_open_driver): Freed chart_file_name.
108
109 Wed Jul 12 21:03:37 2006  Ben Pfaff  <blp@gnu.org>
110
111         * table.c (tab_natural_width): Get rid of warning on empty column,
112         which tended to just trigger false positives because we handle
113         joined cells so badly.  We need a real fix, and the warning is not
114         helpful.
115
116         * table.c (tab_offset): [DEBUGGING] Let row, col arguments be as
117         big as row or column count.
118         
119 Wed Jul 12 20:58:19 2006  Ben Pfaff  <blp@gnu.org>
120
121         * output.c (outp_drivers): [DEBUGGING] Delete unused declaration.
122
123 Sat Jul  1 17:20:03 2006  Ben Pfaff  <blp@gnu.org>
124
125         Make the destination for charts configurable in the HTML driver.
126         Fixes bug #15723, "HTML driver creates .png files insecurely".
127
128         * htmlP.h: (struct html_driver_ext) Add chart_file_name, chart_cnt
129         members.
130         
131         * html.c: (html_open_driver) Initialize new members.
132         (option_tab var) Add "chart-files" option.
133         (handle_option) Parse "chart-files" option.
134         (html_initialise_chart) Name file based on "chart-files" option.
135         
136 Sat Jul  1 22:41:26 2006  Ben Pfaff  <blp@gnu.org>
137
138         Fix bug #16644: Output Driver crashes in DISPLAY VARIABLES.
139         
140         * table.c (tab_create): Don't allocate t->hrh, t->wrv yet, because
141         the table size might change before we're ready to use them.
142         (tabi_table) Allocate them here instead.
143
144 Fri Jun  9 14:42:35 2006  Ben Pfaff  <blp@gnu.org>
145
146         Reform string library.
147         
148         * output.c (init_default_drivers): Update call to
149         configure_driver() to new interface.
150         (get_option_token) Use a modifiable substring in interface instead
151         of a separate position parameter.  Use ss_get_*() functions.
152         (configure_driver) Take and work with substrings.
153         (configure_driver_line) Update call to configure_driver() to new
154         interface.
155         (outp_get_paper_size) Use substrings.
156
157         * output.h (struct outp_class): Change open_driver interface to
158         use substring.  Update all implementations.
159
160         * table.c (text_format): Change to return substring.
161         (tab_title) Use xvasprintf().
162
163         * table.h (struct tab_table): Change title member to char *.
164
165 Thu May 25 18:02:53 WST 2006 John Darrington <john@darrington.wattle.id.au>
166
167         * table.c: Removed redundant extern declaration.
168
169 Sun May 14 14:03:56 2006  Ben Pfaff  <blp@gnu.org>
170
171         * output.c (outp_eject_page): Always make sure that a page is open
172         upon return.
173
174 Sun May 14 13:54:58 2006  Ben Pfaff  <blp@gnu.org>
175
176         * postscript.c: (ps_chart_finalise) Fix format of %%EndDocument
177         comment, which screwed up gv's idea of where one page ended and
178         the next one began.  Thanks to John Darrington for pointing out
179         the bug.
180
181 Sun Apr 16 11:48:25 2006  Ben Pfaff  <blp@gnu.org>
182
183         Start reforming error message support.  In this phase, we get rid
184         of "installation errors" and change all uses of msg() in the
185         output drivers to uses of error() or error_at_line().
186
187         * Removed all inclusion of <libpspp/message.h> in this directory.
188
189         * output.c: Changed all uses of msg() to error() or
190         error_at_line().
191         (outp_read_devices) Maintain line number in int variable instead
192         of "struct file_locator".
193         (tokener) Renamed get_option_token(), rewritten, changed interface.
194         (outp_parse_options) Change `options' argument to type const
195         struct string *.  Rewritten.
196         (configure_driver) Passes a struct string * to ->open_driver()
197         instead of char *.
198         (outp_get_paper_size) Maintain line number in int variable instead
199         of "struct file_locator".  Removed stupid cache.
200
201         * output.h: (struct outp_class) Change `open_driver' function to
202         take const struct string * instead of const char *.  Updated all
203         implementations.
204
205 Mon Apr  3 11:14:38 2006  Ben Pfaff  <blp@gnu.org>
206
207         Rewrite a lot of the output drivers and infrastructure.
208         Started transitioning from msg() to error().
209         Vertical rules in tables now default to putting a small gap
210         between columns, instead of no gap or rule at all.
211         See NEWS for user-visible changes.
212
213         * automake.mk: (output_sources) Add afm.c, afm.h.  Remove font.h,
214         groff-font.c.
215         
216         * afm.c, afm.h: New files.
217
218         * font.h: Removed.
219
220         * groff-font.c: Removed.
221         
222         * ascii.c: Rewrote and simplified.
223
224         * html.c: Ditto.
225
226         * postscript.c: Ditto.
227
228         * output.c: (struct outp_driver_class_list) Move here from
229         output.h.  Remove ref_count member and all references to it.
230         (outp_init) Remove epsf_class references.
231         (init_default_drivers) Use new configure_driver_line() interface.
232         (parse_options) Renamed outp_parse_options(), changed interface.
233         (configure_driver) Changed args from `const char *'s to `const
234         struct string *'s.  Rewrote.  Don't call ->open_global().  Now
235         just calls ->open_driver() instead of ->preopen_driver(),
236         ->option(), ->postopen_driver().
237         (configure_driver_line) Adapt to new configure_driver() interface.
238         (destroy_driver) Don't call ->close_global().
239         (option_cmp) Removed.
240         (outp_match_keyword) Rewrite for simplicity.
241         (outp_open_page) New function.  Changed all equivalent
242         functionality to use this function instead.
243         (outp_close_page) Ditto.
244         (outp_eject_page) Use above functions.
245         (outp_string_width) Add font argument and change all callers to
246         pass one.
247
248         * output.h: (struct rect) Removed.
249         (OUTP_L_*) Name this enumeration "enum outp_line_style".
250         (OUTP_L_SPECIAL) Removed.
251         (struct color) Removed.
252         (OUTP_F_*) Removed.
253         (struct outp_styles) Removed.
254         (OUTP_T_*) Removed.
255         (enum outp_justification) New, containing OUTP_RIGHT, OUTP_LEFT,
256         OUTP_CENTER.
257         (enum outp_font) New, containing OUTP_FIXED, OUTP_PROPORTIONAL,
258         and OUTP_EMPHASIS.
259         (struct outp_text) Replaced `options' member by `font' and
260         `justification'.  Renamed `s' to `string'.  Removed `w', `l'.
261         Updated all usages.
262         (struct outp_class) Removed `magic', `open_global',
263         `close_global', `font_sizes', `preopen_driver', `option',
264         `postopen_driver', `line_horz', `line_vert', `line_intersection',
265         `box', `polyline_begin', `polyline_point', `polyline_end',
266         `text_set_font_by_name', `text_set_font_by_position',
267         `text_set_font_family', `text_get_font_name',
268         `text_get_font_family', `text_set_Size', and `text_get_size'
269         members.  Added `open_driver', `close_driver', `line' members.
270         Changed interface of `open_page', `close_page', `text_metrics',
271         `text_draw' members.  Updated all usages.
272         (struct outp_driver) Rearranged members.  Removed `driver_open',
273         `res', `horiz', `vert', `horiz_line_spacing', `vert_line_spacing'
274         members.
275         (struct outp_option_info) Removed.
276         (struct outp_driver_class_list) Removed.
277         (outp_match_keyword) Changed interface.
278
279         * table.c: (tab_create) Now ignores reallocable argument: tables
280         can always be reallocated.  Use pool_create_container().
281         Initialize vertical rules to UCHAR_MAX.
282         (options_to_font) New function.
283         (tab_destroy) Remove futile assignment.
284         (tab_realloc) Initialize vertical rules to UCHAR_MAX.
285         (text_format) Use xvasprintf() instead of local_alloc().
286         (tab_title) Always format the argument, and drop the option
287         argument.  Change all callers to agree.
288         (tab_natural_width) Adapt to new ->text_metrics() interface.
289         (tab_natural_height) Ditto.
290         (tab_joint_text) Clear rules within the joined cell.  Now
291         necessary because of the default to put spacing between cells.
292         (tab_output_text) Use xvasprintf() instead of local_alloc().
293         Remove special cases for fixed-width font.
294         (rule_to_spacing_type) New function.
295         (tabi_driver) Calculate rule widths manually now that we don't
296         have ->trh or ->trv.  Implement new default for vertical rules.
297         (render_rows) New function.
298         (tabi_render) Rewrite in terms of render_rows() for clarity.
299         (translate_justification) New function.
300         (rule_to_draw_type) New function.
301         (get_hrule) New function.
302         (get_vrule) New function.
303         (render_horz_rule) New function.
304         (render_vert_rule) New function.
305         (render_rule_intersection) New function.
306         (strip_width) New function.
307         (strip_height) New function.
308         (render_cell) New function.
309         (render_strip) Rewrite in terms of new functions.
310
311         * table.h: (TAB_EMPH) New flag.
312         (TAB_FIX) New flag.
313         (TAL_3) Removed.
314         (TAL_GAP) Added.
315         (TAL_SPACING) Removed.
316         (struct tab_table) Members `trh', `hrv', `hr_tot', `vr_tot'
317         removed.
318         [DEBUGGING] (reallocable) Removed.
319         (TAT_FIX) Removed.  All references replaced by TAB_FIX.
320         (TAT_TITLE) Now implies TAB_EMPH.
321                 
322 Thu Mar 30 16:26:56 2006  Ben Pfaff  <blp@gnu.org>
323
324         * output.c: (colon_tokenize) Removed.
325         (configure_driver_line) Rewrote to use ds_separate().  Fixed leak.
326
327 Tue Mar 28 13:50:53 WST 2006 John Darrington <john@darrington.wattle.id.au>
328
329         * html.c, postscript.c, output.c:  Changed to fit the new signature 
330         of fn_interp_vars
331         
332 Sun Mar  5 13:19:32 2006  Ben Pfaff  <blp@gnu.org>
333
334         * postscript.c: (postopen) Fix segfault when the active file has
335         no title.
336
337 Sat Mar  4 13:48:16 2006  Ben Pfaff  <blp@gnu.org>
338
339         We didn't provide a way to define these macros, so obviously
340         there's little demand for them.
341
342         * html.c: Don't test for NO_HTML.
343
344         * postscript.c: Don't test for NO_POSTSCRIPT.
345
346         * output.c: Don't test for either of those.
347
348 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
349         
350         * Moved files from src directory