libtextstyle: term-ostream: Add hyperlink support.
* libtextstyle/gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add
methods get_hyperlink_ref, get_hyperlink_id, set_hyperlink.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Include <stdint.h>,
<sys/time.h>, get_ppid_of.h, get_progname_of.h, xgethostname.h.
(hyperlink_t): New type.
(free_hyperlink): New function.
(attributes_t): Add 'hyperlink' field.
(equal_attributes): Compare also the 'hyperlink' field.
(struct term_ostream): Add fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated, active_attr_hyperlink.
(simplify_attributes): Deal with 'hyperlink' field.
(generate_hyperlink_id): New function.
(out_hyperlink_change): New function.
(out_attr_change): Set active_attr_hyperlink. Invoke out_hyperlink_change.
(restore, async_restore): Use stream->restore_hyperlink.
(async_set_attributes_from_default): Invoke out_hyperlink_change.
(output_buffer): At the end, free the unused hyperlink_t objects.
(term_ostream::free): Free the hyperlinks_array and its contents.
(term_ostream::get_hyperlink_ref, term_ostream::get_hyperlink_id,
term_ostream::set_hyperlink): New functions.
(get_terminal_emulator_progname, should_enable_hyperlinks): New functions.
(term_ostream_create): Set the fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated.
* libtextstyle/gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Test for
getsid function.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Add gettimeofday,
get_ppid_of, get_progname_of, stdint, xgethostname.
* libtextstyle/lib/textstyle.h (term_ostream_get_hyperlink_ref,
term_ostream_get_hyperlink_id, term_ostream_set_hyperlink): New declarations.