| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
| |
(NEXT_PTABLE_SIZE_DEFINED): Use it to avoid multiple declaration
of external symbol `next_ptable_size' (used by both header files).
|
|
|
|
|
|
|
| |
Update all callers.
* src/devices/grotty/tty.cpp: s/glyph/tty_glyph/.
s/output_character_t/output_character/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|