Thu Jan 5 20:31:37 2017 UTC ()
Add the set_escdelay(3) and set_tabsize(3) ncurses extensions.


(roy)
diff -r1.2095 -r1.2096 src/distrib/sets/lists/comp/mi
diff -r1.78 -r1.79 src/lib/libcurses/Makefile
diff -r1.63 -r1.64 src/lib/libcurses/curses.3
diff -r1.115 -r1.116 src/lib/libcurses/curses.h
diff -r1.23 -r1.24 src/lib/libcurses/curses_input.3
diff -r1.55 -r1.56 src/lib/libcurses/curses_private.h
diff -r1.19 -r1.20 src/lib/libcurses/curses_screen.3
diff -r1.10 -r1.11 src/lib/libcurses/get_wch.c
diff -r1.60 -r1.61 src/lib/libcurses/getch.c
diff -r1.56 -r1.57 src/lib/libcurses/setterm.c

cvs diff -r1.2095 -r1.2096 src/distrib/sets/lists/comp/mi (expand / switch to unified diff)

--- src/distrib/sets/lists/comp/mi 2017/01/05 13:45:51 1.2095
+++ src/distrib/sets/lists/comp/mi 2017/01/05 20:31:37 1.2096
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mi,v 1.2095 2017/01/05 13:45:51 wiz Exp $ 1# $NetBSD: mi,v 1.2096 2017/01/05 20:31:37 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
@@ -8831,26 +8831,27 @@ @@ -8831,26 +8831,27 @@
8831./usr/share/man/cat3/sem_destroy.0 comp-c-catman .cat 8831./usr/share/man/cat3/sem_destroy.0 comp-c-catman .cat
8832./usr/share/man/cat3/sem_getvalue.0 comp-c-catman .cat 8832./usr/share/man/cat3/sem_getvalue.0 comp-c-catman .cat
8833./usr/share/man/cat3/sem_init.0 comp-c-catman .cat 8833./usr/share/man/cat3/sem_init.0 comp-c-catman .cat
8834./usr/share/man/cat3/sem_open.0 comp-c-catman .cat 8834./usr/share/man/cat3/sem_open.0 comp-c-catman .cat
8835./usr/share/man/cat3/sem_post.0 comp-c-catman .cat 8835./usr/share/man/cat3/sem_post.0 comp-c-catman .cat
8836./usr/share/man/cat3/sem_timedwait.0 comp-c-catman .cat 8836./usr/share/man/cat3/sem_timedwait.0 comp-c-catman .cat
8837./usr/share/man/cat3/sem_trywait.0 comp-c-catman .cat 8837./usr/share/man/cat3/sem_trywait.0 comp-c-catman .cat
8838./usr/share/man/cat3/sem_unlink.0 comp-c-catman .cat 8838./usr/share/man/cat3/sem_unlink.0 comp-c-catman .cat
8839./usr/share/man/cat3/sem_wait.0 comp-c-catman .cat 8839./usr/share/man/cat3/sem_wait.0 comp-c-catman .cat
8840./usr/share/man/cat3/set_com_err_hook.0 comp-krb5-catman kerberos,.cat 8840./usr/share/man/cat3/set_com_err_hook.0 comp-krb5-catman kerberos,.cat
8841./usr/share/man/cat3/set_current_field.0 comp-c-catman .cat 8841./usr/share/man/cat3/set_current_field.0 comp-c-catman .cat
8842./usr/share/man/cat3/set_current_item.0 comp-c-catman .cat 8842./usr/share/man/cat3/set_current_item.0 comp-c-catman .cat
8843./usr/share/man/cat3/set_curterm.0 comp-c-catman .cat 8843./usr/share/man/cat3/set_curterm.0 comp-c-catman .cat
 8844./usr/share/man/cat3/set_escdelay.0 comp-c-catman .cat
8844./usr/share/man/cat3/set_field_back.0 comp-c-catman .cat 8845./usr/share/man/cat3/set_field_back.0 comp-c-catman .cat
8845./usr/share/man/cat3/set_field_buffer.0 comp-c-catman .cat 8846./usr/share/man/cat3/set_field_buffer.0 comp-c-catman .cat
8846./usr/share/man/cat3/set_field_fore.0 comp-c-catman .cat 8847./usr/share/man/cat3/set_field_fore.0 comp-c-catman .cat
8847./usr/share/man/cat3/set_field_init.0 comp-c-catman .cat 8848./usr/share/man/cat3/set_field_init.0 comp-c-catman .cat
8848./usr/share/man/cat3/set_field_just.0 comp-c-catman .cat 8849./usr/share/man/cat3/set_field_just.0 comp-c-catman .cat
8849./usr/share/man/cat3/set_field_opts.0 comp-c-catman .cat 8850./usr/share/man/cat3/set_field_opts.0 comp-c-catman .cat
8850./usr/share/man/cat3/set_field_pad.0 comp-c-catman .cat 8851./usr/share/man/cat3/set_field_pad.0 comp-c-catman .cat
8851./usr/share/man/cat3/set_field_printf.0 comp-c-catman .cat 8852./usr/share/man/cat3/set_field_printf.0 comp-c-catman .cat
8852./usr/share/man/cat3/set_field_status.0 comp-c-catman .cat 8853./usr/share/man/cat3/set_field_status.0 comp-c-catman .cat
8853./usr/share/man/cat3/set_field_term.0 comp-c-catman .cat 8854./usr/share/man/cat3/set_field_term.0 comp-c-catman .cat
8854./usr/share/man/cat3/set_field_type.0 comp-c-catman .cat 8855./usr/share/man/cat3/set_field_type.0 comp-c-catman .cat
8855./usr/share/man/cat3/set_field_userptr.0 comp-c-catman .cat 8856./usr/share/man/cat3/set_field_userptr.0 comp-c-catman .cat
8856./usr/share/man/cat3/set_fieldtype_arg.0 comp-c-catman .cat 8857./usr/share/man/cat3/set_fieldtype_arg.0 comp-c-catman .cat
@@ -8874,26 +8875,27 @@ @@ -8874,26 +8875,27 @@
8874./usr/share/man/cat3/set_menu_grey.0 comp-c-catman .cat 8875./usr/share/man/cat3/set_menu_grey.0 comp-c-catman .cat
8875./usr/share/man/cat3/set_menu_init.0 comp-c-catman .cat 8876./usr/share/man/cat3/set_menu_init.0 comp-c-catman .cat
8876./usr/share/man/cat3/set_menu_items.0 comp-c-catman .cat 8877./usr/share/man/cat3/set_menu_items.0 comp-c-catman .cat
8877./usr/share/man/cat3/set_menu_mark.0 comp-c-catman .cat 8878./usr/share/man/cat3/set_menu_mark.0 comp-c-catman .cat
8878./usr/share/man/cat3/set_menu_opts.0 comp-c-catman .cat 8879./usr/share/man/cat3/set_menu_opts.0 comp-c-catman .cat
8879./usr/share/man/cat3/set_menu_pad.0 comp-c-catman .cat 8880./usr/share/man/cat3/set_menu_pad.0 comp-c-catman .cat
8880./usr/share/man/cat3/set_menu_sub.0 comp-c-catman .cat 8881./usr/share/man/cat3/set_menu_sub.0 comp-c-catman .cat
8881./usr/share/man/cat3/set_menu_term.0 comp-c-catman .cat 8882./usr/share/man/cat3/set_menu_term.0 comp-c-catman .cat
8882./usr/share/man/cat3/set_menu_unmark.0 comp-c-catman .cat 8883./usr/share/man/cat3/set_menu_unmark.0 comp-c-catman .cat
8883./usr/share/man/cat3/set_menu_userptr.0 comp-c-catman .cat 8884./usr/share/man/cat3/set_menu_userptr.0 comp-c-catman .cat
8884./usr/share/man/cat3/set_menu_win.0 comp-c-catman .cat 8885./usr/share/man/cat3/set_menu_win.0 comp-c-catman .cat
8885./usr/share/man/cat3/set_new_page.0 comp-c-catman .cat 8886./usr/share/man/cat3/set_new_page.0 comp-c-catman .cat
8886./usr/share/man/cat3/set_panel_userptr.0 comp-c-catman .cat 8887./usr/share/man/cat3/set_panel_userptr.0 comp-c-catman .cat
 8888./usr/share/man/cat3/set_tabsize.0 comp-c-catman .cat
