From 1f93fd36bf896ffa779e21cb78da808e75c84780 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 3 Jan 2025 01:05:39 +0100 Subject: [PATCH] libtextstyle: Add comments. * libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Add comments. --- libtextstyle/gnulib-local/lib/term-ostream.oo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libtextstyle/gnulib-local/lib/term-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-ostream.oo.c index 94f01e09a..a10517d4c 100644 --- a/libtextstyle/gnulib-local/lib/term-ostream.oo.c +++ b/libtextstyle/gnulib-local/lib/term-ostream.oo.c @@ -1,5 +1,5 @@ /* Output stream for attributed text, producing ANSI escape sequences. - Copyright (C) 2006-2008, 2017, 2019-2020, 2022-2024 Free Software Foundation, Inc. + Copyright (C) 2006-2025 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -2689,6 +2689,11 @@ term_ostream_create (int fd, const char *filename, ttyctl_t tty_control) recommends to test getenv ("COLORTERM"), but it does not seem like a good idea. It's more of a quick hack that causes long-term problems. */ + /* Note: The strange test against 0x7fff is because ncurses + versions < 6.1 did not support 32-bit values as result of + tgetnum(), see + and . + */ stream->max_colors >= 0x7fff ? cm_xtermrgb : stream->max_colors == 256 ? cm_xterm256 : stream->max_colors == 88 ? cm_xterm88 : @@ -2707,7 +2712,10 @@ term_ostream_create (int fd, const char *filename, ttyctl_t tty_control) (stream->enter_underline_mode != NULL && (stream->exit_underline_mode != NULL || stream->exit_attribute_mode != NULL)); - /* TODO: Use a terminfo capability, once ncurses implements it. */ + /* TODO: Use a terminfo capability, once ncurses implements it. + Reported at + + */ stream->supports_hyperlink = should_enable_hyperlinks (term); /* Infer the restore strings. */ -- 2.47.3