summaryrefslogtreecommitdiff
path: root/man/groff_diff.man
Commit message (Collapse)AuthorAgeFilesLines
* Improve CJK support with new values for `.cflags'.wl2010-12-181-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces three new values to `.cflags': don't break before character: 128 don't break after character: 256 allow inter-character break: 512 They are handled differently if compared to other cflags values: (1) hcode values are completely ignored (2) similar to kern values, and contrary to the other cflags values, troff looks at pairs of characters to decide whether a break gets inserted A yet-to-be-written patch should add inter-character spacing if those flags are active; currently, only zero-width breakpoints are inserted. * src/roff/troff/charinfo.h (charinfo): Change type of `flags' to `int'. Update callers accordingly. New enum values `DONT_BREAK_BEFORE', `DONT_BREAK_AFTER', and `INTER_CHAR_SPACE'. New member functions `prohibit_break_before', `prohibit_break_after', and `inter_char_space'. * src/roff/troff/input.cpp: Updated. * src/roff/troff/node.cpp (inter_char_space_node): New class similar to kern_pair_node, collecting charinfo entities with the abovementioned cflags values. (break_char_type): Add new enum values. (glyph_node::merge_glyph_node): Handle abovementioned cflags values and emit an `inter_char_space_node' if necessary. * tmac/ja.tmac: Use new cflags values. * doc/groff.texinfo, NEWS, man/groff_diff.man: Document new values.
* Implement support for character classes.wl2010-12-131-20/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses standard C++ headers, contrary to the rest of groff. Ideally, everything in groff should be updated to do the same. * src/include/font.h (glyph_to_unicode): New function. * src/libs/libgroff/font.cpp (glyph_to_unicode): Implement it. (font::contains, font::get_code): Use it. * src/roff/troff/charinfo.h: Include <vector> and <utility>. (charinfo): New members `ranges' and `nested_classes'. New member functions `get_unicode_code' and `get_flags'. New member functions `add_to_class', `is_class', and `contains'. (charinfo::overlaps_horizontally, charinfo::overlaps_vertically, charinfo::can_break_before, charinfo::can_break_after, charinfo::can_break_after, charinfo::ends_sentence, charinfo::transparent,, charinfo:ignore_hcodes): Use `get_flags', which handles character classes also. * src/roff/troff/input.cpp (char_class_dictionary): New global variable. (define_class): New function. (init_input_requests): Register `class'. (charinfo::get_unicode_code, charinfo::get_flags, charinfo::contains): Implement it. * NEWS, doc/groff.texinfo (Character Classes), man/groff_diff.man, man/groff.man: Document it.
* * man/groff_diff.man: Document \n[.P].wl2010-06-051-0/+5
|
* * man/groff_diff.man: Document \n[.O].wl2010-06-041-2/+8
|
* Make patterns with uppercase letters work.wl2009-12-311-0/+4
| | | | | | | | Problem reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>. * src/roff/troff/input.cpp (init_hpf_code_table): Use `cmlower'. * doc/groff.texinfo, man/groff_diff.man: Update documentation of `hpfcode' request.
* Add a new `file' warning category.wl2009-02-211-0/+6
| | | | | | | | | | | * src/roff/troff/troff.h (warning_type): Add WARN_FILE. * src/roff/troff/input.cpp (DEFAULT_WARNING_MASK): Include WARN_FILE. (warning_table): Add `file' category. (macro_source): Convert error on missing macro file to a warning. * NEWS, doc/groff.texinfo (I/O, Warnings), man/groff_diff.man, src/roff/troff/troff.man: Document new warning category.
* Implement a leading spaces macro request, `lsm', in analogy towl2009-02-141-1/+22
| | | | | | | | | | | | | | | | | `blm'. Implement two new number registers, \n[lsn] and \n[lss], which hold the number of spaces and the horizontal space, respectively, which would be inserted if the macro registered by `lsm' wasn't called. * src/roff/troff/input.cpp (leading_spaces_macro_name, leading_spaces_number, leading_spaces_space): New global variables. (leading_spaces_macro): New function. (process_input_stack) <token::TOKEN_SPACE>: Handle `lsm'. (init_input_requests): Register `lsm', \n[lsn], and \n[lss]. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo (Leading Spaces Traps): Document new requests and registers.
* Update FDL 1.1 to FDL 1.3.wl2009-01-051-3/+3
|
* Update copyright year.wl2009-01-051-1/+1
|
* * src/libs/libgroff/font.cpp (font::contains, font::get_code):wl2008-01-161-0/+13
| | | | | | | | Handle single-letter names correctly. * doc/groff.texinfo, man/groff_diff.man: Extend documentation of \^ and \|. * NEWS: Updated.
* * man/groff.man: Mention glyph and characters.wl2008-01-151-28/+30
| | | | | | | Minor other updates. * man/groff_char.man: Minor updates. * man/groff_diff.man: Better clarification between characters and glyphs.
* * man/groff_char.man, man/groff.man: Revised.wl2008-01-051-230/+230
| | | | * src/preproc/eqn/lex.cpp (troff_defs): Fix typo.
* * */*: s/Osanna/Ossanna/.wl2008-01-041-6/+3
| | | | | | | | | | | * */*.man: Replace .URL with .UR/.UE (except in groff_www.tmac). Replace .MTO with .MT/.ME (except in groff_www.tmac). Insert `\:' in URLs where appropriate. Don't include www.tmac (except in groff_www.tmac). * man/groff.man (.ESC[]): Fix font of closing bracket. (.ESCq): Fix font of closing quote character. Many other improvements.
* typos, simplificationswl2007-02-081-55/+55
|
* Change .UR/.UE and .MT/.ME so the start macro no longer takesesr2007-02-061-6/+6
| | | | | a second argument that is pasted to the end of the generated text. Instead, the end macro takes an argument that does the same thing.
* Unnecessary macros removed.esr2007-02-051-181/+135
|
* * tmac/an-ext.tmac (\n[EX]): Rename to \n[mX].wl2007-01-301-65/+51
| | | | | | | | | | | | | | | | | | | (\n[mH]): New register (set if grohtml is used). (\n[SY]): Rename to \n[mS]. (\n[a]): Rename to \n[mA]. (\n[i]): Rename to \n[mI]. (mU): New auxiliary input trap macro. (UR, UE): Replace stub with real definition. (URL): Remove. (MT, ME): New macros. (MTO): Remove. (EX, EE): Don't insert vertical space. Use a register to store (and restore) the current font. * man/ditroff.man, man/groff_diff.man, man/roff.man: Revised, based on patches from Eric Raymond. Fix URL addresses. * contrib/pdfmark/pdfroff.man: Updated.
* Add `\%^' escape to handle the parameters to a macro as a stringwl2006-10-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | argument. * src/roff/troff/input.h (DOUBLE_QUOTE): New special character. * src/roff/troff/input.cpp (input_iterator, input_stack, macro_iterator): Add `space_follows_arg' member function. (macro_iterator::add_arg): Add parameter to set the `space_follows' flag. (arg_list): Add member `space_follows'. Update constructor and all callers. (decode_args): Store discarded double quotes. (interpolate_args): Handle DOUBLE_QUOTE. Add `\%^' escape. (get_copy, token::next, composite_glyph_name): Handle DOUBLE_QUOTE. * tmac/trace.tmac: Trace .nr, .ds, .ds1, .as, .as1. * docs/groff.texinfo (Parameters), man/groff.man, man/groff_diff.man, NEWS: Document it.
* Add a request `pev' to print environment information (similar towl2006-09-021-1/+6
| | | | | | | | | | | | | | | `pnr' and `ptr' to print number registers and traps). * src/roff/troff/env.h (environment): Add member function print_env. * src/roff/troff/env.cpp: (environment::print_env): New function to print a given environment state. (print_env): New global function to iterate through the environments, printing each one. (init_env_requests): Register `pev'. * doc/groff.texinfo (Debugging), man/groff.man, man/groff_diff.man, NEWS: Document `pev' request.
* Add new flag to .cflags to enable hyphenation without looking atwl2006-08-111-1/+8
| | | | | | | | | | | | | hcode values. * src/roff/troff/charinfo.h (charinfo): New enumeration value `IGNORE_HCODES'. New member function `ignore_hcodes'. * src/roff/troff/node.cpp (break_char_node::add_self, node::add_char): Updated. * doc/groff.texinfo, man/groff_diff.man, NEWS: Document it.
* Add a request `.fzoom' and a number register `.zoom' to magnifywl2006-07-121-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fonts. * src/include/font.h (font): Add member variable `zoom'. Add member functions `set_zoom' and `get_zoom'. Remove `static' attribute from `scale' member function. * src/libs/libgroff/font.cpp (font::font): Updated. (scale_round): New version with three parameters to handle zoom factor. (font::scale, font::get_width): Handle zoom factor. (font::set_zoom, font::get_zoom): New functions. (font::load): Handle `zoom' while computing `space_width'. * src/roff/troff/env.h: Declare `env_get_zoom'. (environment): Add member function `get_zoom'. * src/roff/troff/env.cpp (environment::get_zoom): New function. (init_env_requests): Initialize `.zoom' register. * src/roff/troff/node.cpp (font_info): New member functions `set_zoom' and `get_zoom'. (tfont): New member function `get_zoom'. (env_get_zoom): New function. (troff_output_file::set_font): Handle zoom factor. (font_zoom_request): New function. (init_node_requests): Initialize `fzoom' request. * docs/groff.texinfo (Changing Fonts), man/groff.man, man/groff_diff.man, NEWS: Document `fzoom' request and `.zoom' register. * src/roff/troff/TODO: Updated.
* Implement new number register `.br' which is set to 1 if a macro haswl2006-04-041-1/+26
| | | | | | | | | | | | | | | | | | | | | | been called as .foo and to 0 if called as 'bar. This is useful for -mtrace so that requests can be reliably traced too. * src/roff/troff/input.cpp (input_iterator): Add virtual function `get_break_flag'. (macro_iterator): Add `with_break' member and `get_break_flag' function. Update constructors. (input_stack): Add function `get_break_flag'. (break_flag_reg): New number register class. (input_init_requests): Register `.br'. * src/roff/troff/TODO: Updated. * tmac/trace.tmac: s/!!sp/!!!sp/. Modify definitions of `de', `de1', `am', and `am1' to use \n[.br]. * docs/groff.texinfo, man/groff.man, man/groff_diff.man, NEWS: Document it.
* Add two request `.device' and `.devicem' which are equivalent towl2006-03-271-1/+18
| | | | | | | | | | | `\X' and `\Y', respectively. * src/roff/troff/input.cpp (device_request, device_macro_request): New functions. (init_input_requests): Register them. * doc/groff.texinfo, man/groff_diff.man, man/groff.man, NEWS: Document them.
* * doc/groff.texinfo (Operators in Conditionals): Mention that `c'wl2006-03-131-97/+98
| | | | | | works with \N'...' also. * man/groff_diff.man: Ditto. Remove use of future tense where possible.
* * src/libs/libgroff/glyphuni.cpp (glyph_to_unicode_list): Use entrywl2006-02-241-4/+6
| | | | | | | | | | | | for \-. Remove commented out entries for \' and \` (there are no such glyph names). * src/libs/libgroff/uniglyph.cpp (unicode_to_glyph_list): Remove commented out entries for \' and \`. * */*: s/legal/valid/ where appropriate.
* * src/devices/grohtml/html-table.cppwl2004-11-231-1/+1
| | | | | (html_table::emit_table_header): Don't emit `cols' attribute which doesn't exist in HTML 4.0 and is thus invalid.
* Add requests `fcolor' and `gcolor'.wlemb2004-07-271-1/+19
| | | | | | | | | | | * src/roff/troff/env.cpp (fill_color_change, glyph_color_change): New functions. (init_env_requests): Add `fcolor' and `gcolor'. * src/roff/troff/input.h: Export do_glyph_color and do_fill_color. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document new requests.
* * src/roff/troff/input.h: s/COMPATIBLE_SAVE/PUSH_GROFF_MODE/.wlemb2004-07-031-1/+19
| | | | | | | | | | | | | | | | | | | | | s/COMPATIBLE_RESTORE/POP_GROFFCOMP_MODE/. Update all users. (PUSH_COMP_MODE): New internal character constant. Update all users. * src/roff/troff/input.cpp (get_copy): Handle PUSH_GROFF_MODE, PUSH_COMP_MODE, and POP_GROFFCOMP_MODE. (token::next, macro::append): Handle PUSH_COMP_MODE. (decode_args): Add PUSH_GROFF_MODE or PUSH_COMP_MODE before and POP_GROFFCOMP after each of the decoded arguments to make them independent from the compatibility mode status. (comp_mode): Add `COMP_ENABLE'. (do_define_string, do_define_macro): Handle COMP_ENABLE. (define_string, append_string, define_macro, define_indirect_macro, append_macro, append_indirect_macro): Handle `compatible_flag'. (chop_macro, substring_request, asciify): Handle PUSH_COMP_MODE. * man/groff_diff.man, doc/groff.texinfo: Updated.
* Implement two new conditional operators `F <name>' and `S <name>'wlemb2004-06-301-9/+28
| | | | | | | | | | | | | | | | | | | | | | | which check whether <name> is a valid font or style, respectively. * src/libs/libgroff/font.cpp (text_file): Add `silent' member. (text_file::text_file): Updated. (text_file::error): Don't emit message if `silent' is set. (font::load_font): Add optional third argument (which is directly passed to `load'. (font::load): Add optional second argument to check the header of a font only, without emitting warning or error messages. * src/include/font.h (font): Updated. * src/roff/troff/input.cpp (do_if_request): Implement `S' and `F' conditionals. * src/roff/troff/node.cpp (mount_font_no_translate): Add optional fourth argument to check a font without mounting. (check_font, check_style): New functions. * src/roff/troff/node.h: Updated. * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: Updated.
* Implement new string-valued register `.sty' to return the currentwlemb2004-06-291-1/+7
| | | | | | | | | | | | | | style name. * env.cpp (environment::get_style_name_string): New function. (init_env_requests): Add `.sty' register. * env.h (environment): Updated. * node.cpp (font_info): Make `get_style_name' a friend. (get_style_name): New function. * node.h: Updated. * man/groff_diff.man, man/groff.man, NEWS, doc/groff.texinfo: Updated.
* * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo:wlemb2004-05-061-3/+9
| | | | | | | | | | | | | Document `.U' register. * src/roff/troff/env.cpp (environment::mark_last_line) [WIDOW_CONTROL]: Fix scope of `p' for new C++ compilers. New read-only register `.U'; it returns 1 in safer mode and 0 otherwise. * src/roff/troff/input.cpp (init_input_requests): Implement `.U' register.
* Implement string-valued registers \n[.m] and \n[.M] to return thewlemb2004-01-071-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | name of the current drawing and background color, respectively. * src/roff/troff/symbol.h: Moved to... * src/include/symbol.h: Here. Small fixes to make it work outside of the `troff' directory. * src/roff/troff/symbol.cpp: Moved to... * src/libs/libgroff/symbol.cpp: Here. Small fixes to make it work outside of the `troff' directory. * src/include/Makefile.sub (HDRS), src/libs/libgroff/Makefile.sub (OBJS, CCSRCS), src/roff/troff/Makefile.sub (OBJS, CCSRCS, HDRS): Updated. * src/include/color.h: Include symbol.h. (color): Add new field `nm'. * src/libs/libgroff/color.cpp (color::color): Updated. * src/roff/troff/dictionary.cpp, src/roff/troff/div.cpp, src/roff/troff/node.cpp, src/roff/troff/number.cpp, src/roff/troff/reg.cpp: Don't include symbol.h. * src/roff/troff/env.cpp: Don't include symbol.h. (environment::get_glyph_color_string, environment_get_fill_color_string): New member functions. (init_env_requests): Handle `.m' and `.M' registers. * src/roff/troff/input.cpp: Don't include symbol.h. (default_symbol): Moved to symbol.cpp/symbol.h. (do_glyph_color, do_fill_color, define_color): Pass symbol name to color constructor. * src/roff/troff/env.h: Updated. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document new registers.
* Add requests `dei1' and `ami1' for completeness.wlemb2003-07-241-36/+48
| | | | | | | | | | | | | | | | | | | | | | | * src/roff/troff/input.cc (calling_mode): Remove CALLING_DISABLE_COMP. (comp_mode): New enumeration. (do_define_string, define_string, define_nocomp_string, append_string, append_nocomp_string): Updated. (do_define_macro): Add third parameter. (define_macro, define_nocomp_macro, define_indirect_macro, append_macro, append_nocomp_macro, append_indirect_macro): Updated. (define_indirect_nocomp_macro, append_indirect_nocomp_macro): New functions. (ignore): Updated. (init_input_requests): Add `dei1' and `ami1'. * tmac/trace.tmac: Handle de1 and am1. (de): Improve tracing message. (am): Add missing `do'. (return): Use de1. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document new requests.
* * *.man: Switch to non-compatibility mode temporarily if GNUwlemb2003-07-181-1/+5
| | | | | | syntax extensions are used in the particular man page. * PROBLEMS: Add solutions for SGR problems.
* * src/preproc/pic/pic.y <sprintf_args>: Implement workaround for bugwlemb2003-06-061-5/+5
| | | | in Compaq C++ V6.5-033 for Compaq Tru64 UNIX V5.1A (Rev. 1885).
* * tmac/doc.tmac (doc-tag-list): Don't use \Z to assure that spaceswlemb2003-05-181-1/+4
| | | | | | | | | | | | | | | | | aren't stretched in a tag (this can fail with unformatted boxes). Instead, insert a break and go back one line. * src/roff/troff/input.cc (return_macro_request): If called with argument pop macro twice. We need this to trace `return'. * tmac/trace.tmac: Handle `return'. Fix typos. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document. * tmac/groff_ms.man, doc/groff.texinfo: Improve documentation of registers `FPS', `FVS', and `FPD'.
* Add register \n[.height] which returns the value of \H.wlemb2003-04-101-0/+10
| | | | | | | | | | | | | | | | | | | | Add register \n[.slant] which returns the value of \S. * src/roff/troff/env.cc (init_env_requests): Implement. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document. * tmac/html.tmac: Move some of the data into html-end.tmac. Remove most of the character translations for eqn since html fonts now cover those characters. Load www.tmac. * tmac/html-end.tmac: New file. * tmac/troffrc: Load html.tmac not www.tmac for -Thtml. * tmac/troffrc-end: Load html-end.tmac not html.tmac for -Thtml. * tmac/Makefile.sub (NORMALFILES): Add html-end.tmac. * man/groff_out.man: Document negative values of `N' if -Thtml is used.
* Document composite glyphs and the `composite' request.wlemb2003-03-021-3/+26
| | | | * man/groff.man, man/groff_diff.man, doc/groff.texinfo: Do it.
* New commands \D'Fr ...', \D'Fc ...', etc. for orthogonality.wlemb2003-02-141-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make \D'f ...' move horizontally again for backwards compatibility. Replace it with \D'Fg ...' where appropriate to avoid dependency on horizontal resolution. * src/roff/troff/input.cc (do_get_long_name): New function. (get_long_name): Call it. (read_draw_node): Handle `\D'Fx ...' by calling ... (read_color_draw_node): New function. (read_rgb, read_cmy, read_cmyk, read_gray): New optional argument `end'. Pass it to `do_get_long_name' which is used instead of `get_long_name'. * src/libs/libdriver/input.cc (color_from_Df_command): Remove unnecessary value guard. (parse_D_command) <'f'>: Add horizontal shift. * src/preproc/grn/hgraph.cc (HGPrintElt) <POLYGON>: Use \D'Fg ...'. * src/preproc/pic/troff.cc (troff_output::set_fill): Ditto. (FILL_MAX): Removed. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Updated. * src/roff/troff/input.cc (do_name_test, do_expr_test, do_zero_width): Push `\n' if closing delimiter is missing. (token::next) <ESCAPE_NEWLINE>, <'\n'>, <'\ '>: Reset `have_input'. <'F'>: Make \F non-transparent at the beginning of line. (process_input_stack) <token::TOKEN_CHAR, token::TOKEN_NEWLINE, token::TOKEN_REQUEST, token::TOKEN_BEGIN_TRAP>: Don't handle `have_input'. (define_color): Free color in case of reassignment. * doc/groff.texinfo (@Defesc, @DefescList, @DefescItem, @DefescListEnd): Use @Var, not @var. Fix all calls. * src/preproc/grn/hgraph.cc (HGPrintElt): Fix typo. * src/preproc/pic/object.cc (object_spec::~object_spec): Free `shaded' and `outlined' arrays. (object_spec::object_spec): Initialize `shaded' and `outlined'. (graphic_object::set_fill_color, graphic_object::set_outline_color): Use strsave. (closed_object::set_fill_color): Ditto. * src/preproc/pic/troff.cc (troff_output::set_color): Use strsave instead of strdup. (troff_output::reset_color): Use a_delete instead of free. * src/preproc/pic/main.cc (do_file): Free `out' in case of error.
* * doc/groff.texinfo: Improve documentation of `ad'.wlemb2003-02-111-2/+10
| | | | | | | | | | Document that \D'f...' is dependent on the horizontal resolution. * man/groff_diff.man: Improve documentation of \D'f...'. * src/preproc/grn/hgraph.cc (HGPrintElt) <POLYGON>: Don't emit compensating \h'...' for \D'f ...' since the latter no longer moves current position. * src/preproc/pic/troff.cc (troff_output::set_fill): Ditto.
* Improve error messages for `x F' (and `F') commands.wlemb2003-02-111-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/include/error.h: Add declaration for `current_source_filename'. * src/libs/libgroff/filename.cc: Add `current_source_filename'. * src/libs/libgroff/error.cc (do_error_with_file_and_line): Add parameter for source file string. Updated all callers. * src/libs/libdriver/input.cc: Add `current_source_filename'. (remember_source_filename): New function. (parse_x_command <'F'>, do_file <'F'>): Use it. Make grotty not emit warnings about unknown colors more than necessary. * src/devices/grotty/tty.cc: Include `ptable.h'. (TTY_MAX_COLORS): Removed. (DEFAULT_COLOR_IDX): Defined to -1. (glyph): Change `back_color_idx' and `fore_color_idx' to `char'. (tty_printer): Change `curr_back_idx' and `curr_fore_idx' to `char'. Change `tty_colors' to be a ptable. First arg of `put_color' is now `char'. New functions `make_rgb_string' and `tty_color'. (tty_printer::tty_printer): Use `tty_color'. (tty_printer::color_to_idx): Return value is now `char'. Use `tty_color'. * src/include/color.h (color): Add `print_color' member function. * src/libs/libgroff/color.cc (color::print_color): Implement it. Valgrind fixes. * src/devices/grops/ps.cc (ps_printer::define_encoding): Close encoding file. * src/include/ptable.h (PTABLE::~PTABLE, PTABLE::define): Always assume that value has been allocated with `new[]', thus use `a_delete' for deallocation. * src/libs/libdriver/input.cc (get_integer_arg, get_possibly_int_args, parse_x_command, do_file): Use `a_delete' where appropriate. * src/libs/libgroff/new.cc (delete) [!COOKIE_BUG]: Define. * src/libs/libgroff/nametoindex.cc (character_indexer::named_char_index): Use `new <type>[1]'. * src/preproc/eqn/lex.cc (init_table, do_definition): Use `new <type>[1]'. * src/preproc/eqn/text.cc (set_special_char_type): Ditto. (split_text): Use `a_delete'. * src/preproc/pic/pic.y (define_label, define_variable): Use `new <type>[1]'. * src/roff/troff/env.cc (environment::choose_breakpoint): Avoid harmless memory leak. (hyphen_trie::read_patterns_file): Initialize `buf'. * src/roff/troff/node.cc (troff_output_file::troff_output_file): Initialize `current_fill_color'and `current_glyph_color'. * src/roff/troff/glyphuni.cc (glyph_to_unicode_init::glyph_to_unicode_init): Use `new <type>[1]'. * src/roff/troff/uniuni.cc (unicode_decompose_init::unicode_decompose_init): Ditto. * src/roff/troff/uniglyph.cc (unicode_to_glyph_init::unicode_to_glyph_init): Ditto.
* Similar to \[is], the square root glyph (\[sr]) and the square rootwlemb2003-01-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | extension glyph (\[radicalex]) are now text symbols. The new mathematical versions are called \[sqrt] and \[sqrtex], respectively. * font/devX*/S: Regenerated. * font/devdvi/generate/texex.map: Rename `sr[0123]' to `sqrt[0123]'. * font/devdvi/generate/texsy.map: Rename `sr' to `sqrt'. * font/devdvi/EX, font/devdvi/S: Regenerated. * font/devhtml/R.proto, font/devutf8/R.proto: Add `sqrt'. * font/devlj4/generate/special.map: Add `sqrt'. * font/devlj4/S: Regenerated. * font/devps/generate/textmap: Add `sqrt'. * font/devps/S, font/devps/symbolmap: Regenerated. * src/preproc/eqn/sqrt.cc (SQRT_CHAR, RADICAL_EXTENSION_CHAR, SQRT_CHAIN, BAR_CHAIN): Use `sqrt*' and `sqrtex*'. * src/roff/troff/input.cc (init_charset_table): Make `sqrtex' overlap horizontally. * tmac/X.tmac, tmac/ps.tmac, tmac/lj4.tmac: Add `sqrtex'. * tmac/dvi.tmac: Add `sr', and `sqrtex'. Fix `radicalex'. * doc/groff.texinfo, man/groff_diff.man: Document that `radicalex' and `sqrtex' are overlapping glyphs.
* * font/devps/generate/freeeuro.sfd: Add glyphs `Euro.symbol.slanted'wlemb2002-12-051-2/+3
| | | | | | | | | | | | | | | | and `Euro.symbol.bold.slanted'. Improve some glyph offsets and widths. * font/devps/EURO, font/devps/freeeuro.afm, font/devps/freeeuro.pfa: Regenerated. * font/devps/generate/Makefile (freeeuro.afm freeeuro.pfa): Fix typo. * font/devps/generate/sfdtopfa.pe: Generate PFA in current direcory. * tmac/europs.tmac: Updated to new glyph indices. Use Euro.symbol for font familiy `A'. * doc/groff.texinfo: Minor improvements.
* * font/devdvi/generate.tc.map: s/%O/%0/.wlemb2002-12-031-1/+6
| | | | | | | | | | | | | | * font/devdvi/*TC: Regenerated. * src/roff/troff/div.cc (init_div_requests): Sorted. * tmac/dvi.tmac: Remove `Ye'. * tmac/ec.tmac: Remove `Ye'. Add .rchar entry for `de'. * man/groff.man, man/groff_diff.man: Document register `.pe'. * doc/groff.texinfo: Document registers `.pe', `.n', and `.w'. * NEWS: Updated.
* Added three new requests `schar', `fschar', and `rfschar'. `schar'wlemb2002-11-121-68/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defines a glyph which is searched after the check for fonts declared with `.special' (and before the check for all mounted special fonts). `fschar' defines a glyph for a particular font which is searched after the check for fonts declared with `.fspecial' (and before the check for fonts declared with `.special'). `rfschar' removes glyphs defined with `fschar'. * src/roff/troff/token.h (char_mode): New enum. Declare do_define_character. * src/roff/troff/charinfo.h (charinfo): Replace `fallback' with `mode'. (charinfo::is_fallback): Updated. (charinfo::is_special): New method. * src/roff/troff/input.cc (do_define_character): Add and use optional second parameter used as a prefix for font-specific glyph names. (define_character, define_fallback_character): Updated. (define_special_character): New function. (init_input_requests): Add `schar'. (charinfo::charinfo, charinfo::set_macro): Updated. * src/roff/troff/node.cc: Include `stringclass.h'. (make_glyph_node): Handle special glyphs defined with `.schar' and `.fschar'. (define_font_special_character, remove_font_special_character): New functions. (init_node_requests): Sorted. Add `fschar' and `rfschar'. * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: Document new requests. * font/devhtml/R.proto, font/devutf8/R.proto: Add `va'. * tmac/dvi.tmac: Add `va' for CW and CWI (using `.fschar').
* Added new font `SC' (cmtex10) to devdvi.wlemb2002-11-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * devdvi/generate/Makefile (FONTS): Add `SC'. (SC): New rule. * devdvi/generate/textex.map: New map file for cmtex. * devdvi/SC: New. * devdvi/Makefile.sub (DEVFILES): Updated. * tmac/dvi.tmac: Add fspecial entries for SC. Add `MI', `S' and `CW' to the `special' call. Otherwise, `SC' is found before `S' since the font position of `SC' is lower due to the gaps in DESC's `font' line. * tmac/ec.tmac: Add a `special' call. * NEWS: Updated. * font/devhtml/R.proto: Remove double entry for `ti'. * tmac/tty.tmac: Add entries for `IJ', `ij', and `bq'. * tmac/tty-char.tmac: Remove entry for `bq'. * tmac/lbp.tmac: Add entries for `lq', `rq', `fo', `fc', and `em'. * tmac/ec.tmac: Don't remove `aq' glyph. * tmac/X.tmac: Fix entry for `em'. Add entries for `fo' and `fc'. * tmac/dvi.tmac: Add entries for `em', `en', `hy', `fo', and `fc'. * doc/groff.texinfo, man/groff.man, man/groff_diff.man: Fix documentation of `special' and `fspecial' requests.
* Changing the substring request to make it fit better with otherwlemb2002-07-071-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string manipulation functions in other programming languages: Index 0 is now the first character in the string, and index -1 indicates the last character. Since this request didn't work properly anyway in the last release, it doesn't harm too much to change the syntax. * src/roff/troff/input.cc (substring_macro): Use loops to get the real string length (ignoring COMPATIBLE_SAVE and COMPATIBLE_RESTORE) and offsets. Implement change described above. * man/groff_char.man, tmac/doc-common (doc-header), tmac/doc.tmac (doc-do-Bd-args, doc-do-Bl-args: Changed accordingly. * NEWS, doc/groff.texinfo, man/groff_diff.man: Updated. Make .chop work with .de1 and friends. COMPATIBLE_SAVE and COMPATIBLE_RESTORE are completely ignored. * src/roff/troff/input.cc (char_list::set, char_list::get): New functions. (macro): `length' field renamed to `len'. Added new field `empty_macro' (1 if macro is empty), to be used instead of checking `len'. Updated all callers. (macro::empty): Updated. (macro::length, macro::set, macro::get): New functions. (macro::append): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. Set `empty_macro'. (chop_macro): Check and remove trailing COMPATIBLE_SAVE/ COMPATIBLE_RESTORE pairs. (asciify): Ignore COMPATIBLE_SAVE and COMPATIBLE_RESTORE. * src/roff/troff/request.h: Updated. * doc/groff.texinfo: Document .chop's behaviour better. * doc/pic.ms: Fix documentation for the addition of positions. * tmac/doc.tmac, tmac/an-old.tmac: Need groff version 1.18.
* Implementation of string arguments of the form \*[foo arg1 arg2 ...]wlemb2002-06-291-10/+16
| | | | | | | | | | | | | | | | * src/roff/troff/input.cc (have_string_arg): New global variable. (read_mode): New enumeration. (read_escape_name): Use it. Update all calls. (read_long_escape_name): Use it. Update all calls. Set have_string_arg if appropriate. (get_char_for_escape_name): Add parameter for handling space character. (interpolate_string_with_args, decode_string_args): New functions. (get_copy, token::next): Call it if necessary. (interpolate_string): Fix error message. * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: Document it.
* Minor doc fixes.wlemb2002-06-261-2/+2
|
* * src/roff/troff/input.cc (init_registers): Add three registerswlemb2002-06-231-1/+19
| | | | | | | `seconds', `minutes', and `hours' to hold the current time. * NEWS, doc/groff.texinfo, man/groff.man, man/groff_diff.man: Updated.