diff options
author | wlemb <wlemb> | 2003-02-16 22:53:23 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2003-02-16 22:53:23 +0000 |
commit | cb5c9fa2e9b072eafd936a516564930a37270654 (patch) | |
tree | a32541c77505673affbf22e28e570b8e5e3d71f3 /src/roff | |
parent | 3b144c5915edcc49b59e82006562256a720f1f78 (diff) | |
download | groff-cb5c9fa2e9b072eafd936a516564930a37270654.tar.gz |
* src/devices/grotty/tty.cc (tty_printer::make_rgb_string): Avoid
null-bytes in created string.
* src/roff/troff/input.cc (lookup_color, interpolate_macro,
alias_macro, lookup_request): Improve warning messages.
* src/roff/troff/node.cc (suppress_node::tprint): Use `strsave',
not `strdup'.
Free `last_image_filename'.
* src/preproc/html/pre-html.cc (char_block::char_block): Initialize
`buffer'.
(imageList::createPage, imageList::createImage): Use `free', not
`a_delete'.
(imageItem::~imageItem): Free `imageName'.
(addRegDef): Use `strsave', not `strdup'.
(get_resolution): Free `pathp'.
Diffstat (limited to 'src/roff')
-rw-r--r-- | src/roff/troff/input.cc | 11 | ||||
-rw-r--r-- | src/roff/troff/node.cc | 5 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc index 5a3190d3..3ad7ac80 100644 --- a/src/roff/troff/input.cc +++ b/src/roff/troff/input.cc @@ -1038,7 +1038,7 @@ static color *lookup_color(symbol nm) return &default_color; color *c = (color *)color_dictionary.lookup(nm); if (c == 0) - warning(WARN_COLOR, "`%1' not defined", nm.contents()); + warning(WARN_COLOR, "color `%1' not defined", nm.contents()); return c; } @@ -3477,12 +3477,13 @@ static void interpolate_macro(symbol nm) macro *m = r->to_macro(); if (!m || !m->empty()) warned = warning(WARN_SPACE, - "`%1' not defined (probable missing space after `%2')", + "macro `%1' not defined " + "(probably missing space after `%2')", nm.contents(), buf); } } if (!warned) { - warning(WARN_MAC, "`%1' not defined", nm.contents()); + warning(WARN_MAC, "macro `%1' not defined", nm.contents()); p = new macro; request_dictionary.define(nm, p); } @@ -4287,7 +4288,7 @@ void alias_macro() symbol s2 = get_name(1); if (!s2.is_null()) { if (!request_dictionary.alias(s1, s2)) - warning(WARN_MAC, "`%1' not defined", s2.contents()); + warning(WARN_MAC, "macro `%1' not defined", s2.contents()); } } skip_line(); @@ -7336,7 +7337,7 @@ static request_or_macro *lookup_request(symbol nm) assert(!nm.is_null()); request_or_macro *p = (request_or_macro *)request_dictionary.lookup(nm); if (p == 0) { - warning(WARN_MAC, "`%1' not defined", nm.contents()); + warning(WARN_MAC, "macro `%1' not defined", nm.contents()); p = new macro; request_dictionary.define(nm, p); } diff --git a/src/roff/troff/node.cc b/src/roff/troff/node.cc index d0889860..53b9477e 100644 --- a/src/roff/troff/node.cc +++ b/src/roff/troff/node.cc @@ -3759,7 +3759,10 @@ void suppress_node::tprint(troff_output_file *out) if (is_on == 2) { // remember position and filename last_position = position; - last_image_filename = strdup(filename.contents()); + const char *tem = last_image_filename; + last_image_filename = strsave(filename.contents()); + if (tem) + a_delete(tem); last_image_id = image_id; // printf("start of image and page = %d\n", current_page); } |