Date: Thu, 25 Feb 2021 18:30:01 GMT From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7a65641922f4 - main - ncurses: import version 6.2-20210220 Message-ID: <202102251830.11PIU199083076@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7a65641922f404b84e9a249d48593de84d8e8d17 commit 7a65641922f404b84e9a249d48593de84d8e8d17 Merge: 220c6d922a84 bf0ab54638a5 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-02-25 18:26:18 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-02-25 18:26:56 +0000 ncurses: import version 6.2-20210220 contrib/ncurses/COPYING | 4 +- contrib/ncurses/INSTALL | 116 +- contrib/ncurses/MANIFEST | 11 +- contrib/ncurses/NEWS | 469 +- contrib/ncurses/README.MinGW | 139 +- contrib/ncurses/VERSION | 2 +- contrib/ncurses/aclocal.m4 | 1536 +- contrib/ncurses/announce.html.in | 10 +- contrib/ncurses/configure | 21719 ++++++++++++---------- contrib/ncurses/configure.in | 275 +- contrib/ncurses/convert_configure.pl | 120 - contrib/ncurses/dist.mk | 8 +- contrib/ncurses/doc/html/announce.html | 11 +- contrib/ncurses/form/Makefile.in | 39 +- contrib/ncurses/form/f_trace.c | 12 +- contrib/ncurses/form/fld_arg.c | 8 +- contrib/ncurses/form/fld_attr.c | 16 +- contrib/ncurses/form/fld_current.c | 10 +- contrib/ncurses/form/fld_def.c | 18 +- contrib/ncurses/form/fld_dup.c | 15 +- contrib/ncurses/form/fld_ftchoice.c | 4 +- contrib/ncurses/form/fld_ftlink.c | 4 +- contrib/ncurses/form/fld_info.c | 10 +- contrib/ncurses/form/fld_just.c | 12 +- contrib/ncurses/form/fld_link.c | 8 +- contrib/ncurses/form/fld_max.c | 4 +- contrib/ncurses/form/fld_move.c | 10 +- contrib/ncurses/form/fld_newftyp.c | 8 +- contrib/ncurses/form/fld_opts.c | 12 +- contrib/ncurses/form/fld_pad.c | 8 +- contrib/ncurses/form/fld_page.c | 10 +- contrib/ncurses/form/fld_stat.c | 10 +- contrib/ncurses/form/fld_type.c | 8 +- contrib/ncurses/form/fld_user.c | 10 +- contrib/ncurses/form/form.h | 203 +- contrib/ncurses/form/form.priv.h | 76 +- contrib/ncurses/form/frm_cursor.c | 4 +- contrib/ncurses/form/frm_data.c | 8 +- contrib/ncurses/form/frm_def.c | 82 +- contrib/ncurses/form/frm_driver.c | 78 +- contrib/ncurses/form/frm_hook.c | 6 +- contrib/ncurses/form/frm_opts.c | 18 +- contrib/ncurses/form/frm_page.c | 6 +- contrib/ncurses/form/frm_post.c | 6 +- contrib/ncurses/form/frm_req_name.c | 6 +- contrib/ncurses/form/frm_scale.c | 4 +- contrib/ncurses/form/frm_sub.c | 6 +- contrib/ncurses/form/frm_user.c | 10 +- contrib/ncurses/form/frm_win.c | 6 +- contrib/ncurses/form/fty_alnum.c | 12 +- contrib/ncurses/form/fty_alpha.c | 12 +- contrib/ncurses/form/fty_enum.c | 11 +- contrib/ncurses/form/fty_generic.c | 19 +- contrib/ncurses/form/fty_int.c | 15 +- contrib/ncurses/form/fty_ipv4.c | 8 +- contrib/ncurses/form/fty_num.c | 15 +- contrib/ncurses/form/fty_regex.c | 12 +- contrib/ncurses/include/Caps | 10 +- contrib/ncurses/include/Caps-ncurses | 12 +- contrib/ncurses/include/Caps.aix4 | 10 +- contrib/ncurses/include/Caps.hpux11 | 10 +- contrib/ncurses/include/Caps.keys | 10 +- contrib/ncurses/include/Caps.osf1r5 | 10 +- contrib/ncurses/include/Caps.uwin | 10 +- contrib/ncurses/include/MKkey_defs.sh | 14 +- contrib/ncurses/include/MKterm.h.awk.in | 37 +- contrib/ncurses/include/Makefile.in | 20 +- contrib/ncurses/include/curses.events | 55 + contrib/ncurses/include/curses.h.in | 54 +- contrib/ncurses/include/headers | 4 +- contrib/ncurses/include/nc_alloc.h | 4 +- contrib/ncurses/include/nc_mingw.h | 23 +- contrib/ncurses/include/nc_termios.h | 8 +- contrib/ncurses/include/nc_tparm.h | 14 +- contrib/ncurses/include/nc_win32.h | 183 + contrib/ncurses/include/ncurses_cfg.hin | 4 +- contrib/ncurses/include/ncurses_defs | 6 +- contrib/ncurses/include/ncurses_dll.h.in | 70 +- contrib/ncurses/include/term_entry.h | 6 +- contrib/ncurses/include/win32_curses.h | 75 + contrib/ncurses/man/curs_add_wch.3x | 23 +- contrib/ncurses/man/curs_add_wchstr.3x | 8 +- contrib/ncurses/man/curs_addch.3x | 38 +- contrib/ncurses/man/curs_addchstr.3x | 24 +- contrib/ncurses/man/curs_addstr.3x | 20 +- contrib/ncurses/man/curs_addwstr.3x | 4 +- contrib/ncurses/man/curs_bkgd.3x | 6 +- contrib/ncurses/man/curs_bkgrnd.3x | 6 +- contrib/ncurses/man/curs_border.3x | 38 +- contrib/ncurses/man/curs_clear.3x | 36 +- contrib/ncurses/man/curs_color.3x | 20 +- contrib/ncurses/man/curs_delch.3x | 8 +- contrib/ncurses/man/curs_deleteln.3x | 14 +- contrib/ncurses/man/curs_extend.3x | 4 +- contrib/ncurses/man/curs_get_wch.3x | 4 +- contrib/ncurses/man/curs_get_wstr.3x | 4 +- contrib/ncurses/man/curs_getch.3x | 10 +- contrib/ncurses/man/curs_getstr.3x | 20 +- contrib/ncurses/man/curs_getyx.3x | 10 +- contrib/ncurses/man/curs_in_wch.3x | 6 +- contrib/ncurses/man/curs_in_wchstr.3x | 4 +- contrib/ncurses/man/curs_inch.3x | 10 +- contrib/ncurses/man/curs_inchstr.3x | 20 +- contrib/ncurses/man/curs_initscr.3x | 6 +- contrib/ncurses/man/curs_inopts.3x | 79 +- contrib/ncurses/man/curs_ins_wch.3x | 10 +- contrib/ncurses/man/curs_ins_wstr.3x | 4 +- contrib/ncurses/man/curs_insch.3x | 12 +- contrib/ncurses/man/curs_insstr.3x | 20 +- contrib/ncurses/man/curs_instr.3x | 20 +- contrib/ncurses/man/curs_inwstr.3x | 4 +- contrib/ncurses/man/curs_kernel.3x | 10 +- contrib/ncurses/man/curs_legacy.3x | 28 +- contrib/ncurses/man/curs_memleaks.3x | 23 +- contrib/ncurses/man/curs_mouse.3x | 17 +- contrib/ncurses/man/curs_move.3x | 6 +- contrib/ncurses/man/curs_opaque.3x | 32 +- contrib/ncurses/man/curs_outopts.3x | 101 +- contrib/ncurses/man/curs_print.3x | 6 +- contrib/ncurses/man/curs_printw.3x | 52 +- contrib/ncurses/man/curs_refresh.3x | 12 +- contrib/ncurses/man/curs_scanw.3x | 54 +- contrib/ncurses/man/curs_scr_dump.3x | 10 +- contrib/ncurses/man/curs_scroll.3x | 10 +- contrib/ncurses/man/curs_slk.3x | 4 +- contrib/ncurses/man/curs_sp_funcs.3x | 289 +- contrib/ncurses/man/curs_termcap.3x | 83 +- contrib/ncurses/man/curs_terminfo.3x | 60 +- contrib/ncurses/man/curs_threads.3x | 14 +- contrib/ncurses/man/curs_touch.3x | 22 +- contrib/ncurses/man/curs_util.3x | 37 +- contrib/ncurses/man/curs_variables.3x | 4 +- contrib/ncurses/man/default_colors.3x | 8 +- contrib/ncurses/man/define_key.3x | 4 +- contrib/ncurses/man/form.3x | 12 +- contrib/ncurses/man/form_cursor.3x | 6 +- contrib/ncurses/man/form_data.3x | 8 +- contrib/ncurses/man/form_driver.3x | 6 +- contrib/ncurses/man/form_field.3x | 14 +- contrib/ncurses/man/form_field_attributes.3x | 20 +- contrib/ncurses/man/form_field_buffer.3x | 18 +- contrib/ncurses/man/form_field_info.3x | 18 +- contrib/ncurses/man/form_field_just.3x | 8 +- contrib/ncurses/man/form_field_new.3x | 20 +- contrib/ncurses/man/form_field_opts.3x | 14 +- contrib/ncurses/man/form_field_userptr.3x | 11 +- contrib/ncurses/man/form_field_validation.3x | 104 +- contrib/ncurses/man/form_fieldtype.3x | 119 +- contrib/ncurses/man/form_hook.3x | 26 +- contrib/ncurses/man/form_new.3x | 10 +- contrib/ncurses/man/form_new_page.3x | 8 +- contrib/ncurses/man/form_opts.3x | 14 +- contrib/ncurses/man/form_page.3x | 22 +- contrib/ncurses/man/form_post.3x | 8 +- contrib/ncurses/man/form_requestname.3x | 17 +- contrib/ncurses/man/form_userptr.3x | 10 +- contrib/ncurses/man/form_variables.3x | 5 +- contrib/ncurses/man/form_win.3x | 18 +- contrib/ncurses/man/infocmp.1m | 6 +- contrib/ncurses/man/infotocap.1m | 6 +- contrib/ncurses/man/key_defined.3x | 4 +- contrib/ncurses/man/keybound.3x | 4 +- contrib/ncurses/man/keyok.3x | 4 +- contrib/ncurses/man/legacy_coding.3x | 4 +- contrib/ncurses/man/manhtml.aliases | 11 +- contrib/ncurses/man/manhtml.externs | 4 +- contrib/ncurses/man/manlinks.sed | 8 +- contrib/ncurses/man/menu_attributes.3x | 26 +- contrib/ncurses/man/menu_cursor.3x | 6 +- contrib/ncurses/man/menu_driver.3x | 10 +- contrib/ncurses/man/menu_format.3x | 8 +- contrib/ncurses/man/menu_hook.3x | 26 +- contrib/ncurses/man/menu_items.3x | 12 +- contrib/ncurses/man/menu_mark.3x | 10 +- contrib/ncurses/man/menu_new.3x | 10 +- contrib/ncurses/man/menu_opts.3x | 14 +- contrib/ncurses/man/menu_pattern.3x | 10 +- contrib/ncurses/man/menu_post.3x | 8 +- contrib/ncurses/man/menu_requestname.3x | 12 +- contrib/ncurses/man/menu_spacing.3x | 20 +- contrib/ncurses/man/menu_userptr.3x | 10 +- contrib/ncurses/man/menu_win.3x | 18 +- contrib/ncurses/man/mitem_current.3x | 20 +- contrib/ncurses/man/mitem_name.3x | 10 +- contrib/ncurses/man/mitem_new.3x | 10 +- contrib/ncurses/man/mitem_opts.3x | 14 +- contrib/ncurses/man/mitem_userptr.3x | 10 +- contrib/ncurses/man/mitem_value.3x | 8 +- contrib/ncurses/man/mitem_visible.3x | 6 +- contrib/ncurses/man/ncurses.3x | 185 +- contrib/ncurses/man/new_pair.3x | 8 +- contrib/ncurses/man/resizeterm.3x | 8 +- contrib/ncurses/man/tabs.1 | 4 +- contrib/ncurses/man/term.5 | 124 +- contrib/ncurses/man/terminfo.tail | 6 +- contrib/ncurses/man/tic.1m | 4 +- contrib/ncurses/man/toe.1m | 6 +- contrib/ncurses/man/tput.1 | 8 +- contrib/ncurses/man/user_caps.5 | 19 +- contrib/ncurses/man/wresize.3x | 4 +- contrib/ncurses/menu/Makefile.in | 31 +- contrib/ncurses/menu/m_attribs.c | 6 +- contrib/ncurses/menu/m_cursor.c | 16 +- contrib/ncurses/menu/m_driver.c | 10 +- contrib/ncurses/menu/m_format.c | 10 +- contrib/ncurses/menu/m_global.c | 62 +- contrib/ncurses/menu/m_hook.c | 6 +- contrib/ncurses/menu/m_item_cur.c | 16 +- contrib/ncurses/menu/m_item_nam.c | 10 +- contrib/ncurses/menu/m_item_new.c | 24 +- contrib/ncurses/menu/m_item_opt.c | 18 +- contrib/ncurses/menu/m_item_top.c | 12 +- contrib/ncurses/menu/m_item_use.c | 10 +- contrib/ncurses/menu/m_item_val.c | 10 +- contrib/ncurses/menu/m_item_vis.c | 6 +- contrib/ncurses/menu/m_items.c | 16 +- contrib/ncurses/menu/m_new.c | 19 +- contrib/ncurses/menu/m_opts.c | 20 +- contrib/ncurses/menu/m_pad.c | 12 +- contrib/ncurses/menu/m_pattern.c | 10 +- contrib/ncurses/menu/m_post.c | 22 +- contrib/ncurses/menu/m_req_name.c | 6 +- contrib/ncurses/menu/m_scale.c | 6 +- contrib/ncurses/menu/m_spacing.c | 10 +- contrib/ncurses/menu/m_sub.c | 10 +- contrib/ncurses/menu/m_trace.c | 20 +- contrib/ncurses/menu/m_userptr.c | 10 +- contrib/ncurses/menu/m_win.c | 10 +- contrib/ncurses/menu/menu.h | 330 +- contrib/ncurses/menu/menu.priv.h | 40 +- contrib/ncurses/misc/Makefile.in | 8 +- contrib/ncurses/misc/gen-pkgconfig.in | 58 +- contrib/ncurses/misc/ncurses-config.in | 45 +- contrib/ncurses/misc/terminfo.src | 2071 ++- contrib/ncurses/mk-1st.awk | 36 +- contrib/ncurses/mk-2nd.awk | 11 +- contrib/ncurses/mk-hdr.awk | 11 +- contrib/ncurses/ncurses/Makefile.in | 46 +- contrib/ncurses/ncurses/base/MKlib_gen.sh | 17 +- contrib/ncurses/ncurses/base/lib_addch.c | 18 +- contrib/ncurses/ncurses/base/lib_addstr.c | 10 +- contrib/ncurses/ncurses/base/lib_bkgd.c | 74 +- contrib/ncurses/ncurses/base/lib_color.c | 45 +- contrib/ncurses/ncurses/base/lib_driver.c | 4 +- contrib/ncurses/ncurses/base/lib_getch.c | 74 +- contrib/ncurses/ncurses/base/lib_getstr.c | 3 +- contrib/ncurses/ncurses/base/lib_initscr.c | 9 +- contrib/ncurses/ncurses/base/lib_mouse.c | 62 +- contrib/ncurses/ncurses/base/lib_newterm.c | 13 +- contrib/ncurses/ncurses/base/lib_screen.c | 8 +- contrib/ncurses/ncurses/base/lib_set_term.c | 29 +- contrib/ncurses/ncurses/base/new_pair.c | 27 +- contrib/ncurses/ncurses/base/wresize.c | 12 +- contrib/ncurses/ncurses/curses.priv.h | 79 +- contrib/ncurses/ncurses/llib-lncurses | 283 +- contrib/ncurses/ncurses/llib-lncursest | 283 +- contrib/ncurses/ncurses/llib-lncursestw | 419 +- contrib/ncurses/ncurses/llib-lncursesw | 419 +- contrib/ncurses/ncurses/llib-ltinfo | 17 + contrib/ncurses/ncurses/llib-ltinfot | 17 + contrib/ncurses/ncurses/llib-ltinfotw | 17 + contrib/ncurses/ncurses/llib-ltinfow | 17 + contrib/ncurses/ncurses/modules | 8 +- contrib/ncurses/ncurses/new_pair.h | 5 +- contrib/ncurses/ncurses/report_hashing.c | 73 + contrib/ncurses/ncurses/tinfo/MKcaptab.sh | 0 contrib/ncurses/ncurses/tinfo/MKfallback.sh | 16 +- contrib/ncurses/ncurses/tinfo/access.c | 12 +- contrib/ncurses/ncurses/tinfo/captoinfo.c | 13 +- contrib/ncurses/ncurses/tinfo/comp_parse.c | 4 +- contrib/ncurses/ncurses/tinfo/doalloc.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_baudrate.c | 22 +- contrib/ncurses/ncurses/tinfo/lib_cur_term.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_data.c | 7 +- contrib/ncurses/ncurses/tinfo/lib_kernel.c | 12 +- contrib/ncurses/ncurses/tinfo/lib_napms.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_options.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_print.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_raw.c | 11 +- contrib/ncurses/ncurses/tinfo/lib_setup.c | 29 +- contrib/ncurses/ncurses/tinfo/lib_tgoto.c | 4 +- contrib/ncurses/ncurses/tinfo/lib_tparm.c | 459 +- contrib/ncurses/ncurses/tinfo/lib_tputs.c | 16 +- contrib/ncurses/ncurses/tinfo/lib_ttyflags.c | 6 +- contrib/ncurses/ncurses/tinfo/lib_win32con.c | 1256 ++ contrib/ncurses/ncurses/tinfo/lib_win32util.c | 134 + contrib/ncurses/ncurses/tinfo/parse_entry.c | 10 +- contrib/ncurses/ncurses/tinfo/read_entry.c | 16 +- contrib/ncurses/ncurses/tinfo/tinfo_driver.c | 137 +- contrib/ncurses/ncurses/tinfo/trim_sgr0.c | 4 +- contrib/ncurses/ncurses/tinfo/write_entry.c | 4 +- contrib/ncurses/ncurses/trace/lib_trace.c | 6 +- contrib/ncurses/ncurses/trace/lib_tracebits.c | 42 +- contrib/ncurses/ncurses/tty/hashmap.c | 4 +- contrib/ncurses/ncurses/tty/lib_mvcur.c | 105 +- contrib/ncurses/ncurses/tty/lib_twait.c | 4 +- contrib/ncurses/ncurses/tty/lib_vidattr.c | 22 +- contrib/ncurses/ncurses/tty/tty_update.c | 62 +- contrib/ncurses/ncurses/wcwidth.h | 8 +- contrib/ncurses/ncurses/widechar/lib_cchar.c | 16 +- contrib/ncurses/ncurses/widechar/lib_ins_wch.c | 6 +- contrib/ncurses/ncurses/widechar/lib_vid_attr.c | 23 +- contrib/ncurses/ncurses/widechar/widechars.c | 6 +- contrib/ncurses/ncurses/win32con/gettimeofday.c | 4 +- contrib/ncurses/ncurses/win32con/wcwidth.c | 10 +- contrib/ncurses/ncurses/win32con/win32_driver.c | 1221 ++ contrib/ncurses/ncurses/win32con/win_driver.c | 22 +- contrib/ncurses/panel/Makefile.in | 28 +- contrib/ncurses/panel/llib-lpanel | 3 +- contrib/ncurses/panel/llib-lpanelt | 3 +- contrib/ncurses/panel/llib-lpaneltw | 3 +- contrib/ncurses/panel/llib-lpanelw | 3 +- contrib/ncurses/panel/p_above.c | 6 +- contrib/ncurses/panel/p_below.c | 6 +- contrib/ncurses/panel/p_bottom.c | 6 +- contrib/ncurses/panel/p_delete.c | 17 +- contrib/ncurses/panel/p_hidden.c | 4 +- contrib/ncurses/panel/p_hide.c | 6 +- contrib/ncurses/panel/p_move.c | 4 +- contrib/ncurses/panel/p_new.c | 54 +- contrib/ncurses/panel/p_replace.c | 4 +- contrib/ncurses/panel/p_show.c | 6 +- contrib/ncurses/panel/p_top.c | 4 +- contrib/ncurses/panel/p_update.c | 6 +- contrib/ncurses/panel/p_user.c | 6 +- contrib/ncurses/panel/p_win.c | 4 +- contrib/ncurses/panel/panel.c | 34 +- contrib/ncurses/panel/panel.h | 49 +- contrib/ncurses/panel/panel.priv.h | 22 +- contrib/ncurses/progs/Makefile.in | 24 +- contrib/ncurses/progs/dump_entry.c | 22 +- contrib/ncurses/progs/dump_entry.h | 4 +- contrib/ncurses/progs/infocmp.c | 9 +- contrib/ncurses/progs/progs.priv.h | 20 +- contrib/ncurses/progs/reset_cmd.c | 43 +- contrib/ncurses/progs/tabs.c | 4 +- contrib/ncurses/progs/tic.c | 124 +- contrib/ncurses/progs/tparm_type.c | 30 +- contrib/ncurses/progs/tparm_type.h | 6 +- contrib/ncurses/progs/tput.c | 20 +- contrib/ncurses/progs/tset.c | 15 +- contrib/ncurses/test/back_ground.c | 300 + contrib/ncurses/test/dup_field.c | 394 + contrib/ncurses/test/move_field.c | 524 + contrib/ncurses/test/test_tparm.c | 388 + 345 files changed, 24747 insertions(+), 14861 deletions(-) diff --cc contrib/ncurses/include/curses.events index 000000000000,25a2583fc9b5..25a2583fc9b5 mode 000000,100644..100644 --- a/contrib/ncurses/include/curses.events +++ b/contrib/ncurses/include/curses.events diff --cc contrib/ncurses/include/nc_win32.h index 000000000000,790e8dfe9388..790e8dfe9388 mode 000000,100644..100644 --- a/contrib/ncurses/include/nc_win32.h +++ b/contrib/ncurses/include/nc_win32.h diff --cc contrib/ncurses/include/win32_curses.h index 000000000000,5babf47d214a..5babf47d214a mode 000000,100644..100644 --- a/contrib/ncurses/include/win32_curses.h +++ b/contrib/ncurses/include/win32_curses.h diff --cc contrib/ncurses/ncurses/curses.priv.h index 2846791fbdd6,000000000000..4243373f9a7a mode 100644,000000..100644 --- a/contrib/ncurses/ncurses/curses.priv.h +++ b/contrib/ncurses/ncurses/curses.priv.h @@@ -1,2746 -1,0 +1,2793 @@@ +/**************************************************************************** + * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 1998-2017,2018 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * + * and: Eric S. Raymond <esr@snark.thyrsus.com> * + * and: Thomas E. Dickey 1996-on * + * and: Juergen Pfeifer * + ****************************************************************************/ + +/* - * $Id: curses.priv.h,v 1.628 2020/02/02 23:34:34 tom Exp $ ++ * $Id: curses.priv.h,v 1.639 2020/11/14 23:37:54 tom Exp $ + * + * curses.priv.h + * + * Header file for curses library objects which are private to + * the library. + * + */ + +#ifndef CURSES_PRIV_H +#define CURSES_PRIV_H 1 +/* *INDENT-OFF* */ + +#include <ncurses_dll.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#include <ncurses_cfg.h> + +#if USE_RCS_IDS +#define MODULE_ID(id) static const char Ident[] = id; +#else +#define MODULE_ID(id) /*nothing*/ +#endif + +#include <stddef.h> /* for offsetof */ +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> + +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + - #if HAVE_SYS_BSDTYPES_H && !(defined(_WIN32) || defined(_WIN64)) - #include <sys/bsdtypes.h> /* needed for ISC */ - #endif - +#if HAVE_LIMITS_H +# include <limits.h> +#elif HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif + +#include <assert.h> +#include <stdio.h> + +#include <errno.h> + +#if defined __hpux +# ifndef EILSEQ +# define EILSEQ 47 +# endif +#endif + +#ifndef PATH_MAX +# if defined(_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# elif defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 255 /* the Posix minimum path-size */ +# endif +#endif + +#if DECL_ERRNO +extern int errno; +#endif + ++/* Some Windows related defines */ ++#undef _NC_WINDOWS ++#if (defined(_WIN32) || defined(_WIN64)) ++#define _NC_WINDOWS ++#else ++#undef EXP_WIN32_DRIVER ++#endif ++ ++#undef _NC_MINGW ++#if (defined(__MINGW32__) || defined(__MINGW64__)) ++#define _NC_MINGW ++#endif ++ ++#undef _NC_MSC ++#ifdef _MSC_VER ++#define _NC_MSC ++#endif ++ +/* Some systems have a broken 'select()', but workable 'poll()'. Use that */ +#if HAVE_WORKING_POLL +#define USE_FUNC_POLL 1 +#if HAVE_POLL_H +#include <poll.h> +#else +#include <sys/poll.h> +#endif +#else +#define USE_FUNC_POLL 0 +#endif + +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif + +/* include signal.h before curses.h to work-around defect in glibc 2.1.3 */ +#include <signal.h> + +/* Alessandro Rubini's GPM (general-purpose mouse) */ +#if HAVE_LIBGPM && HAVE_GPM_H +#define USE_GPM_SUPPORT 1 +#else +#define USE_GPM_SUPPORT 0 +#endif + +/* QNX mouse support */ +#if defined(__QNX__) && !defined(__QNXNTO__) +#define USE_QNX_MOUSE 1 +#else +#define USE_QNX_MOUSE 0 +#endif + +/* EMX mouse support */ +#ifdef __EMX__ +#define USE_EMX_MOUSE 1 +#else +#define USE_EMX_MOUSE 0 +#endif + +/* kLIBC keyboard/mouse support */ +#if defined(__OS2__) && defined(__KLIBC__) +#define USE_KLIBC_KBD 1 +#define USE_KLIBC_MOUSE 1 +#else +#define USE_KLIBC_KBD 0 +#define USE_KLIBC_MOUSE 0 +#endif + +#define DEFAULT_MAXCLICK 166 +#define EV_MAX 8 /* size of mouse circular event queue */ + +/* + * If we don't have signals to support it, don't add a sigwinch handler. + * In any case, resizing is an extended feature. Use it if we've got it. + */ +#if !NCURSES_EXT_FUNCS +#undef HAVE_SIZECHANGE +#define HAVE_SIZECHANGE 0 +#endif + +#if HAVE_SIZECHANGE && USE_SIGWINCH && defined(SIGWINCH) +#define USE_SIZECHANGE 1 +#else +#define USE_SIZECHANGE 0 +#undef USE_SIGWINCH +#define USE_SIGWINCH 0 +#endif + +/* + * When building in the MSYS2 environment, the automatic discovery of + * the path separator in configure doesn't work properly. So, if building + * for MinGW, we enforce the correct Windows PATH separator + */ - #ifdef _WIN32 ++#if defined(_NC_WINDOWS) +# ifdef NCURSES_PATHSEP +# undef NCURSES_PATHSEP +# endif +# define NCURSES_PATHSEP ';' +#endif + +/* + * If desired, one can configure this, disabling environment variables that + * point to custom terminfo/termcap locations. + */ +#ifdef USE_ROOT_ENVIRON +#define use_terminfo_vars() 1 +#else +#define use_terminfo_vars() _nc_env_access() +extern NCURSES_EXPORT(int) _nc_env_access (void); +#endif + +/* + * Not all platforms have memmove; some have an equivalent bcopy. (Some may + * have neither). + */ +#if USE_OK_BCOPY +#define memmove(d,s,n) bcopy(s,d,n) +#elif USE_MY_MEMMOVE +#define memmove(d,s,n) _nc_memmove(d,s,n) +extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); +#endif + +/* + * If we have va_copy(), use it for assigning va_list's. + */ +#if defined(HAVE___VA_COPY) +#define begin_va_copy(dst,src) __va_copy(dst, src) +#define end_va_copy(dst) va_end(dst) +#elif defined(va_copy) || defined(HAVE_VA_COPY) +#define begin_va_copy(dst,src) va_copy(dst, src) +#define end_va_copy(dst) va_end(dst) +#else +#define begin_va_copy(dst,src) (dst) = (src) +#define end_va_copy(dst) /* nothing */ +#endif + +/* + * Either/both S_ISxxx and/or S_IFxxx are defined in sys/types.h; some systems + * lack one or the other. + */ +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) +#endif + +/* + * POSIX ignores the "b", which c89 specified. Some very old systems do not + * accept it. + */ +#if USE_FOPEN_BIN_R +#define BIN_R "rb" +#define BIN_W "wb" +#else +#define BIN_R "r" +#define BIN_W "w" +#endif + +/* + * Scroll hints are useless when hashmap is used + */ +#if !USE_SCROLL_HINTS +#if !USE_HASHMAP +#define USE_SCROLL_HINTS 1 +#else +#define USE_SCROLL_HINTS 0 +#endif +#endif + +#if USE_SCROLL_HINTS +#define if_USE_SCROLL_HINTS(stmt) stmt +#else +#define if_USE_SCROLL_HINTS(stmt) /*nothing*/ +#endif + +#include <nc_string.h> + +/* + * Options for terminal drivers, etc... + */ +#ifdef USE_TERM_DRIVER ++#define NO_TERMINAL "unknown" +#define USE_SP_RIPOFF 1 +#define USE_SP_TERMTYPE 1 +#define USE_SP_WINDOWLIST 1 ++#else ++#define NO_TERMINAL 0 +#endif + ++#define VALID_TERM_ENV(term_env, no_terminal) \ ++ (term_env = (NonEmpty(term_env) \ ++ ? term_env \ ++ : no_terminal), \ ++ NonEmpty(term_env)) ++ +/* + * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only + * when we're throwing control codes at the screen at high volume. To see + * this, re-enable USE_HARD_TABS and run worm for a while. Other systems + * probably don't want to define this either due to uncertainties about tab + * delays and expansion in raw mode. + */ + +#define TRIES struct tries +typedef TRIES { + TRIES *child; /* ptr to child. NULL if none */ + TRIES *sibling; /* ptr to sibling. NULL if none */ + unsigned char ch; /* character at this node */ + unsigned short value; /* code of string so far. 0 if none. */ +#undef TRIES +} TRIES; + +/* + * Common/troublesome character definitions + */ +#define StringOf(ch) {ch, 0} + +#define L_BRACE '{' +#define R_BRACE '}' +#define S_QUOTE '\'' +#define D_QUOTE '"' + +#define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~" + +/* + * Structure for palette tables + */ + +#define MAXCOLUMNS 135 +#define MAXLINES 66 +#define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */ + +#define ACS_LEN 128 + +#define WINDOWLIST struct _win_list + +#if USE_WIDEC_SUPPORT +#define _nc_bkgd _bkgrnd +#else +#undef _XOPEN_SOURCE_EXTENDED +#undef _XPG5 +#define _nc_bkgd _bkgd +#define wgetbkgrnd(win, wch) ((*wch = win->_bkgd) != 0 ? OK : ERR) +#define wbkgrnd wbkgd +#endif + +#undef NCURSES_OPAQUE +#define NCURSES_INTERNALS 1 +#define NCURSES_OPAQUE 0 + +#include <curses.h> /* we'll use -Ipath directive to get the right one! */ + ++#if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) ++#undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ ++#endif ++ +typedef struct +{ + int red, green, blue; /* what color_content() returns */ + int r, g, b; /* params to init_color() */ + int init; /* true if we called init_color() */ +} +color_t; + +typedef union { + struct { + unsigned char red; + unsigned char green; + unsigned char blue; + } bits; /* bits per color-value in RGB */ + unsigned value; +} rgb_bits_t; + +/* + * If curses.h did not expose the SCREEN-functions, then we do not need the + * parameter in the corresponding unextended functions. + */ + +#define USE_SP_FUNC_SUPPORT NCURSES_SP_FUNCS +#define USE_EXT_SP_FUNC_SUPPORT (NCURSES_SP_FUNCS && NCURSES_EXT_FUNCS) + +#if NCURSES_SP_FUNCS +#define SP_PARM sp /* use parameter */ +#define NCURSES_SP_ARG SP_PARM +#define NCURSES_SP_DCL SCREEN *NCURSES_SP_ARG +#define NCURSES_SP_DCL0 NCURSES_SP_DCL +#define NCURSES_SP_ARGx NCURSES_SP_ARG, +#define NCURSES_SP_DCLx SCREEN *NCURSES_SP_ARGx +#else +#define SP_PARM SP /* use global variable */ +#define NCURSES_SP_ARG +#define NCURSES_SP_DCL +#define NCURSES_SP_DCL0 void +#define NCURSES_SP_ARGx +#define NCURSES_SP_DCLx +#endif + +#include <nc_panel.h> + +#include <term.h> +#include <nc_termios.h> + +#define IsPreScreen(sp) (((sp) != 0) && sp->_prescreen) +#define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term))) +#define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp)) + +#if USE_REENTRANT +#define CurTerm _nc_prescreen._cur_term +#else +#define CurTerm cur_term +#endif + +#if NCURSES_SP_FUNCS +#define TerminalOf(sp) ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm) +#else +#define TerminalOf(sp) CurTerm +#endif + +/* + * The legacy layout for TERMTYPE uses "short" for all of the numbers. Moving + * past that, numeric capabilities can be "int" by using a TERMTYPE2 structure + * in TERMINAL, and doing most of the internal work using TERMTYPE2. There are + * a few places (mostly to expose the legacy layout) where the distinction + * needs attention. + */ +#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR +#define NCURSES_EXT_NUMBERS 1 +#define NCURSES_INT2 int +#define SIZEOF_INT2 4 +#define TerminalType(tp) (tp)->type2 +#else +#define NCURSES_EXT_NUMBERS 0 +#define NCURSES_INT2 short +#define SIZEOF_INT2 2 +#define TerminalType(tp) (tp)->type +#endif + +#define SIZEOF_SHORT 2 + +#ifdef CUR +#undef CUR +#define CUR TerminalType(cur_term). +#endif + +/* + * Reduce dependency on cur_term global by using terminfo data from SCREEN's + * pointer to this data. + */ +#ifdef USE_SP_TERMTYPE +#undef CUR +#endif + +#define SP_TERMTYPE TerminalType(TerminalOf(sp)). + +#include <term_entry.h> + +#include <nc_tparm.h> + +/* + * Simplify ifdef's for the "*_ATTR" macros in case italics are not configured. + */ +#if defined(A_ITALIC) && defined(exit_italics_mode) +#define USE_ITALIC 1 +#else +#define USE_ITALIC 0 +#undef A_ITALIC +#define A_ITALIC 0 +#endif + +/* + * Use these macros internally, to make tracing less verbose. But leave the + * option for compiling the tracing into the library. + */ +#if 1 +#define ColorPair(n) (NCURSES_BITS(n, 0) & A_COLOR) +#define PairNumber(a) (NCURSES_CAST(int,(((unsigned long)(a) & A_COLOR) >> NCURSES_ATTR_SHIFT))) +#else +#define ColorPair(pair) COLOR_PAIR(pair) +#define PairNumber(attr) PAIR_NUMBER(attr) +#endif + +#define unColor(n) unColor2(AttrOf(n)) +#define unColor2(a) ((a) & ALL_BUT_COLOR) + +/* + * Extended-colors stores the color pair in a separate struct-member than the + * attributes. But for compatibility, we handle most cases where a program + * written for non-extended colors stores the color in the attributes by + * checking for a color pair in both places. + */ +#if NCURSES_EXT_COLORS +#define if_EXT_COLORS(stmt) stmt +#define SetPair(value,p) SetPair2((value).ext_color, AttrOf(value), p) +#define SetPair2(c,a,p) c = (p), \ + a = (unColor2(a) | ColorPair(oldColor(c))) +#define GetPair(value) GetPair2((value).ext_color, AttrOf(value)) +#define GetPair2(c,a) ((c) ? (c) : PairNumber(a)) +#define oldColor(p) (((p) > 255) ? 255 : (p)) +#define GET_WINDOW_PAIR(w) GetPair2((w)->_color, (w)->_attrs) +#define SET_WINDOW_PAIR(w,p) (w)->_color = (p) +#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b)) + +#define VIDPUTS(sp,attr,pair) do { \ + int vid_pair = pair; \ + NCURSES_SP_NAME(vid_puts)( \ + NCURSES_SP_ARGx attr, \ + (NCURSES_PAIRS_T) pair, \ + &vid_pair, \ + NCURSES_OUTC_FUNC); \ + } while (0) + +#else /* !NCURSES_EXT_COLORS */ + +#define if_EXT_COLORS(stmt) /* nothing */ +#define SetPair(value,p) RemAttr(value, A_COLOR), \ + SetAttr(value, AttrOf(value) | ColorPair(p)) +#define GetPair(value) PairNumber(AttrOf(value)) +#define GET_WINDOW_PAIR(w) PairNumber(WINDOW_ATTRS(w)) +#define SET_WINDOW_PAIR(w,p) WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \ + WINDOW_ATTRS(w) |= ColorPair(p) +#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b)) + +#define VIDPUTS(sp,attr,pair) NCURSES_SP_NAME(vidputs)(NCURSES_SP_ARGx attr, NCURSES_OUTC_FUNC) + +#endif /* NCURSES_EXT_COLORS */ + +#define NCURSES_OUTC_FUNC NCURSES_SP_NAME(_nc_outch) +#define NCURSES_PUTP2(name,value) NCURSES_SP_NAME(_nc_putp)(NCURSES_SP_ARGx name, value) +#define NCURSES_PUTP2_FLUSH(name,value) NCURSES_SP_NAME(_nc_putp_flush)(NCURSES_SP_ARGx name, value) + +#if NCURSES_NO_PADDING +#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding) +#define SetNoPadding(sp) _nc_set_no_padding(sp) +extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); +#else +#define GetNoPadding(sp) FALSE +#define SetNoPadding(sp) /*nothing*/ +#endif + +#define WINDOW_ATTRS(w) ((w)->_attrs) + +#define SCREEN_ATTRS(s) (*((s)->_current_attr)) +#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s)) +#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) + +#if USE_REENTRANT || NCURSES_SP_FUNCS +NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); +#endif + +#if USE_REENTRANT + +#define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES)) +#define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS)) +#define ptrTabsize(sp) (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE)) +#define ptrEscdelay(sp) (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY)) + +#define SET_LINES(value) *_nc_ptr_Lines(SP_PARM) = value +#define SET_COLS(value) *_nc_ptr_Cols(SP_PARM) = value +#define SET_TABSIZE(value) *_nc_ptr_Tabsize(SP_PARM) = value +#define SET_ESCDELAY(value) *_nc_ptr_Escdelay(SP_PARM) = value + +#else + +#define ptrLines(sp) &LINES +#define ptrCols(sp) &COLS +#define ptrTabsize(sp) &TABSIZE +#define ptrEscdelay(sp) &ESCDELAY + +#define SET_LINES(value) LINES = value +#define SET_COLS(value) COLS = value +#define SET_TABSIZE(value) TABSIZE = value +#define SET_ESCDELAY(value) ESCDELAY = value + +#endif + +#define HasHardTabs() (NonEmpty(clear_all_tabs) && NonEmpty(set_tab)) + +#define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ + __FILE__, __LINE__, \ + (unsigned long) (pthread_self()), \ + data.__data.__lock, \ + data.__data.__count, \ + data.__data.__owner, \ + data.__data.__kind, \ + (data.__data.__nusers > 5) ? " OOPS " : "", \ + data.__data.__nusers) +#define TR_GLOBAL_MUTEX(name) TR_MUTEX(_nc_globals.mutex_##name) *** 2248 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102251830.11PIU199083076>