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