summaryrefslogtreecommitdiff
path: root/src/include/ptable.h
Commit message (Collapse)AuthorAgeFilesLines
* Speed up troff.wl2010-12-261-2/+2
| | | | | | | | | | * src/include/ptable.h (PTABLE): Make hash tables much more sparse by changing `FULL_NUM' from 3 to 1. This increases the allocated memory by about 200kByte (which is nothing today) but assures that there aren't extremely long searches for a free hash slot in case that the hash function doesn't return a free one. Due to the nature of the entries in uniuni.cpp, the used hash function in ptable.cpp is not optimal, but using a sparse array compensates this.
* Update copyright year.wl2009-01-051-1/+1
|
* * */*: Update GPL2 to GPL3.wl2009-01-041-5/+4
|
* * src/include/ptable.h, src/include/itable.hwl2006-02-171-0/+5
| | | | | (NEXT_PTABLE_SIZE_DEFINED): Use it to avoid multiple declaration of external symbol `next_ptable_size' (used by both header files).
* * src/include/font.h: s/glyph_t/glyph/.wl2006-02-111-0/+2
| | | | | | | Update all callers. * src/devices/grotty/tty.cpp: s/glyph/tty_glyph/. s/output_character_t/output_character/.
* New accessor method glyph_t::glyph_name().wl2006-02-111-5/+29
| | | | | | | | | | | | | | | | | | | | | * src/include/ptable.h (declare_ptable): Add a return value to the 'define' method, and declare a 'lookupassoc' method. (implement_ptable): Return the stored key in 'define'. Implement lookupassoc. * src/include/font.h (glyph_t): Add 'name' field. Add an argument to the constructor. (glyph_t::glyph_name): New method. * src/libs/libgroff/nametoindex.cpp (character_indexer): Change return type of methods and field member type to glyph_t. (character_indexer::character_indexer): Update. (character_indexer::ascii_char_index): Allocate a name for the glyph. Return a glyph_t with name. (character_indexer::numbered_char_index): Return a glyph_t without a name. (character_indexer::named_char_index): Return a glyph_t with a name. (font::number_to_index, font::name_to_index): Update. * src/roff/troff/input.cpp (charinfo::charinfo): Use the symbol as the glyph's name.
* This change is based on a patch by Bruno Haible <bruno@clisp.org>.wl2006-01-261-13/+46
| | | | | | | | | * src/include/device.h: Add comments. * src/include/font.h: Add comments. * src/include/unicode.h: Likewise. * src/include/ptable.h, src/libs/libgroff/ptable.cpp: Likewise. Fix quotation in comments to be of the form `xxx'.
* * All affected files: Update postal address of FSF.wl2005-05-261-1/+1
|
* * src/devices/grolbp/lbp.h, src/preproc/grn/gprint.h,wlemb2004-04-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | src/preproc/grn/hgraph.cpp, src/preproc/grn/hpoint.cpp, src/preproc/html/pushback.cpp, src/preproc/html/pushback.h: Use `double' instead of `float' everywhere. * src/preproc/grn/main.cpp: Use `double' instead of `float' everywhere. (main): Add return value. * src/preproc/grn/hdb.cpp: Use `double' instead of `float' everywhere. Update all user functions. * src/include/search.h, src/include/ptable.h, src/include/printer.h, src/preproc/eqn/box.h, src/preproc/pic/object.h, src/preproc/refer/refer.h, src/preproc/tbl/table.h, src/preproc/tbl/table.cpp, src/roff/troff/env.h, src/roff/troff/div.h, src/roff/troff/token.h, src/roff/troff/node.h, src/roff/troff/input.cpp, src/roff/troff/request.h, src/roff/troff/node.cpp: Don't mix `struct' and `class' in forward declarations. * src/utils/indxbib/signal.c: Include stdlib.h.
* Improve error messages for `x F' (and `F') commands.wlemb2003-02-111-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Initial revisionwlemb2000-02-061-0/+168