summaryrefslogtreecommitdiff
path: root/tmac
Commit message (Collapse)AuthorAgeFilesLines
* * aclocal.m4 (GROFF_EBCDIC): Don't include `font/devutf8' inwlemb2002-02-243-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TTYDEVDIRS. Define new variable OTHERDEVDIRS (containing `font/devlj4 font/devlbp' if not EBCDIC). * Makefile.in (TTYDEVDIRS): Always include `font/devutf8'. (OTHERDEVDIRS): New variable. (MDEFINES, DEVDIRS, ALLDIRS, DISTDIRS): Updated. * configure: Regenerated. * NEWS, src/devices/grotty/grotty.man: Updated. * src/roff/troff/input.cc (do_overstrike, do_bracket, get_line_arg): Honour input level. Add new symbol `mc' corresponding to U+00B5 MICRO SIGN. * font/*/*: Implement it in all font files. * font/devps/generate/textmap, font/devps/generate/symbolchars, * font/devps/symbolmap: Updated. * font/devlj4/generate/text.map: Updated. * font/devdvi/generate/CompileFonts (sizes): Add LaTeX sizes. * font/devdvi/generate/texmi.map: Updated. * font/devutf8/R.proto: Remove all `charXXX' entries. * font/devutf8/NOTES: Updated. * font/devX*/*: Regenerated with xtotroff, using fonts from XFree86 version 4.1.0. * tmac/latin1.tmac, tmac/psold.tmac, tmac/tty-char.tmac: Updated. * NEWS, man/groff_char.man: Updated.
* * doc/Makefile (clean): Add *.eps.wlemb2002-02-177-397/+770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (MEMACROS): Removed. (TFLAG): New variable. (TROFF): Use it. Add -ww. (GROFF): Use TFLAG, FFLAG, -U, -p, -e, -t, and -ww. (.me.dit): Fixed. (.ms.html, .ms.ascii, .ms.ps, homepage.html): Simplify. * tmac/www.tmac: Use dummy diversion while resetting and disabling `.tl'. * tmac/e.tmac: Inserted some more `\"' to remove warnings if used unstripped. * src/roff/troff/troff.man: Fix order of parameter description. * NEWS: Updated. Simplify image handling for grohtml. Fix <p> 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 <p>. * 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.
* * tmac/groff_tmac.man: Moved to...wlemb2002-02-132-452/+0
| | | | | * man/groff_tmac.man: This place. * tmac/Makefile.sub, man/Makefile.sub: Updated.
* Illegal -> Invalid.wlemb2002-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. * 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.
* * tmac/www.tmac (www-error): New macro, replacing calls to `@error'.wlemb2002-02-091-38/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | (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. * doc/pic.ms: Fixed typos (\(*tx -> \*(tx). Added `linethick' to table in section `Style Variables'. * src/libs/libdriver/input.cc (get_extended_arg): Fix conditional.
* Adding options -C (compatibility mode) and -c (grotty's old outputwlemb2002-02-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme) to nroff. * src/roff/nroff/nroff.sh: Implement it. Remove `-Wall'. * NEWS, src/roff/nroff/nroff.man: Updated. 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.
* * man/groff_char.man: Add Euro symbol.wlemb2002-02-042-0/+6
| | | | | * man/groff_diff.man: Improve documentation of `.am1' and `.as1'. * tmac/tty.tmac: Add `EUR' as replacement for `eu' and `Eu'.
* Added three new requests `ds1', `as1', and `ami'. The former twowlemb2002-02-032-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* * doc/groff.texinfo, tmac/groff_ms.man: More fixes.wlemb2002-02-021-0/+13
|
* * tmac/an-old.tmac (I): Use \, and \/ to improve spacing.wlemb2002-01-311-1/+1
|
* * tmac/ps.tmac, tmac/html.tmac: Fix compatibility mode issues.wlemb2002-01-282-4/+4
|
* Add two switches -a and -g to control the antialiasing bits forwlemb2002-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | 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. * doc/groff.texinfo (Def*): Call index function after deffn. * tmac/html.tmac: Call `nroff' request.
* * tmac/groff_ms.man: Add some omissions.wlemb2002-01-261-8/+88
|
* * tmac/groff_ms.man: Typographical improvements.wlemb2002-01-264-52/+106
| | | | | | | | | | | | | | | | | * 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.
* * tmac/groff_www.man, NEWS: Fix typos.wlemb2002-01-242-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete revision of color support: Adapt programs to the new libdriver/input.cc. Color spaces are no longer converted to RGB but transferred as-is in the troff intermediate output format. Handle default color gracefully. troff now supports a `default' color (which can't be changed). grops will now use the proper color space functions if available. Update pic. Note that currently grohtml doesn't handle colors properly. This has to be fixed. * src/libgroff/itoa.c (UINT_DIGITS): New macro. (ui_to_a): New function. * src/include/lib.h: Updated. * src/include/color.h (color_scheme): Replace `NONE' with `DEFAULT'. (color): Simplified; removed all `double' members and methods. A new array `components' now holds the color parameters. (color::is_default, color::get_components): New methods. (color::operator==, color:operator!=): New. (Red, Green, Blue, Cyan, Magenta, Yellow, Black, Gray): New macros to make access to the `components' array more comprehensible. * src/libgroff/color.cc: Implement new color support. (atoh): Small fixes. (color::read_encoding): Simplified for new troff intermediate color output format. (default_color): New global variable. * src/roff/troff/input.cc (default_symbol): New global variable. (lookup_color): Use it. (default_black): Removed. (do_glyph_color, do_fill_color): Simplified. (define_color): Handle default color. Improve warnings. (do_if_request): Handle default color. * src/roff/troff/env.cc (environment::environment): Initialize colors with `default_color'. * src/roff/troff/node.cc (troff_output_file::put): Add method for `unsigned int'. (troff_output_file::hex): Removed. (troff_output_file::fill_color, troff_output_file::glyph_color): Updated to include/color.h and libdriver/input.cc. * src/preproc/pic/object.cc (draw_arrow): New parameter to set fill color properly (identically to the outline color). \D'f...' doesn't work any more. All function calls to it updated. * src/devices/grohtml/post-html.cc (html_printer::do_body, main): Updated. * src/devices/grohtml/html-text.cc (html_text::issue_color_begin): Updated. * src/devices/grops/ps.cc (ps_output::put_color): New method. (ps_printer::sbuf_color): Make a real member instead of pointer. (ps_printer::fill_color, ps_printer::output_color): Removed. (ps_printer::ps_printer): Updated. (ps_printer::set_char): Ditto. (ps_printer::set_color): Use various color schemes. Use `put_color' method. (ps_printer::flush_sbuf): Don't set color. (ps_printer::fill_path): Take `environment' as parameter. Simplify color handling. (ps_printer::set_line_thickness): Renamed to ... (ps_printer::set_line_thickness_and_color): This (and updated). (ps_printer::set_color): Change second parameter from `complete' to `fill' which better describes what it does. (ps_printer::draw): Call `flush_sbuf' to output graphic commands and text in the right order. Updated. Remove branches for `f' and `F'; this is handled by libdriver/input.cc. * src/devices/grops/ps.h: Updated. * font/devps/prologue (FL): Redefined ({F,C}r,k,g: New color functions (with and without filling). * doc/pic.ms, src/preproc/pic/pic.man: Small fixes. * man/groff_diff.man, man/groff.man, man/groff_out.man, doc/groff.texinfo, NEWS: Updated. * src/libs/libdriver/input.cc: Completely rewritten. See comments in this file for what has been changed.
* * tmac/doc.common: Initialize %I register for the %I macro towlemb2002-01-182-6/+6
| | | | | | avoid (harmless) warning. * tmac/doc.tmac (Bd): There is no reason to enforce -compact when in the SYNOPSIS section.
* * tmac/groff_ms.man: Completely rewritten.wlemb2002-01-171-134/+810
|
* * tmac/an-old.tmac (TS): Force break, inserting some vertical space.wlemb2002-01-161-0/+1
|
* * tmac/groff_mdoc.man: Minor fixes.wlemb2002-01-151-7/+12
|
* * man/groff_out.man: Revised.wlemb2002-01-091-0/+6
| | | | | | | * man/roff.man: Minor fixes. * src/roff/troff/troff.man: Some reordering. * tmac/an-old.tmac: Add dummy macros for equation support.
* doc/groff.texinfo: Fix documentation of glyph searching algorithm.wlemb2002-01-072-21/+22
| | | | | | * tmac/an-old.tmac: Revert change 2001-12-23. This breaks too many man pages. * tmac/groff_man.man: Small improvements.
* * tmac/www.tmac: Remove extraneous backslash.wlemb2002-01-061-1/+1
| | | | * man/ditroff.man, src/roff/groff/groff.man, man/groff.man: Revised.
* *** empty log message ***wlemb2001-12-301-15/+15
|
* * tmac/www.tmac: Replace\\n[www-html] with \n[www-html] since thewlemb2001-12-302-86/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device is already known at start-up. Make all names of internal macros/registers/strings lowercase, and prepend `www-'. Other minor changes. * src/roff/troff/troff.man: Add preprocessor string at BOF. Implement option `-b' in grohtml to set the HTML background colour. * src/devices/grohtml/post-html.cc (default_background): New global variable. (html_printer::html_printer): Initialize `background' to `default_background'. (main): Implement option `-b'. (usage): Updated. * src/preproc/html/pre-html.cc (scanArguments): Add dummy handling of `-b' option. * src/devices/grohtml/grohtml.man: Updated. * doc/Makefile (.ms.html): Use `-b'. * tmac/html.tmac: Don't set background color. Add new grohtml tag `.html-tl'. * src/devices/grohtml/post-html.cc (title_desc): Add `with_h1' member variable. (title_desc::title_desc): Updated. (html_printer::troff_tag): Handle `.html-tl'. (html_printer::write_title): Use `with_h1'. * tmac/www.tmac (www-end-nowhere): New auxiliary macro. (HTML-TL): New macro. Add support for unordered lists in HTML. * tmac/www.tmac (www-level): New auxiliary register. (www-level1, www-level2, www-level3): New auxiliary strings. (www-push-level, www-pop-level): New auxiliary macros (UL-BEGIN, UL-END, LI): User macros for unordered lists. Miscellaneous. * src/preproc/html/pre-html.cc (DEFAULT_IMAGE_RES): Increase to 100. (DEFAULT_VERTICAL_OFFSET): Removed. (IMAGE_BOARDER_PIXELS): Set to 0. (A4_LENGTH, A4_OFFSET, LETTER_LENGTH, LETTER_OFFSET): New macros. (vertical_offset): Initialize with 0. (gsPaper): New global variable. (get_resolution): Scan for and return unsigned int. (get_papersize): New function to get paper length from devps/DESC. (determine_vertical_offset): New function. (createAllPages): Produce gray-level images and use proper page length. (createImage): Use `-quiet' option of pnmcrop. (addZ): Fix passing of `-Z'. (scanArguments): Fix handling of `-o'. (main): Call `determine_vertical_offset'. * src/devices/grohtml/post-html.cc (html_printer::draw): Comment out code for `l'. * src/libs/libgroff/tmpfile.cc (add_tmp_file): Fix buffer length. * src/roff/troff/node.cc (troff_output_file::check_charinfo): Handle glyph descenders properly. * doc/homepage.ms: Include `gnubw.eps'. * doc/Makefile (gnubw.eps): New rule. (homepage.html): Depend on `gnubw.eps'.
* * tmac/doc-common (Dt): Change output of architecture strings.wlemb2001-12-252-92/+88
| | | | | Do some syntax cleanup. * tmac/groff_mdoc.man: Updated.
* Adding an `itc' request (input line trap accepting \c).wlemb2001-12-221-7/+7
| | | | | | | | | | | | | | | | | | | * src/roff/troff/env.h (environment): New member `continued_input_trap'. Make `do_input_trap' a friend function instead of `input_trap'. * src/roff/troff/env.cc (environment::environment, environment::copy): Updated. (environment::newline): Implement it. (do_input_trap): New function. (input_trap): Call `do_input_trap'. (input_trap_continued): New function. (init_env_requests): Updated. * src/roff/troff/TODO: Updated. * tmac/an-old.tmac (SH, SS, B, I, SM, SB, TP): Use `.itc' instead of `.it'. * src/preproc/grn/hdb.cc (DBRead): Really chop after 127 characters.
* * tmac/doc-common, tmac/doc-syms: Small updates.wlemb2001-12-223-0/+6
| | | | | | | | | | * tmac/an-old.tmac (an-p-footer): Set title length in environment 1. * MANIFEST: New file. * src/preproc/grn/grn.man: Updated. * src/preproc/grn/hdb.cc (MAXSTRING_S): New macro. (DBRead): Use it.
* *** empty log message ***wlemb2001-12-141-291/+0
|
* * src/preproc/eqn/main.cc (inline_equation): Fix typos.wlemb2001-12-121-9/+0
| | | | * tmac/groff_man.man, doc/groff.texinfo: There is no .R macro.
* * src/roff/troff/input.cc (get_delim_file_name): Removed since nowlemb2001-12-069-1050/+1065
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | longer used. * src/devices/grohtml/post-html.cc (html_printer::html_printer): Fix order of initializers. * NEWS: Updated. * doc/groff.texinfo: Fix documentation of \O. * src/devices/grohtml/html-text.cc (html_text::do_indent, html_text::do_table, html_text::do_emittext, html_text::do_para): Use `const' for first argument. (html_text::do_table): Use cast. * src/devices/grohtml/html-text.h: Updated. * src/devices/grohtml/output.cc (simple_output::put_string): Add method for `const string &s'. * src/devices/grohtml/html.h: Updated. * src/devices/grohtml/post-html.cc (MAX_STRING_LENGTH): Removed. (ANCHOR_TEMPLATE): Modified. (manufacture_headings): New global variable to handle `-h' option. (is_subsection): Removed. (char_buffer::add_string): Add `const' to first argument. Protect against invalid string argument. Add method for `const string &s'. (text_glob): Completely redesigned. (page): Use `const' for strings and remove string length variable. (page::add_html): Removed. (page::add_end_encode): New member function. (to_unicode): Moved upwards. (title_desc, header_desc): Updated. (header_desc::write_headings): Updated to new ANCHOR_TEMPLATE definition. (html_printer::is_bold, html_printer::make_bold): New member functions. (html_printer::end_of_line): Updated. (generate_img_src, html_printer::do_auto_image, html_printer::do_title, html_printer::write_header, html_printer::determine_header_level, html_printer::do_heading, html_printer::do_linelength, html_printer::do_pageoffset, html_printer::do_indentation, html_printer::do_tempindent, html_printer::do_indentedparagraph, html_printer::do_break, html_printer::flush_sbuf, get_html_translation, html_printer::begin_page, html_printer::special): Rewritten to get rid of static string length limit. (html_printer::troff_tag): Added `.no-auto-rule'. (html_printer::flush_globs): Small fix. (html_printer::determine_space): Don't compute `space_width'. (html_printer::translate_to_html): Renamed to ... (html_printer::emit_html): This (with updates). (html_printer::write_header): Implement `-h' option. (html_printer::draw): Remove commented-out code. Handle `F' command. (html_printer::add_char_to_sbuf): Removed. (html_printer::add_to_sbuf): Rewritten. (html_printer::sbuf_continuation): Fixed. (html_printer::seen_backwards_escape, reverse, html_printer::remove_last_char_from_sbuf): Removed. (char_translate_to_html, str_translate_to_html): Removed. (html_printer::overstrike): New function member. (html_printer::set_char): Use it. (html_printer::do_body): New function member. (html_printer::~html_printer): Use it. (main): Handle `-h' option. (usage): Updated. * src/devices/grohtml/grohtml.man: Document -h switch. * src/preproc/html/pre-html.cc: Include searchpath.h Replace `POSTSCRIPTRES' macro with `postscriptRes' variable. (get_resolution): New function. (checkImageDir): Use `0777' permissions in mkdir() (write_start_image): Rewritten to use `\O[5...]'. (createImage, generateImages): Updated. (main): Handle `F' and `h' options. Use `get_resolution'. * src/roff/troff/input.cc (begin, end, image): Removed. (do_suppress): Take parameter. Handle modified syntax of `\O'. (token::next): Updated. (init_markup_requests): Removed. (main): Updated. * src/roff/troff/div.h: Add declaration for begin_page(). * tmac/color-html.tmac: Removed. Contents moved to... * tmac/html.tmac: Here. Set background color. * tmac/color.tmac: Removed. Contents moved to... * tmac/ps.tmac: Here. * tmac/www.tmac: Remove the title command when generating images for html. (NO_AUTO_RULE): New macro. (HTML_DO_IMAGE): Use revised `\O' escapes. * tmac/Makefile.sub, tmac/groff_www.man, tmac/troffrc: Updated.
* * src/lib/libbib/map.c, src/utils/pfbtops/pfbtops.c: Includewlemb2001-12-011-0/+1
| | | | | | | | | stdlib.h. * src/roff/troff/input.cc (read_draw_node): Emit error message if more than one argument to \D'f ...'. * tmac/Makefile.sub (NORMALFILES): Add lbp.tmac.
* Use macros of the official interface to test for reloading.wlemb2001-11-282-2/+2
|
* * tmac/an-old.tmac, tmac/doc.tmac, contrib/mm/m.tmac: Assure thatwlemb2001-11-283-4/+9
| | | | | | the macro package is loaded only once. * tmac/groff_man.man: Minor cosmetic fix.
* * src/roff/groff/groff.man, tmac/groff_tmac.man,wlemb2001-11-273-6/+3
| | | | tmac/groff_www.man: s/mwww/www/.
* * aclocal.m4 (GROFF_MKSTEMP): Implement test using C++ linkage.wlemb2001-11-263-5/+293
| | | | | | | | | | | * configure: Regenerated. * win32-diffs: Updated. * tmac/groff_mwww.tmac: Renamed to ... * tmac/groff_www.tmac: This. * tmac/mwww.tmac: Removed. * NEWS, tmac/Makefile.sub: Updated. * doc/groff.texinfo: Improve documentation of the `\v' escape. Fix explanation of `\D' and `rt'.
* * tmac/an-old.tmac (an-header): Set header length equal to pagewlemb2001-11-211-0/+3
| | | | | | | width. * doc/groff.texinfo: Improve documentation of `ne' request. Other minor fixes. * NEWS: Small fix.
* * man/groff_differences.man: Renamed to ...wlemb2001-11-171-1/+1
| | | | | | | | | | | | | | | | | | * man/groff_diff.man: This. Updated. * man/Makefile.sub, src/roff/troff/troff.man, NEWS: Updated. * src/preproc/html/pushbackbuffer.cc: Renamed to ... * src/preproc/html/pushback.cc: This. Updated. * src/preproc/html/pushbackbuffer.h: Renamed to ... * src/preproc/html/pushback.h: This. * src/preproc/html/Makefile.sub, src/preproc/html/pre-html.cc: Updated. * src/libs/libgroff/htmlindicate.cc: Renamed to ... * src/libs/libgroff/htmlhint.cc: This. * src/libs/libgroff/Makefile.sub: Updated. * tmac/an-old.tmac (an-end): Fix page length.
* * NEWS, man/groff_differences.man, doc/groff.texinfo: Updated.wlemb2001-11-162-2/+15
| | | | | | | | | | | | * man/Makefile.sub: Include groff_differences.man. * VERSION: Set to 1.18. * REVISION: Set to 0. * src/roff/troff/input.cc (do_define_macro): Allow whitespace before the second dot (or ending macro name) to end a macro. * doc/groff.texinfo: Doc fix. * tmac/doc-common (doc-header): Handle very long document titles better. * tmac/doc.tmac (doc-do-Bl-args): Fix .substring requests.
* * src/roff/troff/troff.man: Revised and split into troff.man and...wlemb2001-11-151-0/+14
| | | | | | | * man/groff_differences.man: New file. * NEWS: Updated. * tmac/an-old.tmac (TS, TE): New macros for table support.
* * tmac/doc.tmac (doc-flag-recursion): Protect arguments againstwlemb2001-10-191-1/+1
| | | | being handled as end-of-sentence characters,
* * src/roff/troff/input.cc (file_iterator): New memberswlemb2001-10-102-1022/+1022
| | | | | | | | | | | | | | | | | | | | | | | | | `suppress_newline_flag' and `seen_escape'. (file_iterator::next_file): Updated. (file_iterator::fill): Use it. (string_iterator): New member `suppress_newline_flag'. (string_iterator::fill): Set it. (get_color_element): Use MAX_COLOR_VAL. * src/roff/troff/env.cc (environment): Remove `need_eol'. (no_fill): Don't set `env->ignore_next_eol'. (environment::newline): Handle `eol' tag properly. Emit `eol.ce'. (environment::add_html_tag): Set `env->ignore_next_eol'. Don't handle `.ce'. * src/roff/troff/env.h (environment): Updated. * src/devices/grohtml/post-html.cc (text_glob::is_eol_ce): New member function. (html_printer::outstanding_eol): New member function. (html_printer::do_title): Use new functions. (html_printer::troff_tag): Test `id_eol_ce'. * tmac/color.tmac, tmac/color-html.tmac: Use `.do' to make those files work with -C also.
* New files.wlemb2001-10-052-0/+1031
|
* Implementing color support in troff, pic, grops, and grohtml. Thesewlemb2001-10-054-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes are based on a major patch provided by Gaius Mulley <gaius@glam.ac.uk>. New request: `defcolor', supporting rgb, cmy, cmyk, and gray definitions with both hex values and fractions. New escapes: \m and \M for drawing and background color, respectively. This corresponds to the troff output commands `m' and `DF'. groff and troff accept command line switch `-c' to disable color output (which is automatically disabled in compatibility mode). New scaling indicator `f' for fractions (1f = 65536u). New conditional operator `m' to test for defined colors with `if' and `ie'. New keywords `color' (or `colour', `colored', `coloured'), `outline' (or `outlined'), and `shaded' added to pic. * src/include/color.h: New file. * src/include/driver.h: Include it. * src/include/printer.h: Include color.h. (environment): New members `col' and `fill'. (printer): Remove `adjust_arc_center' member function. * src/include/Makefile.sub: Updated. * src/libs/libdriver/input.cc (do_file): Initialize `env.col' and `env.fill'. Handle `m' and `DF' troff commands. * src/libs/libgroff/color.cc: New file. * src/libs/libgroff/Makefile.sub: Updated. * src/preproc/html/pre-html.cc (IMAGE_BORDER_PIXELS): Set to 2. (stop): Removed. (createImage): Fix computation of `y2'. Use `pnmcrop' also. (buffer::write_file_html): Remove calls to `stop'. * src/preproc/pic/common.h (common_output): New abstract function members `set_color', `reset_color', `get_last_filled', and `get_outline_color'. * src/preproc/pic/object.h: Add `IS_SHADED' and `IS_OUTLINED'. (object_spec): Add members `shaded' and `outlined'. * src/preproc/pic/output.h (output): `command' is now abstract. New function members `set_color', `reset_color', `get_last_filled', and `get_outline_color'. * src/preproc/pic/lex.cc (lookup_keyword): Recognize `colo[u]r[ed]', `outline[d]', and `shaded'. * src/preproc/pic/object.cc (output::command): Removed. (output::set_location):Moved to output.h. (graphic_object): Add protected members `outline_color' and `color_fill'. Add member functions `set_outline_color', `get_outline_color', and `set_fill_color'. (closed_object): Add member function `set_fill_color'. Add member `color_fill'. (graphic_object::print_text): Use `out->set_color' and `out->reset_color'. (box_object::print, ellipse_object::print, circle_object::print, line_object::print, spline_object::print, arc_object::print): Ditto. (object_spec::make_object): Implement `IS_OUTLINED' and `IS_SHADED'. * src/preproc/pic/pic.y: Add tokens `COLORED', `OUTLINED', and `SHADED', making them `%left'. Add rules `object_spec [SHADED|COLORED|OUTLINED] text'. * src/preproc/pic/tex.cc (tex_output): New dummy function members `set_color', `reset_color', `get_last_filled', and `get_outline_color'. * src/preproc/pic/troff.cc (simple_output): New abstract function members `set_color', `reset_color', and `get_last_filled'. (simple_output::polygon, simple_output::circle, simple_output::ellipse): Use `get_last_filled'. (troff_output): New members `last_filled' and `last_outlined'. New function members `set_color', `reset_color', `get_last_filled', and `get_outline_color'. (troff_output::finish_picture): Use `reset_color'. (troff_output::set_fill): Test `last_filled'. * src/preproc/pic/pic.man: Updated. * src/roff/groff/groff.cc (main): Implement `-c' option. (synopsis, help): Updated. src/roff/groff/groff.man: Updated. * src/roff/troff/troff.h: Include color.h. (warning_type): Add WARN_COLOR. * src/roff/troff/env.h (environment): New members `{cur,prev}_{glyph,fill}_color'. New member functions `get_{prev_,}{glyph,fill}_color'. * src/roff/troff/env.cc: Initialize and implement them. * src/roff/troff/input.cc: New global variable `disable_color_flag'. Replace `NULL' with `0' everywhere for consistency. (lookup_color, default_black, do_glyph_color, do_fill_color, get_color_element, read_rgb, read_cmy, read_cmyk, read_gray, define_color): New functions. (token::next): Implement \M and \m escapes. (do_if_request): Implement `m' operator. (usage): Updated. (main): Implement `-c' option. (init_markup_requests): Add `defcolor' request. (warning_table): Add `color' warning. * src/roff/troff/node.h (glyph_color_node, fill_color_node): New classes. * src/roff/troff/node.cc (troff_output_file): New members `current_{page,glyph}color'. New member functions `put_hex', `glyph_color', and `fill_color'. (glyph_color_node::*, fill_color_node::*): Implement it. * src/roff/troff/number.cc (SCALE_INDICATOR_CHARS): Add `f'. (parse_term): Add support for `f'. * src/roff/troff/troff.man: Updated. * src/devices/grodvi/dvi.cc (draw_dvi_printer::draw): Add dummy entry for `F'. * src/devices/grolbp/lbp.cc (lbp_printer::draw): Ditto. * src/devices/grolj4/lj4.cc (lj4_printer::draw): Ditto. * src/devices/grohtml/html-text.h (HTML_TAG): Add COLOR_TAG. (tag_definition): Use `void *' for arg1. (html_text): New member functions `do_color' and `done_color'. Use `void *' for second parameter of `push_para' member function. New `push_para' member function with a single parameter. Use `char *' for parameter of `issue_table_begin' member funtion. New `issue_color_begin' member function. * src/devices/grohtml/html-text.cc (html_text::end_tag): Handle COLOR_TAG. (html_text::issue_color_begin): New function. (html_text::issue_table_begin): Use `char *' for parameter. (html_text::start_tag, html_text::shutdown, html_text::check_emit_text): Updated. (html_text::push_para): Use `void *' for second parameter. Add same function with only one parameter. (html_text::do_*): Updated. (html_text::do_color, html_text::done_color): New functions. * src/devices/grohtml/post-html.cc (style): New member `col'. Mew member `style' with 6 parameters. (style::style, style::operator==): Updated. (html_printer::do_font): Use it. (html_printer::draw): Add dummy entry for `F'. (html_printer::set_char): Updated. * src/devices/grohtml/grohtml.man: Updated. * src/devices/grops/ps.cc (ps_output::put_float): Use `%g' to have trailing zeroes removed. (ps_printer): New members `sbuf_color', `fill_color', and `output_color'. Removed member `fill'. New member function `set_color'. (ps_printer::ps_printer, ps_printer::set_char): Updated. (ps_printer::flush_sbuf, ps_printer::set_line_thickness, ps_printer::fill_path, ps_printer::draw): Use `set_color'. * tmac/color-html.tmac, tmac/color.tmac: New files. * tmac/troffrc: Include them. * tmac/www.tmac (URL, FTP, MAILTO): Use blue color. * tmac/Makefile.sub: Updated. * NEWS, doc/groff.texinfo, doc/pic.ms, man/groff_out.man, man/groff.man: Updated. * font/devps/prologue.ps: Define FC and CO functions. Fix incorrect cropping of images and incorrect handling of special characters. Fix handling of file names in \O. * src/include/geometry.h: New file. * src/libs/libgroff/geometry.cc: New file. * src/libs/libdriver/printer.cc (printer::adjust_arc_center): Moved to `geometry.cc'. * src/roff/troff/input.cc (get_delim_file_name): Fixed problem with initial spaces. (do_suppress): Updated. * src/roff/troff/node.cc: Include geometry.h. (troff_output_file::flush_tbuf): Fixed parameters to `check_output_limits'. (troff_output_file::check_charinfo): Ditto. (troff_output_file::determine_line_limits): Add support for `Da' and `Dl' commands. * src/devices/grohtml/post-html.cc (str_translate_to_html): Add new parameter `is_special' to decode special characters from escape sequences. (html_printer::do_title, html_printer::do_heading, html_printer::do_indentedparagraph, html_printer::translate_to_html, html_printer::special): Updated. * Makefile.sub (DISTCLEANFILES): Add stamp-h. Fix entry for config.h. * test-groff (GROFF_BIN_PATH): Add $builddir/roff/groff. * tmac/troffrc: Translate nonbreakable space character to `\~'. * src/preproc/eqn/eqn.man: Document -d command line option.
* * src/roff/troff/troff.man: Remove superfluous line.wlemb2001-09-051-2/+3
| | | | | | * tmac/s.tmac, contrib/mm/m.tmac: Enable all warnings only if no -W or -w option is given on the command line (or rather, if only the default warnings are set).
* * contrib/mm/groff_mm.man, man/groff.man, src/preproc/eqn/eqn.man,wlemb2001-09-041-1/+2
| | | | tmac/groff_mdoc.man: Don't use .ne for TTY devices.
* * src/roff/troff/token.h (token_type): Add TOKEN_TRANSPARENT_ESCAPE.wlemb2001-08-281-1/+1
| | | | | | | | | | | | | | * src/roff/troff/input.cc (token::next): Return TOKEN_TRANSPARENT_ESCAPE for \f, \H, \R, \s, and \S if not in compatibility mode. (token::description): Updated. (process_input_stack): Reset `bol' for TOKEN_TRANSPARENT_ESCAPE. (token::add_to_node_list, token::process): Ignore TOKEN_TRANSPARENT_ESCAPE. * tmac/an-old.tmac: Fix `S' string. * src/roff/troff/troff.man: Don't use .ne for TTY devices.
* * tmac/doc.tmac (Ex): New implementation.wlemb2001-08-143-3/+100
| | | | * tmac/doc-common, tmac/groff_tmac.man: Updated.
* * tmac/doc.tmac (Rv): Implement support for 0 or more than 1wlemb2001-08-142-14/+49
| | | | | argument. * tmac/groff_tmac.man: Updated.
* * src/libs/libgroff/tmpname.cc: New file, defining get_tempname().wlemb2001-07-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * src/libs/libgroff/mkstemp.cc: New file. * src/libs/libgroff/mksdir.cc: New file. * src/libs/libgroff/tmpfile.cc [HAVE_MKSTEMP_PROTO]: Removed. (xtmpfile) [!HAVE_MKSTEMP]: Removed. * src/libs/libgroff/Makefile.sub: Updated. * src/include/lib.h: Add mksdir() prototype. * src/include/posix.h: Define S_IXUSR if not yet defined. * src/preproc/html/pre-html.cc (MAX_RETRIES): Removed. (createAllPages): Use mksdir() instead of current code. * src/utils/indxbib/indxbib.cc [HAVE_MKSTEMP_PROTO]: Removed. (main): [!HAVE_MKSTEMP]: Removed. * aclocal.m4 (GROFF_MKSTEMP): Updated to use new mkstemp.cc file. (GROFF_INTTYPES_H, GROFF_UNSIGNED_LONG_LONG, GROFF_UINTMAX_T): New macros. * configure.ac: Add tests for stdint.h, sys/time.h, and gettimeofday(). Call new GROFF_xxx macros. * configure: Regenerated. * Makefile.in: Comments updated.
* Added .cvsignore fileswlemb2001-07-191-0/+19
|