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