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