8887./usr/share/man/cat3/set_term.0 comp-c-catman .cat 8889./usr/share/man/cat3/set_term.0 comp-c-catman .cat
8888./usr/share/man/cat3/set_top_row.0 comp-c-catman .cat 8890./usr/share/man/cat3/set_top_row.0 comp-c-catman .cat
8889./usr/share/man/cat3/setbuf.0 comp-c-catman .cat 8891./usr/share/man/cat3/setbuf.0 comp-c-catman .cat
8890./usr/share/man/cat3/setbuffer.0 comp-c-catman .cat 8892./usr/share/man/cat3/setbuffer.0 comp-c-catman .cat
8891./usr/share/man/cat3/setclasscontext.0 comp-c-catman .cat 8893./usr/share/man/cat3/setclasscontext.0 comp-c-catman .cat
8892./usr/share/man/cat3/setdisktab.0 comp-c-catman .cat 8894./usr/share/man/cat3/setdisktab.0 comp-c-catman .cat
8893./usr/share/man/cat3/setdomainname.0 comp-c-catman .cat 8895./usr/share/man/cat3/setdomainname.0 comp-c-catman .cat
8894./usr/share/man/cat3/setenv.0 comp-c-catman .cat 8896./usr/share/man/cat3/setenv.0 comp-c-catman .cat
8895./usr/share/man/cat3/setfsent.0 comp-c-catman .cat 8897./usr/share/man/cat3/setfsent.0 comp-c-catman .cat
8896./usr/share/man/cat3/setgrent.0 comp-c-catman .cat 8898./usr/share/man/cat3/setgrent.0 comp-c-catman .cat
8897./usr/share/man/cat3/setgrfile.0 comp-obsolete obsolete 8899./usr/share/man/cat3/setgrfile.0 comp-obsolete obsolete
8898./usr/share/man/cat3/setgroupent.0 comp-c-catman .cat 8900./usr/share/man/cat3/setgroupent.0 comp-c-catman .cat
8899./usr/share/man/cat3/sethostent.0 comp-c-catman .cat 8901./usr/share/man/cat3/sethostent.0 comp-c-catman .cat
@@ -16138,26 +16140,27 @@ @@ -16138,26 +16140,27 @@
16138./usr/share/man/html3/sem_destroy.html comp-c-htmlman html 16140./usr/share/man/html3/sem_destroy.html comp-c-htmlman html
16139./usr/share/man/html3/sem_getvalue.html comp-c-htmlman html 16141./usr/share/man/html3/sem_getvalue.html comp-c-htmlman html
16140./usr/share/man/html3/sem_init.html comp-c-htmlman html 16142./usr/share/man/html3/sem_init.html comp-c-htmlman html
16141./usr/share/man/html3/sem_open.html comp-c-htmlman html 16143./usr/share/man/html3/sem_open.html comp-c-htmlman html
16142./usr/share/man/html3/sem_post.html comp-c-htmlman html 16144./usr/share/man/html3/sem_post.html comp-c-htmlman html
16143./usr/share/man/html3/sem_timedwait.html comp-c-htmlman html 16145./usr/share/man/html3/sem_timedwait.html comp-c-htmlman html
16144./usr/share/man/html3/sem_trywait.html comp-c-htmlman html 16146./usr/share/man/html3/sem_trywait.html comp-c-htmlman html
16145./usr/share/man/html3/sem_unlink.html comp-c-htmlman html 16147./usr/share/man/html3/sem_unlink.html comp-c-htmlman html
16146./usr/share/man/html3/sem_wait.html comp-c-htmlman html 16148./usr/share/man/html3/sem_wait.html comp-c-htmlman html
16147./usr/share/man/html3/set_com_err_hook.html comp-krb5-htmlman kerberos,html 16149./usr/share/man/html3/set_com_err_hook.html comp-krb5-htmlman kerberos,html
16148./usr/share/man/html3/set_current_field.html comp-c-htmlman html 16150./usr/share/man/html3/set_current_field.html comp-c-htmlman html
16149./usr/share/man/html3/set_current_item.html comp-c-htmlman html 16151./usr/share/man/html3/set_current_item.html comp-c-htmlman html
16150./usr/share/man/html3/set_curterm.html comp-c-htmlman html 16152./usr/share/man/html3/set_curterm.html comp-c-htmlman html
 16153./usr/share/man/html3/set_escdelay.html comp-c-htmlman html
16151./usr/share/man/html3/set_field_back.html comp-c-htmlman html 16154./usr/share/man/html3/set_field_back.html comp-c-htmlman html
16152./usr/share/man/html3/set_field_buffer.html comp-c-htmlman html 16155./usr/share/man/html3/set_field_buffer.html comp-c-htmlman html
16153./usr/share/man/html3/set_field_fore.html comp-c-htmlman html 16156./usr/share/man/html3/set_field_fore.html comp-c-htmlman html
16154./usr/share/man/html3/set_field_init.html comp-c-htmlman html 16157./usr/share/man/html3/set_field_init.html comp-c-htmlman html
16155./usr/share/man/html3/set_field_just.html comp-c-htmlman html 16158./usr/share/man/html3/set_field_just.html comp-c-htmlman html
16156./usr/share/man/html3/set_field_opts.html comp-c-htmlman html 16159./usr/share/man/html3/set_field_opts.html comp-c-htmlman html
16157./usr/share/man/html3/set_field_pad.html comp-c-htmlman html 16160./usr/share/man/html3/set_field_pad.html comp-c-htmlman html
16158./usr/share/man/html3/set_field_printf.html comp-c-htmlman html 16161./usr/share/man/html3/set_field_printf.html comp-c-htmlman html
16159./usr/share/man/html3/set_field_status.html comp-c-htmlman html 16162./usr/share/man/html3/set_field_status.html comp-c-htmlman html
16160./usr/share/man/html3/set_field_term.html comp-c-htmlman html 16163./usr/share/man/html3/set_field_term.html comp-c-htmlman html
16161./usr/share/man/html3/set_field_type.html comp-c-htmlman html 16164./usr/share/man/html3/set_field_type.html comp-c-htmlman html
16162./usr/share/man/html3/set_field_userptr.html comp-c-htmlman html 16165./usr/share/man/html3/set_field_userptr.html comp-c-htmlman html
16163./usr/share/man/html3/set_fieldtype_arg.html comp-c-htmlman html 16166./usr/share/man/html3/set_fieldtype_arg.html comp-c-htmlman html
@@ -16181,26 +16184,27 @@ @@ -16181,26 +16184,27 @@
16181./usr/share/man/html3/set_menu_grey.html comp-c-htmlman html 16184./usr/share/man/html3/set_menu_grey.html comp-c-htmlman html
16182./usr/share/man/html3/set_menu_init.html comp-c-htmlman html 16185./usr/share/man/html3/set_menu_init.html comp-c-htmlman html
16183./usr/share/man/html3/set_menu_items.html comp-c-htmlman html 16186./usr/share/man/html3/set_menu_items.html comp-c-htmlman html
16184./usr/share/man/html3/set_menu_mark.html comp-c-htmlman html 16187./usr/share/man/html3/set_menu_mark.html comp-c-htmlman html
16185./usr/share/man/html3/set_menu_opts.html comp-c-htmlman html 16188./usr/share/man/html3/set_menu_opts.html comp-c-htmlman html
16186./usr/share/man/html3/set_menu_pad.html comp-c-htmlman html 16189./usr/share/man/html3/set_menu_pad.html comp-c-htmlman html
16187./usr/share/man/html3/set_menu_sub.html comp-c-htmlman html 16190./usr/share/man/html3/set_menu_sub.html comp-c-htmlman html
16188./usr/share/man/html3/set_menu_term.html comp-c-htmlman html 16191./usr/share/man/html3/set_menu_term.html comp-c-htmlman html
16189./usr/share/man/html3/set_menu_unmark.html comp-c-htmlman html 16192./usr/share/man/html3/set_menu_unmark.html comp-c-htmlman html
16190./usr/share/man/html3/set_menu_userptr.html comp-c-htmlman html 16193./usr/share/man/html3/set_menu_userptr.html comp-c-htmlman html
16191./usr/share/man/html3/set_menu_win.html comp-c-htmlman html 16194./usr/share/man/html3/set_menu_win.html comp-c-htmlman html
16192./usr/share/man/html3/set_new_page.html comp-c-htmlman html 16195./usr/share/man/html3/set_new_page.html comp-c-htmlman html
16193./usr/share/man/html3/set_panel_userptr.html comp-c-htmlman html 16196./usr/share/man/html3/set_panel_userptr.html comp-c-htmlman html
 16197./usr/share/man/html3/set_tabsize.html comp-c-htmlman html
16194./usr/share/man/html3/set_term.html comp-c-htmlman html 16198./usr/share/man/html3/set_term.html comp-c-htmlman html
16195./usr/share/man/html3/set_top_row.html comp-c-htmlman html 16199./usr/share/man/html3/set_top_row.html comp-c-htmlman html
16196./usr/share/man/html3/setbuf.html comp-c-htmlman html 16200./usr/share/man/html3/setbuf.html comp-c-htmlman html
16197./usr/share/man/html3/setbuffer.html comp-c-htmlman html 16201./usr/share/man/html3/setbuffer.html comp-c-htmlman html
16198./usr/share/man/html3/setclasscontext.html comp-c-htmlman html 16202./usr/share/man/html3/setclasscontext.html comp-c-htmlman html
16199./usr/share/man/html3/setdisktab.html comp-c-htmlman html 16203./usr/share/man/html3/setdisktab.html comp-c-htmlman html
16200./usr/share/man/html3/setdomainname.html comp-c-htmlman html 16204./usr/share/man/html3/setdomainname.html comp-c-htmlman html
16201./usr/share/man/html3/setenv.html comp-c-htmlman html 16205./usr/share/man/html3/setenv.html comp-c-htmlman html
16202./usr/share/man/html3/setfsent.html comp-c-htmlman html 16206./usr/share/man/html3/setfsent.html comp-c-htmlman html
16203./usr/share/man/html3/setgrent.html comp-c-htmlman html 16207./usr/share/man/html3/setgrent.html comp-c-htmlman html
16204./usr/share/man/html3/setgroupent.html comp-c-htmlman html 16208./usr/share/man/html3/setgroupent.html comp-c-htmlman html
16205./usr/share/man/html3/sethostent.html comp-c-htmlman html 16209./usr/share/man/html3/sethostent.html comp-c-htmlman html
16206./usr/share/man/html3/sethostid.html comp-c-htmlman html 16210./usr/share/man/html3/sethostid.html comp-c-htmlman html
@@ -23448,26 +23452,27 @@ @@ -23448,26 +23452,27 @@
23448./usr/share/man/man3/sem_destroy.3 comp-c-man .man 23452./usr/share/man/man3/sem_destroy.3 comp-c-man .man
23449./usr/share/man/man3/sem_getvalue.3 comp-c-man .man 23453./usr/share/man/man3/sem_getvalue.3 comp-c-man .man
23450./usr/share/man/man3/sem_init.3 comp-c-man .man 23454./usr/share/man/man3/sem_init.3 comp-c-man .man
23451./usr/share/man/man3/sem_open.3 comp-c-man .man 23455./usr/share/man/man3/sem_open.3 comp-c-man .man
23452./usr/share/man/man3/sem_post.3 comp-c-man .man 23456./usr/share/man/man3/sem_post.3 comp-c-man .man
23453./usr/share/man/man3/sem_timedwait.3 comp-c-man .man 23457./usr/share/man/man3/sem_timedwait.3 comp-c-man .man
23454./usr/share/man/man3/sem_trywait.3 comp-c-man .man 23458./usr/share/man/man3/sem_trywait.3 comp-c-man .man
23455./usr/share/man/man3/sem_unlink.3 comp-c-man .man 23459./usr/share/man/man3/sem_unlink.3 comp-c-man .man
23456./usr/share/man/man3/sem_wait.3 comp-c-man .man 23460./usr/share/man/man3/sem_wait.3 comp-c-man .man
23457./usr/share/man/man3/set_com_err_hook.3 comp-krb5-man kerberos,.man 23461./usr/share/man/man3/set_com_err_hook.3 comp-krb5-man kerberos,.man
23458./usr/share/man/man3/set_current_field.3 comp-c-man .man 23462./usr/share/man/man3/set_current_field.3 comp-c-man .man
23459./usr/share/man/man3/set_current_item.3 comp-c-man .man 23463./usr/share/man/man3/set_current_item.3 comp-c-man .man
23460./usr/share/man/man3/set_curterm.3 comp-c-man .man 23464./usr/share/man/man3/set_curterm.3 comp-c-man .man
 23465./usr/share/man/man3/set_escdelay.3 comp-c-man .man
