Simplify image handling for grohtml.
Fix bug.
* src/devices/grohtml/html-text.cc (DEBUGGING): Don't undefine but
comment out.
(html_text::dump_stack): Don't emit newline while debugging.
(html_text::do_push) [DEBUGGING]: Print more info.
(html_text::check_emit_text): Fix handling of
.
* src/devices/grohtml/html.h: Updated.
* src/devices/grohtml/output.cc (FPUTC, FPUTS, PUTC): New macros,
replacing `fputc', `fputs', `putc'. If DEBUGGING is defined, they
send its data to stderr also.
Update all callers.
(simple_output::space_or_newline) [DEBUGGING]: Removed.
* src/devices/grohtml/post-html.cc (html_printer::do_links,
html_printer::html_printer): Remove `DEBUGGING' conditionals.
* src/include/html-strings.h (HTML_IMAGE_{CENTERED,LEFT,RIGHT,END}):
Removed.
* src/libs/libgroff/htmlhint.cc (is_in_graphic_start,
is_inline_image): Removed.
(html_begin_suppress, html_end_suppress): Don't take a parameter.
(graphic_start, graphic_end): Removed.
* src/include/htmlindicate.h: Updated.
* src/preproc/html/pre-html.cc (DEBUG_HTML): Removed.
(macroset_template): New global variable.
(makeFileName): Use `macroset_template'.
(write_end_image): Don't take a parameter.
Don't emit newline.
(write_start_image: Don't emit newline.
(char_buffer::write_upto_newline): Updated.
(char_buffer::skip_to_newline): Renamed to ...
(char_buffer::skip_until_newline): This.
Fix code.
(char_buffer::write_file_troff, char_buffer::write_file_html):
Simplified.
(createAllPages, createImage) [DEBUGGING]: Handle `debug' flag.
(removeAllPages): Remove `DEBUGGING' conditionals.
(addRegDef, dump_args): New functions.
(char_buffer::do_html, char_buffer::do_image): Handle
`www-image-template' command line variable.
Add more debugging code.
(addps4html): Removed.
(removeTempFiles) [DEBUGGING]: Handle `debug' flag.
* src/preproc/eqn/main.cc: Include `ctype.h'.
(suppress_html): Removed.
(do_file): Updated.
(inline_equation): Use `html_begin_suppress' and
`html_end_suppress'.
* src/preproc/pic/troff.cc: Don't include `htmlindicate.h'.
(troff_output::start_picture, troff_output::finish_picture):
Updated.
* src/preproc/tbl/main.cc: Don't include `htmlindicate.h'.
(process_input_file): Updated.
* src/roff/troff/div.cc (page_number): Set page number only if the
`ps4html' register isn't defined.
* src/roff/troff/input.cc (image_no): New external variable.
(do_suppress): Use it.
* src/roff/troff/node.h (suppress_node::image_id): New member.
* src/roff/troff/node.cc (image_no): Remove `static' keyword.
(suppress_node::suppress_node): Initialize `image_id' member.
(suppress_node::same): Handle `image_id' also.
(suppress_node::copy): Updated.
(last_image_id): New global variable.
(suppress_node::tprint): Use it.
* tmac/an-old.tmac (TS, TE, EQ, EN): Use HTML-IMAGE and
HTML-IMAGE-END.
* tmac/pspic.mac (PSPIC): Fix html support.
* tmac/s.tmac (@EQ, @EN, @TS, TE, PS, PE): Ditto.
* tmac/www.tmac (www-image-template): Set up.
(HTMLINDEX): Renamed to...
(HX): This.
(BODYCOLOR): Renamed to...
(BCL): This.
(BACKGROUND): Renamed to...
(BGIMG): This.
(URL): Change order of parameters for consistency.
(MAILTO): Renamed to...
(MTO): This.
(IMAGE, PNG-IMAGE, MARGIN-PNG-IMAGE): Renamed to...
(IMG, PIMG, MPIMG): This.
(HTML-H-BEGIN, HTML-H-END): Renamed to...
(HnS, HnE): This.
(LINKS): Renamed to...
(LK): This.
(LINE): Renamed to...
(HR): This.
(NO-AUTO-RULE): Renamed to...
(NHR): This.
(HTML-TL): Renamed to...
(HTL): This.
(UL-BEGIN, UL-END): Renamed to...
(ULS, ULE): This.
(DROPCAP): Renamed to...
(DC): This.
(TS, TE, EQ, EN): Provide default definitions.
(www-make-unique-name): Updated.
(HTML-IMAGE-INLINE): Fix typo.
* tmac/groff_www.man: Updated.
* doc/Makefile (homepage.html): Add option -r to grohtml.
Use shortened image name.
* doc/groff.texinfo: Updated info on grohtml strings and macros.
* doc/homepage.ms: Updated and extended.
2002-02-14 Werner LEMBERG
Don't use `CSI 39 m' and `CSI 49 m' but `CSI 0 m'.
* src/devices/grotty/tty.cc (SGR_DEFAULT_COLOR,
SGR_BACK_DEFAULT_COLOR): Replaced with ...
(tty_printer::put_color): Use it.
(ttr_printer::end_page): Simplify.
2002-02-13 Werner LEMBERG
* tmac/groff_tmac.man: Moved to...
* man/groff_tmac.man: This place.
* tmac/Makefile.sub, man/Makefile.sub: Updated.
2002-02-12 Werner LEMBERG
* src/libs/libgroff/Makefile.sub (snprintf.o): Don't use
$(COMPILE.c) to not include groff's assert.h.
* src/drivers/grotty/tty.cc (main): Add GROFF_NO_SGR environment
variable.
* NEWS, src/drivers/grotty/grotty.man: Document it.
2002-02-11 Werner LEMBERG
* src/libs/snprintf/snprintf.c: Updated to latest version
(2002-02-11).
* src/roff/grog/grog.pl (process): Fix handling of `.['. We now
test whether there is `.]' also.
Don't check for spaces after `.['.
* src/roff/grog/grog.sh: Do the same.
2002-02-10 Werner LEMBERG
Illegal -> Invalid.
* src/libs/libgroff/illegal.cc: Renamed to ...
* src/libs/libgroff/invalid.cc: This.
(illegal_char_table): Renamed to ...
(invalid_char_table): This.
* src/libs/libgroff/Makefile.sub: Updated.
* win32-diffs: Updated.
* doc/groff.texinfo, src/devices/grops/psrm.cc (ps_get_line),
src/libs/libdriver/input.cc (fatal_command, parse_color_command,
parse_x_command), src/libs/libgroff/font.cc (text_file::next,
font::load), src/preproc/eqn/main.cc (read_line, main),
src/preproc/eqn/lex.cc (file_input::read_line),
src/preproc/pic/lex.cc (file_input::read_line,
simple_file_input::get, simple_file_input::peek),
src/preproc/pic/main.cc (top_input::get, top_input::peek),
src/preproc/pic/pic.man, src/preproc/refer/main.cc
(input_stack::push_file), src/preproc/refer/refer.cc (do_file,
do_bib), src/preproc/tbl/main.cc (table_input::get),
src/preproc/grn/grn.man, src/preproc/grn/main.cc (interpret),
src/roff/troff/input.cc (file_iterator::fill, file_iterator::peek,
do_zero_width, read_request, encode_char, ps_get_line,
transparent_file, get_char_for_escape_name, transparent_translate,
asciify, input_char_description, read_string, set_string),
src/roff/troff/env.cc (environment::add_html_tag),
src/roff/troff/troff.man, tmac/e.tmac (`@(', `(f'): Do it.
* src/include/lib.h: Updated.
* src/preproc/eqn/eqn.cc: Removed.
* NEWS: Updated.
* src/preproc/grn/hdb.cc (DBRead): Fix fscanf() fields.
2002-02-09 Werner LEMBERG
* doc/gnu.xpm: New image.
* doc/Makefile (DOCS): Add homepage.ps.
Add rules for converting xpm->png and xpm->eps.
Use `gnu.{xpm,eps}' as image names.
* doc/homepage.ms: Updated.
2002-02-09 Gaius Mulley
* tmac/www.tmac (www-error): New macro, replacing calls to `@error'.
(IMAGE): Change image position parameters to `-L', `-R', and `-C'.
Remove calls to `B1' and `B2'
(PNG-IMAGE): New macro for inclusion of images in PNG format.
(www-left-ll-trap, www-left-po-trap, www-right-ll-trap): New
auxiliary variables for MARGIN-PNG-IMAGE.
(www-finish-left-po, www-finish-right-ll, www-finish-left-ll): New
auxiliary macros for MARGIN-PNG-IMAGE.
(MARGIN-PNG-IMAGE): New macro to put an image in PNG format into
the margin.
(www-heading-no): New auxiliary variable for HTML-H-{BEGIN,END}.
(HTML-H-BEGIN, HTML-H-END): New macros to begin and end a heading.
(DROPCAP): New macro to produce dropcap characters.
(www-do-image): Renamed back to...
(HTML-DO-IMAGE): This.
Updated all callers.
* doc/Makefile (gnubw.eps): Updated.
* doc/homepage.ms: Updated.
2002-02-08 Werner LEMBERG
* doc/pic.ms: Fixed typos (\(*tx -> \*(tx).
Added `linethick' to table in section `Style Variables'.
2002-02-08 Gaius Mulley
* src/libs/libdriver/input.cc (get_extended_arg): Fix conditional.
2002-02-07 Werner LEMBERG
Adding options -C (compatibility mode) and -c (grotty's old output
scheme) to nroff.
* src/roff/nroff/nroff.sh: Implement it.
Remove `-Wall'.
* NEWS, src/roff/nroff/nroff.man: Updated.
* PROBLEMS: Document bison 1.32 bug.
Some fixes to make groff compile on z/OS 1.2 UNIX (was OS/390).
* src/roff/troff/node.cc (make_tfont): Define it earlier.
* src/roff/troff/div.h: Add prototype for `end_diversions'.
* src/roff/troff/input.cc: Add prototype for `process_input_stack'.
* src/roff/troff/env.h: Add prototype for `title'.
Adding EBCDIC support to grotty.
* src/devices/grotty/tty.cc (CSI): New macro.
(SGR_*, tty_printer::put_color): Use it.
2002-02-06 Werner LEMBERG
Implementing color support in grotty. The new switch -c activates
the old drawing scheme, disabling color at the same time. The new
switch `-i' selects italic instead of underlining (SGR only).
* src/devices/grotty/tty.cc (putstring): New define instead of
`fputs'. Updated all callers.
(old_drawing_scheme): New global variable.
(COLOR_CHANGE): New enum value.
(SGR_*): New defines containing color handling escape sequences.
(TTY_MAX_COLORS, DEFAULT_COLOR_IDX): New defines.
(glyph): New members `back_color_idx' and `fore_color_idx'.
(glyph::order): Add COLOR_CHANGE.
(tty_printer): New members `cur_fore_idx', `curr_back_idx',
`is_underline', `is_bold', `cu_flag', `tty_colors'.
New methods `make_underline', `make_bold', `color_to_idx',
`change_color', `put_color'.
(cu_flag): Moved into `tty_printer' class.
(tty_printer::tty_printer): Initialize colors.
(tty_printer::add_char, tty_printer::set_char, tty_printer::special,
tty_printer::draw, tty_printer::end_page): Handle colors also.
(main): Add options `-c' and `-i'.
(usage): Updated.
* NEWS, src/devices/grotty/grotty.man: Updated.
* src/include/errarg.h (errarg): Add support for `unsigned int'.
* src/libs/libgroff/errarg.c: Implement it.
* src/include/printer.h (printer): Add `change_color' method
(currently used by grotty only).
* src/libs/libdriver/printer.cc: Implement it.
* src/libs/libdriver/input.cc (parse_D_command, do_file): Add
call to `pr->change_color'.
* src/roff/troff/node.cc (troff_output_file::fill_color,
troff_output_file::glyph_color): Call `do_motion'.
* tmac/tty.tmac: Add color definitions.
* src/roff/groff/groff.man: Minor fixes.
2002-02-05 Bernd Warken
* src/libs/libdriver/input.cc: Introduce `EnvInt' typedef and use
it. This is a preparation for future changes.
2002-02-05 Werner LEMBERG
* src/roff/troff/input.cc (process_input_stack): Fix the case
where leading spaces are followed by \f or \s; previously, an
incorrect space width has been used.
* doc/roff.man (quoted_char): Fix argument.
(comment): Define string.
2002-02-04 Larry Kollar
* doc/groff.texinfo: More fixes.
2002-02-04 Werner LEMBERG
* src/preproc/eqn/box.cc (output_string): Don't use \\*[...].
* src/preproc/eqn/main.cc (do_file, inline_equation): Call
`restore_compatibility' before `output_string' -- the LINE_STRING
register now already contains proper switches from and to
compatibility mode.
* man/groff_char.man: Add Euro symbol.
* man/groff_diff.man: Improve documentation of `.am1' and `.as1'.
* tmac/tty.tmac: Add `EUR' as replacement for `eu' and `Eu'.
* doc/groff.texinfo (Defstr*): Print strings with full syntax.
Other minor fixes.
* doc/Makefile (.SUFFIXES, .texinfo.pdf, clean): Add support for
texinfo->pdf.
(.texinfo.html): Add support for texinfo->html.
2002-02-03 Werner LEMBERG
Added three new requests `ds1', `as1', and `ami'. The former two
are equivalent to `ds' and `as' with the difference that
compatibility mode is saved on entry, switched off during string
expansion, and restored on exit. The latter is the pendant to `dei'
for `am'.
(do_define_string): Use `define_mode' and `calling mode'.
Insert COMPATIBLE_SAVE and COMPATIBLE_RESTORE at the beginning and
end of string, respectively.
(define_string, append_string): Use `calling_mode'.
(define_nocomp_string, append_nocomp_string,
define_string_indirect): New functions.
(init_input_requests): Updated.
* NEWS, man/groff_diff.man, man/groff.man: Document it.
* src/preproc/eqn/box.cc (box::top_level, box::extra_space): Use
`as1' for assigning LINE_STRING (this is `10' usually). Sun's
mm macro package accesses this string register directly.
* src/preproc/eqn/main.cc (inline_equation): Use `as1'.
* tmac/trace.tmac: Trace calls to `am' also. Make it work in
compatibility mode.
2002-02-02 Larry Kollar
* doc/groff.texinfo, tmac/groff_ms.man: More fixes.
2002-01-31 Werner LEMBERG
* tmac/an-old.tmac (I): Use \, and \/ to improve spacing.
2002-01-31 Bernd Warken
* src/devices/grolbp/lbp.cc (main): Delete `pr'.
* man/groff_out.man: Revised and updated.
2002-01-30 Bernd Warken
* src/libs/libdriver/input.cc [USE_ENV_STACK]: New macro to comment
out the unused `{' and `}' commands. Undefined by default.
(IntArray): Make `data' private.
(IntArray::operator[], IntArray::get_data, IntArray::len): Use these
new methods instead.
(skip_line_D, skip_to_end_of_line): New functions.
(get_D_fixed_args): Use `skip_line_D'.
Changed to handle dummy odd arguments by ...
(get_D_fixed_args_odd_dummy): This new function.
(get_D_variable_args): Split some code into ...
(get_possibly_integer_args): This new function.
(send_draw): Use more `const'.
(delete_current_env): New function.
(position_to_end_of_args): Use `size_t'.
Updated.
(send_draw): Updated.
(parse_D_command): Handle `c', `C', and `t' better.
Updated.
(do_file): Updated.
2002-01-29 Werner LEMBERG
* NEWS: Revised.
* doc/groff.texinfo: Introduce @Def...List, @Def...Item, and
@Def...ListEnd which replaces @Def...x. This is necessary to get
proper HTML output -- see the comment in the file for more
information.
Updated all calls.
2002-01-29 Gaius Mulley
Fixes to make color changes of 2002-01-21 work with grohtml.
* src/devices/grohtml/post-html.cc (style): Updated.
(html_printer): Remove unused methods.
(html_printer::do_font, html_printer::draw, html_printer::set_char,
html_printer::special): Updated.
* src/devices/grohtml/html-text.cc (debugStack, turnDebug,
html_text::dump_stack_element, html_text::dump_stack) [DEBUGGING]:
Added some debugging code.
(html_text::start_tag): Updated.
(html_text::do_push): New method.
(html_text::push_para): Call it.
Add method for handling color.
(html_text::do_color): Updated.
(html_text::shutdown): Handle color.
* src/devices/grohtml/html-text.h (tag_definition): New member
`col'.
Updated.
2002-01-28 Werner LEMBERG
* tmac/ps.tmac, tmac/html.tmac: Fix compatibility mode issues.
2002-01-27 Gaius Mulley
Add two switches -a and -g to control the antialiasing bits for
text and graphics, respectively.
* src/devices/grohtml/post-html.cc (main): Dummy code for `-a' and
`-g'.
* src/devices/grohtml/grohtml.man: Document them.
* src/preproc/html/pre-html.cc (MIN_ALPHA_BITS, MAX_ALPHA_BITS):
New macros.
(textAlphaBits, graphicAlphaBits, antiAlias): New global variables.
(setupAntiAlias): New function.
(createAllPages): Updated.
(scanArguments): Handle `-a' and `-g'.
(main): Call `setupAntiAlias'.
* NEWS: Updated.
2002-01-27 Werner LEMBERG
* doc/groff.texinfo (Def*): Call index function after deffn.
* tmac/html.tmac: Call `nroff' request.
2002-01-26 Larry Kollar
* tmac/groff_ms.man: Add some omissions.
2002-01-25 Larry Kollar
* tmac/groff_ms.man: Typographical improvements.
2002-01-25 Werner LEMBERG
* doc/groff.texinfo: Updated version and copyright.
* src/devices/grops/grops.man: Updated.
* tmac/groff_tmac.man: Fix `ig' macro.
* tmac/an-old.tmac (ne): Redefine `ne' request to be a no-op in
nroff mode.
Use `.ne' unconditionally everywhere.
(TS): Only insert some vertical space. Doing a page break is no
longer necessary due to the redefinition of the `ne' request.
* src/libs/libdriver/input.cc (parse_D_command): Don't emit a
warning for unknown subcommands but parse and pass them to the
device driver.
2002-01-24 Werner LEMBERG