diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2021-08-27 19:46:57 +1000 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2021-08-28 10:29:00 +1000 |
commit | 61d2307000c457db0604a7833e29ca4ad15884f7 (patch) | |
tree | adead6cf5219172b7b9518468f24cc93fc3ac2da /src/preproc/refer | |
parent | f078d60b9e76817e4c36ce4788010bb0bfc195ed (diff) | |
download | groff-git-61d2307000c457db0604a7833e29ca4ad15884f7.tar.gz |
[libgroff]: Drop `a_delete` preprocessor wrapper.
... for the `delete` operator. It has been rendered unnecessary by the
removal of support for ancient C++ compilers.
* src/include/lib.h (a_delete): Drop symbol definition.
* src/devices/grohtml/output.cpp (word::~word):
* src/devices/grohtml/post-html.cpp (char_block::char_block,
assert_state::~assert_state, assert_state::add,
assert_state::close, replace_negate_str):
* src/devices/grops/ps.cpp (ps_font::ps_font,
subencoding::subencoding, ps_printer::define_encoding,
ps_printer::encode_fonts):
* src/devices/grops/psrm.cpp (resource_manager::document_setup,
resource_manager::supply_resource):
* src/devices/grotty/tty.cpp (tty_printer::tty_color,
tty_printer::tty_printer, tty_printer::color_to_idx,
tty_printer::add_char):
* src/include/itable.h (ITABLE(T)::~ITABLE(T),
ITABLE(T)::define):
* src/include/ptable.h (PTABLE(T)::~PTABLE(T),
PTABLE(T)::define):
* src/libs/libbib/index.cpp
(index_search_item::~index_search_item, make_index_search_item,
index_search_item_iterator::index_search_item_iterator,
index_search_item::get_tag, index_search_item::munge_filename,
index_search_item::search):
* src/libs/libbib/linear.cpp (bmpattern::~bmpattern,
file_buffer::file_buffer, file_buffer::load,
linear_searcher::linear_searcher,
linear_searcher::~linear_searcher):
* src/libs/libbib/search.cpp
(search_list_iterator::search_list_iterator,
search_item::search_item):
* src/libs/libdriver/input.cpp (IntArray::~IntArray,
IntArray::append, StringBuf::~StringBuf, StringBuf::append,
get_integer_arg, parse_x_command, do_file):
* src/libs/libdriver/printer.cpp (printer::printer,
printer::load_font, text_file::~text_file, text_file::next,
font::~font, font_widths_cache::~font_widths_cache,
font:alloc_ch_index, font::extend_ch, font::compact,
font::load_desc):
* src/libs/libgroff/fontfile.cpp (font::open_file):
* src/libs/libgroff/relocate.cpp (searchpath, searchpathext,
set_current_prefix):
* src/libs/libgroff/searchpath.cpp (search_path::search_path,
search_path::command_line_dir, search_path::open_file,
search_path::open_file_cautious):
* src/libs/libgroff/string.cpp (sfree, srealloc,
string::remove_spaces):
* src/libs/libgroff/symbol.cpp (symbol::symbol, concat):
* src/libs/libgroff/tmpfile.cpp (temp_init::temp_init,
xtmpfile_list_init::~xtmpfile_list_init, xtmpfile):
* src/preproc/eqn/box.cpp (set_gfont, set_grfont, set_gbfont,
box_list::append, box_list::~box_list):
* src/preproc/eqn/delim.cpp (make_delim_box,
delim_box::~delim_box):
* src/preproc/eqn/eqn.ypp (number):
* src/preproc/eqn/lex.ypp (file_input::~file_input,
argument_macro_input::~argument_macro_input):
* src/preproc/eqn/pile.ypp (matrix_box::~matrix_box,
matrix_box::append):
* src/preproc/eqn/special.cpp (special_box::~special_box):
* src/preproc/eqn/text.ypp (set_char_type):
* src/preproc/html/pre-html.cpp (get_line, scanArguments):
* src/preproc/pic/object.cpp (output::~output,
output::set_args, text_item::~text_item,
object_spec::~object_spec, command_object::~command_object,
line_object::~line_object):
* src/preproc/pic/pic.ypp (placeless_element, reset_variables,
print_args, text_expr, object_spec, text, sprintf_args, path):
* src/preproc/refer/command.cpp (input_item::~input_item,
input_item::peek_char):
* src/preproc/refer/label.ypp (lookup_label):
* src/preproc/refer/refer.cpp (store_citation, store_reference):
* src/preproc/tbl/main.cpp (format::add_rows, format::~format):
* src/preproc/tbl/table.cpp (block_entry::~block_entry,
table::~table, table::allocate):
* src/roff/groff/groff.cpp (possible_command::~possible_command,
possible_command::clear_name):
* src/roff/troff/column.cpp
(justification_spec::~justification_spec,
justification_spec::append):
* src/roff/troff/dictionary.cpp (dictionary::lookup):
* src/roff/troff/env.cpp (override_sizes, tab_stops::to_string,
hyphen_word, hyphen_trie::insert_hyphenation):
* src/roff/troff/input.cpp (read_long_escape_name, token::next,
do_get_long_name, temp_iterator::~temp_iterator, get_delim_name,
pipe_source, read_string, pipe_output, system_request,
open_mac_file, do_macro_source, do_register_assignment,
do_string_assignment, read_draw_node, copy_mode_error):
* src/roff/troff/node.cpp (troff_output_file::set_font,
troff_output_file::~troff_output_file, draw_node::is_tag,
grow_font_table, font_family::~font_family,
font_family::make_definite):
* src/utils/hpftodit/hpftodit.cpp (name_list::~name_list,
read_map):
* src/utils/indxbib/indxbib.cpp (main, get_cwd):
* src/utils/tfmtodit/tfmtodit.cpp (tfm::~tfm, tfm::load): Port
uses of `a_delete(xxx)` to `delete[]`.
Diffstat (limited to 'src/preproc/refer')
-rw-r--r-- | src/preproc/refer/command.cpp | 4 | ||||
-rw-r--r-- | src/preproc/refer/label.ypp | 2 | ||||
-rw-r--r-- | src/preproc/refer/refer.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/preproc/refer/command.cpp b/src/preproc/refer/command.cpp index 75b197802..7860e3d89 100644 --- a/src/preproc/refer/command.cpp +++ b/src/preproc/refer/command.cpp @@ -52,7 +52,7 @@ input_item::input_item(string &s, const char *fn, int ln) input_item::~input_item() { - a_delete filename; + delete[] filename; } inline int input_item::peek_char() @@ -787,7 +787,7 @@ static void command_loop() for (int i = 0; i < argc; i++) argv[i].s = ptr = strchr(ptr, '\0') + 1; execute_command(command.contents(), argc, argv); - a_delete argv; + delete[] argv; if (res == -1) break; } diff --git a/src/preproc/refer/label.ypp b/src/preproc/refer/label.ypp index ed02052be..89876b682 100644 --- a/src/preproc/refer/label.ypp +++ b/src/preproc/refer/label.ypp @@ -995,7 +995,7 @@ label_info *lookup_label(const string &label) ; *p = old_table[i]; } - a_delete old_table; + delete[] old_table; } return result; } diff --git a/src/preproc/refer/refer.cpp b/src/preproc/refer/refer.cpp index ce5204a9d..5cf05c26c 100644 --- a/src/preproc/refer/refer.cpp +++ b/src/preproc/refer/refer.cpp @@ -692,7 +692,7 @@ static void store_citation(reference *ref) citation_max *= 2; citation = new reference *[citation_max]; memcpy(citation, old_citation, ncitations*sizeof(reference *)); - a_delete old_citation; + delete[] old_citation; } } citation[ncitations++] = ref; @@ -751,7 +751,7 @@ static unsigned store_reference(const string &str) ; *p = old_table[i]; } - a_delete old_table; + delete[] old_table; } } if (label_in_text) |