23461./usr/share/man/man3/set_field_back.3 comp-c-man .man 23466./usr/share/man/man3/set_field_back.3 comp-c-man .man
23462./usr/share/man/man3/set_field_buffer.3 comp-c-man .man 23467./usr/share/man/man3/set_field_buffer.3 comp-c-man .man
23463./usr/share/man/man3/set_field_fore.3 comp-c-man .man 23468./usr/share/man/man3/set_field_fore.3 comp-c-man .man
23464./usr/share/man/man3/set_field_init.3 comp-c-man .man 23469./usr/share/man/man3/set_field_init.3 comp-c-man .man
23465./usr/share/man/man3/set_field_just.3 comp-c-man .man 23470./usr/share/man/man3/set_field_just.3 comp-c-man .man
23466./usr/share/man/man3/set_field_opts.3 comp-c-man .man 23471./usr/share/man/man3/set_field_opts.3 comp-c-man .man
23467./usr/share/man/man3/set_field_pad.3 comp-c-man .man 23472./usr/share/man/man3/set_field_pad.3 comp-c-man .man
23468./usr/share/man/man3/set_field_printf.3 comp-c-man .man 23473./usr/share/man/man3/set_field_printf.3 comp-c-man .man
23469./usr/share/man/man3/set_field_status.3 comp-c-man .man 23474./usr/share/man/man3/set_field_status.3 comp-c-man .man
23470./usr/share/man/man3/set_field_term.3 comp-c-man .man 23475./usr/share/man/man3/set_field_term.3 comp-c-man .man
23471./usr/share/man/man3/set_field_type.3 comp-c-man .man 23476./usr/share/man/man3/set_field_type.3 comp-c-man .man
23472./usr/share/man/man3/set_field_userptr.3 comp-c-man .man 23477./usr/share/man/man3/set_field_userptr.3 comp-c-man .man
23473./usr/share/man/man3/set_fieldtype_arg.3 comp-c-man .man 23478./usr/share/man/man3/set_fieldtype_arg.3 comp-c-man .man
@@ -23491,26 +23496,27 @@ @@ -23491,26 +23496,27 @@
23491./usr/share/man/man3/set_menu_grey.3 comp-c-man .man 23496./usr/share/man/man3/set_menu_grey.3 comp-c-man .man
23492./usr/share/man/man3/set_menu_init.3 comp-c-man .man 23497./usr/share/man/man3/set_menu_init.3 comp-c-man .man
23493./usr/share/man/man3/set_menu_items.3 comp-c-man .man 23498./usr/share/man/man3/set_menu_items.3 comp-c-man .man
23494./usr/share/man/man3/set_menu_mark.3 comp-c-man .man 23499./usr/share/man/man3/set_menu_mark.3 comp-c-man .man
23495./usr/share/man/man3/set_menu_opts.3 comp-c-man .man 23500./usr/share/man/man3/set_menu_opts.3 comp-c-man .man
23496./usr/share/man/man3/set_menu_pad.3 comp-c-man .man 23501./usr/share/man/man3/set_menu_pad.3 comp-c-man .man
23497./usr/share/man/man3/set_menu_sub.3 comp-c-man .man 23502./usr/share/man/man3/set_menu_sub.3 comp-c-man .man
23498./usr/share/man/man3/set_menu_term.3 comp-c-man .man 23503./usr/share/man/man3/set_menu_term.3 comp-c-man .man
23499./usr/share/man/man3/set_menu_unmark.3 comp-c-man .man 23504./usr/share/man/man3/set_menu_unmark.3 comp-c-man .man
23500./usr/share/man/man3/set_menu_userptr.3 comp-c-man .man 23505./usr/share/man/man3/set_menu_userptr.3 comp-c-man .man
23501./usr/share/man/man3/set_menu_win.3 comp-c-man .man 23506./usr/share/man/man3/set_menu_win.3 comp-c-man .man
23502./usr/share/man/man3/set_new_page.3 comp-c-man .man 23507./usr/share/man/man3/set_new_page.3 comp-c-man .man
23503./usr/share/man/man3/set_panel_userptr.3 comp-c-man .man 23508./usr/share/man/man3/set_panel_userptr.3 comp-c-man .man
 23509./usr/share/man/man3/set_tabsize.3 comp-c-man .man
23504./usr/share/man/man3/set_term.3 comp-c-man .man 23510./usr/share/man/man3/set_term.3 comp-c-man .man
23505./usr/share/man/man3/set_top_row.3 comp-c-man .man 23511./usr/share/man/man3/set_top_row.3 comp-c-man .man
23506./usr/share/man/man3/setbuf.3 comp-c-man .man 23512./usr/share/man/man3/setbuf.3 comp-c-man .man
23507./usr/share/man/man3/setbuffer.3 comp-c-man .man 23513./usr/share/man/man3/setbuffer.3 comp-c-man .man
23508./usr/share/man/man3/setclasscontext.3 comp-c-man .man 23514./usr/share/man/man3/setclasscontext.3 comp-c-man .man
23509./usr/share/man/man3/setdisktab.3 comp-c-man .man 23515./usr/share/man/man3/setdisktab.3 comp-c-man .man
23510./usr/share/man/man3/setdomainname.3 comp-c-man .man 23516./usr/share/man/man3/setdomainname.3 comp-c-man .man
23511./usr/share/man/man3/setenv.3 comp-c-man .man 23517./usr/share/man/man3/setenv.3 comp-c-man .man
23512./usr/share/man/man3/setfsent.3 comp-c-man .man 23518./usr/share/man/man3/setfsent.3 comp-c-man .man
23513./usr/share/man/man3/setgrent.3 comp-c-man .man 23519./usr/share/man/man3/setgrent.3 comp-c-man .man
23514./usr/share/man/man3/setgroupent.3 comp-c-man .man 23520./usr/share/man/man3/setgroupent.3 comp-c-man .man
23515./usr/share/man/man3/sethostent.3 comp-c-man .man 23521./usr/share/man/man3/sethostent.3 comp-c-man .man
23516./usr/share/man/man3/sethostid.3 comp-c-man .man 23522./usr/share/man/man3/sethostid.3 comp-c-man .man

cvs diff -r1.78 -r1.79 src/lib/libcurses/Makefile (expand / switch to unified diff)

--- src/lib/libcurses/Makefile 2017/01/03 13:21:40 1.78
+++ src/lib/libcurses/Makefile 2017/01/05 20:31:37 1.79
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.78 2017/01/03 13:21:40 roy Exp $ 1# $NetBSD: Makefile,v 1.79 2017/01/05 20:31:37 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
6WARNS= 2 6WARNS= 2
7 7
8CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo 8CPPFLAGS+=-I${.CURDIR} -I${NETBSDSRCDIR}/lib/libterminfo
9.if defined(DEBUG_CURSES) 9.if defined(DEBUG_CURSES)
10CPPFLAGS+=-g -DDEBUG 10CPPFLAGS+=-g -DDEBUG
11.endif 11.endif
12.if defined(SMALL) 12.if defined(SMALL)
13CPPFLAGS+=-DSMALL 13CPPFLAGS+=-DSMALL
14.endif 14.endif
@@ -135,26 +135,27 @@ MLINKS+= curses_addch.3 addch.3 curses_a @@ -135,26 +135,27 @@ MLINKS+= curses_addch.3 addch.3 curses_a
135 curses_tty.3 noraw.3 curses_input.3 notimeout.3 \ 135 curses_tty.3 noraw.3 curses_input.3 notimeout.3 \
136 curses_window.3 overlay.3 curses_window.3 overwrite.3 \ 136 curses_window.3 overlay.3 curses_window.3 overwrite.3 \
137 curses_color.3 pair_content.3 curses_echochar.3 pechochar.3 \ 137 curses_color.3 pair_content.3 curses_echochar.3 pechochar.3 \
138 curses_pad.3 pnoutrefresh.3 \ 138 curses_pad.3 pnoutrefresh.3 \
139 curses_pad.3 prefresh.3 curses_print.3 printw.3 \ 139 curses_pad.3 prefresh.3 curses_print.3 printw.3 \
140 curses_fileio.3 putwin.3 curses_tty.3 qiflush.3 \ 140 curses_fileio.3 putwin.3 curses_tty.3 qiflush.3 \
141 curses_tty.3 raw.3 curses_refresh.3 refresh.3 \ 141 curses_tty.3 raw.3 curses_refresh.3 refresh.3 \
142 curses_tty.3 reset_prog_mode.3 curses_tty.3 reset_shell_mode.3 \ 142 curses_tty.3 reset_prog_mode.3 curses_tty.3 reset_shell_mode.3 \
143 curses_tty.3 resetty.3 curses_screen.3 resizeterm.3 \ 143 curses_tty.3 resetty.3 curses_screen.3 resizeterm.3 \
144 curses_tty.3 savetty.3 curses_scanw.3 scanw.3 \ 144 curses_tty.3 savetty.3 curses_scanw.3 scanw.3 \
145 curses_scroll.3 scrl.3 curses_scroll.3 scroll.3 \ 145 curses_scroll.3 scrl.3 curses_scroll.3 scroll.3 \
146 curses_scroll.3 scrollok.3 curses_scroll.3 setscrreg.3 \ 146 curses_scroll.3 scrollok.3 curses_scroll.3 setscrreg.3 \
147 curses_cursor.3 setsyx.3 \ 147 curses_cursor.3 setsyx.3 \
 148 curses_input.3 set_escdelay.3 curses_screen.3 set_tabsize.3 \
