Implement POSIX Curses Soft Label Key functions.diff -r1.2102 -r1.2103 src/distrib/sets/lists/comp/mi
(roy)
--- src/distrib/sets/lists/comp/mi 2017/01/11 12:02:24 1.2102
+++ src/distrib/sets/lists/comp/mi 2017/01/24 17:27:30 1.2103
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: mi,v 1.2102 2017/01/11 12:02:24 joerg Exp $ | 1 | # $NetBSD: mi,v 1.2103 2017/01/24 17:27:30 roy Exp $ | |
2 | # | 2 | # | |
3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | 3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | |
4 | ./etc/mtree/set.comp comp-sys-root | 4 | ./etc/mtree/set.comp comp-sys-root | |
5 | ./usr/bin/addr2line comp-debug-bin binutils | 5 | ./usr/bin/addr2line comp-debug-bin binutils | |
6 | ./usr/bin/ar comp-util-bin binutils | 6 | ./usr/bin/ar comp-util-bin binutils | |
7 | ./usr/bin/as comp-util-bin binutils | 7 | ./usr/bin/as comp-util-bin binutils | |
8 | ./usr/bin/asa comp-fortran-bin | 8 | ./usr/bin/asa comp-fortran-bin | |
9 | ./usr/bin/atf-compile comp-obsolete obsolete | 9 | ./usr/bin/atf-compile comp-obsolete obsolete | |
10 | ./usr/bin/c++ comp-cxx-bin gcccmds | 10 | ./usr/bin/c++ comp-cxx-bin gcccmds | |
11 | ./usr/bin/c++filt comp-cxx-bin binutils | 11 | ./usr/bin/c++filt comp-cxx-bin binutils | |
12 | ./usr/bin/c11 comp-c-bin | 12 | ./usr/bin/c11 comp-c-bin | |
13 | ./usr/bin/c89 comp-c-bin | 13 | ./usr/bin/c89 comp-c-bin | |
14 | ./usr/bin/c99 comp-c-bin | 14 | ./usr/bin/c99 comp-c-bin | |
@@ -5729,26 +5729,27 @@ | @@ -5729,26 +5729,27 @@ | |||
5729 | ./usr/share/man/cat3/curses_inch.0 comp-c-catman .cat | 5729 | ./usr/share/man/cat3/curses_inch.0 comp-c-catman .cat | |
5730 | ./usr/share/man/cat3/curses_input.0 comp-c-catman .cat | 5730 | ./usr/share/man/cat3/curses_input.0 comp-c-catman .cat | |
5731 | ./usr/share/man/cat3/curses_insdelln.0 comp-c-catman .cat | 5731 | ./usr/share/man/cat3/curses_insdelln.0 comp-c-catman .cat | |
5732 | ./usr/share/man/cat3/curses_insertch.0 comp-c-catman .cat | 5732 | ./usr/share/man/cat3/curses_insertch.0 comp-c-catman .cat | |
5733 | ./usr/share/man/cat3/curses_insertln.0 comp-c-catman .cat | 5733 | ./usr/share/man/cat3/curses_insertln.0 comp-c-catman .cat | |
5734 | ./usr/share/man/cat3/curses_keyname.0 comp-c-catman .cat | 5734 | ./usr/share/man/cat3/curses_keyname.0 comp-c-catman .cat | |
5735 | ./usr/share/man/cat3/curses_line.0 comp-c-catman .cat | 5735 | ./usr/share/man/cat3/curses_line.0 comp-c-catman .cat | |
5736 | ./usr/share/man/cat3/curses_pad.0 comp-c-catman .cat | 5736 | ./usr/share/man/cat3/curses_pad.0 comp-c-catman .cat | |
5737 | ./usr/share/man/cat3/curses_print.0 comp-c-catman .cat | 5737 | ./usr/share/man/cat3/curses_print.0 comp-c-catman .cat | |
5738 | ./usr/share/man/cat3/curses_refresh.0 comp-c-catman .cat | 5738 | ./usr/share/man/cat3/curses_refresh.0 comp-c-catman .cat | |
5739 | ./usr/share/man/cat3/curses_scanw.0 comp-c-catman .cat | 5739 | ./usr/share/man/cat3/curses_scanw.0 comp-c-catman .cat | |
5740 | ./usr/share/man/cat3/curses_screen.0 comp-c-catman .cat | 5740 | ./usr/share/man/cat3/curses_screen.0 comp-c-catman .cat | |
5741 | ./usr/share/man/cat3/curses_scroll.0 comp-c-catman .cat | 5741 | ./usr/share/man/cat3/curses_scroll.0 comp-c-catman .cat | |
5742 | ./usr/share/man/cat3/curses_slk.0 comp-c-catman .cat | |||
5742 | ./usr/share/man/cat3/curses_standout.0 comp-c-catman .cat | 5743 | ./usr/share/man/cat3/curses_standout.0 comp-c-catman .cat | |
5743 | ./usr/share/man/cat3/curses_termcap.0 comp-c-catman .cat | 5744 | ./usr/share/man/cat3/curses_termcap.0 comp-c-catman .cat | |
5744 | ./usr/share/man/cat3/curses_touch.0 comp-c-catman .cat | 5745 | ./usr/share/man/cat3/curses_touch.0 comp-c-catman .cat | |
5745 | ./usr/share/man/cat3/curses_tty.0 comp-c-catman .cat | 5746 | ./usr/share/man/cat3/curses_tty.0 comp-c-catman .cat | |
5746 | ./usr/share/man/cat3/curses_underscore.0 comp-c-catman .cat | 5747 | ./usr/share/man/cat3/curses_underscore.0 comp-c-catman .cat | |
5747 | ./usr/share/man/cat3/curses_window.0 comp-c-catman .cat | 5748 | ./usr/share/man/cat3/curses_window.0 comp-c-catman .cat | |
5748 | ./usr/share/man/cat3/cuserid.0 comp-c-catman .cat | 5749 | ./usr/share/man/cat3/cuserid.0 comp-c-catman .cat | |
5749 | ./usr/share/man/cat3/d2i_ASN1_OBJECT.0 comp-c-catman crypto,.cat | 5750 | ./usr/share/man/cat3/d2i_ASN1_OBJECT.0 comp-c-catman crypto,.cat | |
5750 | ./usr/share/man/cat3/d2i_CMS_ContentInfo.0 comp-c-catman crypto,.cat | 5751 | ./usr/share/man/cat3/d2i_CMS_ContentInfo.0 comp-c-catman crypto,.cat | |
5751 | ./usr/share/man/cat3/d2i_DHparams.0 comp-c-catman crypto,.cat | 5752 | ./usr/share/man/cat3/d2i_DHparams.0 comp-c-catman crypto,.cat | |
5752 | ./usr/share/man/cat3/d2i_DSAPublicKey.0 comp-c-catman crypto,.cat | 5753 | ./usr/share/man/cat3/d2i_DSAPublicKey.0 comp-c-catman crypto,.cat | |
5753 | ./usr/share/man/cat3/d2i_ECPrivateKey.0 comp-c-catman crypto,.cat | 5754 | ./usr/share/man/cat3/d2i_ECPrivateKey.0 comp-c-catman crypto,.cat | |
5754 | ./usr/share/man/cat3/d2i_PKCS8PrivateKey.0 comp-c-catman crypto,.cat | 5755 | ./usr/share/man/cat3/d2i_PKCS8PrivateKey.0 comp-c-catman crypto,.cat | |
@@ -8998,26 +8999,42 @@ | @@ -8998,26 +8999,42 @@ | |||
8998 | ./usr/share/man/cat3/skey_haskey.0 comp-c-catman skey,.cat | 8999 | ./usr/share/man/cat3/skey_haskey.0 comp-c-catman skey,.cat | |
8999 | ./usr/share/man/cat3/skey_keyinfo.0 comp-c-catman skey,.cat | 9000 | ./usr/share/man/cat3/skey_keyinfo.0 comp-c-catman skey,.cat | |
9000 | ./usr/share/man/cat3/skey_passcheck.0 comp-c-catman skey,.cat | 9001 | ./usr/share/man/cat3/skey_passcheck.0 comp-c-catman skey,.cat | |
9001 | ./usr/share/man/cat3/skey_set_algorithm.0 comp-c-catman skey,.cat | 9002 | ./usr/share/man/cat3/skey_set_algorithm.0 comp-c-catman skey,.cat | |
9002 | ./usr/share/man/cat3/skeychallenge.0 comp-c-catman skey,.cat | 9003 | ./usr/share/man/cat3/skeychallenge.0 comp-c-catman skey,.cat | |
9003 | ./usr/share/man/cat3/skeygetnext.0 comp-c-catman skey,.cat | 9004 | ./usr/share/man/cat3/skeygetnext.0 comp-c-catman skey,.cat | |
9004 | ./usr/share/man/cat3/skeylookup.0 comp-c-catman skey,.cat | 9005 | ./usr/share/man/cat3/skeylookup.0 comp-c-catman skey,.cat | |
9005 | ./usr/share/man/cat3/skeyverify.0 comp-c-catman skey,.cat | 9006 | ./usr/share/man/cat3/skeyverify.0 comp-c-catman skey,.cat | |
9006 | ./usr/share/man/cat3/skeyzero.0 comp-c-catman skey,.cat | 9007 | ./usr/share/man/cat3/skeyzero.0 comp-c-catman skey,.cat | |
9007 | ./usr/share/man/cat3/sl_add.0 comp-c-catman .cat | 9008 | ./usr/share/man/cat3/sl_add.0 comp-c-catman .cat | |
9008 | ./usr/share/man/cat3/sl_find.0 comp-c-catman .cat | 9009 | ./usr/share/man/cat3/sl_find.0 comp-c-catman .cat | |
9009 | ./usr/share/man/cat3/sl_free.0 comp-c-catman .cat | 9010 | ./usr/share/man/cat3/sl_free.0 comp-c-catman .cat | |
9010 | ./usr/share/man/cat3/sl_init.0 comp-c-catman .cat | 9011 | ./usr/share/man/cat3/sl_init.0 comp-c-catman .cat | |
9012 | ./usr/share/man/cat3/slk_attroff.0 comp-c-catman .cat | |||
9013 | ./usr/share/man/cat3/slk_attr_off.0 comp-c-catman .cat | |||
9014 | ./usr/share/man/cat3/slk_attron.0 comp-c-catman .cat | |||
9015 | ./usr/share/man/cat3/slk_attr_on.0 comp-c-catman .cat | |||
9016 | ./usr/share/man/cat3/slk_attrset.0 comp-c-catman .cat | |||
9017 | ./usr/share/man/cat3/slk_attr_set.0 comp-c-catman .cat | |||
9018 | ./usr/share/man/cat3/slk_clear.0 comp-c-catman .cat | |||
9019 | ./usr/share/man/cat3/slk_color.0 comp-c-catman .cat | |||
9020 | ./usr/share/man/cat3/slk_init.0 comp-c-catman .cat | |||
9021 | ./usr/share/man/cat3/slk_label.0 comp-c-catman .cat | |||
9022 | ./usr/share/man/cat3/slk_noutrefresh.0 comp-c-catman .cat | |||
9023 | ./usr/share/man/cat3/slk_refresh.0 comp-c-catman .cat | |||
9024 | ./usr/share/man/cat3/slk_restore.0 comp-c-catman .cat | |||
9025 | ./usr/share/man/cat3/slk_set.0 comp-c-catman .cat | |||
9026 | ./usr/share/man/cat3/slk_touch.0 comp-c-catman .cat | |||
9027 | ./usr/share/man/cat3/slk_wset.0 comp-c-catman .cat | |||
9011 | ./usr/share/man/cat3/sleep.0 comp-c-catman .cat | 9028 | ./usr/share/man/cat3/sleep.0 comp-c-catman .cat | |
9012 | ./usr/share/man/cat3/snprintb.0 comp-c-catman .cat | 9029 | ./usr/share/man/cat3/snprintb.0 comp-c-catman .cat | |
9013 | ./usr/share/man/cat3/snprintb_m.0 comp-c-catman .cat | 9030 | ./usr/share/man/cat3/snprintb_m.0 comp-c-catman .cat | |
9014 | ./usr/share/man/cat3/snprintf.0 comp-c-catman .cat | 9031 | ./usr/share/man/cat3/snprintf.0 comp-c-catman .cat | |
9015 | ./usr/share/man/cat3/snprintf_l.0 comp-c-catman .cat | 9032 | ./usr/share/man/cat3/snprintf_l.0 comp-c-catman .cat | |
9016 | ./usr/share/man/cat3/snvis.0 comp-c-catman .cat | 9033 | ./usr/share/man/cat3/snvis.0 comp-c-catman .cat | |
9017 | ./usr/share/man/cat3/sockaddr_snprintf.0 comp-c-catman .cat | 9034 | ./usr/share/man/cat3/sockaddr_snprintf.0 comp-c-catman .cat | |
9018 | ./usr/share/man/cat3/sockatmark.0 comp-c-catman .cat | 9035 | ./usr/share/man/cat3/sockatmark.0 comp-c-catman .cat | |
9019 | ./usr/share/man/cat3/sprintf.0 comp-c-catman .cat | 9036 | ./usr/share/man/cat3/sprintf.0 comp-c-catman .cat | |
9020 | ./usr/share/man/cat3/sprintf_l.0 comp-c-catman .cat | 9037 | ./usr/share/man/cat3/sprintf_l.0 comp-c-catman .cat | |
9021 | ./usr/share/man/cat3/sqlite3.0 comp-c-catman .cat | 9038 | ./usr/share/man/cat3/sqlite3.0 comp-c-catman .cat | |
9022 | ./usr/share/man/cat3/sqlite3_aggregate_context.0 comp-c-catman .cat | 9039 | ./usr/share/man/cat3/sqlite3_aggregate_context.0 comp-c-catman .cat | |
9023 | ./usr/share/man/cat3/sqlite3_aggregate_count.0 comp-c-catman .cat | 9040 | ./usr/share/man/cat3/sqlite3_aggregate_count.0 comp-c-catman .cat | |
@@ -13124,26 +13141,27 @@ | @@ -13124,26 +13141,27 @@ | |||
13124 | ./usr/share/man/html3/curses_inch.html comp-c-htmlman html | 13141 | ./usr/share/man/html3/curses_inch.html comp-c-htmlman html | |
13125 | ./usr/share/man/html3/curses_input.html comp-c-htmlman html | 13142 | ./usr/share/man/html3/curses_input.html comp-c-htmlman html | |
13126 | ./usr/share/man/html3/curses_insdelln.html comp-c-htmlman html | 13143 | ./usr/share/man/html3/curses_insdelln.html comp-c-htmlman html | |
13127 | ./usr/share/man/html3/curses_insertch.html comp-c-htmlman html | 13144 | ./usr/share/man/html3/curses_insertch.html comp-c-htmlman html | |
13128 | ./usr/share/man/html3/curses_insertln.html comp-c-htmlman html | 13145 | ./usr/share/man/html3/curses_insertln.html comp-c-htmlman html | |
13129 | ./usr/share/man/html3/curses_keyname.html comp-c-htmlman html | 13146 | ./usr/share/man/html3/curses_keyname.html comp-c-htmlman html | |
13130 | ./usr/share/man/html3/curses_line.html comp-c-htmlman html | 13147 | ./usr/share/man/html3/curses_line.html comp-c-htmlman html | |
13131 | ./usr/share/man/html3/curses_pad.html comp-c-htmlman html | 13148 | ./usr/share/man/html3/curses_pad.html comp-c-htmlman html | |
13132 | ./usr/share/man/html3/curses_print.html comp-c-htmlman html | 13149 | ./usr/share/man/html3/curses_print.html comp-c-htmlman html | |
13133 | ./usr/share/man/html3/curses_refresh.html comp-c-htmlman html | 13150 | ./usr/share/man/html3/curses_refresh.html comp-c-htmlman html | |
13134 | ./usr/share/man/html3/curses_scanw.html comp-c-htmlman html | 13151 | ./usr/share/man/html3/curses_scanw.html comp-c-htmlman html | |
13135 | ./usr/share/man/html3/curses_screen.html comp-c-htmlman html | 13152 | ./usr/share/man/html3/curses_screen.html comp-c-htmlman html | |
13136 | ./usr/share/man/html3/curses_scroll.html comp-c-htmlman html | 13153 | ./usr/share/man/html3/curses_scroll.html comp-c-htmlman html | |
13154 | ./usr/share/man/html3/curses_slk.html comp-c-htmlman html | |||
13137 | ./usr/share/man/html3/curses_standout.html comp-c-htmlman html | 13155 | ./usr/share/man/html3/curses_standout.html comp-c-htmlman html | |
13138 | ./usr/share/man/html3/curses_termcap.html comp-c-htmlman html | 13156 | ./usr/share/man/html3/curses_termcap.html comp-c-htmlman html | |
13139 | ./usr/share/man/html3/curses_touch.html comp-c-htmlman html | 13157 | ./usr/share/man/html3/curses_touch.html comp-c-htmlman html | |
13140 | ./usr/share/man/html3/curses_tty.html comp-c-htmlman html | 13158 | ./usr/share/man/html3/curses_tty.html comp-c-htmlman html | |
13141 | ./usr/share/man/html3/curses_underscore.html comp-c-htmlman html | 13159 | ./usr/share/man/html3/curses_underscore.html comp-c-htmlman html | |
13142 | ./usr/share/man/html3/curses_window.html comp-c-htmlman html | 13160 | ./usr/share/man/html3/curses_window.html comp-c-htmlman html | |
13143 | ./usr/share/man/html3/cuserid.html comp-c-htmlman html | 13161 | ./usr/share/man/html3/cuserid.html comp-c-htmlman html | |
13144 | ./usr/share/man/html3/d2i_ASN1_OBJECT.html comp-c-htmlman crypto,html | 13162 | ./usr/share/man/html3/d2i_ASN1_OBJECT.html comp-c-htmlman crypto,html | |
13145 | ./usr/share/man/html3/d2i_CMS_ContentInfo.html comp-c-htmlman crypto,html | 13163 | ./usr/share/man/html3/d2i_CMS_ContentInfo.html comp-c-htmlman crypto,html | |
13146 | ./usr/share/man/html3/d2i_DHparams.html comp-c-htmlman crypto,html | 13164 | ./usr/share/man/html3/d2i_DHparams.html comp-c-htmlman crypto,html | |
13147 | ./usr/share/man/html3/d2i_DSAPublicKey.html comp-c-htmlman crypto,html | 13165 | ./usr/share/man/html3/d2i_DSAPublicKey.html comp-c-htmlman crypto,html | |
13148 | ./usr/share/man/html3/d2i_ECPrivateKey.html comp-c-htmlman crypto,html | 13166 | ./usr/share/man/html3/d2i_ECPrivateKey.html comp-c-htmlman crypto,html | |
13149 | ./usr/share/man/html3/d2i_PKCS8PrivateKey.html comp-c-htmlman crypto,html | 13167 | ./usr/share/man/html3/d2i_PKCS8PrivateKey.html comp-c-htmlman crypto,html | |
@@ -16329,26 +16347,42 @@ | @@ -16329,26 +16347,42 @@ | |||
16329 | ./usr/share/man/html3/skey_haskey.html comp-c-htmlman skey,html | 16347 | ./usr/share/man/html3/skey_haskey.html comp-c-htmlman skey,html | |
16330 | ./usr/share/man/html3/skey_keyinfo.html comp-c-htmlman skey,html | 16348 | ./usr/share/man/html3/skey_keyinfo.html comp-c-htmlman skey,html | |
16331 | ./usr/share/man/html3/skey_passcheck.html comp-c-htmlman skey,html | 16349 | ./usr/share/man/html3/skey_passcheck.html comp-c-htmlman skey,html | |
16332 | ./usr/share/man/html3/skey_set_algorithm.html comp-c-htmlman skey,html | 16350 | ./usr/share/man/html3/skey_set_algorithm.html comp-c-htmlman skey,html | |
16333 | ./usr/share/man/html3/skeychallenge.html comp-c-htmlman skey,html | 16351 | ./usr/share/man/html3/skeychallenge.html comp-c-htmlman skey,html | |
16334 | ./usr/share/man/html3/skeygetnext.html comp-c-htmlman skey,html | 16352 | ./usr/share/man/html3/skeygetnext.html comp-c-htmlman skey,html | |
16335 | ./usr/share/man/html3/skeylookup.html comp-c-htmlman skey,html | 16353 | ./usr/share/man/html3/skeylookup.html comp-c-htmlman skey,html | |
16336 | ./usr/share/man/html3/skeyverify.html comp-c-htmlman skey,html | 16354 | ./usr/share/man/html3/skeyverify.html comp-c-htmlman skey,html | |
16337 | ./usr/share/man/html3/skeyzero.html comp-c-htmlman skey,html | 16355 | ./usr/share/man/html3/skeyzero.html comp-c-htmlman skey,html | |
16338 | ./usr/share/man/html3/sl_add.html comp-c-htmlman html | 16356 | ./usr/share/man/html3/sl_add.html comp-c-htmlman html | |
16339 | ./usr/share/man/html3/sl_find.html comp-c-htmlman html | 16357 | ./usr/share/man/html3/sl_find.html comp-c-htmlman html | |
16340 | ./usr/share/man/html3/sl_free.html comp-c-htmlman html | 16358 | ./usr/share/man/html3/sl_free.html comp-c-htmlman html | |
16341 | ./usr/share/man/html3/sl_init.html comp-c-htmlman html | 16359 | ./usr/share/man/html3/sl_init.html comp-c-htmlman html | |
16360 | ./usr/share/man/html3/slk_attroff.html comp-c-htmlman html | |||
16361 | ./usr/share/man/html3/slk_attr_off.html comp-c-htmlman html | |||
16362 | ./usr/share/man/html3/slk_attron.html comp-c-htmlman html | |||
16363 | ./usr/share/man/html3/slk_attr_on.html comp-c-htmlman html | |||
16364 | ./usr/share/man/html3/slk_attrset.html comp-c-htmlman html | |||
16365 | ./usr/share/man/html3/slk_attr_set.html comp-c-htmlman html | |||
16366 | ./usr/share/man/html3/slk_clear.html comp-c-htmlman html | |||
16367 | ./usr/share/man/html3/slk_color.html comp-c-htmlman html | |||
16368 | ./usr/share/man/html3/slk_init.html comp-c-htmlman html | |||
16369 | ./usr/share/man/html3/slk_label.html comp-c-htmlman html | |||
16370 | ./usr/share/man/html3/slk_noutrefresh.html comp-c-htmlman html | |||
16371 | ./usr/share/man/html3/slk_refresh.html comp-c-htmlman html | |||
16372 | ./usr/share/man/html3/slk_restore.html comp-c-htmlman html | |||
16373 | ./usr/share/man/html3/slk_set.html comp-c-htmlman html | |||
16374 | ./usr/share/man/html3/slk_touch.html comp-c-htmlman html | |||
16375 | ./usr/share/man/html3/slk_wset.html comp-c-htmlman html | |||
16342 | ./usr/share/man/html3/sleep.html comp-c-htmlman html | 16376 | ./usr/share/man/html3/sleep.html comp-c-htmlman html | |
16343 | ./usr/share/man/html3/snprintb.html comp-c-htmlman html | 16377 | ./usr/share/man/html3/snprintb.html comp-c-htmlman html | |
16344 | ./usr/share/man/html3/snprintb_m.html comp-c-htmlman html | 16378 | ./usr/share/man/html3/snprintb_m.html comp-c-htmlman html | |
16345 | ./usr/share/man/html3/snprintf.html comp-c-htmlman html | 16379 | ./usr/share/man/html3/snprintf.html comp-c-htmlman html | |
16346 | ./usr/share/man/html3/snprintf_l.html comp-c-htmlman html | 16380 | ./usr/share/man/html3/snprintf_l.html comp-c-htmlman html | |
16347 | ./usr/share/man/html3/snvis.html comp-c-htmlman html | 16381 | ./usr/share/man/html3/snvis.html comp-c-htmlman html | |
16348 | ./usr/share/man/html3/sockaddr_snprintf.html comp-c-htmlman html | 16382 | ./usr/share/man/html3/sockaddr_snprintf.html comp-c-htmlman html | |
16349 | ./usr/share/man/html3/sockatmark.html comp-c-htmlman html | 16383 | ./usr/share/man/html3/sockatmark.html comp-c-htmlman html | |
16350 | ./usr/share/man/html3/sprintf.html comp-c-htmlman html | 16384 | ./usr/share/man/html3/sprintf.html comp-c-htmlman html | |
16351 | ./usr/share/man/html3/sprintf_l.html comp-c-htmlman html | 16385 | ./usr/share/man/html3/sprintf_l.html comp-c-htmlman html | |
16352 | ./usr/share/man/html3/sqlite3.html comp-c-htmlman html | 16386 | ./usr/share/man/html3/sqlite3.html comp-c-htmlman html | |
16353 | ./usr/share/man/html3/sqlite3_aggregate_context.html comp-c-htmlman html | 16387 | ./usr/share/man/html3/sqlite3_aggregate_context.html comp-c-htmlman html | |
16354 | ./usr/share/man/html3/sqlite3_aggregate_count.html comp-c-htmlman html | 16388 | ./usr/share/man/html3/sqlite3_aggregate_count.html comp-c-htmlman html | |
@@ -20426,26 +20460,27 @@ | @@ -20426,26 +20460,27 @@ | |||
20426 | ./usr/share/man/man3/curses_inch.3 comp-c-man .man | 20460 | ./usr/share/man/man3/curses_inch.3 comp-c-man .man | |
20427 | ./usr/share/man/man3/curses_input.3 comp-c-man .man | 20461 | ./usr/share/man/man3/curses_input.3 comp-c-man .man | |
20428 | ./usr/share/man/man3/curses_insdelln.3 comp-c-man .man | 20462 | ./usr/share/man/man3/curses_insdelln.3 comp-c-man .man | |
20429 | ./usr/share/man/man3/curses_insertch.3 comp-c-man .man | 20463 | ./usr/share/man/man3/curses_insertch.3 comp-c-man .man | |
20430 | ./usr/share/man/man3/curses_insertln.3 comp-c-man .man | 20464 | ./usr/share/man/man3/curses_insertln.3 comp-c-man .man | |
20431 | ./usr/share/man/man3/curses_keyname.3 comp-c-man .man | 20465 | ./usr/share/man/man3/curses_keyname.3 comp-c-man .man | |
20432 | ./usr/share/man/man3/curses_line.3 comp-c-man .man | 20466 | ./usr/share/man/man3/curses_line.3 comp-c-man .man | |
20433 | ./usr/share/man/man3/curses_pad.3 comp-c-man .man | 20467 | ./usr/share/man/man3/curses_pad.3 comp-c-man .man | |
20434 | ./usr/share/man/man3/curses_print.3 comp-c-man .man | 20468 | ./usr/share/man/man3/curses_print.3 comp-c-man .man | |
20435 | ./usr/share/man/man3/curses_refresh.3 comp-c-man .man | 20469 | ./usr/share/man/man3/curses_refresh.3 comp-c-man .man | |
20436 | ./usr/share/man/man3/curses_scanw.3 comp-c-man .man | 20470 | ./usr/share/man/man3/curses_scanw.3 comp-c-man .man | |
20437 | ./usr/share/man/man3/curses_screen.3 comp-c-man .man | 20471 | ./usr/share/man/man3/curses_screen.3 comp-c-man .man | |
20438 | ./usr/share/man/man3/curses_scroll.3 comp-c-man .man | 20472 | ./usr/share/man/man3/curses_scroll.3 comp-c-man .man | |
20473 | ./usr/share/man/man3/curses_slk.3 comp-c-man .man | |||
20439 | ./usr/share/man/man3/curses_standout.3 comp-c-man .man | 20474 | ./usr/share/man/man3/curses_standout.3 comp-c-man .man | |
20440 | ./usr/share/man/man3/curses_termcap.3 comp-c-man .man | 20475 | ./usr/share/man/man3/curses_termcap.3 comp-c-man .man | |
20441 | ./usr/share/man/man3/curses_touch.3 comp-c-man .man | 20476 | ./usr/share/man/man3/curses_touch.3 comp-c-man .man | |
20442 | ./usr/share/man/man3/curses_tty.3 comp-c-man .man | 20477 | ./usr/share/man/man3/curses_tty.3 comp-c-man .man | |
20443 | ./usr/share/man/man3/curses_underscore.3 comp-c-man .man | 20478 | ./usr/share/man/man3/curses_underscore.3 comp-c-man .man | |
20444 | ./usr/share/man/man3/curses_window.3 comp-c-man .man | 20479 | ./usr/share/man/man3/curses_window.3 comp-c-man .man | |
20445 | ./usr/share/man/man3/cuserid.3 comp-c-man .man | 20480 | ./usr/share/man/man3/cuserid.3 comp-c-man .man | |
20446 | ./usr/share/man/man3/d2i_ASN1_OBJECT.3 comp-c-man crypto,.man | 20481 | ./usr/share/man/man3/d2i_ASN1_OBJECT.3 comp-c-man crypto,.man | |
20447 | ./usr/share/man/man3/d2i_CMS_ContentInfo.3 comp-c-man crypto,.man | 20482 | ./usr/share/man/man3/d2i_CMS_ContentInfo.3 comp-c-man crypto,.man | |
20448 | ./usr/share/man/man3/d2i_DHparams.3 comp-c-man crypto,.man | 20483 | ./usr/share/man/man3/d2i_DHparams.3 comp-c-man crypto,.man | |
20449 | ./usr/share/man/man3/d2i_DSAPublicKey.3 comp-c-man crypto,.man | 20484 | ./usr/share/man/man3/d2i_DSAPublicKey.3 comp-c-man crypto,.man | |
20450 | ./usr/share/man/man3/d2i_ECPrivateKey.3 comp-c-man crypto,.man | 20485 | ./usr/share/man/man3/d2i_ECPrivateKey.3 comp-c-man crypto,.man | |
20451 | ./usr/share/man/man3/d2i_PKCS8PrivateKey.3 comp-c-man crypto,.man | 20486 | ./usr/share/man/man3/d2i_PKCS8PrivateKey.3 comp-c-man crypto,.man | |
@@ -23691,26 +23726,42 @@ | @@ -23691,26 +23726,42 @@ | |||
23691 | ./usr/share/man/man3/skey_haskey.3 comp-c-man skey,.man | 23726 | ./usr/share/man/man3/skey_haskey.3 comp-c-man skey,.man | |
23692 | ./usr/share/man/man3/skey_keyinfo.3 comp-c-man skey,.man | 23727 | ./usr/share/man/man3/skey_keyinfo.3 comp-c-man skey,.man | |
23693 | ./usr/share/man/man3/skey_passcheck.3 comp-c-man skey,.man | 23728 | ./usr/share/man/man3/skey_passcheck.3 comp-c-man skey,.man | |
23694 | ./usr/share/man/man3/skey_set_algorithm.3 comp-c-man skey,.man | 23729 | ./usr/share/man/man3/skey_set_algorithm.3 comp-c-man skey,.man | |
23695 | ./usr/share/man/man3/skeychallenge.3 comp-c-man skey,.man | 23730 | ./usr/share/man/man3/skeychallenge.3 comp-c-man skey,.man | |
23696 | ./usr/share/man/man3/skeygetnext.3 comp-c-man skey,.man | 23731 | ./usr/share/man/man3/skeygetnext.3 comp-c-man skey,.man | |
23697 | ./usr/share/man/man3/skeylookup.3 comp-c-man skey,.man | 23732 | ./usr/share/man/man3/skeylookup.3 comp-c-man skey,.man | |
23698 | ./usr/share/man/man3/skeyverify.3 comp-c-man skey,.man | 23733 | ./usr/share/man/man3/skeyverify.3 comp-c-man skey,.man | |
23699 | ./usr/share/man/man3/skeyzero.3 comp-c-man skey,.man | 23734 | ./usr/share/man/man3/skeyzero.3 comp-c-man skey,.man | |
23700 | ./usr/share/man/man3/sl_add.3 comp-c-man .man | 23735 | ./usr/share/man/man3/sl_add.3 comp-c-man .man | |
23701 | ./usr/share/man/man3/sl_find.3 comp-c-man .man | 23736 | ./usr/share/man/man3/sl_find.3 comp-c-man .man | |
23702 | ./usr/share/man/man3/sl_free.3 comp-c-man .man | 23737 | ./usr/share/man/man3/sl_free.3 comp-c-man .man | |
23703 | ./usr/share/man/man3/sl_init.3 comp-c-man .man | 23738 | ./usr/share/man/man3/sl_init.3 comp-c-man .man | |
23739 | ./usr/share/man/man3/slk_attroff.3 comp-c-man .man | |||
23740 | ./usr/share/man/man3/slk_attr_off.3 comp-c-man .man | |||
23741 | ./usr/share/man/man3/slk_attron.3 comp-c-man .man | |||
23742 | ./usr/share/man/man3/slk_attr_on.3 comp-c-man .man | |||
23743 | ./usr/share/man/man3/slk_attrset.3 comp-c-man .man | |||
23744 | ./usr/share/man/man3/slk_attr_set.3 comp-c-man .man | |||
23745 | ./usr/share/man/man3/slk_clear.3 comp-c-man .man | |||
23746 | ./usr/share/man/man3/slk_color.3 comp-c-man .man | |||
23747 | ./usr/share/man/man3/slk_init.3 comp-c-man .man | |||
23748 | ./usr/share/man/man3/slk_label.3 comp-c-man .man | |||
23749 | ./usr/share/man/man3/slk_noutrefresh.3 comp-c-man .man | |||
23750 | ./usr/share/man/man3/slk_refresh.3 comp-c-man .man | |||
23751 | ./usr/share/man/man3/slk_restore.3 comp-c-man .man | |||
23752 | ./usr/share/man/man3/slk_set.3 comp-c-man .man | |||
23753 | ./usr/share/man/man3/slk_touch.3 comp-c-man .man | |||
23754 | ./usr/share/man/man3/slk_wset.3 comp-c-man .man | |||
23704 | ./usr/share/man/man3/sleep.3 comp-c-man .man | 23755 | ./usr/share/man/man3/sleep.3 comp-c-man .man | |
23705 | ./usr/share/man/man3/snprintb.3 comp-c-man .man | 23756 | ./usr/share/man/man3/snprintb.3 comp-c-man .man | |
23706 | ./usr/share/man/man3/snprintb_m.3 comp-c-man .man | 23757 | ./usr/share/man/man3/snprintb_m.3 comp-c-man .man | |
23707 | ./usr/share/man/man3/snprintf.3 comp-c-man .man | 23758 | ./usr/share/man/man3/snprintf.3 comp-c-man .man | |
23708 | ./usr/share/man/man3/snprintf_l.3 comp-c-man .man | 23759 | ./usr/share/man/man3/snprintf_l.3 comp-c-man .man | |
23709 | ./usr/share/man/man3/snvis.3 comp-c-man .man | 23760 | ./usr/share/man/man3/snvis.3 comp-c-man .man | |
23710 | ./usr/share/man/man3/sockaddr_snprintf.3 comp-c-man .man | 23761 | ./usr/share/man/man3/sockaddr_snprintf.3 comp-c-man .man | |
23711 | ./usr/share/man/man3/sockatmark.3 comp-c-man .man | 23762 | ./usr/share/man/man3/sockatmark.3 comp-c-man .man | |
23712 | ./usr/share/man/man3/sprintf.3 comp-c-man .man | 23763 | ./usr/share/man/man3/sprintf.3 comp-c-man .man | |
23713 | ./usr/share/man/man3/sprintf_l.3 comp-c-man .man | 23764 | ./usr/share/man/man3/sprintf_l.3 comp-c-man .man | |
23714 | ./usr/share/man/man3/sqlite3.3 comp-c-man .man | 23765 | ./usr/share/man/man3/sqlite3.3 comp-c-man .man | |
23715 | ./usr/share/man/man3/sqlite3_aggregate_context.3 comp-c-man .man | 23766 | ./usr/share/man/man3/sqlite3_aggregate_context.3 comp-c-man .man | |
23716 | ./usr/share/man/man3/sqlite3_aggregate_count.3 comp-c-man .man | 23767 | ./usr/share/man/man3/sqlite3_aggregate_count.3 comp-c-man .man |
--- src/lib/libcurses/Makefile 2017/01/11 20:43:03 1.83
+++ src/lib/libcurses/Makefile 2017/01/24 17:27:30 1.84
@@ -1,51 +1,51 @@ | @@ -1,51 +1,51 @@ | |||
1 | # $NetBSD: Makefile,v 1.83 2017/01/11 20:43:03 roy Exp $ | 1 | # $NetBSD: Makefile,v 1.84 2017/01/24 17:27:30 roy Exp $ | |
2 | # @(#)Makefile 8.2 (Berkeley) 1/2/94 | 2 | # @(#)Makefile 8.2 (Berkeley) 1/2/94 | |
3 | 3 | |||
4 | .include <bsd.own.mk> | 4 | .include <bsd.own.mk> | |
5 | 5 | |||
6 | WARNS= 2 | 6 | WARNS= 2 | |
7 | 7 | |||
8 | CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo | 8 | CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo | |
9 | .if defined(DEBUG_CURSES) | 9 | .if defined(DEBUG_CURSES) | |
10 | CPPFLAGS+=-g -DDEBUG | 10 | CPPFLAGS+=-g -DDEBUG | |
11 | .endif | 11 | .endif | |
12 | .if defined(SMALL) | 12 | .if defined(SMALL) | |
13 | CPPFLAGS+=-DSMALL | 13 | CPPFLAGS+=-DSMALL | |
14 | .endif | 14 | .endif | |
15 | LIB= curses | 15 | LIB= curses | |
16 | SRCS= acs.c addbytes.c addch.c addchnstr.c addnstr.c attributes.c \ | 16 | SRCS= acs.c addbytes.c addch.c addchnstr.c addnstr.c attributes.c \ | |
17 | background.c bell.c border.c box.c chgat.c clear.c clearok.c \ | 17 | background.c bell.c border.c box.c chgat.c clear.c clearok.c \ | |
18 | clrtobot.c clrtoeol.c color.c copywin.c cr_put.c \ | 18 | clrtobot.c clrtoeol.c color.c copywin.c cr_put.c \ | |
19 | ctrace.c cur_hash.c curs_set.c \ | 19 | ctrace.c cur_hash.c curs_set.c \ | |
20 | curses.c delch.c deleteln.c delwin.c echochar.c erase.c fileio.c \ | 20 | curses.c delch.c deleteln.c delwin.c echochar.c erase.c fileio.c \ | |
21 | flushok.c fullname.c getch.c getstr.c getyx.c id_subwins.c idlok.c \ | 21 | flushok.c fullname.c getch.c getstr.c getyx.c id_subwins.c idlok.c \ | |
22 | idcok.c immedok.c inch.c inchstr.c initscr.c insch.c insdelln.c \ | 22 | idcok.c immedok.c inch.c inchstr.c initscr.c insch.c insdelln.c \ | |
23 | insertln.c instr.c keypad.c keyname.c leaveok.c line.c meta.c move.c \ | 23 | insertln.c instr.c keypad.c keyname.c leaveok.c line.c meta.c move.c \ | |
24 | mvwin.c newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c \ | 24 | mvwin.c newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c \ | |
25 | printw.c putchar.c refresh.c resize.c ripoffline.c scanw.c screen.c \ | 25 | printw.c putchar.c refresh.c resize.c ripoffline.c scanw.c screen.c \ | |
26 | scroll.c scrollok.c setterm.c standout.c syncok.c timeout.c \ | 26 | scroll.c scrollok.c setterm.c slk.c standout.c syncok.c timeout.c \ | |
27 | toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c | 27 | toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c | |
28 | 28 | |||
29 | MAN= curses.3 curses_addch.3 curses_addchstr.3 curses_addstr.3 \ | 29 | MAN= curses.3 curses_addch.3 curses_addchstr.3 curses_addstr.3 \ | |
30 | curses_attributes.3 curses_background.3 curses_border.3 \ | 30 | curses_attributes.3 curses_background.3 curses_border.3 \ | |
31 | curses_chgat.3 curses_clear.3 curses_color.3 \ | 31 | curses_chgat.3 curses_clear.3 curses_color.3 \ | |
32 | curses_cursor.3 curses_default_colors.3 \ | 32 | curses_cursor.3 curses_default_colors.3 \ | |
33 | curses_delch.3 curses_deleteln.3 curses_echochar.3 curses_fileio.3 \ | 33 | curses_delch.3 curses_deleteln.3 curses_echochar.3 curses_fileio.3 \ | |
34 | curses_inch.3 curses_input.3 curses_insertch.3 curses_insertln.3 \ | 34 | curses_inch.3 curses_input.3 curses_insertch.3 curses_insertln.3 \ | |
35 | curses_insdelln.3 curses_keyname.3 curses_line.3 curses_pad.3 \ | 35 | curses_insdelln.3 curses_keyname.3 curses_line.3 curses_pad.3 \ | |
36 | curses_print.3 curses_refresh.3 curses_scanw.3 curses_screen.3 \ | 36 | curses_print.3 curses_refresh.3 curses_scanw.3 curses_screen.3 \ | |
37 | curses_scroll.3 curses_standout.3 curses_termcap.3 curses_touch.3 \ | 37 | curses_scroll.3 curses_slk.3 curses_standout.3 curses_termcap.3 \ | |
38 | curses_tty.3 curses_underscore.3 curses_window.3 | 38 | curses_touch.3 curses_tty.3 curses_underscore.3 curses_window.3 | |
39 | INCS= curses.h unctrl.h | 39 | INCS= curses.h unctrl.h | |
40 | INCSDIR=/usr/include | 40 | INCSDIR=/usr/include | |
41 | 41 | |||
42 | LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo | 42 | LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo | |
43 | 43 | |||
44 | .if !defined(DISABLE_WCHAR) | 44 | .if !defined(DISABLE_WCHAR) | |
45 | CPPFLAGS+=-DHAVE_WCHAR | 45 | CPPFLAGS+=-DHAVE_WCHAR | |
46 | SRCS+= cchar.c add_wch.c add_wchstr.c addwstr.c echo_wchar.c ins_wch.c \ | 46 | SRCS+= cchar.c add_wch.c add_wchstr.c addwstr.c echo_wchar.c ins_wch.c \ | |
47 | insstr.c ins_wstr.c get_wch.c get_wstr.c in_wch.c in_wchstr.c \ | 47 | insstr.c ins_wstr.c get_wch.c get_wstr.c in_wch.c in_wchstr.c \ | |
48 | inwstr.c | 48 | inwstr.c | |
49 | .else | 49 | .else | |
50 | CPPFLAGS+=-DDISABLE_WCHAR | 50 | CPPFLAGS+=-DDISABLE_WCHAR | |
51 | .endif | 51 | .endif | |
@@ -140,26 +140,34 @@ MLINKS+= curses_addch.3 addch.3 curses_a | @@ -140,26 +140,34 @@ MLINKS+= curses_addch.3 addch.3 curses_a | |||
140 | curses_pad.3 prefresh.3 curses_print.3 printw.3 \ | 140 | curses_pad.3 prefresh.3 curses_print.3 printw.3 \ | |
141 | curses_fileio.3 putwin.3 curses_tty.3 qiflush.3 \ | 141 | curses_fileio.3 putwin.3 curses_tty.3 qiflush.3 \ | |
142 | curses_tty.3 raw.3 curses_refresh.3 refresh.3 \ | 142 | curses_tty.3 raw.3 curses_refresh.3 refresh.3 \ | |
143 | curses_tty.3 reset_prog_mode.3 curses_tty.3 reset_shell_mode.3 \ | 143 | curses_tty.3 reset_prog_mode.3 curses_tty.3 reset_shell_mode.3 \ | |
144 | curses_tty.3 resetty.3 \ | 144 | curses_tty.3 resetty.3 \ | |
145 | curses_screen.3 resizeterm.3 curses_screen.3 resize_term.3 \ | 145 | curses_screen.3 resizeterm.3 curses_screen.3 resize_term.3 \ | |
146 | curses_screen.3 ripoffline.3 \ | 146 | curses_screen.3 ripoffline.3 \ | |
147 | curses_tty.3 savetty.3 curses_scanw.3 scanw.3 \ | 147 | curses_tty.3 savetty.3 curses_scanw.3 scanw.3 \ | |
148 | curses_scroll.3 scrl.3 curses_scroll.3 scroll.3 \ | 148 | curses_scroll.3 scrl.3 curses_scroll.3 scroll.3 \ | |
149 | curses_scroll.3 scrollok.3 curses_scroll.3 setscrreg.3 \ | 149 | curses_scroll.3 scrollok.3 curses_scroll.3 setscrreg.3 \ | |
150 | curses_cursor.3 setsyx.3 \ | 150 | curses_cursor.3 setsyx.3 \ | |
151 | curses_input.3 set_escdelay.3 curses_screen.3 set_tabsize.3 \ | 151 | curses_input.3 set_escdelay.3 curses_screen.3 set_tabsize.3 \ | |
152 | curses_screen.3 set_term.3 curses_screen.3 setterm.3 \ | 152 | curses_screen.3 set_term.3 curses_screen.3 setterm.3 \ | |
153 | curses_slk.3 slk_attroff.3 curses_slk.3 slk_attr_off.3 \ | |||
154 | curses_slk.3 slk_attron.3 curses_slk.3 slk_attr_on.3 \ | |||
155 | curses_slk.3 slk_attrset.3 curses_slk.3 slk_attr_set.3 \ | |||
156 | curses_slk.3 slk_clear.3 curses_slk.3 slk_color.3 \ | |||
157 | curses_slk.3 slk_init.3 curses_slk.3 slk_label.3 \ | |||
158 | curses_slk.3 slk_noutrefresh.3 curses_slk.3 slk_refresh.3 \ | |||
159 | curses_slk.3 slk_restore.3 curses_slk.3 slk_set.3 \ | |||
160 | curses_slk.3 slk_touch.3 curses_slk.3 slk_wset.3 \ | |||
153 | curses_standout.3 standend.3 curses_standout.3 standout.3 \ | 161 | curses_standout.3 standend.3 curses_standout.3 standout.3 \ | |
154 | curses_color.3 start_color.3 curses_pad.3 subpad.3 \ | 162 | curses_color.3 start_color.3 curses_pad.3 subpad.3 \ | |
155 | curses_window.3 subwin.3 curses_touch.3 syncok.3 \ | 163 | curses_window.3 subwin.3 curses_touch.3 syncok.3 \ | |
156 | curses_input.3 timeout.3 \ | 164 | curses_input.3 timeout.3 \ | |
157 | curses_touch.3 touchline.3 curses_touch.3 touchoverlap.3 \ | 165 | curses_touch.3 touchline.3 curses_touch.3 touchoverlap.3 \ | |
158 | curses_touch.3 touchwin.3 curses_tty.3 typeahead.3 \ | 166 | curses_touch.3 touchwin.3 curses_tty.3 typeahead.3 \ | |
159 | curses_print.3 unctrl.3 \ | 167 | curses_print.3 unctrl.3 \ | |
160 | curses_underscore.3 underend.3 curses_underscore.3 underscore.3 \ | 168 | curses_underscore.3 underend.3 curses_underscore.3 underscore.3 \ | |
161 | curses_input.3 ungetch.3 curses_touch.3 untouchwin.3 \ | 169 | curses_input.3 ungetch.3 curses_touch.3 untouchwin.3 \ | |
162 | curses_default_colors.3 use_default_colors.3 \ | 170 | curses_default_colors.3 use_default_colors.3 \ | |
163 | curses_screen.3 use_env.3 curses_line.3 vline.3 \ | 171 | curses_screen.3 use_env.3 curses_line.3 vline.3 \ | |
164 | curses_addch.3 waddch.3 curses_addchstr.3 waddchnstr.3 \ | 172 | curses_addch.3 waddch.3 curses_addchstr.3 waddchnstr.3 \ | |
165 | curses_addchstr.3 waddchstr.3 curses_addstr.3 waddnstr.3 \ | 173 | curses_addchstr.3 waddchstr.3 curses_addstr.3 waddnstr.3 \ |
--- src/lib/libcurses/curses.h 2017/01/10 10:13:24 1.120
+++ src/lib/libcurses/curses.h 2017/01/24 17:27:30 1.121
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: curses.h,v 1.120 2017/01/10 10:13:24 roy Exp $ */ | 1 | /* $NetBSD: curses.h,v 1.121 2017/01/24 17:27:30 roy Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1981, 1993, 1994 | 4 | * Copyright (c) 1981, 1993, 1994 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -833,26 +833,44 @@ int insnstr(const char *, int); | @@ -833,26 +833,44 @@ int insnstr(const char *, int); | |||
833 | int insstr(const char *); | 833 | int insstr(const char *); | |
834 | int mvinsnstr(int, int, const char *, int); | 834 | int mvinsnstr(int, int, const char *, int); | |
835 | int mvinsstr(int, int, const char *); | 835 | int mvinsstr(int, int, const char *); | |
836 | int mvwinsnstr(WINDOW *, int, int, const char *, int); | 836 | int mvwinsnstr(WINDOW *, int, int, const char *, int); | |
837 | int mvwinsstr(WINDOW *, int, int, const char *); | 837 | int mvwinsstr(WINDOW *, int, int, const char *); | |
838 | int winsnstr(WINDOW *, const char *, int); | 838 | int winsnstr(WINDOW *, const char *, int); | |
839 | int winsstr(WINDOW *, const char *); | 839 | int winsstr(WINDOW *, const char *); | |
840 | 840 | |||
841 | int chgat(int, attr_t, short, const void *); | 841 | int chgat(int, attr_t, short, const void *); | |
842 | int wchgat(WINDOW *, int, attr_t, short, const void *); | 842 | int wchgat(WINDOW *, int, attr_t, short, const void *); | |
843 | int mvchgat(int, int, int, attr_t, short, const void *); | 843 | int mvchgat(int, int, int, attr_t, short, const void *); | |
844 | int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); | 844 | int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *); | |
845 | 845 | |||
846 | /* Soft Label Keys. */ | |||
847 | int slk_attroff(const chtype); | |||
848 | int slk_attr_off(const attr_t, void *); | |||
849 | int slk_attron(const chtype); | |||
850 | int slk_attr_on(const attr_t, void *); | |||
851 | int slk_attrset(const chtype); | |||
852 | int slk_attr_set(const attr_t, short, void *); | |||
853 | int slk_clear(void); | |||
854 | int slk_color(short); | |||
855 | int slk_init(int); | |||
856 | char *slk_label(int); | |||
857 | int slk_noutrefresh(void); | |||
858 | int slk_refresh(void); | |||
859 | int slk_restore(void); | |||
860 | int slk_set(int, const char *, int); | |||
861 | int slk_touch(void); | |||
862 | int slk_wset(int, const wchar_t *, int); | |||
863 | ||||
846 | /* wide-character support routines */ | 864 | /* wide-character support routines */ | |
847 | /* return ERR when HAVE_WCHAR is not defined */ | 865 | /* return ERR when HAVE_WCHAR is not defined */ | |
848 | /* add */ | 866 | /* add */ | |
849 | int add_wch(const cchar_t *); | 867 | int add_wch(const cchar_t *); | |
850 | int wadd_wch(WINDOW *, const cchar_t *); | 868 | int wadd_wch(WINDOW *, const cchar_t *); | |
851 | int mvadd_wch(int, int, const cchar_t *); | 869 | int mvadd_wch(int, int, const cchar_t *); | |
852 | int mvwadd_wch(WINDOW *, int, int, const cchar_t *); | 870 | int mvwadd_wch(WINDOW *, int, int, const cchar_t *); | |
853 | 871 | |||
854 | int add_wchnstr(const cchar_t *, int); | 872 | int add_wchnstr(const cchar_t *, int); | |
855 | int add_wchstr(const cchar_t *); | 873 | int add_wchstr(const cchar_t *); | |
856 | int wadd_wchnstr(WINDOW *, const cchar_t *, int); | 874 | int wadd_wchnstr(WINDOW *, const cchar_t *, int); | |
857 | int wadd_wchstr(WINDOW *, const cchar_t *); | 875 | int wadd_wchstr(WINDOW *, const cchar_t *); | |
858 | int mvadd_wchnstr(int, int, const cchar_t *, int); | 876 | int mvadd_wchnstr(int, int, const cchar_t *, int); |
--- src/lib/libcurses/curses_private.h 2017/01/11 20:43:03 1.59
+++ src/lib/libcurses/curses_private.h 2017/01/24 17:27:30 1.60
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: curses_private.h,v 1.59 2017/01/11 20:43:03 roy Exp $ */ | 1 | /* $NetBSD: curses_private.h,v 1.60 2017/01/24 17:27:30 roy Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998-2000 Brett Lymn | 4 | * Copyright (c) 1998-2000 Brett Lymn | |
5 | * (blymn@baea.com.au, brett_lymn@yahoo.com.au) | 5 | * (blymn@baea.com.au, brett_lymn@yahoo.com.au) | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * This code has been donated to The NetBSD Foundation by the Author. | 8 | * This code has been donated to The NetBSD Foundation by the Author. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -179,26 +179,42 @@ struct __color { | @@ -179,26 +179,42 @@ struct __color { | |||
179 | struct __pair { | 179 | struct __pair { | |
180 | short fore; | 180 | short fore; | |
181 | short back; | 181 | short back; | |
182 | int flags; | 182 | int flags; | |
183 | }; | 183 | }; | |
184 | 184 | |||
185 | /* Maximum colours */ | 185 | /* Maximum colours */ | |
186 | #define MAX_COLORS 256 | 186 | #define MAX_COLORS 256 | |
187 | /* Maximum colour pairs - determined by number of colour bits in attr_t */ | 187 | /* Maximum colour pairs - determined by number of colour bits in attr_t */ | |
188 | #define MAX_PAIRS PAIR_NUMBER(__COLOR) | 188 | #define MAX_PAIRS PAIR_NUMBER(__COLOR) | |
189 | 189 | |||
190 | typedef struct keymap keymap_t; | 190 | typedef struct keymap keymap_t; | |
191 | 191 | |||
192 | /* POSIX allows up to 8 columns in a label. */ | |||
193 | #define MAX_SLK_COLS 8 | |||
194 | #ifdef HAVE_WCHAR | |||
195 | #define MAX_SLK_LABEL sizeof(wchar_t) * MAX_SLK_COLS | |||
196 | #else | |||
197 | #define MAX_SLK_LABEL MAX_SLK_COLS | |||
198 | #endif | |||
199 | struct __slk_label { | |||
200 | char *text; | |||
201 | int justify; | |||
202 | #define SLK_JUSTIFY_LEFT 0 | |||
203 | #define SLK_JUSTIFY_CENTER 1 | |||
204 | #define SLK_JUSTIFY_RIGHT 2 | |||
205 | char label[MAX_SLK_LABEL + 1]; | |||
206 | int x; | |||
207 | }; | |||
192 | 208 | |||
193 | #define MAX_RIPS 5 | 209 | #define MAX_RIPS 5 | |
194 | struct __ripoff { | 210 | struct __ripoff { | |
195 | int nlines; | 211 | int nlines; | |
196 | WINDOW *win; | 212 | WINDOW *win; | |
197 | }; | 213 | }; | |
198 | 214 | |||
199 | /* this is the encapsulation of the terminal definition, one for | 215 | /* this is the encapsulation of the terminal definition, one for | |
200 | * each terminal that curses talks to. | 216 | * each terminal that curses talks to. | |
201 | */ | 217 | */ | |
202 | struct __screen { | 218 | struct __screen { | |
203 | FILE *infd, *outfd; /* input and output file descriptors */ | 219 | FILE *infd, *outfd; /* input and output file descriptors */ | |
204 | WINDOW *curscr; /* Current screen. */ | 220 | WINDOW *curscr; /* Current screen. */ | |
@@ -258,26 +274,38 @@ struct __screen { | @@ -258,26 +274,38 @@ struct __screen { | |||
258 | int ovtime; | 274 | int ovtime; | |
259 | char *stdbuf; | 275 | char *stdbuf; | |
260 | unsigned int len; | 276 | unsigned int len; | |
261 | int meta_state; | 277 | int meta_state; | |
262 | char padchar; | 278 | char padchar; | |
263 | int endwin; | 279 | int endwin; | |
264 | int notty; | 280 | int notty; | |
265 | int half_delay; | 281 | int half_delay; | |
266 | int resized; | 282 | int resized; | |
267 | wchar_t *unget_list; | 283 | wchar_t *unget_list; | |
268 | int unget_len, unget_pos; | 284 | int unget_len, unget_pos; | |
269 | int filtered; | 285 | int filtered; | |
270 | int checkfd; | 286 | int checkfd; | |
287 | ||||
288 | /* soft label key */ | |||
289 | bool is_term_slk; | |||
290 | WINDOW *slk_window; | |||
291 | int slk_format; | |||
292 | #define SLK_FMT_3_2_3 0 | |||
293 | #define SLK_FMT_4_4 1 | |||
294 | int slk_nlabels; | |||
295 | int slk_label_len; | |||
296 | bool slk_hidden; | |||
297 | struct __slk_label *slk_labels; | |||
298 | ||||
271 | #ifdef HAVE_WCHAR | 299 | #ifdef HAVE_WCHAR | |
272 | #define MB_LEN_MAX 8 | 300 | #define MB_LEN_MAX 8 | |
273 | #define MAX_CBUF_SIZE MB_LEN_MAX | 301 | #define MAX_CBUF_SIZE MB_LEN_MAX | |
274 | int cbuf_head; /* header to cbuf */ | 302 | int cbuf_head; /* header to cbuf */ | |
275 | int cbuf_tail; /* tail to cbuf */ | 303 | int cbuf_tail; /* tail to cbuf */ | |
276 | int cbuf_cur; /* the current char in cbuf */ | 304 | int cbuf_cur; /* the current char in cbuf */ | |
277 | mbstate_t sp; /* wide char processing state */ | 305 | mbstate_t sp; /* wide char processing state */ | |
278 | char cbuf[ MAX_CBUF_SIZE ]; /* input character buffer */ | 306 | char cbuf[ MAX_CBUF_SIZE ]; /* input character buffer */ | |
279 | #endif /* HAVE_WCHAR */ | 307 | #endif /* HAVE_WCHAR */ | |
280 | }; | 308 | }; | |
281 | 309 | |||
282 | 310 | |||
283 | extern char __GT; /* Gtty indicates tabs. */ | 311 | extern char __GT; /* Gtty indicates tabs. */ | |
@@ -347,34 +375,39 @@ void __restore_colors(void); | @@ -347,34 +375,39 @@ void __restore_colors(void); | |||
347 | void __restore_cursor_vis(void); | 375 | void __restore_cursor_vis(void); | |
348 | void __restore_meta_state(void); | 376 | void __restore_meta_state(void); | |
349 | void __restore_termios(void); | 377 | void __restore_termios(void); | |
350 | void __restore_stophandler(void); | 378 | void __restore_stophandler(void); | |
351 | void __restore_winchhandler(void); | 379 | void __restore_winchhandler(void); | |
352 | int __ripoffscreen(SCREEN *, int *); | 380 | int __ripoffscreen(SCREEN *, int *); | |
353 | void __ripoffresize(SCREEN *); | 381 | void __ripoffresize(SCREEN *); | |
354 | int __rippedlines(const SCREEN *); | 382 | int __rippedlines(const SCREEN *); | |
355 | void __save_termios(void); | 383 | void __save_termios(void); | |
356 | void __set_color(WINDOW *win, attr_t attr); | 384 | void __set_color(WINDOW *win, attr_t attr); | |
357 | void __set_stophandler(void); | 385 | void __set_stophandler(void); | |
358 | void __set_winchhandler(void); | 386 | void __set_winchhandler(void); | |
359 | void __set_subwin(WINDOW *, WINDOW *); | 387 | void __set_subwin(WINDOW *, WINDOW *); | |
388 | int __slk_init(SCREEN *); | |||
389 | void __slk_free(SCREEN *); | |||
390 | int __slk_resize(SCREEN *, int cols); | |||
391 | int __slk_noutrefresh(SCREEN *); | |||
360 | void __startwin(SCREEN *); | 392 | void __startwin(SCREEN *); | |
361 | void __stop_signal_handler(int); | 393 | void __stop_signal_handler(int); | |
362 | int __stopwin(void); | 394 | int __stopwin(void); | |
363 | void __swflags(WINDOW *); | 395 | void __swflags(WINDOW *); | |
364 | void __sync(WINDOW *); | 396 | void __sync(WINDOW *); | |
365 | int __timeout(int); | 397 | int __timeout(int); | |
366 | int __touchline(WINDOW *, int, int, int); | 398 | int __touchline(WINDOW *, int, int, int); | |
367 | int __touchwin(WINDOW *); | 399 | int __touchwin(WINDOW *); | |
400 | int __unripoffline(int (*)(WINDOW *, int)); | |||
368 | void __unsetattr(int); | 401 | void __unsetattr(int); | |
369 | void __unset_color(WINDOW *win); | 402 | void __unset_color(WINDOW *win); | |
370 | int __waddch(WINDOW *, __LDATA *); | 403 | int __waddch(WINDOW *, __LDATA *); | |
371 | int __wgetnstr(WINDOW *, char *, int); | 404 | int __wgetnstr(WINDOW *, char *, int); | |
372 | void __winch_signal_handler(int); | 405 | void __winch_signal_handler(int); | |
373 | 406 | |||
374 | /* Private #defines. */ | 407 | /* Private #defines. */ | |
375 | #define min(a,b) ((a) < (b) ? (a) : (b)) | 408 | #define min(a,b) ((a) < (b) ? (a) : (b)) | |
376 | #define max(a,b) ((a) > (b) ? (a ): (b)) | 409 | #define max(a,b) ((a) > (b) ? (a ): (b)) | |
377 | 410 | |||
378 | /* Private externs. */ | 411 | /* Private externs. */ | |
379 | extern int __echoit; | 412 | extern int __echoit; | |
380 | extern int __endwin; | 413 | extern int __endwin; |
.\" $NetBSD: curses_slk.3,v 1.1 2017/01/24 17:27:30 roy Exp $
.\"
.\" Copyright (c) 2017 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Roy Marples.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
.Dd January 12, 2017
.Dt CURSES_SLK 3
.Os
.Sh NAME
.Nm slk_attroff ,
.Nm slk_attr_off ,
.Nm slk_attron ,
.Nm slk_attr_on ,
.Nm slk_attrset ,
.Nm slk_attr_set ,
.Nm slk_clear ,
.Nm slk_color ,
.Nm slk_init ,
.Nm slk_label ,
.Nm slk_noutrefresh ,
.Nm slk_refresh ,
.Nm slk_restore ,
.Nm slk_set ,
.Nm slk_touch ,
.Nm slk_wset
.Nd Curses soft label key routines
.Sh LIBRARY
.Lb libcurses
.Sh SYNOPSIS
.In curses.h
.Ft int
.Fn slk_attroff "const chtype attr"
.Ft int
.Fn slk_attr_off "const attr_t attr" "void *opt"
.Ft int
.Fn slk_attron "const chtype attr"
.Ft int
.Fn slk_attr_on "const attr_t attr" "void *opt"
.Ft int
.Fn slk_attrset "const chtype attr"
.Ft int
.Fn slk_attr_set "const attr_t attr" "void *opt"
.Ft void
.Fn slk_clear "void"
.Ft int
.Fn slk_color "short pair"
.Ft int
.Fn slk_init "int fmt"
.Ft char *
.Fn slk_label "int labnum"
.Ft int
.Fn slk_noutrefresh "void"
.Ft int
.Fn slk_refresh "void"
.Ft int
.Fn slk_restore "void"
.Ft int
.Fn slk_set "int labnum" "const char *label" "int justify"
.Ft int
.Fn slk_touch "void"
.Ft int
.Fn slk_wset "int labnum" "const wchar_t *label" "int justify"
.Sh DESCRIPTION
This Curses interface manipulates the set of soft function-key labels that
exist on some terminals.
For those terminals that do not have soft labels, Curses takes over the bottom
line of
.Dv stdstr ,
reducing the size of
.Dv stdscr
and the value of the
.Dv LINES
external variable.
There can be up to eight labels of up to eight display columns each.
.Pp
To use soft labels,
.Fn slk_init
must be called before
.Xr initscr 3 ,
.Xr newterm 3 ,
or
.Xr ripoffline 3
is called.
If
.Xr newterm 3
eventually uses a line from
.Dv stdscr
to emulate the soft labels, then
.Fa fmt
determines how the labels are arranged on the screen from the following list:
.Bl -tag -width ERR -compact
.It 0
indicates a 3-2-3 arrangement.
.It 1
indicates a 4-4 arrangement.
.El
.Pp
The
.Fn slk_set
and
.Fn slk_wset
functions specify the text of soft label number
.Fa labnum ,
within the range from 1 to 8 inclusive.
The
.Fa label
argument is the string to be put on the label.
The
.Fa justify
argument can have the following values to indicate how to justify
.Fa label
within the space reserved for it:
.Bl -tag -width ERR -compact
.It 0
Left align.
.It 1
Center align.
.It 2
Right align.
.El
.Pp
The
.Fn slk_refresh
and
.Fn slk_noutrefresh
functions correspond to the
.Xr wrefresh 3
and
.Xr wnoutrefresh 3
functions.
.Pp
The
.Fn slk_label
function returns a pointer to the text displayed in the label.
.Pp
The
.Fn slk_clear
function immediately clears the soft labels from the screen.
.Pp
The
.Fn slk_restore
function immediately restores the soft labels to the screen after a call to
.Fn slk_clear .
.Pp
The
.Fn slk_touch
function forces all soft labels to be output the next time
.Fn slk_noutrefresh
or
.Fn slk_refresh
is called.
.Pp
The
.Fn slk_attron ,
.Fn slk_attrset
and
.Fn slk_attroff
functions correspond to
.Xr attron 3 ,
.Xr attrset 3
and
.Xr attroff 3 .
The have an effect only if soft labels are simulated on the bottom line of the
screen.
.Pp
The
.Fn slk_attr_on ,
.Fn slk_attr_set ,
.Fn slk_color
and
.Fn slk_attr_off
functions correspond to
.Xr attr_on 3 ,
.Xr attr_set 3 ,
.Xr color_set 3
and
.Xr attr_off 3
and thus support the attribute constants with the WA_ prefix and color.
The have an effect only if soft labels are simulated on the bottom line of the
screen.
.Pp
The
.Fa opt
argument is reserved for future use.
Currently the application must provide a NULL pointer as
.Fa opt .
.Sh RETURN VALUES
Functions returning pointers will return
.Dv NULL
if an error is detected.
The functions that return an int will return one of the following
values:
.Pp
.Bl -tag -width ERR -compact
.It Er OK
The function completed successfully.
.It Er ERR
An error occurred in the function.
.El
.Sh SEE ALSO
.Xr terminfo 5
.Sh NOTES
This has not been tested on a terminal with real soft label keys.
.Dv label_height ,
.Dv label_width ,
.Dv label_format
and
.Dv lab_f*
are currently not used.
.Sh STANDARDS
The
.Nx
Curses library complies with the X/Open Curses specification, part of the
Single Unix Specification.
.Sh HISTORY
The Curses package appeared in
.Bx 4.0 .
The soft label key functions were added in
.Nx 8.0 .
/* $NetBSD: slk.c,v 1.1 2017/01/24 17:27:30 roy Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Roy Marples.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: slk.c,v 1.1 2017/01/24 17:27:30 roy Exp $");
#endif /* not lint */
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_WCHAR
#include <wctype.h>
#endif
#include "curses.h"
#include "curses_private.h"
/* Terminals with real soft labels have NOT been tested.
* If you have such a device, please let us know so this comment
* can be adjusted. */
/* POSIX says that each label can be up to 8 columns.
* However, our implementation can allow labels to expand beyond that. */
//#define SLK_SIZE_DYNAMIC
#ifdef SLK_SIZE_DYNAMIC
#define SLK_SIZE MAX_SLK_LABEL
#else
#define SLK_SIZE MAX_SLK_COLS
#endif
static int slk_fmt; /* fmt of slk_init */
/* Safe variants of public functions. */
static int __slk_attron(SCREEN *, const chtype);
static int __slk_attr_on(SCREEN *, const attr_t, void *);
static int __slk_attroff(SCREEN *, const chtype);
static int __slk_attr_off(SCREEN *, const attr_t, void *);
static int __slk_attrset(SCREEN *, const chtype);
static int __slk_attr_set(SCREEN *, const attr_t, short, void *opt);
static int __slk_color(SCREEN *, short);
static int __slk_clear(SCREEN *);
static char *__slk_label(SCREEN *, int);
static int __slk_restore(SCREEN *);
static int __slk_set(SCREEN *, int, const char *, int);
static int __slk_touch(SCREEN *);
static int __slk_wset(SCREEN *, int, const wchar_t *, int);
/* Internal engine parts. */
static int __slk_ripoffline(WINDOW *, int);
static int __slk_set_finalise(SCREEN *, int);
static int __slk_draw(SCREEN *, int);
static int __slk_redraw(SCREEN *);
/*
* slk_init --
* Init Soft Label Keys.
*/
int
slk_init(int fmt)
{
switch(fmt) {
case SLK_FMT_3_2_3:
case SLK_FMT_4_4:
break;
default:
return ERR;
}
slk_fmt = fmt;
/* Even if the terminal supports soft label keys directly,
* we need to reserve a line. */
return ripoffline(-1, __slk_ripoffline);
}
/*
* slk_attron --
* Test and set attributes on ripped off slk window.
*/
int
slk_attron(const chtype attr)
{
return __slk_attron(_cursesi_screen, attr);
}
/*
* slk_attr_on --
* Test and set wide attributes on ripped off slk window.
*/
int
slk_attr_on(const attr_t attr, void *opt)
{
return __slk_attr_on(_cursesi_screen, attr, opt);
}
/*
* slk_attroff --
* Test and unset attributes on ripped off slk window.
*/
int
slk_attroff(const chtype attr)
{
return __slk_attroff(_cursesi_screen, attr);
}
/*
* slk_attr_off --
* Test and unset wide attributes on ripped off slk window.
*/
int
slk_attr_off(const attr_t attr, void *opt)
{
return __slk_attr_off(_cursesi_screen, attr, opt);
}
/*
* slk_attrset --
* Set attributes and color pair on ripped off slk window.
*/
int
slk_attrset(const chtype attr)
{
return __slk_attrset(_cursesi_screen, attr);
}
/*
* slk_attr_set --
* Set wide attributes and color pair on ripped off slk window.
*/
int
slk_attr_set(const attr_t attr, short pair, void *opt)
{
return __slk_attr_set(_cursesi_screen, attr, pair, opt);
}
/*
* slk_clear --
* Clear slk from the current screen.
*/
int
slk_clear(void)
{
return __slk_clear(_cursesi_screen);
}
/*
* slk_color --
* Set color pair on ripped off slk window.
*/
int
slk_color(short pair)
{
return __slk_color(_cursesi_screen, pair);
}
/*
* slk_label --
* Return a pointer to the saved label for key labnum.
*/
char *
slk_label(int labnum)
{
return __slk_label(_cursesi_screen, labnum);
}
/*
* slk_wnoutrefresh --
* Add the contents of the ripped off slk window to the virtual window.
*/
int
slk_noutrefresh(void)
{
return __slk_noutrefresh(_cursesi_screen);
}
/*
* slk_refresh --
* Force a refresh for the ripped off slk window.
*/
int
slk_refresh(void)
{
if (slk_noutrefresh() == ERR)
return ERR;
return doupdate();
}
/*
* slk_restore --
* Retore slk to the screen after a slk_clear.
*/
int
slk_restore(void)
{
return __slk_restore(_cursesi_screen);
}
/*
* slk_set --
* Sets the text of the label specified by labnum
* and how it is displayed.
*/
int
slk_set(int labnum, const char *label, int justify)
{
return __slk_set(_cursesi_screen, labnum, label, justify);
}
/*
* slk_touch --
* Sets the ripped off slk window as modified.
*/
int
slk_touch(void)
{
return __slk_touch(_cursesi_screen);
}
/*
* slk_wset --
* Sets the wide text of the label specified by labnum
* and how it is displayed.
*/
int
slk_wset(int labnum, const wchar_t *label, int justify)
{
return __slk_wset(_cursesi_screen, labnum, label, justify);
}
/*
* __slk_attron --
* Test and set attributes on ripped off slk window.
*/
static int
__slk_attron(SCREEN *screen, const chtype attr)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattron(screen->slk_window, attr);
}
/*
* __slk_attr_on --
* Test and set wide attributes on ripped off slk window.
*/
static int
__slk_attr_on(SCREEN *screen, const attr_t attr, void *opt)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattr_on(screen->slk_window, attr, opt);
}
/*
* __slk_attroff --
* Test and unset attributes on ripped off slk window.
*/
static int
__slk_attroff(SCREEN *screen, const chtype attr)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattroff(screen->slk_window, attr);
}
/*
* __slk_attr_off --
* Test and unset wide attributes on ripped off slk window.
*/
static int
__slk_attr_off(SCREEN *screen, const attr_t attr, void *opt)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattr_off(screen->slk_window, attr, opt);
}
/*
* __slk_attrset --
* Set attributes and color pair on ripped off slk window.
*/
static int
__slk_attrset(SCREEN *screen, const chtype attr)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattrset(screen->slk_window, attr);
}
/*
* __slk_attr_set --
* Set wide attributes and color pair on ripped off slk window.
*/
static int
__slk_attr_set(SCREEN *screen, const attr_t attr, short pair, void *opt)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wattr_set(screen->slk_window, attr, pair, opt);
}
/*
* __slk_clear --
* Clear slk from the current screen.
*/
static int
__slk_clear(SCREEN *screen)
{
assert(screen != NULL);
screen->slk_hidden = true;
if (screen->is_term_slk) {
if (t_label_off(screen->term) == NULL)
return ERR;
return ti_putp(screen->term,
ti_tiparm(screen->term, t_label_off(screen->term)));
}
if (screen->slk_window == NULL)
return ERR;
werase(screen->slk_window);
return wrefresh(screen->slk_window);
}
/*
* __slk_color --
* Set color pair on ripped off slk window.
*/
static int
__slk_color(SCREEN *screen, short pair)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wcolor_set(screen->slk_window, pair, NULL);
}
/*
* __slk_label --
* Return a pointer to the saved label for key labnum.
*/
static char *
__slk_label(SCREEN *screen, int labnum)
{
assert(screen != NULL);
if (labnum < 1 || labnum > screen->slk_nlabels)
return NULL;
return screen->slk_labels[--labnum].text;
}
/*
* __slk_wnoutrefresh --
* Add the contents of the ripped off slk window to the virtual window.
*/
int
__slk_noutrefresh(SCREEN *screen)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return wnoutrefresh(screen->slk_window);
}
/*
* __slk_restore --
* Retore slk to the screen after a slk_clear.
*/
static int
__slk_restore(SCREEN *screen)
{
assert(screen != NULL);
screen->slk_hidden = false;
if (screen->is_term_slk) {
if (t_label_on(screen->term) == NULL)
return ERR;
return ti_putp(screen->term,
ti_tiparm(screen->term, t_label_on(screen->term)));
}
if (screen->slk_window == NULL)
return ERR;
if (__slk_redraw(screen) == ERR)
return ERR;
return wrefresh(screen->slk_window);
}
/*
* __slk_set --
* Sets the text of the label specified by labnum
* and how it is displayed.
*/
static int
__slk_set(SCREEN *screen, int labnum, const char *label, int justify)
{
struct __slk_label *l;
const char *end;
size_t len;
char *text;
#ifdef HAVE_WCHAR
wchar_t wc;
size_t wc_len;
#endif
assert(screen != NULL);
/* Check args. */
if (labnum < 1 || labnum > screen->slk_nlabels)
return ERR;
switch(justify) {
case SLK_JUSTIFY_LEFT:
case SLK_JUSTIFY_CENTER:
case SLK_JUSTIFY_RIGHT:
break;
default:
return ERR;
}
if (label == NULL)
label = "";
/* Skip leading whitespace. */
while(isspace((unsigned char)*label))
label++;
/* Grab end. */
end = label;
#ifdef HAVE_WCHAR
len = 0;
while (*end != '\0') {
if ((wc_len = mbrtowc(0, end, strlen(end), &screen->sp)) == -1)
return ERR;
mbrtowc(&wc, end, wc_len, &screen->sp);
if (!iswprint((wint_t)wc))
break;
len += wcwidth(wc);
end += wc_len;
}
#else
while(isprint((unsigned char)*end))
end++;
len = end - label;
#endif
/* Take a backup, in-case we can grow the label. */
if ((text = strndup(label, len)) == NULL)
return ERR;
/* All checks out, assign. */
l = &screen->slk_labels[--labnum]; /* internal zero based index */
l->text = text;
l->justify = justify;
__slk_set_finalise(screen, labnum);
return OK;
}
/*
* __slk_touch --
* Sets the ripped off slk window as modified.
*/
static int
__slk_touch(SCREEN *screen)
{
assert(screen != NULL);
if (screen->slk_window == NULL)
return ERR;
return touchwin(screen->slk_window);
}
/*
* __slk_wset --
* Sets the wide text of the label specified by labnum
* and how it is displayed.
*/
static int
__slk_wset(SCREEN *screen, int labnum, const wchar_t *label, int justify)
{
#ifdef HAVE_WCHAR
const wchar_t *olabel;
size_t len;
char *str;
int result = ERR;
assert(screen != NULL);
olabel = label;
if ((len = wcsrtombs(NULL, &olabel, 0, &screen->sp)) == -1)
return ERR;
len++; /* We need to store the NULL character. */
if ((str = malloc(len)) == NULL)
return ERR;
olabel = label;
if (wcsrtombs(str, &olabel, len, &screen->sp) == -1)
goto out;
result = __slk_set(screen, labnum, str, justify);
out:
free(str);
return result;
#else
return ERR;
#endif
}
/*
* __slk_init --
* Allocate structures.
*/
int
__slk_init(SCREEN *screen)
{
__slk_free(screen); /* safety */
screen->slk_format = slk_fmt;
switch(screen->slk_format) {
case SLK_FMT_3_2_3:
case SLK_FMT_4_4:
screen->slk_nlabels = 8;
break;
default: /* impossible */
return ERR;
}
screen->slk_labels = calloc(screen->slk_nlabels,
sizeof(*screen->slk_labels));
if (screen->slk_labels == NULL)
return ERR;
screen->is_term_slk =
t_plab_norm(screen->term) != NULL &&
t_num_labels(screen->term) > 0;
if (screen->is_term_slk) {
__unripoffline(__slk_ripoffline);
screen->slk_nlabels = t_num_labels(screen->term);
screen->slk_label_len = t_label_width(screen->term);
/* XXX label_height, label_format? */
}
return OK;
}
/*
* __slk_free --
* Free allocates resources.
*/
void
__slk_free(SCREEN *screen)
{
int i;
if (screen->slk_window != NULL)
delwin(screen->slk_window);
for (i = 0; i < screen->slk_nlabels; i++)
free(screen->slk_labels[i].text);
free(screen->slk_labels);
}
/*
* __slk_ripoffline --
* ripoffline callback to accept a WINDOW to create our keys.
*/
static int
__slk_ripoffline(WINDOW *window, int cols)
{
if (window == NULL)
return ERR;
assert(window->screen->slk_window == NULL);
window->screen->slk_window = window;
wattron(window,
(t_no_color_video(window->screen->term) & 1) == 0
? A_STANDOUT : A_REVERSE);
__slk_resize(window->screen, cols);
return OK;
}
/*
* __slk_resize --
* Size and position the labels in the ripped off slk window.
*/
int
__slk_resize(SCREEN *screen, int cols)
{
int x = 0;
struct __slk_label *l;
assert(screen != NULL);
if (screen->is_term_slk || screen->slk_nlabels == 0)
return OK;
screen->slk_label_len = (cols / screen->slk_nlabels) - 1;
if (screen->slk_label_len > SLK_SIZE)
screen->slk_label_len = SLK_SIZE;
l = screen->slk_labels;
switch(screen->slk_format) {
case SLK_FMT_3_2_3:
/* Left 3 */
(l++)->x = x;
(l++)->x = (x += screen->slk_label_len + 1);
(l++)->x = (x += screen->slk_label_len + 1);
/* Middle 2 */
x = cols / 2;
(l++)->x = x -(screen->slk_label_len + 1);
(l++)->x = x + 1;
/* Right 3 */
x = (cols - ((screen->slk_label_len + 1) * 3)) + 1;
(l++)->x = x;
(l++)->x = (x += screen->slk_label_len + 1);
(l++)->x = (x += screen->slk_label_len + 1);
break;
case SLK_FMT_4_4:
{
int i, half;
half = screen->slk_nlabels / 2;
for (i = 0; i < screen->slk_nlabels; i++) {
(l++)->x = x;
x += screen->slk_label_len;
/* Split labels in half */
if (i == half - 1)
x = cols - (screen->slk_label_len * half) + 1;
}
break;
}
}
/* Write text to the labels. */
for (x = 0; x < screen->slk_nlabels; x++)
__slk_set_finalise(screen, x);
return __slk_redraw(screen);
}
/*
* __slk_set_finalise --
* Does the grunt work of positioning and sizing the text in the label.
*/
static int
__slk_set_finalise(SCREEN *screen, int labnum)
{
struct __slk_label *l;
size_t spc, len, x;
char *p;
l = &screen->slk_labels[labnum];
spc = screen->slk_label_len;
#ifdef HAVE_WCHAR
len = 0;
if (l->text != NULL) {
wchar_t wc;
p = l->text;
while (*p != '\0') {
if ((x = mbrtowc(0, p, strlen(p), &screen->sp)) == -1)
return ERR;
mbrtowc(&wc, p, x, &screen->sp);
if (len + wcwidth(wc) > spc)
break;
len += wcwidth(wc);
p += x;
}
}
#else
len = l->text == NULL ? 0 : strlen(l->text);
if (len > spc)
len = spc;
#endif
switch(l->justify) {
case SLK_JUSTIFY_LEFT:
x = 0;
break;
case SLK_JUSTIFY_CENTER:
x = (spc - len) / 2;
if (x + len > spc)
x--;
break;
case SLK_JUSTIFY_RIGHT:
x = spc - len;
break;
default:
return ERR; /* impossible */
}
p = l->label;
if (x != 0) {
memset(p, ' ', x);
p += x;
spc -= x;
}
if (len != 0) {
memcpy(p, l->text, len);
p += len;
spc -= len;
}
if (spc != 0) {
memset(p, ' ', spc);
p += spc;
}
*p = '\0'; /* Terminate for plab_norm. */
return __slk_draw(screen, labnum);
}
/*
* __slk_draw --
* Draws the specified key.
*/
static int
__slk_draw(SCREEN *screen, int labnum)
{
const struct __slk_label *l;
if (screen->slk_hidden)
return OK;
l = &screen->slk_labels[labnum];
if (screen->is_term_slk)
return ti_putp(screen->term,
ti_tiparm(screen->term,
t_plab_norm(screen->term), labnum + 1, l->label));
else if (screen->slk_window != NULL)
return mvwaddnstr(screen->slk_window, 0, l->x,
l->label, screen->slk_label_len);
else
return ERR;
}
/*
* __slk_draw --
* Draws all the keys.
*/
static int
__slk_redraw(SCREEN *screen)
{
int i, result = OK;
for (i = 0; i < screen->slk_nlabels; i++) {
if (__slk_draw(screen, i) == ERR)
result = ERR;
}
return result;
}
--- src/lib/libcurses/resize.c 2017/01/11 20:43:03 1.25
+++ src/lib/libcurses/resize.c 2017/01/24 17:27:30 1.26
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: resize.c,v 1.25 2017/01/11 20:43:03 roy Exp $ */ | 1 | /* $NetBSD: resize.c,v 1.26 2017/01/24 17:27:30 roy Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001 | 4 | * Copyright (c) 2001 | |
5 | * Brett Lymn. | 5 | * Brett Lymn. | |
6 | * | 6 | * | |
7 | * This code has been donated to The NetBSD Foundation by the Author. | 7 | * This code has been donated to The NetBSD Foundation by the Author. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
35 | * SUCH DAMAGE. | 35 | * SUCH DAMAGE. | |
36 | */ | 36 | */ | |
37 | 37 | |||
38 | #include <sys/cdefs.h> | 38 | #include <sys/cdefs.h> | |
39 | #ifndef lint | 39 | #ifndef lint | |
40 | #if 0 | 40 | #if 0 | |
41 | static char sccsid[] = "@(#)resize.c blymn 2001/08/26"; | 41 | static char sccsid[] = "@(#)resize.c blymn 2001/08/26"; | |
42 | #else | 42 | #else | |
43 | __RCSID("$NetBSD: resize.c,v 1.25 2017/01/11 20:43:03 roy Exp $"); | 43 | __RCSID("$NetBSD: resize.c,v 1.26 2017/01/24 17:27:30 roy Exp $"); | |
44 | #endif | 44 | #endif | |
45 | #endif /* not lint */ | 45 | #endif /* not lint */ | |
46 | 46 | |||
47 | #include <stdlib.h> | 47 | #include <stdlib.h> | |
48 | 48 | |||
49 | #include "curses.h" | 49 | #include "curses.h" | |
50 | #include "curses_private.h" | 50 | #include "curses_private.h" | |
51 | 51 | |||
52 | static int __resizeterm(WINDOW *win, int nlines, int ncols); | 52 | static int __resizeterm(WINDOW *win, int nlines, int ncols); | |
53 | static int __resizewin(WINDOW *win, int nlines, int ncols); | 53 | static int __resizewin(WINDOW *win, int nlines, int ncols); | |
54 | 54 | |||
55 | /* | 55 | /* | |
56 | * wresize -- | 56 | * wresize -- | |
@@ -163,28 +163,34 @@ resizeterm(int nlines, int ncols) | @@ -163,28 +163,34 @@ resizeterm(int nlines, int ncols) | |||
163 | __CTRACE(__CTRACE_WINDOW, "resizeterm: (%d, %d)\n", nlines, ncols); | 163 | __CTRACE(__CTRACE_WINDOW, "resizeterm: (%d, %d)\n", nlines, ncols); | |
164 | #endif | 164 | #endif | |
165 | 165 | |||
166 | 166 | |||
167 | if (!is_term_resized(nlines, ncols)) | 167 | if (!is_term_resized(nlines, ncols)) | |
168 | return OK; | 168 | return OK; | |
169 | 169 | |||
170 | result = resize_term(nlines, ncols); | 170 | result = resize_term(nlines, ncols); | |
171 | 171 | |||
172 | /* Screen contents are unknown, libcurses is not libpanel, we don't | 172 | /* Screen contents are unknown, libcurses is not libpanel, we don't | |
173 | * know the correct draw order. */ | 173 | * know the correct draw order. */ | |
174 | clearok(curscr, TRUE); | 174 | clearok(curscr, TRUE); | |
175 | 175 | |||
176 | /* We know how to repaint the ripoffs */ | 176 | if (result == OK) { | |
177 | __ripoffresize(_cursesi_screen); | 177 | /* We know how to repaint the ripoffs */ | |
178 | __ripoffresize(_cursesi_screen); | |||
179 | ||||
180 | /* We do need to reposition our slks. */ | |||
181 | __slk_resize(_cursesi_screen, ncols); | |||
182 | __slk_noutrefresh(_cursesi_screen); | |||
183 | } | |||
178 | 184 | |||
179 | return result; | 185 | return result; | |
180 | } | 186 | } | |
181 | 187 | |||
182 | /* | 188 | /* | |
183 | * resize_term -- | 189 | * resize_term -- | |
184 | * Resize the terminal window, resizing the dependent windows. | 190 | * Resize the terminal window, resizing the dependent windows. | |
185 | */ | 191 | */ | |
186 | int | 192 | int | |
187 | resize_term(int nlines, int ncols) | 193 | resize_term(int nlines, int ncols) | |
188 | { | 194 | { | |
189 | WINDOW *win; | 195 | WINDOW *win; | |
190 | struct __winlist *list; | 196 | struct __winlist *list; | |
@@ -200,26 +206,31 @@ resize_term(int nlines, int ncols) | @@ -200,26 +206,31 @@ resize_term(int nlines, int ncols) | |||
200 | if (__resizeterm(curscr, nlines, ncols) == ERR) | 206 | if (__resizeterm(curscr, nlines, ncols) == ERR) | |
201 | return ERR; | 207 | return ERR; | |
202 | if (__resizeterm(__virtscr, nlines, ncols) == ERR) | 208 | if (__resizeterm(__virtscr, nlines, ncols) == ERR) | |
203 | return ERR; | 209 | return ERR; | |
204 | rlines = nlines - __rippedlines(_cursesi_screen); | 210 | rlines = nlines - __rippedlines(_cursesi_screen); | |
205 | if (__resizeterm(stdscr, rlines, ncols) == ERR) | 211 | if (__resizeterm(stdscr, rlines, ncols) == ERR) | |
206 | return ERR; | 212 | return ERR; | |
207 | 213 | |||
208 | _cursesi_screen->LINES = nlines; | 214 | _cursesi_screen->LINES = nlines; | |
209 | _cursesi_screen->COLS = ncols; | 215 | _cursesi_screen->COLS = ncols; | |
210 | LINES = rlines; | 216 | LINES = rlines; | |
211 | COLS = ncols; | 217 | COLS = ncols; | |
212 | 218 | |||
219 | if (_cursesi_screen->slk_window != NULL && | |||
220 | __resizewin(_cursesi_screen->slk_window, | |||
221 | _cursesi_screen->slk_window->reqy, ncols) == ERR) | |||
222 | return ERR; | |||
223 | ||||
213 | /* tweak the flags now that we have updated the LINES and COLS */ | 224 | /* tweak the flags now that we have updated the LINES and COLS */ | |
214 | for (list = _cursesi_screen->winlistp; list != NULL; list = list->nextp) { | 225 | for (list = _cursesi_screen->winlistp; list != NULL; list = list->nextp) { | |
215 | win = list->winp; | 226 | win = list->winp; | |
216 | 227 | |||
217 | if (!(win->flags & __ISPAD)) | 228 | if (!(win->flags & __ISPAD)) | |
218 | __swflags(win); | 229 | __swflags(win); | |
219 | } | 230 | } | |
220 | 231 | |||
221 | return OK; | 232 | return OK; | |
222 | } | 233 | } | |
223 | 234 | |||
224 | /* | 235 | /* | |
225 | * __resizeterm | 236 | * __resizeterm |
--- src/lib/libcurses/ripoffline.c 2017/01/12 16:23:46 1.2
+++ src/lib/libcurses/ripoffline.c 2017/01/24 17:27:30 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ripoffline.c,v 1.2 2017/01/12 16:23:46 roy Exp $ */ | 1 | /* $NetBSD: ripoffline.c,v 1.3 2017/01/24 17:27:30 roy Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2017 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2017 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Roy Marples. | 8 | * by Roy Marples. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | #ifndef lint | 33 | #ifndef lint | |
34 | __RCSID("$NetBSD: ripoffline.c,v 1.2 2017/01/12 16:23:46 roy Exp $"); | 34 | __RCSID("$NetBSD: ripoffline.c,v 1.3 2017/01/24 17:27:30 roy Exp $"); | |
35 | #endif /* not lint */ | 35 | #endif /* not lint */ | |
36 | 36 | |||
37 | #include "curses.h" | 37 | #include "curses.h" | |
38 | #include "curses_private.h" | 38 | #include "curses_private.h" | |
39 | 39 | |||
40 | /* List of ripoffline calls */ | 40 | /* List of ripoffline calls */ | |
41 | static struct ripoff { | 41 | static struct ripoff { | |
42 | int nlines; | 42 | int nlines; | |
43 | int (*init)(WINDOW *, int); | 43 | int (*init)(WINDOW *, int); | |
44 | } ripoffs[MAX_RIPS]; | 44 | } ripoffs[MAX_RIPS]; | |
45 | static int nrips; | 45 | static int nrips; | |
46 | 46 | |||
47 | /* | 47 | /* | |
@@ -93,26 +93,28 @@ __rippedlines(const SCREEN *screen) | @@ -93,26 +93,28 @@ __rippedlines(const SCREEN *screen) | |||
93 | * this implemenation allows for N lines if needed. | 93 | * this implemenation allows for N lines if needed. | |
94 | */ | 94 | */ | |
95 | int | 95 | int | |
96 | __ripoffscreen(SCREEN *screen, int *rtop) | 96 | __ripoffscreen(SCREEN *screen, int *rtop) | |
97 | { | 97 | { | |
98 | int i, nlines; | 98 | int i, nlines; | |
99 | const struct ripoff *srip; | 99 | const struct ripoff *srip; | |
100 | struct __ripoff *rip; | 100 | struct __ripoff *rip; | |
101 | WINDOW *w; | 101 | WINDOW *w; | |
102 | 102 | |||
103 | *rtop = 0; | 103 | *rtop = 0; | |
104 | rip = screen->ripped; | 104 | rip = screen->ripped; | |
105 | for (i = 0, srip = ripoffs; i < nrips; i++, srip++) { | 105 | for (i = 0, srip = ripoffs; i < nrips; i++, srip++) { | |
106 | if (srip->nlines == 0) | |||
107 | continue; | |||
106 | nlines = srip->nlines < 0 ? -srip->nlines : srip->nlines; | 108 | nlines = srip->nlines < 0 ? -srip->nlines : srip->nlines; | |
107 | w = __newwin(screen, nlines, 0, | 109 | w = __newwin(screen, nlines, 0, | |
108 | srip->nlines < 0 ? LINES - nlines : *rtop, | 110 | srip->nlines < 0 ? LINES - nlines : *rtop, | |
109 | 0, FALSE); | 111 | 0, FALSE); | |
110 | if (w != NULL) { | 112 | if (w != NULL) { | |
111 | rip->win = w; | 113 | rip->win = w; | |
112 | rip->nlines = srip->nlines; | 114 | rip->nlines = srip->nlines; | |
113 | rip++; | 115 | rip++; | |
114 | screen->nripped++; | 116 | screen->nripped++; | |
115 | if (rip->nlines > 0) | 117 | if (rip->nlines > 0) | |
116 | (*rtop) += rip->nlines; | 118 | (*rtop) += rip->nlines; | |
117 | LINES -= nlines; | 119 | LINES -= nlines; | |
118 | } | 120 | } | |
@@ -141,13 +143,33 @@ __ripoffresize(SCREEN *screen) | @@ -141,13 +143,33 @@ __ripoffresize(SCREEN *screen) | |||
141 | struct __ripoff *rip; | 143 | struct __ripoff *rip; | |
142 | 144 | |||
143 | for (i = 0, rip = screen->ripped; i < screen->nripped; i++, rip++) { | 145 | for (i = 0, rip = screen->ripped; i < screen->nripped; i++, rip++) { | |
144 | if (rip->nlines > 0) | 146 | if (rip->nlines > 0) | |
145 | touchwin(rip->win); | 147 | touchwin(rip->win); | |
146 | else { | 148 | else { | |
147 | /* Reposition the lower windows. */ | 149 | /* Reposition the lower windows. */ | |
148 | mvwin(rip->win, rbot + rip->nlines, 0); | 150 | mvwin(rip->win, rbot + rip->nlines, 0); | |
149 | rbot += rip->nlines; | 151 | rbot += rip->nlines; | |
150 | } | 152 | } | |
151 | wnoutrefresh(rip->win); | 153 | wnoutrefresh(rip->win); | |
152 | } | 154 | } | |
153 | } | 155 | } | |
156 | ||||
157 | /* | |||
158 | * __unripoffline -- | |||
159 | * Used by __slk_init to remove the ripoffline reservation it made | |||
160 | * because the terminal natively supports soft label keys. | |||
161 | */ | |||
162 | int | |||
163 | __unripoffline(int (*init)(WINDOW *, int)) | |||
164 | { | |||
165 | struct ripoff *rip; | |||
166 | int i, unripped = 0; | |||
167 | ||||
168 | for (i = 0, rip = ripoffs; i < nrips; i++, rip++) { | |||
169 | if (rip->init == init) { | |||
170 | rip->nlines = 0; | |||
171 | unripped++; | |||
172 | } | |||
173 | } | |||
174 | return unripped; | |||
175 | } |
--- src/lib/libcurses/screen.c 2017/01/11 20:43:03 1.29
+++ src/lib/libcurses/screen.c 2017/01/24 17:27:30 1.30
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: screen.c,v 1.29 2017/01/11 20:43:03 roy Exp $ */ | 1 | /* $NetBSD: screen.c,v 1.30 2017/01/24 17:27:30 roy Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1981, 1993, 1994 | 4 | * Copyright (c) 1981, 1993, 1994 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
29 | * SUCH DAMAGE. | 29 | * SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | #ifndef lint | 33 | #ifndef lint | |
34 | #if 0 | 34 | #if 0 | |
35 | static char sccsid[] = "@(#)screen.c 8.2 (blymn) 11/27/2001"; | 35 | static char sccsid[] = "@(#)screen.c 8.2 (blymn) 11/27/2001"; | |
36 | #else | 36 | #else | |
37 | __RCSID("$NetBSD: screen.c,v 1.29 2017/01/11 20:43:03 roy Exp $"); | 37 | __RCSID("$NetBSD: screen.c,v 1.30 2017/01/24 17:27:30 roy Exp $"); | |
38 | #endif | 38 | #endif | |
39 | #endif /* not lint */ | 39 | #endif /* not lint */ | |
40 | 40 | |||
41 | #include <stdlib.h> | 41 | #include <stdlib.h> | |
42 | 42 | |||
43 | #include "curses.h" | 43 | #include "curses.h" | |
44 | #include "curses_private.h" | 44 | #include "curses_private.h" | |
45 | 45 | |||
46 | static int filtered; | 46 | static int filtered; | |
47 | 47 | |||
48 | 48 | |||
49 | static void __delscreen(SCREEN *); | 49 | static void __delscreen(SCREEN *); | |
50 | 50 | |||
@@ -169,39 +169,43 @@ newterm(char *type, FILE *outfd, FILE *i | @@ -169,39 +169,43 @@ newterm(char *type, FILE *outfd, FILE *i | |||
169 | !t_cursor_address(new_screen->term)) | 169 | !t_cursor_address(new_screen->term)) | |
170 | goto error_exit; | 170 | goto error_exit; | |
171 | 171 | |||
172 | new_screen->winlistp = NULL; | 172 | new_screen->winlistp = NULL; | |
173 | 173 | |||
174 | if ((new_screen->curscr = __newwin(new_screen, 0, | 174 | if ((new_screen->curscr = __newwin(new_screen, 0, | |
175 | 0, 0, 0, FALSE)) == NULL) | 175 | 0, 0, 0, FALSE)) == NULL) | |
176 | goto error_exit; | 176 | goto error_exit; | |
177 | 177 | |||
178 | if ((new_screen->__virtscr = __newwin(new_screen, 0, | 178 | if ((new_screen->__virtscr = __newwin(new_screen, 0, | |
179 | 0, 0, 0, FALSE)) == NULL) | 179 | 0, 0, 0, FALSE)) == NULL) | |
180 | goto error_exit; | 180 | goto error_exit; | |
181 | 181 | |||
182 | /* If Soft Label Keys are setup, they will ripoffline. */ | |||
183 | if (__slk_init(new_screen) == ERR) | |||
184 | goto error_exit; | |||
185 | ||||
182 | if (__ripoffscreen(new_screen, &rtop) == ERR) | 186 | if (__ripoffscreen(new_screen, &rtop) == ERR) | |
183 | goto error_exit; | 187 | goto error_exit; | |
184 | 188 | |||
185 | new_screen->stdscr = __newwin(new_screen, LINES, 0, rtop, 0, FALSE); | 189 | new_screen->stdscr = __newwin(new_screen, LINES, 0, rtop, 0, FALSE); | |
186 | if (new_screen->stdscr == NULL) | 190 | if (new_screen->stdscr == NULL) | |
187 | goto error_exit; | 191 | goto error_exit; | |
188 | 192 | |||
189 | clearok(new_screen->stdscr, 1); | 193 | clearok(new_screen->stdscr, 1); | |
190 | 194 | |||
191 | __init_getch(new_screen); | 195 | __init_getch(new_screen); | |
192 | __init_acs(new_screen); | 196 | __init_acs(new_screen); | |
193 | #ifdef HAVE_WCHAR | 197 | #ifdef HAVE_WCHAR | |
194 | __init_get_wch( new_screen ); | 198 | __init_get_wch(new_screen); | |
195 | __init_wacs(new_screen); | 199 | __init_wacs(new_screen); | |
196 | #endif /* HAVE_WCHAR */ | 200 | #endif /* HAVE_WCHAR */ | |
197 | 201 | |||
198 | __set_stophandler(); | 202 | __set_stophandler(); | |
199 | __set_winchhandler(); | 203 | __set_winchhandler(); | |
200 | 204 | |||
201 | /* | 205 | /* | |
202 | * bleh - it seems that apps expect the first newterm to set | 206 | * bleh - it seems that apps expect the first newterm to set | |
203 | * up the curses screen.... emulate this. | 207 | * up the curses screen.... emulate this. | |
204 | */ | 208 | */ | |
205 | if (_cursesi_screen == NULL || _cursesi_screen->endwin) { | 209 | if (_cursesi_screen == NULL || _cursesi_screen->endwin) { | |
206 | set_term(new_screen); | 210 | set_term(new_screen); | |
207 | } | 211 | } | |
@@ -230,26 +234,29 @@ newterm(char *type, FILE *outfd, FILE *i | @@ -230,26 +234,29 @@ newterm(char *type, FILE *outfd, FILE *i | |||
230 | void | 234 | void | |
231 | delscreen(SCREEN *screen) | 235 | delscreen(SCREEN *screen) | |
232 | { | 236 | { | |
233 | 237 | |||
234 | #ifdef DEBUG | 238 | #ifdef DEBUG | |
235 | __CTRACE(__CTRACE_SCREEN, "delscreen(%p)\n", screen); | 239 | __CTRACE(__CTRACE_SCREEN, "delscreen(%p)\n", screen); | |
236 | #endif | 240 | #endif | |
237 | 241 | |||
238 | __delscreen(screen); | 242 | __delscreen(screen); | |
239 | 243 | |||
240 | /* free the storage of the keymaps */ | 244 | /* free the storage of the keymaps */ | |
241 | _cursesi_free_keymap(screen->base_keymap); | 245 | _cursesi_free_keymap(screen->base_keymap); | |
242 | 246 | |||
247 | /* free the Soft Label Keys */ | |||
248 | __slk_free(screen); | |||
249 | ||||
243 | free(screen->stdbuf); | 250 | free(screen->stdbuf); | |
244 | free(screen->unget_list); | 251 | free(screen->unget_list); | |
245 | if (_cursesi_screen == screen) | 252 | if (_cursesi_screen == screen) | |
246 | _cursesi_screen = NULL; | 253 | _cursesi_screen = NULL; | |
247 | free(screen); | 254 | free(screen); | |
248 | } | 255 | } | |
249 | 256 | |||
250 | static void | 257 | static void | |
251 | __delscreen(SCREEN *screen) | 258 | __delscreen(SCREEN *screen) | |
252 | { | 259 | { | |
253 | struct __winlist *list; | 260 | struct __winlist *list; | |
254 | 261 | |||
255 | /* free up the terminfo stuff */ | 262 | /* free up the terminfo stuff */ |