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