148 curses_screen.3 set_term.3 curses_screen.3 setterm.3 \ 149 curses_screen.3 set_term.3 curses_screen.3 setterm.3 \
149 curses_standout.3 standend.3 curses_standout.3 standout.3 \ 150 curses_standout.3 standend.3 curses_standout.3 standout.3 \
150 curses_color.3 start_color.3 curses_pad.3 subpad.3 \ 151 curses_color.3 start_color.3 curses_pad.3 subpad.3 \
151 curses_window.3 subwin.3 curses_touch.3 syncok.3 \ 152 curses_window.3 subwin.3 curses_touch.3 syncok.3 \
152 curses_input.3 timeout.3 \ 153 curses_input.3 timeout.3 \
153 curses_touch.3 touchline.3 curses_touch.3 touchoverlap.3 \ 154 curses_touch.3 touchline.3 curses_touch.3 touchoverlap.3 \
154 curses_touch.3 touchwin.3 curses_tty.3 typeahead.3 \ 155 curses_touch.3 touchwin.3 curses_tty.3 typeahead.3 \
155 curses_print.3 unctrl.3 \ 156 curses_print.3 unctrl.3 \
156 curses_underscore.3 underend.3 curses_underscore.3 underscore.3 \ 157 curses_underscore.3 underend.3 curses_underscore.3 underscore.3 \
157 curses_input.3 ungetch.3 curses_touch.3 untouchwin.3 \ 158 curses_input.3 ungetch.3 curses_touch.3 untouchwin.3 \
158 curses_default_colors.3 use_default_colors.3 \ 159 curses_default_colors.3 use_default_colors.3 \
159 curses_screen.3 use_env.3 curses_line.3 vline.3 \ 160 curses_screen.3 use_env.3 curses_line.3 vline.3 \
160 curses_addch.3 waddch.3 curses_addchstr.3 waddchnstr.3 \ 161 curses_addch.3 waddch.3 curses_addchstr.3 waddchnstr.3 \

cvs diff -r1.63 -r1.64 src/lib/libcurses/curses.3 (expand / switch to unified diff)

--- src/lib/libcurses/curses.3 2012/04/21 12:27:27 1.63
+++ src/lib/libcurses/curses.3 2017/01/05 20:31:37 1.64
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: curses.3,v 1.63 2012/04/21 12:27:27 roy Exp $ 1.\" $NetBSD: curses.3,v 1.64 2017/01/05 20:31:37 roy Exp $
2.\" 2.\"
3.\" Copyright (c) 1985, 1991, 1993 3.\" Copyright (c) 1985, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)curses.3 8.1 (Berkeley) 6/4/93 30.\" @(#)curses.3 8.1 (Berkeley) 6/4/93
31.\" 31.\"
32.Dd April 5, 2012 32.Dd January 5, 2017
33.Dt CURSES 3 33.Dt CURSES 3
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm curses 36.Nm curses
37.Nd screen functions with 37.Nd screen functions with
38.Dq optimal 38.Dq optimal
39cursor motion 39cursor motion
40.Sh LIBRARY 40.Sh LIBRARY
41.Lb libcurses 41.Lb libcurses
42.Sh SYNOPSIS 42.Sh SYNOPSIS
43.Nm cc 43.Nm cc
44.Op Ar flags 44.Op Ar flags
45.Ar files 45.Ar files
@@ -211,26 +211,28 @@ must be called before any of the other r @@ -211,26 +211,28 @@ must be called before any of the other r
211.It qiflush Ta Xr curses_tty 3 211.It qiflush Ta Xr curses_tty 3
212.It raw Ta Xr curses_tty 3 212.It raw Ta Xr curses_tty 3
213.It redrawwin Ta Xr curses_touch 3 213.It redrawwin Ta Xr curses_touch 3
214.It refresh Ta Xr curses_refresh 3 214.It refresh Ta Xr curses_refresh 3
215.It reset_prog_mode Ta Xr curses_tty 3 215.It reset_prog_mode Ta Xr curses_tty 3
216.It reset_shell_mode Ta Xr curses_tty 3 216.It reset_shell_mode Ta Xr curses_tty 3
217.It resetty Ta Xr curses_tty 3 217.It resetty Ta Xr curses_tty 3
218.It resizeterm Ta Xr curses_screen 3 218.It resizeterm Ta Xr curses_screen 3
219.It savetty Ta Xr curses_tty 3 219.It savetty Ta Xr curses_tty 3
220.It scanw Ta Xr curses_scanw 3 220.It scanw Ta Xr curses_scanw 3
221.It scrl Ta Xr curses_scroll 3 221.It scrl Ta Xr curses_scroll 3
222.It scroll Ta Xr curses_scroll 3 222.It scroll Ta Xr curses_scroll 3
223.It scrollok Ta Xr curses_scroll 3 223.It scrollok Ta Xr curses_scroll 3
 224.It set_escdelay Ta Xr curses_input 3
 225.It set_tabsize Ta Xr curses_screen 3
224.It set_term Ta Xr curses_screen 3 226.It set_term Ta Xr curses_screen 3
225.It setscrreg Ta Xr curses_scroll 3 227.It setscrreg Ta Xr curses_scroll 3
226.It setterm Ta Xr curses_screen 3 228.It setterm Ta Xr curses_screen 3
227.It standend Ta Xr curses_standout 3 229.It standend Ta Xr curses_standout 3
228.It standout Ta Xr curses_standout 3 230.It standout Ta Xr curses_standout 3
229.It start_color Ta Xr curses_color 3 231.It start_color Ta Xr curses_color 3
230.It subpad Ta Xr curses_pad 3 232.It subpad Ta Xr curses_pad 3
231.It subwin Ta Xr curses_window 3 233.It subwin Ta Xr curses_window 3
232.It termattrs Ta Xr curses_attributes 3 234.It termattrs Ta Xr curses_attributes 3
233.It timeout Ta Xr curses_input 3 235.It timeout Ta Xr curses_input 3
234.It touchline Ta Xr curses_touch 3 236.It touchline Ta Xr curses_touch 3
235.It touchoverlap Ta Xr curses_touch 3 237.It touchoverlap Ta Xr curses_touch 3
236.It touchwin Ta Xr curses_touch 3 238.It touchwin Ta Xr curses_touch 3
@@ -299,26 +301,29 @@ must be called before any of the other r @@ -299,26 +301,29 @@ must be called before any of the other r
299The number of columns in the terminal if set. 301The number of columns in the terminal if set.
300This is usually automatically configured by querying the kernel. 302This is usually automatically configured by querying the kernel.
301.It CURSES_TRACE_MASK 303.It CURSES_TRACE_MASK
302An integer mask that enables specific debugging traces. 304An integer mask that enables specific debugging traces.
303Enabled only in the debug build of curses. 305Enabled only in the debug build of curses.
304.It CURSES_TRACE_FILE 306.It CURSES_TRACE_FILE
305A file where to output debugging information. 307A file where to output debugging information.
306Enabled only in the debug build of curses. 308Enabled only in the debug build of curses.
307.It ESCDELAY 309.It ESCDELAY
308The maximum delay in milliseconds between characters in multi-character 310The maximum delay in milliseconds between characters in multi-character
309keystrokes (such are arrow keys) where the adjacent characters are considered 311keystrokes (such are arrow keys) where the adjacent characters are considered
310part of the same multi-character sequence. 312part of the same multi-character sequence.
311The default is 300 milliseconds. 313The default is 300 milliseconds.
 314.It TABSIZE
 315The number of spaces making up a tab.
 316The default is 8 if not specified by the terminal description.
312.It LINES 317.It LINES
313The number of lines in the terminal if set. 318The number of lines in the terminal if set.
314is usually automatically configured by querying the kernel. 319is usually automatically configured by querying the kernel.
315.It TERM 320.It TERM
316The terminal type of the current terminal. 321The terminal type of the current terminal.
317.El 322.El
318.Sh SEE ALSO 323.Sh SEE ALSO
319.Xr ioctl 2 , 324.Xr ioctl 2 ,
320.Xr getenv 3 , 325.Xr getenv 3 ,
321.Xr tty 4 , 326.Xr tty 4 ,
322.Xr terminfo 5 327.Xr terminfo 5
323.Rs 328.Rs
324.%T Screen Updating and Cursor Movement Optimization: A Library Package 329.%T Screen Updating and Cursor Movement Optimization: A Library Package

cvs diff -r1.115 -r1.116 src/lib/libcurses/curses.h (expand / switch to unified diff)

