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