diff options
author | wlemb <wlemb> | 2003-02-22 09:06:47 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2003-02-22 09:06:47 +0000 |
commit | 4265d920f18ed55998b0e4184e596a832e0d66ff (patch) | |
tree | e4f16276eafcb4fabfbf249fddb75672568abca5 /src/devices | |
parent | dd41e31bc5e4d53896180070a6dff88b0f4a06ad (diff) | |
download | groff-4265d920f18ed55998b0e4184e596a832e0d66ff.tar.gz |
Valgrind fixes.
* src/devices/grohtml/html-table.cc (html_table::~html_table):
Deallocate `columns' list.
* src/devices/grohtml/post-html.cc (char_block::~char_block):
New destructor.
(text_glob::text_glob_html, text_glob::text_glob_special,
text_glob::text_glob_line, text_glob::text_glob_auto_image,
text_glob::text_glob_tag): Avoid memory leaks.
(text_glob::remember_table): Free memory before reassigning.
Add glyph `+e', greek lunate epsilon symbol, and `-h' (with the
alias `hbar'), the Planck constant over two pi.
* font/devdvi/generate/texmi.map: Use `*e' for position 15 and
`+e' for position 34.
* font/devdvi/generate/texsy.map: Replace `DI' and `HE' with
`u2662' and `u2661'.
* font/devdvi/{MI,S}: Regenerated.
* font/devhtml/R.proto, font/devutf8/R.proto: Add `+e', `-h', `hbar'.
* font/devlbp/*: Add `hbar' alias.
* font/devlj4/generate/special.map: Ditto.
* font/devlj4/S: Regenerated.
* font/devps/generate/symbolchars: Add `+e'.
* font/devps/generate/textmap: Fix PS name for `-h'.
Add `hbar' alias.
* font/devps/symbolmap: Regenerated.
* src/devices/grops/ps.cc (transform_fill): Removed since unused.
* src/roff/troff/glyphuni.cc (glyph_to_unicode_list): Add `+e',
`-h', `hbar'.
* src/roff/troff/uniglyph.cc (unicode_to_glyph_list): Add `+e',
`-h'.
* tmac/X.tmac, tmac/ps.tmac: Provide definitions for `-h' and
`hbar'.
* tmac/tty-char.tmac: Add `+e'.
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/grohtml/html-table.cc | 8 | ||||
-rw-r--r-- | src/devices/grohtml/post-html.cc | 14 | ||||
-rw-r--r-- | src/devices/grops/ps.cc | 5 |
3 files changed, 22 insertions, 5 deletions
diff --git a/src/devices/grohtml/html-table.cc b/src/devices/grohtml/html-table.cc index a2bb2555..e7311e89 100644 --- a/src/devices/grohtml/html-table.cc +++ b/src/devices/grohtml/html-table.cc @@ -235,8 +235,16 @@ html_table::html_table (simple_output *op, int linelen) html_table::~html_table () { + cols *c; if (tab_stops != NULL) delete tab_stops; + + c = columns; + while (columns != NULL) { + columns = columns->next; + free(c); + c = columns; + } } /* diff --git a/src/devices/grohtml/post-html.cc b/src/devices/grohtml/post-html.cc index e6eedebe..5929ff55 100644 --- a/src/devices/grohtml/post-html.cc +++ b/src/devices/grohtml/post-html.cc @@ -261,6 +261,7 @@ struct char_block { char_block(); char_block(int length); + ~char_block(); }; char_block::char_block() @@ -276,6 +277,12 @@ char_block::char_block(int length) fatal("out of memory error"); } +char_block::~char_block() +{ + if (buffer != NULL) + free(buffer); +} + class char_buffer { public: char_buffer(); @@ -448,6 +455,7 @@ void text_glob::text_glob_html (style *s, char *str, int length, min_vertical, min_horizontal, max_vertical, max_horizontal, FALSE, FALSE, FALSE, FALSE, 0); *this = *g; + delete g; } /* @@ -465,6 +473,7 @@ void text_glob::text_glob_special (style *s, char *str, int length, min_vertical, min_horizontal, max_vertical, max_horizontal, FALSE, FALSE, TRUE, FALSE, 0); *this = *g; + delete g; } /* @@ -480,6 +489,7 @@ void text_glob::text_glob_line (style *s, min_vertical, min_horizontal, max_vertical, max_horizontal, FALSE, FALSE, FALSE, TRUE, thickness); *this = *g; + delete g; } /* @@ -513,6 +523,7 @@ void text_glob::text_glob_auto_image(style *s, char *str, int length, min_vertical, min_horizontal, max_vertical, max_horizontal, TRUE, TRUE, FALSE, FALSE, 0); *this = *g; + delete g; } /* @@ -527,6 +538,7 @@ void text_glob::text_glob_tag (style *s, char *str, int length, min_vertical, min_horizontal, max_vertical, max_horizontal, TRUE, FALSE, FALSE, FALSE, 0); *this = *g; + delete g; } /* @@ -747,6 +759,8 @@ int text_glob::get_tab_args (char *align) void text_glob::remember_table (html_table *t) { + if (tab != NULL) + delete tab; tab = t; } diff --git a/src/devices/grops/ps.cc b/src/devices/grops/ps.cc index 78760a45..8a2c82b0 100644 --- a/src/devices/grops/ps.cc +++ b/src/devices/grops/ps.cc @@ -70,11 +70,6 @@ double radians(double d) return d*PI/180.0; } -inline double transform_fill(int fill) -{ - return 1 - fill/double(FILL_MAX); -} - // This is used for testing whether a character should be output in the // PostScript file using \nnn, so we really want the character to be // less than 0200. |