--- src/lib/libcurses/curses.h 2017/01/04 03:51:29 1.115
+++ src/lib/libcurses/curses.h 2017/01/05 20:31:37 1.116
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: curses.h,v 1.115 2017/01/04 03:51:29 roy Exp $ */ 1/* $NetBSD: curses.h,v 1.116 2017/01/05 20:31:37 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.
@@ -739,26 +739,28 @@ int printw(const char *, ...) __printfl @@ -739,26 +739,28 @@ int printw(const char *, ...) __printfl
739int putwin(WINDOW *, FILE *); 739int putwin(WINDOW *, FILE *);
740void qiflush(void); 740void qiflush(void);
741int raw(void); 741int raw(void);
742int redrawwin(WINDOW *); 742int redrawwin(WINDOW *);
743int reset_prog_mode(void); 743int reset_prog_mode(void);
744int reset_shell_mode(void); 744int reset_shell_mode(void);
745int resetty(void); 745int resetty(void);
746int resizeterm(int, int); 746int resizeterm(int, int);
747int savetty(void); 747int savetty(void);
748int scanw(const char *, ...) __scanflike(1, 2); 748int scanw(const char *, ...) __scanflike(1, 2);
749int scroll(WINDOW *); 749int scroll(WINDOW *);
750int scrollok(WINDOW *, bool); 750int scrollok(WINDOW *, bool);
751int setterm(char *); 751int setterm(char *);
 752int set_escdelay(int);
 753int set_tabsize(int);
752SCREEN *set_term(SCREEN *); 754SCREEN *set_term(SCREEN *);
753int start_color(void); 755int start_color(void);
754WINDOW *subpad(WINDOW *, int, int, int, int); 756WINDOW *subpad(WINDOW *, int, int, int, int);
755WINDOW *subwin(WINDOW *, int, int, int, int); 757WINDOW *subwin(WINDOW *, int, int, int, int);
756int syncok(WINDOW *, bool); 758int syncok(WINDOW *, bool);
757chtype termattrs(void); 759chtype termattrs(void);
758attr_t term_attrs(void); 760attr_t term_attrs(void);
759int touchline(WINDOW *, int, int); 761int touchline(WINDOW *, int, int);
760int touchoverlap(WINDOW *, WINDOW *); 762int touchoverlap(WINDOW *, WINDOW *);
761int touchwin(WINDOW *); 763int touchwin(WINDOW *);
762int typeahead(int); 764int typeahead(int);
763int ungetch(int); 765int ungetch(int);
764int untouchwin(WINDOW *); 766int untouchwin(WINDOW *);

cvs diff -r1.23 -r1.24 src/lib/libcurses/curses_input.3 (expand / switch to unified diff)

--- src/lib/libcurses/curses_input.3 2017/01/01 03:06:06 1.23
+++ src/lib/libcurses/curses_input.3 2017/01/05 20:31:37 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: curses_input.3,v 1.23 2017/01/01 03:06:06 roy Exp $ 1.\" $NetBSD: curses_input.3,v 1.24 2017/01/05 20:31:37 roy Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 3.\" Copyright (c) 2002
4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
5.\" 5.\"
6.\" This code is donated to the NetBSD Foundation by the Author. 6.\" This code is donated to the NetBSD Foundation by the Author.
7.\" 7.\"
8.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
10.\" are met: 10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright 11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer. 12.\" notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 14.\" notice, this list of conditions and the following disclaimer in the
@@ -45,27 +45,28 @@ @@ -45,27 +45,28 @@
45.Nm getnstr , 45.Nm getnstr ,
46.Nm wgetnstr , 46.Nm wgetnstr ,
47.Nm mvgetnstr , 47.Nm mvgetnstr ,
48.Nm mvwgetnstr , 48.Nm mvwgetnstr ,
49.Nm getstr , 49.Nm getstr ,
50.Nm wgetstr , 50.Nm wgetstr ,
51.Nm mvgetstr , 51.Nm mvgetstr ,
52.Nm mvwgetstr , 52.Nm mvwgetstr ,
53.Nm keypad , 53.Nm keypad ,
54.Nm notimeout , 54.Nm notimeout ,
55.Nm timeout , 55.Nm timeout ,
56.Nm wtimeout , 56.Nm wtimeout ,
57.Nm nodelay , 57.Nm nodelay ,
58.Nm ungetch 58.Nm ungetch ,
 59.Nm set_escdelay
59.Nd curses input stream routines 60.Nd curses input stream routines
60.Sh LIBRARY 61.Sh LIBRARY
61.Lb libcurses 62.Lb libcurses
62.Sh SYNOPSIS 63.Sh SYNOPSIS
63.In curses.h 64.In curses.h
64.Ft int 65.Ft int
65.Fn getch "void" 66.Fn getch "void"
66.Ft int 67.Ft int
67.Fn wgetch "WINDOW *win" 68.Fn wgetch "WINDOW *win"
68.Ft int 69.Ft int
69.Fn mvgetch "int y" "int x" 70.Fn mvgetch "int y" "int x"
70.Ft int 71.Ft int
71.Fn mvwgetch "WINDOW *win" "int y" "int x" 72.Fn mvwgetch "WINDOW *win" "int y" "int x"
@@ -93,26 +94,28 @@ @@ -93,26 +94,28 @@
93.Fn mvwgetstr "WINDOW *win" "int y" "int x" "char *str" 94.Fn mvwgetstr "WINDOW *win" "int y" "int x" "char *str"
94.Ft int 95.Ft int
95.Fn keypad "WINDOW *win" "boolf flag" 96.Fn keypad "WINDOW *win" "boolf flag"
96.Ft int 97.Ft int
97.Fn notimeout "WINDOW *win" "boolf flag" 98.Fn notimeout "WINDOW *win" "boolf flag"
98.Ft int 99.Ft int
99.Fn timeout "int delay" 100.Fn timeout "int delay"
100.Ft int 101.Ft int
101.Fn wtimeout "WINDOW *win" "int delay" 102.Fn wtimeout "WINDOW *win" "int delay"
102.Ft int 103.Ft int
103.Fn nodelay "WINDOW *win" "boolf flag" 104.Fn nodelay "WINDOW *win" "boolf flag"
104.Ft int 105.Ft int
105.Fn ungetch "int c" 106.Fn ungetch "int c"
 107.Ft int
 108.Fn set_escdelay "int escdelay"
106.Pp 109.Pp
107.Va extern int ESCDELAY ; 110.Va extern int ESCDELAY ;
108.Sh DESCRIPTION 111.Sh DESCRIPTION
109These functions read characters and strings from the window input file 112These functions read characters and strings from the window input file
110descriptor. 113descriptor.
111.Pp 114.Pp
112The 115The
113.Fn getch 116.Fn getch
114function reads a character from the 117function reads a character from the
115.Dv stdscr 118.Dv stdscr
116input file descriptor and returns it. 119input file descriptor and returns it.
117If the 120If the
118.Fn keypad 121.Fn keypad
@@ -375,26 +378,33 @@ The default setting for the flag is @@ -375,26 +378,33 @@ The default setting for the flag is
375is equivalent to 378is equivalent to
376.Fn wtimeout win 0 379.Fn wtimeout win 0
377and 380and
378.Fn nodelay win FALSE 381.Fn nodelay win FALSE
379is equivalent to 382is equivalent to
380.Fn wtimeout win \-1 . 383.Fn wtimeout win \-1 .
381.Pp 384.Pp
382.Fn ungetch 385.Fn ungetch
383will convert 386will convert
384.Fa c 387.Fa c
385into an unsigned char and push that character back onto the input stream. 388into an unsigned char and push that character back onto the input stream.
386Only one character of push-back is guaranteed to work, more may be possible 389Only one character of push-back is guaranteed to work, more may be possible
387depending on system resources. 390depending on system resources.
 391.Pp
 392The
 393.Fn set_escdelay
 394function sets the
 395.Va ESCDELAY
 396value of the current screen to
 397.Fa escdelay.
388.Sh RETURN VALUES 398.Sh RETURN VALUES
389The functions 399The functions
390.Fn getch , 400.Fn getch ,
391.Fn wgetch , 401.Fn wgetch ,
392.Fn mvgetch , 402.Fn mvgetch ,
393and 403and
394.Fn mvwgetch 404.Fn mvwgetch
395will return the value of the key pressed or 405will return the value of the key pressed or
396.Dv ERR 406.Dv ERR
397in the case of an error or a timeout. 407in the case of an error or a timeout.
398Additionally, if 408Additionally, if
399.Fn keypad TRUE 409.Fn keypad TRUE
400has been called on a window, then it may return one of the following values: 410has been called on a window, then it may return one of the following values:
@@ -582,13 +592,20 @@ The @@ -582,13 +592,20 @@ The
582Curses library complies with the X/Open Curses specification, part of the 592Curses library complies with the X/Open Curses specification, part of the
583Single Unix Specification. 593Single Unix Specification.
584.Sh NOTES 594.Sh NOTES
585The 595The
586.Fn keyok 596.Fn keyok
587and 597and
588.Fn define_key 598.Fn define_key
589functions are implementations of extensions made by the NCurses library 599functions are implementations of extensions made by the NCurses library
590to the Curses standard. 600to the Curses standard.
591Portable implementations should avoid the use of these functions. 601Portable implementations should avoid the use of these functions.
592.Sh HISTORY 602.Sh HISTORY
593The Curses package appeared in 603The Curses package appeared in
594.Bx 4.0 . 604.Bx 4.0 .
 605The
 606.Fn set_tabsize
 607function is a
 608.Em ncurses
 609extension to the Curses library and was added in
 610.Nx 8.0 .
 611

cvs diff -r1.55 -r1.56 src/lib/libcurses/curses_private.h (expand / switch to unified diff)

--- src/lib/libcurses/curses_private.h 2017/01/03 12:42:06 1.55
+++ src/lib/libcurses/curses_private.h 2017/01/05 20:31:37 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: curses_private.h,v 1.55 2017/01/03 12:42:06 roy Exp $ */ 1/* $NetBSD: curses_private.h,v 1.56 2017/01/05 20:31:37 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.
@@ -191,27 +191,30 @@ typedef struct keymap keymap_t; @@ -191,27 +191,30 @@ typedef struct keymap keymap_t;
191 191
192/* this is the encapsulation of the terminal definition, one for 192/* this is the encapsulation of the terminal definition, one for
193 * each terminal that curses talks to. 193 * each terminal that curses talks to.
194 */ 194 */
195struct __screen { 195struct __screen {
196 FILE *infd, *outfd; /* input and output file descriptors */ 196 FILE *infd, *outfd; /* input and output file descriptors */
197 WINDOW *curscr; /* Current screen. */ 197 WINDOW *curscr; /* Current screen. */
198 WINDOW *stdscr; /* Standard screen. */ 198 WINDOW *stdscr; /* Standard screen. */
199 WINDOW *__virtscr; /* Virtual screen (for doupdate()). */ 199 WINDOW *__virtscr; /* Virtual screen (for doupdate()). */
200 int curwin; /* current window for refresh */ 200 int curwin; /* current window for refresh */
201 int lx, ly; /* loop parameters for refresh */ 201 int lx, ly; /* loop parameters for refresh */
202 int COLS; /* Columns on the screen. */ 202 int COLS; /* Columns on the screen. */
203 int LINES; /* Lines on the screen. */ 203 int LINES; /* Lines on the screen. */
 204 int ESCDELAY; /* Delay between keys in esc seq's. */
 205#define ESCDELAY_DEFAULT 300 /* milliseconds. */
204 int TABSIZE; /* Size of a tab. */ 206 int TABSIZE; /* Size of a tab. */
 207#define TABSIZE_DEFAULT 8 /* spaces. */
205 int COLORS; /* Maximum colors on the screen */ 208 int COLORS; /* Maximum colors on the screen */
206 int COLOR_PAIRS; /* Maximum color pairs on the screen */ 209 int COLOR_PAIRS; /* Maximum color pairs on the screen */
207 int My_term; /* Use Def_term regardless. */ 210 int My_term; /* Use Def_term regardless. */
208 char GT; /* Gtty indicates tabs. */ 211 char GT; /* Gtty indicates tabs. */
209 char NONL; /* Term can't hack LF doing a CR. */ 212 char NONL; /* Term can't hack LF doing a CR. */
210 char UPPERCASE; /* Terminal is uppercase only. */ 213 char UPPERCASE; /* Terminal is uppercase only. */
211 214
212 chtype acs_char[NUM_ACS]; 215 chtype acs_char[NUM_ACS];
213#ifdef HAVE_WCHAR 216#ifdef HAVE_WCHAR
214 cchar_t wacs_char[ NUM_ACS ]; 217 cchar_t wacs_char[ NUM_ACS ];
215#endif /* HAVE_WCHAR */ 218#endif /* HAVE_WCHAR */
216 struct __color colours[MAX_COLORS]; 219 struct __color colours[MAX_COLORS];
217 struct __pair colour_pairs[MAX_PAIRS]; 220 struct __pair colour_pairs[MAX_PAIRS];

cvs diff -r1.19 -r1.20 src/lib/libcurses/curses_screen.3 (expand / switch to unified diff)

--- src/lib/libcurses/curses_screen.3 2017/01/05 12:35:41 1.19
+++ src/lib/libcurses/curses_screen.3 2017/01/05 20:31:37 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: curses_screen.3,v 1.19 2017/01/05 12:35:41 wiz Exp $ 1.\" $NetBSD: curses_screen.3,v 1.20 2017/01/05 20:31:37 roy Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 3.\" Copyright (c) 2002
4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
5.\" 5.\"
6.\" This code is donated to the NetBSD Foundation by the Author. 6.\" This code is donated to the NetBSD Foundation by the Author.
7.\" 7.\"
8.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
10.\" are met: 10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright 11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer. 12.\" notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 14.\" notice, this list of conditions and the following disclaimer in the
@@ -20,66 +20,69 @@ @@ -20,66 +20,69 @@
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" 32.\"
33.Dd December 30, 2016 33.Dd January 5, 2017
34.Dt CURSES_SCREEN 3 34.Dt CURSES_SCREEN 3
35.Os 35.Os
36.Sh NAME 36.Sh NAME
37.Nm curses_screen , 37.Nm curses_screen ,
38.Nm filter , 38.Nm filter ,
39.Nm use_env , 39.Nm use_env ,
40.Nm newterm , 40.Nm newterm ,
41.Nm set_term , 41.Nm set_term ,
42.Nm delscreen , 42.Nm delscreen ,
43.Nm endwin , 43.Nm endwin ,
44.Nm initscr , 44.Nm initscr ,
45.Nm isendwin , 45.Nm isendwin ,
46.Nm resizeterm , 46.Nm resizeterm ,
47.Nm setterm 47.Nm setterm ,
 48.Nm set_tabsize
48.Nd curses terminal and screen routines 49.Nd curses terminal and screen routines
49.Sh LIBRARY 50.Sh LIBRARY
50.Lb libcurses 51.Lb libcurses
51.Sh SYNOPSIS 52.Sh SYNOPSIS
52.In curses.h 53.In curses.h
53.Ft void 54.Ft void
54.Fn filter "void" 55.Fn filter "void"
55.Ft void 56.Ft void
56.Fn use_env "bool value" 57.Fn use_env "bool value"
57.Ft SCREEN * 58.Ft SCREEN *
58.Fn newterm "char *type" "FILE *outfd" "FILE *infd" 59.Fn newterm "char *type" "FILE *outfd" "FILE *infd"
59.Ft SCREEN * 60.Ft SCREEN *
60.Fn set_term "SCREEN *screen" 61.Fn set_term "SCREEN *screen"
61.Ft void 62.Ft void
62.Fn delscreen "SCREEN *screen" 63.Fn delscreen "SCREEN *screen"
63.Ft int 64.Ft int
64.Fn endwin "void" 65.Fn endwin "void"
65.Ft WINDOW * 66.Ft WINDOW *
66.Fn initscr "void" 67.Fn initscr "void"
67.Ft bool 68.Ft bool
68.Fn isendwin "void" 69.Fn isendwin "void"
69.Ft int 70.Ft int
70.Fn resizeterm "int lines" "int cols" 71.Fn resizeterm "int lines" "int cols"
71.Ft int 72.Ft int
72.Fn setterm "char *name" 73.Fn setterm "char *name"
 74.Ft int
 75.Fn set_tabsize "int value"
73.Pp 76.Pp
74.Va extern int LINES ; 77.Va extern int LINES ;
75.Pp 78.Pp
76.Va extern int COLS ; 79.Va extern int COLS ;
77.Sh DESCRIPTION 80.Sh DESCRIPTION
78These functions initialize terminals and screens. 81These functions initialize terminals and screens.
79.Pp 82.Pp
80The 83The
81.Fn newterm 84.Fn newterm
82function initialises the curses data structures and pointers ready for 85function initialises the curses data structures and pointers ready for
83use by curses. 86use by curses.
84The 87The
85.Fa type 88.Fa type
@@ -199,26 +202,33 @@ The @@ -199,26 +202,33 @@ The
199function determines whether the environment variables 202function determines whether the environment variables
200.Ev LINES 203.Ev LINES
201and 204and
202.Ev COLUMNS 205.Ev COLUMNS
203override the normal values. 206override the normal values.
204The default is true. 207The default is true.
205Any call to 208Any call to
206.Fn use_env 209.Fn use_env
207must precede calls to 210must precede calls to
208.Fn initscr , 211.Fn initscr ,
209.Fn newterm , 212.Fn newterm ,
210or 213or
211.Fn setupterm . 214.Fn setupterm .
 215.Pp
 216The
 217.Fn set_tabsize
 218function will set
 219.Va TABSIZE
 220of the current screen to
 221.Va tabsize .
212.Sh RETURN VALUES 222.Sh RETURN VALUES
213Functions returning pointers will return 223Functions returning pointers will return
214.Dv NULL 224.Dv NULL
215if an error is detected. 225if an error is detected.
216The functions that return an int will return one of the following 226The functions that return an int will return one of the following
217values: 227values:
218.Pp 228.Pp
219.Bl -tag -width ERR -compact 229.Bl -tag -width ERR -compact
220.It Er OK 230.It Er OK
221The function completed successfully. 231The function completed successfully.
222.It Er ERR 232.It Er ERR
223An error occurred in the function. 233An error occurred in the function.
224.El 234.El
@@ -231,13 +241,19 @@ An error occurred in the function. @@ -231,13 +241,19 @@ An error occurred in the function.
231The 241The
232.Nx 242.Nx
233Curses library complies with the X/Open Curses specification, part of the 243Curses library complies with the X/Open Curses specification, part of the
234Single Unix Specification. 244Single Unix Specification.
235.Sh HISTORY 245.Sh HISTORY
236The Curses package appeared in 246The Curses package appeared in
237.Bx 4.0 . 247.Bx 4.0 .
238The 248The
239.Fn resizeterm 249.Fn resizeterm
240function is a 250function is a
241.Em ncurses 251.Em ncurses
242extension to the Curses library and was added in 252extension to the Curses library and was added in
243.Nx 1.6 . 253.Nx 1.6 .
 254The
 255.Fn set_tabsize
 256function is a
 257.Em ncurses
 258extension to the Curses library and was added in
 259.Nx 8.0 .

cvs diff -r1.10 -r1.11 src/lib/libcurses/get_wch.c (expand / switch to unified diff)

--- src/lib/libcurses/get_wch.c 2012/06/29 10:40:29 1.10
+++ src/lib/libcurses/get_wch.c 2017/01/05 20:31:37 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $ */ 1/* $NetBSD: get_wch.c,v 1.11 2017/01/05 20:31:37 roy Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 The NetBSD Foundation Inc. 4 * Copyright (c) 2005 The NetBSD Foundation Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from code donated to the NetBSD Foundation 7 * This code is derived from code donated to the NetBSD Foundation
8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>. 8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>.
9 * 9 *
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38#ifndef lint 38#ifndef lint
39__RCSID("$NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $"); 39__RCSID("$NetBSD: get_wch.c,v 1.11 2017/01/05 20:31:37 roy Exp $");
40#endif /* not lint */ 40#endif /* not lint */
41 41
42#include <string.h> 42#include <string.h>
43#include <stdlib.h> 43#include <stdlib.h>
44#include <unistd.h> 44#include <unistd.h>
45#include <stdio.h> 45#include <stdio.h>
46#include "curses.h" 46#include "curses.h"
47#include "curses_private.h" 47#include "curses_private.h"
48#include "keymap.h" 48#include "keymap.h"
49 49
50#ifdef HAVE_WCHAR 50#ifdef HAVE_WCHAR
51static short wstate; /* state of the wcinkey function */ 51static short wstate; /* state of the wcinkey function */
52#endif /* HAVE_WCHAR */ 52#endif /* HAVE_WCHAR */
@@ -81,26 +81,27 @@ __init_get_wch(SCREEN *screen) @@ -81,26 +81,27 @@ __init_get_wch(SCREEN *screen)
81 */ 81 */
82static int 82static int
83inkey(wchar_t *wc, int to, int delay) 83inkey(wchar_t *wc, int to, int delay)
84{ 84{
85 wchar_t k = 0; 85 wchar_t k = 0;
86 int c, mapping, ret = 0; 86 int c, mapping, ret = 0;
87 size_t mlen = 0; 87 size_t mlen = 0;
88 keymap_t *current = _cursesi_screen->base_keymap; 88 keymap_t *current = _cursesi_screen->base_keymap;
89 FILE *infd = _cursesi_screen->infd; 89 FILE *infd = _cursesi_screen->infd;
90 int *start = &_cursesi_screen->cbuf_head, 90 int *start = &_cursesi_screen->cbuf_head,
91 *working = &_cursesi_screen->cbuf_cur, 91 *working = &_cursesi_screen->cbuf_cur,
92 *end = &_cursesi_screen->cbuf_tail; 92 *end = &_cursesi_screen->cbuf_tail;
93 char *inbuf = &_cursesi_screen->cbuf[ 0 ]; 93 char *inbuf = &_cursesi_screen->cbuf[ 0 ];
 94 int escdelay = _cursesi_screen->ESCDELAY;
94 95
95#ifdef DEBUG 96#ifdef DEBUG
96 __CTRACE(__CTRACE_INPUT, "inkey (%p, %d, %d)\n", wc, to, delay); 97 __CTRACE(__CTRACE_INPUT, "inkey (%p, %d, %d)\n", wc, to, delay);
97#endif 98#endif
98 for (;;) { /* loop until we get a complete key sequence */ 99 for (;;) { /* loop until we get a complete key sequence */
99 if (wstate == INKEY_NORM) { 100 if (wstate == INKEY_NORM) {
100 if (delay && __timeout(delay) == ERR) 101 if (delay && __timeout(delay) == ERR)
101 return ERR; 102 return ERR;
102 c = fgetc(infd); 103 c = fgetc(infd);
103 if (c == WEOF) { 104 if (c == WEOF) {
104 clearerr(infd); 105 clearerr(infd);
105 return ERR; 106 return ERR;
106 } 107 }
@@ -129,31 +130,31 @@ inkey(wchar_t *wc, int to, int delay) @@ -129,31 +130,31 @@ inkey(wchar_t *wc, int to, int delay)
129 if (*working == *end) { /* see if run out of keys */ 130 if (*working == *end) { /* see if run out of keys */
130 /* if so, switch to assembling */ 131 /* if so, switch to assembling */
131 wstate = INKEY_ASSEMBLING; 132 wstate = INKEY_ASSEMBLING;
132#ifdef DEBUG 133#ifdef DEBUG
133 __CTRACE(__CTRACE_INPUT, 134 __CTRACE(__CTRACE_INPUT,
134 "inkey: BACKOUT=>ASSEMBLING, start(%d), " 135 "inkey: BACKOUT=>ASSEMBLING, start(%d), "
135 "current(%d), end(%d)\n", 136 "current(%d), end(%d)\n",
136 *start, *working, *end); 137 *start, *working, *end);
137#endif /* DEBUG */ 138#endif /* DEBUG */
138 } 139 }
139 } else if (wstate == INKEY_ASSEMBLING) { 140 } else if (wstate == INKEY_ASSEMBLING) {
140 /* assembling a key sequence */ 141 /* assembling a key sequence */
141 if (delay) { 142 if (delay) {
142 if (__timeout(to ? (ESCDELAY / 100) : delay) 143 if (__timeout(to ? (escdelay / 100) : delay)
143 == ERR) 144 == ERR)
144 return ERR; 145 return ERR;
145 } else { 146 } else {
146 if (to && (__timeout(ESCDELAY / 100) == ERR)) 147 if (to && (__timeout(escdelay / 100) == ERR))
147 return ERR; 148 return ERR;
148 } 149 }
149 150
150 c = fgetc(infd); 151 c = fgetc(infd);
151 if (ferror(infd)) { 152 if (ferror(infd)) {
152 clearerr(infd); 153 clearerr(infd);
153 return ERR; 154 return ERR;
154 } 155 }
155 156
156 if ((to || delay) && (__notimeout() == ERR)) 157 if ((to || delay) && (__notimeout() == ERR))
157 return ERR; 158 return ERR;
158 159
159 k = (wchar_t) c; 160 k = (wchar_t) c;
@@ -179,31 +180,31 @@ inkey(wchar_t *wc, int to, int delay) @@ -179,31 +180,31 @@ inkey(wchar_t *wc, int to, int delay)
179 inbuf[ *end ] = k; 180 inbuf[ *end ] = k;
180 *working = *end; 181 *working = *end;
181 *end = ( *end + 1 ) % MAX_CBUF_SIZE; 182 *end = ( *end + 1 ) % MAX_CBUF_SIZE;
182#ifdef DEBUG 183#ifdef DEBUG
183 __CTRACE(__CTRACE_INPUT, 184 __CTRACE(__CTRACE_INPUT,
184 "inkey: ASSEMBLING: start(%d), " 185 "inkey: ASSEMBLING: start(%d), "
185 "current(%d), end(%d)", 186 "current(%d), end(%d)",
186 *start, *working, *end); 187 *start, *working, *end);
187#endif /* DEBUG */ 188#endif /* DEBUG */
188 } 189 }
189 } else if (wstate == INKEY_WCASSEMBLING) { 190 } else if (wstate == INKEY_WCASSEMBLING) {
190 /* assembling a wide-char sequence */ 191 /* assembling a wide-char sequence */
191 if (delay) { 192 if (delay) {
192 if (__timeout(to ? (ESCDELAY / 100) : delay) 193 if (__timeout(to ? (escdelay / 100) : delay)
193 == ERR) 194 == ERR)
194 return ERR; 195 return ERR;
195 } else { 196 } else {
196 if (to && (__timeout(ESCDELAY / 100) == ERR)) 197 if (to && (__timeout(escdelay / 100) == ERR))
197 return ERR; 198 return ERR;
198 } 199 }
199 200
200 c = fgetc(infd); 201 c = fgetc(infd);
201 if (ferror(infd)) { 202 if (ferror(infd)) {
202 clearerr(infd); 203 clearerr(infd);
203 return ERR; 204 return ERR;
204 } 205 }
205 206
206 if ((to || delay) && (__notimeout() == ERR)) 207 if ((to || delay) && (__notimeout() == ERR))
207 return ERR; 208 return ERR;
208 209
209 k = (wchar_t) c; 210 k = (wchar_t) c;

cvs diff -r1.60 -r1.61 src/lib/libcurses/getch.c (expand / switch to unified diff)

--- src/lib/libcurses/getch.c 2017/01/01 03:06:06 1.60
+++ src/lib/libcurses/getch.c 2017/01/05 20:31:37 1.61
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: getch.c,v 1.60 2017/01/01 03:06:06 roy Exp $ */ 1/* $NetBSD: getch.c,v 1.61 2017/01/05 20:31:37 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
35static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94"; 35static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94";
36#else 36#else
37__RCSID("$NetBSD: getch.c,v 1.60 2017/01/01 03:06:06 roy Exp $"); 37__RCSID("$NetBSD: getch.c,v 1.61 2017/01/05 20:31:37 roy Exp $");
38#endif 38#endif
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#include <string.h> 41#include <string.h>
42#include <stdlib.h> 42#include <stdlib.h>
43#include <unistd.h> 43#include <unistd.h>
44#include <stdio.h> 44#include <stdio.h>
45#include "curses.h" 45#include "curses.h"
46#include "curses_private.h" 46#include "curses_private.h"
47#include "keymap.h" 47#include "keymap.h"
48 48
49short state; /* state of the inkey function */ 49short state; /* state of the inkey function */
50 50
@@ -193,27 +193,27 @@ static const struct tcdata tc[] = { @@ -193,27 +193,27 @@ static const struct tcdata tc[] = {
193 {TICODE_krmir, KEY_EIC}, 193 {TICODE_krmir, KEY_EIC},
194 {TICODE_knp, KEY_NPAGE}, 194 {TICODE_knp, KEY_NPAGE},
195 {TICODE_kpp, KEY_PPAGE}, 195 {TICODE_kpp, KEY_PPAGE},
196 {TICODE_kri, KEY_SR}, 196 {TICODE_kri, KEY_SR},
197 {TICODE_kcuf1, KEY_RIGHT}, 197 {TICODE_kcuf1, KEY_RIGHT},
198 {TICODE_ked, KEY_EOS}, 198 {TICODE_ked, KEY_EOS},
199 {TICODE_khts, KEY_STAB}, 199 {TICODE_khts, KEY_STAB},
200 {TICODE_kctab, KEY_CTAB}, 200 {TICODE_kctab, KEY_CTAB},
201 {TICODE_kcuu1, KEY_UP} 201 {TICODE_kcuu1, KEY_UP}
202}; 202};
203/* Number of TC entries .... */ 203/* Number of TC entries .... */
204static const int num_tcs = (sizeof(tc) / sizeof(struct tcdata)); 204static const int num_tcs = (sizeof(tc) / sizeof(struct tcdata));
205 205
206int ESCDELAY = 300; /* Delay in ms between keys for esc seq's */ 206int ESCDELAY; /* Delay in ms between keys for esc seq's */
207 207
208/* Key buffer */ 208/* Key buffer */
209#define INBUF_SZ 16 /* size of key buffer - must be larger than 209#define INBUF_SZ 16 /* size of key buffer - must be larger than
210 * longest multi-key sequence */ 210 * longest multi-key sequence */
211static wchar_t inbuf[INBUF_SZ]; 211static wchar_t inbuf[INBUF_SZ];
212static int start, end, working; /* pointers for manipulating inbuf data */ 212static int start, end, working; /* pointers for manipulating inbuf data */
213 213
214/* prototypes for private functions */ 214/* prototypes for private functions */
215static void add_key_sequence(SCREEN *screen, char *sequence, int key_type); 215static void add_key_sequence(SCREEN *screen, char *sequence, int key_type);
216static key_entry_t *add_new_key(keymap_t *current, char ch, int key_type, 216static key_entry_t *add_new_key(keymap_t *current, char ch, int key_type,
217 int symbol); 217 int symbol);
218static void delete_key_sequence(keymap_t *current, int key_type); 218static void delete_key_sequence(keymap_t *current, int key_type);
219static void do_keyok(keymap_t *current, int key_type, bool set, bool flag, 219static void do_keyok(keymap_t *current, int key_type, bool set, bool flag,
@@ -540,26 +540,27 @@ new_key(void) @@ -540,26 +540,27 @@ new_key(void)
540/* 540/*
541 * inkey - do the work to process keyboard input, check for multi-key 541 * inkey - do the work to process keyboard input, check for multi-key
542 * sequences and return the appropriate symbol if we get a match. 542 * sequences and return the appropriate symbol if we get a match.
543 * 543 *
544 */ 544 */
545 545
546wchar_t 546wchar_t
547inkey(int to, int delay) 547inkey(int to, int delay)
548{ 548{
549 wchar_t k; 549 wchar_t k;
550 int c, mapping; 550 int c, mapping;
551 keymap_t *current = _cursesi_screen->base_keymap; 551 keymap_t *current = _cursesi_screen->base_keymap;
552 FILE *infd = _cursesi_screen->infd; 552 FILE *infd = _cursesi_screen->infd;
 553 int escdelay = _cursesi_screen->ESCDELAY;
553 554
554 k = 0; /* XXX gcc -Wuninitialized */ 555 k = 0; /* XXX gcc -Wuninitialized */
555 556
556#ifdef DEBUG 557#ifdef DEBUG
557 __CTRACE(__CTRACE_INPUT, "inkey (%d, %d)\n", to, delay); 558 __CTRACE(__CTRACE_INPUT, "inkey (%d, %d)\n", to, delay);
558#endif 559#endif
559 for (;;) { /* loop until we get a complete key sequence */ 560 for (;;) { /* loop until we get a complete key sequence */
560reread: 561reread:
561 if (state == INKEY_NORM) { 562 if (state == INKEY_NORM) {
562 if (delay && __timeout(delay) == ERR) 563 if (delay && __timeout(delay) == ERR)
563 return ERR; 564 return ERR;
564 c = fgetc(infd); 565 c = fgetc(infd);
565 if (c == EOF) { 566 if (c == EOF) {
@@ -585,31 +586,31 @@ reread: @@ -585,31 +586,31 @@ reread:
585 } else if (state == INKEY_BACKOUT) { 586 } else if (state == INKEY_BACKOUT) {
586 k = inbuf[working]; 587 k = inbuf[working];
587 INC_POINTER(working); 588 INC_POINTER(working);
588 if (working == end) { /* see if we have run 589 if (working == end) { /* see if we have run
589 * out of keys in the 590 * out of keys in the
590 * backlog */ 591 * backlog */
591 592
592 /* if we have then switch to assembling */ 593 /* if we have then switch to assembling */
593 state = INKEY_ASSEMBLING; 594 state = INKEY_ASSEMBLING;
594 } 595 }
595 } else if (state == INKEY_ASSEMBLING) { 596 } else if (state == INKEY_ASSEMBLING) {
596 /* assembling a key sequence */ 597 /* assembling a key sequence */
597 if (delay) { 598 if (delay) {
598 if (__timeout(to ? (ESCDELAY / 100) : delay) 599 if (__timeout(to ? (escdelay / 100) : delay)
599 == ERR) 600 == ERR)
600 return ERR; 601 return ERR;
601 } else { 602 } else {
602 if (to && (__timeout(ESCDELAY / 100) == ERR)) 603 if (to && (__timeout(escdelay / 100) == ERR))
603 return ERR; 604 return ERR;
604 } 605 }
605 606
606 c = fgetc(infd); 607 c = fgetc(infd);
607 if (ferror(infd)) { 608 if (ferror(infd)) {
608 clearerr(infd); 609 clearerr(infd);
609 return ERR; 610 return ERR;
610 } 611 }
611 612
612 if ((to || delay) && (__notimeout() == ERR)) 613 if ((to || delay) && (__notimeout() == ERR))
613 return ERR; 614 return ERR;
614 615
615#ifdef DEBUG 616#ifdef DEBUG
@@ -967,13 +968,26 @@ __unget(wint_t c) @@ -967,13 +968,26 @@ __unget(wint_t c)
967 _cursesi_screen->unget_list[_cursesi_screen->unget_pos] = c; 968 _cursesi_screen->unget_list[_cursesi_screen->unget_pos] = c;
968 _cursesi_screen->unget_pos++; 969 _cursesi_screen->unget_pos++;
969 return OK; 970 return OK;
970} 971}
971 972
972int 973int
973has_key(int key_type) 974has_key(int key_type)
974{ 975{
975 int result = ERR; 976 int result = ERR;
976 977
977 do_keyok(_cursesi_screen->base_keymap, key_type, false, false, &result); 978 do_keyok(_cursesi_screen->base_keymap, key_type, false, false, &result);
978 return result; 979 return result;
979} 980}
 981
 982/*
 983 * set_escdelay --
 984 * Sets the escape delay for the current screen.
 985 */
 986int
 987set_escdelay(int escdelay)
 988{
 989
 990 _cursesi_screen->ESCDELAY = escdelay;
 991 ESCDELAY = escdelay;
 992 return OK;
 993}

cvs diff -r1.56 -r1.57 src/lib/libcurses/setterm.c (expand / switch to unified diff)

--- src/lib/libcurses/setterm.c 2016/12/31 17:46:35 1.56
+++ src/lib/libcurses/setterm.c 2017/01/05 20:31:37 1.57
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: setterm.c,v 1.56 2016/12/31 17:46:35 roy Exp $ */ 1/* $NetBSD: setterm.c,v 1.57 2017/01/05 20:31:37 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
35static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94"; 35static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
36#else 36#else
37__RCSID("$NetBSD: setterm.c,v 1.56 2016/12/31 17:46:35 roy Exp $"); 37__RCSID("$NetBSD: setterm.c,v 1.57 2017/01/05 20:31:37 roy Exp $");
38#endif 38#endif
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#include <sys/ioctl.h> /* TIOCGWINSZ on old systems. */ 41#include <sys/ioctl.h> /* TIOCGWINSZ on old systems. */
42 42
43#include <stdlib.h> 43#include <stdlib.h>
44#include <string.h> 44#include <string.h>
45#include <termios.h> 45#include <termios.h>
46#include <unistd.h> 46#include <unistd.h>
47 47
48#include "curses.h" 48#include "curses.h"
49#include "curses_private.h" 49#include "curses_private.h"
50 50
@@ -124,41 +124,44 @@ _cursesi_setterm(char *type, SCREEN *scr @@ -124,41 +124,44 @@ _cursesi_setterm(char *type, SCREEN *scr
124 } 124 }
125#ifdef DEBUG 125#ifdef DEBUG
126 __CTRACE(__CTRACE_INIT, "setterm: filtered %d", screen->filtered); 126 __CTRACE(__CTRACE_INIT, "setterm: filtered %d", screen->filtered);
127#endif 127#endif
128 128
129 /* POSIX 1003.2 requires that the environment override. */ 129 /* POSIX 1003.2 requires that the environment override. */
130 if (__use_env) { 130 if (__use_env) {
131 if (!screen->filtered && (p = getenv("LINES")) != NULL) 131 if (!screen->filtered && (p = getenv("LINES")) != NULL)
132 screen->LINES = (int) strtol(p, NULL, 0); 132 screen->LINES = (int) strtol(p, NULL, 0);
133 if ((p = getenv("COLUMNS")) != NULL) 133 if ((p = getenv("COLUMNS")) != NULL)
134 screen->COLS = (int) strtol(p, NULL, 0); 134 screen->COLS = (int) strtol(p, NULL, 0);
135 } 135 }
136 if ((p = getenv("ESCDELAY")) != NULL) 136 if ((p = getenv("ESCDELAY")) != NULL)
137 ESCDELAY = (int) strtol(p, NULL, 0); 137 screen->ESCDELAY = (int) strtol(p, NULL, 0);
 138 else
 139 screen->ESCDELAY = ESCDELAY_DEFAULT;
138 if ((p = getenv("TABSIZE")) != NULL) 140 if ((p = getenv("TABSIZE")) != NULL)
139 screen->TABSIZE = (int) strtol(p, NULL, 0); 141 screen->TABSIZE = (int) strtol(p, NULL, 0);
140 else if (t_init_tabs(screen->term) >= 0) 142 else if (t_init_tabs(screen->term) >= 0)
141 screen->TABSIZE = (int) t_init_tabs(screen->term); 143 screen->TABSIZE = (int) t_init_tabs(screen->term);
142 else 144 else
143 screen->TABSIZE = 8; 145 screen->TABSIZE = TABSIZE_DEFAULT;
144 /* 146 /*
145 * Want cols > 4, otherwise things will fail. 147 * Want cols > 4, otherwise things will fail.
146 */ 148 */
147 if (screen->COLS <= 4) 149 if (screen->COLS <= 4)
148 return (ERR); 150 return (ERR);
149 151
150 LINES = screen->LINES; 152 LINES = screen->LINES;
151 COLS = screen->COLS; 153 COLS = screen->COLS;
 154 ESCDELAY = screen->ESCDELAY;
152 TABSIZE = screen->TABSIZE; 155 TABSIZE = screen->TABSIZE;
153 156
154#ifdef DEBUG 157#ifdef DEBUG
155 __CTRACE(__CTRACE_INIT, 158 __CTRACE(__CTRACE_INIT,
156 "setterm: LINES = %d, COLS = %d, TABSIZE = %d\n", 159 "setterm: LINES = %d, COLS = %d, TABSIZE = %d\n",
157 LINES, COLS, TABSIZE); 160 LINES, COLS, TABSIZE);
158#endif 161#endif
159 162
160 /* 163 /*
161 * set the pad char, only take the first char of the pc capability 164 * set the pad char, only take the first char of the pc capability
162 * as this is all we can use. 165 * as this is all we can use.
163 */ 166 */
164 screen->padchar = t_pad_char(screen->term) ? 167 screen->padchar = t_pad_char(screen->term) ?
@@ -270,26 +273,27 @@ _cursesi_setterm(char *type, SCREEN *scr @@ -270,26 +273,27 @@ _cursesi_setterm(char *type, SCREEN *scr
270} 273}
271 274
272/* 275/*
273 * _cursesi_resetterm -- 276 * _cursesi_resetterm --
274 * Copy the terminal instance data for the given screen to the global 277 * Copy the terminal instance data for the given screen to the global
275 * variables. 278 * variables.
276 */ 279 */
277void 280void
278_cursesi_resetterm(SCREEN *screen) 281_cursesi_resetterm(SCREEN *screen)
279{ 282{
280 283
281 LINES = screen->LINES; 284 LINES = screen->LINES;
282 COLS = screen->COLS; 285 COLS = screen->COLS;
 286 ESCDELAY = screen->ESCDELAY;
283 TABSIZE = screen->TABSIZE; 287 TABSIZE = screen->TABSIZE;
284 __GT = screen->GT; 288 __GT = screen->GT;
285 289
286 __noqch = screen->noqch; 290 __noqch = screen->noqch;
287 __mask_op = screen->mask_op; 291 __mask_op = screen->mask_op;
288 __mask_me = screen->mask_me; 292 __mask_me = screen->mask_me;
289 __mask_ue = screen->mask_ue; 293 __mask_ue = screen->mask_ue;
290 __mask_se = screen->mask_se; 294 __mask_se = screen->mask_se;
291 295
292 set_curterm(screen->term); 296 set_curterm(screen->term);
293} 297}
294 298
295/* 299/*
@@ -379,13 +383,26 @@ does_ctrl_o(const char *exit_cap, const  @@ -379,13 +383,26 @@ does_ctrl_o(const char *exit_cap, const
379 int l; 383 int l;
380 384
381#ifdef DEBUG 385#ifdef DEBUG
382 __CTRACE(__CTRACE_INIT, "does_ctrl_o: Testing %s for %s\n", eptr, aptr); 386 __CTRACE(__CTRACE_INIT, "does_ctrl_o: Testing %s for %s\n", eptr, aptr);
383#endif 387#endif
384 l = strlen(acs_cap); 388 l = strlen(acs_cap);
385 while (*eptr != 0) { 389 while (*eptr != 0) {
386 if (!strncmp(eptr, aptr, l)) 390 if (!strncmp(eptr, aptr, l))
387 return 1; 391 return 1;
388 eptr++; 392 eptr++;
389 } 393 }
390 return 0; 394 return 0;
391} 395}
 396
 397/*
 398 * set_tabsize --
 399 * Sets the tabsize for the current screen.
 400 */
 401int
 402set_tabsize(int tabsize)
 403{
 404
 405 _cursesi_screen->TABSIZE = tabsize;
 406 TABSIZE = tabsize;
 407 return OK;
 408}